This documentation is for older software versions (up to 3.1.29). If you have software version 3.1.30 or higher, go to MODERN Home |
---|
(Classic) Light schedule - Dusk/Dawn
Define actions based on pre-defined schedules using the Light Scheduler node. This functionality is based on astronomical hours of dusks and dawns.
Flow
[{"id":"2dd64d2ffc858f6c","type":"light-scheduler","z":"ab392f0dc3f60eae","settings":"b17a207d2a6309f3","events":"[{\"start\":{\"dow\":1,\"mod\":1270},\"end\":{\"dow\":2,\"mod\":0}},{\"start\":{\"dow\":2,\"mod\":1270},\"end\":{\"dow\":3,\"mod\":0}},{\"start\":{\"dow\":3,\"mod\":1270},\"end\":{\"dow\":4,\"mod\":0}},{\"start\":{\"dow\":4,\"mod\":1270},\"end\":{\"dow\":5,\"mod\":0}},{\"start\":{\"dow\":5,\"mod\":1270},\"end\":{\"dow\":6,\"mod\":0}},{\"start\":{\"dow\":6,\"mod\":1270},\"end\":{\"dow\":0,\"mod\":0}},{\"start\":{\"dow\":0,\"mod\":1270},\"end\":{\"dow\":1,\"mod\":0}},{\"start\":{\"dow\":1,\"mod\":0},\"end\":{\"dow\":1,\"mod\":365}},{\"start\":{\"dow\":2,\"mod\":0},\"end\":{\"dow\":2,\"mod\":365}},{\"start\":{\"dow\":4,\"mod\":0},\"end\":{\"dow\":4,\"mod\":365}},{\"start\":{\"dow\":3,\"mod\":0},\"end\":{\"dow\":3,\"mod\":365}},{\"start\":{\"dow\":5,\"mod\":0},\"end\":{\"dow\":5,\"mod\":365}},{\"start\":{\"dow\":6,\"mod\":0},\"end\":{\"dow\":6,\"mod\":365}},{\"start\":{\"dow\":0,\"mod\":0},\"end\":{\"dow\":0,\"mod\":365}}]","topic":"","name":"","onPayload":"100","onPayloadType":"num","offPayload":"0","offPayloadType":"num","onlyWhenDark":true,"scheduleRndMax":"","sunElevationThreshold":"-18","sunShowElevationInStatus":true,"outputfreq":"output.statechange.startup","x":740,"y":340,"wires":[["4aef42ead51468c5"]]},{"id":"5f0490d247784132","type":"vertex cluster","z":"ab392f0dc3f60eae","rate":90,"x":1250,"y":340,"wires":[]},{"id":"2e6a0a7c7e7138e4","type":"comment","z":"ab392f0dc3f60eae","name":"Setting shedule","info":"","x":740,"y":300,"wires":[]},{"id":"c0276ce44e5a63dc","type":"comment","z":"ab392f0dc3f60eae","name":"Direct value","info":"","x":990,"y":300,"wires":[]},{"id":"4aef42ead51468c5","type":"vertex action","z":"ab392f0dc3f60eae","name":"","typeButton":"directv","bPayload":{"action":"setbrightness","group":"3f27ccfea1c114f791557e1328f9d924","param":0,"priority":"254"},"bState":"","defaultpriority":true,"x":990,"y":340,"wires":[["5f0490d247784132"]]},{"id":"1d0882e570252d87","type":"inject","z":"ab392f0dc3f60eae","name":"","props":[{"p":"payload"},{"p":"topic","v":"","vt":"date"}],"repeat":"","crontab":"","once":true,"onceDelay":"10","topic":"","payload":"light-only","payloadType":"str","x":320,"y":340,"wires":[["2dd64d2ffc858f6c"]]},{"id":"6652701141623cd0","type":"comment","z":"ab392f0dc3f60eae","name":"Inject with light-only payload and timestamp topic","info":"","x":420,"y":300,"wires":[]},{"id":"b17a207d2a6309f3","type":"light-scheduler-settings","name":"test","latitude":"50.049272","longitude":"19.957367"}]
Instructions
Find the following nodes in the palette on the left side of the Node-RED:
Light Scheduler
inject
vertex action
vertex cluster
Drag the nodes and drop them onto the workspace.
Go to the Light Scheduler node, in the section Globals, select the icon with a pen.
3. Set the name, longitude and latitude of your investment/building.
4. Mark Output, On Payload and Off Payload as shown below.
This option ignores the schedule, leave this section blank.
5. Conditions of the Dusk/Dawn part should be set as shown in the screenshot below. Use Only when dark option and, in the Threshold field, -18o - Astronomical dawn / Night.
6. Go to the inject node and mark messages and the repeat interval as shown below.
7. Go to the vertex action node and choose direct value mode with action set brightness (scale percent).
8. Link all the nodes and select the Deploy button.