@moddable-node-red/mcu_restart
Version:
Restart microcontroller for Node-RED MCU Edition
59 lines (45 loc) • 1.56 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('mcu_restart',{
category: 'MCU',
color: '#a2aaff',
defaults: {
name: {value:""},
moddable_manifest: {
value: {
include: "$(NODEREDMCU)/nodes/restart/manifest.json"
}
}
},
inputs:1,
outputs:0,
icon: "font-awesome/fa-rotate-left",
label() {
return this.name||"restart";
},
paletteLabel: 'restart',
});
</script>
<script type="text/html" data-template-name="mcu_restart">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/markdown" data-help-name="mcu_restart">
Restarts the MCU.
This node is designed for use with [Node-RED MCU Edition](https://github.com/phoddie/node-red-mcu).
### Inputs
: payload (any) : payload is not used
### Outputs
None
### Details
The MCU is restarted when any message is received. This is useful in many situations:
- Following the installation of an OTA update
- After changing global settings
- To restart long-running devices periodically
- In response to unexpected errors
When used in the Moddable SDK simulator (mcsim), the restart node exits the simulator.
### References
- [GitHub](https://github.com/phoddie/mcu_restart) - this node's repository on GitHub
- [Node-RED MCU Edition](https://github.com/phoddie/node-red-mcu) - the Node-RED MCU Edition repository
</script>