- send_last
npm install @fcunlimited/node-red-contrib-schedex00:00 ... 23:59 | 24hr time |
sunrise | sunrise (top edge of the sun appears on the horizon) |
sunriseEnd | sunrise ends (bottom edge of the sun touches the horizon) |
goldenHourEnd | morning golden hour (soft light, best time for photography) ends |
solarNoon | solar noon (sun is in the highest position) |
goldenHour | evening golden hour starts |
sunsetStart | sunset starts (bottom edge of the sun touches the horizon) |
sunset | sunset (sun disappears below the horizon, evening civil twilight starts) |
dusk | dusk (evening nautical twilight starts) |
nauticalDusk | nautical dusk (evening astronomical twilight starts) |
night | night starts (dark enough for astronomical observations) |
nadir | nadir (darkest moment of the night, sun is in the lowest position) |
nightEnd | night ends (morning astronomical twilight starts) |
nauticalDawn | nautical dawn (morning nautical twilight starts) |
dawn | dawn (morning nautical twilight ends, morning civil twilight starts) |
Passthrough unhandled messages is enabled, any message that isn't explicitly handled by Schedex will be immediately emitted.
Passthough unhandled messagesdisabled (the default), any message that isn't handled by Schedex will be dropped and an error reported.
msg.payload.
on | Triggers manual on mode and causes Schedex to emit the configured on event. Manual mode is reset when the next on or off time is reached |
off | Triggers manual off mode and causes Schedex to emit the configured off event. Manual mode is reset when the next on or off time is reached |
toggle | Triggers either the manual on or manual off mode. If the last event was the on event, toggle will cause schedex to emit the off event and vice versa. State is not maintained over restarts and deploys. Schedex assumes off upon start so the first toggle will emit the on event. |
info | Schedex emits an object containing the on and off times in UTC format. It also contains the state which is either on or off along with the rest of this node's configuration. Note that the output message contains the actuated state. This will be null (if an event hasn't happened yet) or 'on' or 'off'. |
info_local | Emits the information exactly the same as the info command but with the on and off times in local ISO format. |
send_state | Causes Schedex to emit the current state as a message with either the on or off topic/payload set. If Schedex is suspended, this command emits nothing. |
send_last | Causes Schedex to emit the last state inclusive manual changes as a message with either the on or off topic/payload set. If Schedex is suspended, this command emits nothing. |
msg.payload.suspended | Boolean: true will suspend scheduling, false will resume scheduling |
msg.payload.ontime | String value as specified in the table above for time configuration |
msg.payload.ontopic | String value emitted as the topic for the on event |
msg.payload.onpayload | String value emitted as the payload for the on event |
msg.payload.onoffset | Number value as specified above for Offset configuration |
msg.payload.onrandomoffset | Boolean value as specified above in Randomisation of Times |
msg.payload.offtime | String value as specified in the table above for time configuration |
msg.payload.offtopic | String value emitted as the topic for the off event |
msg.payload.offpayload | String value emitted as the payload for the off event |
msg.payload.offoffset | Number value as specified above for Offset configuration |
msg.payload.offrandomoffset | Boolean value as specified above in Randomisation of Times |
msg.payload.mon | Boolean: true enables the schedule on a Monday, false disables it. |
msg.payload.tue | Boolean: true enables the schedule on a Tuesday, false disables it. |
msg.payload.wed | Boolean: true enables the schedule on a Wednesday, false disables it. |
msg.payload.thu | Boolean: true enables the schedule on a Thursday, false disables it. |
msg.payload.fri | Boolean: true enables the schedule on a Friday, false disables it. |
msg.payload.sat | Boolean: true enables the schedule on a Saturday, false disables it. |
msg.payload.sun | Boolean: true enables the schedule on a Sunday, false disables it. |
msg.payload.passthroughunhandled | Boolean: true enables unhandled input messages to automatically be sent to output. |
suspended true | true will suspend scheduling, false will resume scheduling |
ontime 12:00 | Time as specified in the table above for time configuration |
ontopic my_topic | Sets the topic for the on event (no spaces) |
onpayload my_payload | Sets the payload for the on event (no spaces) |
onoffset 30 | Sets the offset for the on event |
onrandomoffset true | Sets the random offset for the on event |
offtime dusk | Time as specified in the table above for time configuration |
offtopic my_topic | Sets the topic for the off event (no spaces) |
offpayload my_payload | Sets the payload for the off event (no spaces) |
offoffset -30 | Sets the offset for the off event |
offrandomoffset false | Sets the random offset for the off event |
mon false | Disables the schedule on a Monday |
tue true | Enables the schedule on a Tuesday |
ontime 16:30 onoffset 60 onrandomoffset true | Sets the time, offset and random offset for the on event |
passthroughunhandled false | Disabled unhandled input messages automatically being sent to output |
node-red-contrib-config and drag a config node into your workspace. Configure the node to set a global variable called schedex
{"debug": true}. Also make sure that the config tickbox for active is unchecked. Redeploy. Now click the button on the config node.
schedex to write extra logging to the os syslog next time they're invoked.