UNPKG

node-red-contrib-ui-time-scheduler

Version:
69 lines (65 loc) 3.34 kB
<script type="text/x-red" data-help-name="ui_time_scheduler"> <p>A ui scheduler for the Node-RED Dashboard</p> <h3>Inputs</h3> <dl class="message-properties"> <dt>payload <span class="property-type">JSON string</span> </dt> <dd> any existing timers and settings (generated by the nodes top output) </dd> <dt>disableDevice <span class="property-type">number | string</span> </dt> <dd> the device name or index to disable </dd> <dt>enableDevice <span class="property-type">number | string</span> </dt> <dd> the device name or index to enable </dd> <dt>getStatus <span class="property-type">any</span> </dt> <dd> triggers the node to send its data to the top output </dd> </dl> <h3>Outputs</h3> <ol class="node-ports"> <li> Outputs new timers and settings <dl class="message-properties"> <dt>payload <span class="property-type">JSON string</span></dt> <dd>the modified or new time-schedule</dd> </dl> </li> <li> to N - Outputs timer (event) value <dl class="message-properties"> <dt>payload <span class="property-type">boolean | number | string</span></dt> <dd>true, false or any configured event, depening on your schedule</dd> </dl> <dl class="message-properties"> <dt>topic <span class="property-type">string</span></dt> <dd>the device name (if enabled)</dd> </dl> </li> </ol> <h3>Details</h3> <p> If you changed the node-red <a href="https://nodered.org/docs/user-guide/context#context-stores">contextStorage to localfilesystem</a>, schedules are automatically saved and restored after a reboot. Otherwise incoming <code>msg.payload</code> is used as the schedule data. You can use that to inject a predefined schedule after a certain event or just after a reboot. If there is no incoming payload or the incoming payload is not a valid schedule a new and empty schedule will be created. </p> <p> To create a new schedule click the nodes plus sign at the right top corner (at the frontend/dashboard) </p> <p> The section <code>Devices</code> must contain at least 1 device and offers the possibility to add many more. Every device has a node output and an independent schedule at the ui dashboard. </p> <p> The <code>Event Mode</code> allows you to define individual events instead of a schedule with fixed start and end time. </p> <p> The <code>Refresh</code> property adjusts the frequency of how often timers are evaluated (in seconds - default 60). </p> <p> If the <code>Single off</code> property is checked the node will only output "off" payloads at a timers defined end time. </p> <p> If the <code>Block</code> property is checked the node will only output anything if the current value is different from the previous value. The value after a deploy (or reboot) is "undefined". </p> <h3>References</h3> <ul> <li><a href="https://github.com/fellinga/node-red-contrib-ui-time-scheduler">GitHub</a> - the nodes github repository</li> </ul> </script>