Light schedule

Schedule-based lighting control is particularly useful for automating lighting in spaces with predictable occupancy patterns, such as offices, classrooms, and retail stores. By defining schedules that align with typical occupancy hours, the Light Scheduler node can ensure that lights are turned on and off at appropriate times, optimizing energy efficiency and reducing operational costs. 

Import the ready made flow using the instructions here: or follow the instructions below.

[{"id":"a8e88fabb382b989","type":"light-scheduler","z":"a4a230cc1709cfb6","settings":"b17a207d2a6309f3","events":"[{\"start\":{\"dow\":3,\"mod\":455},\"end\":{\"dow\":3,\"mod\":805}},{\"start\":{\"dow\":4,\"mod\":455},\"end\":{\"dow\":4,\"mod\":805}},{\"start\":{\"dow\":5,\"mod\":455},\"end\":{\"dow\":5,\"mod\":805}},{\"start\":{\"dow\":1,\"mod\":455},\"end\":{\"dow\":1,\"mod\":805}},{\"start\":{\"dow\":6,\"mod\":455},\"end\":{\"dow\":6,\"mod\":805}},{\"start\":{\"dow\":2,\"mod\":455},\"end\":{\"dow\":2,\"mod\":805}}]","topic":"","name":"","onPayload":"100","onPayloadType":"num","offPayload":"0","offPayloadType":"num","onlyWhenDark":false,"scheduleRndMax":"","sunElevationThreshold":6,"sunShowElevationInStatus":false,"outputfreq":"output.statechange.startup","x":500,"y":400,"wires":[["ae856ada9407eb5a"]]},{"id":"ae856ada9407eb5a","type":"vertex action","z":"a4a230cc1709cfb6","name":"","typeButton":"directv","bPayload":{"action":"setbrightness","group":"95c5b32707068e426c23abc3506faaaa","param":0,"priority":"254"},"bState":"","defaultpriority":true,"x":830,"y":400,"wires":[["c80dcab05580ca8d"]]},{"id":"c80dcab05580ca8d","type":"vertex cluster","z":"a4a230cc1709cfb6","rate":90,"x":1110,"y":400,"wires":[]},{"id":"bb4dc71145d97f52","type":"comment","z":"a4a230cc1709cfb6","name":"Setting your shedule","info":"","x":510,"y":360,"wires":[]},{"id":"9804f2ea10567ae1","type":"comment","z":"a4a230cc1709cfb6","name":"Direct value","info":"","x":830,"y":360,"wires":[]},{"id":"b17a207d2a6309f3","type":"light-scheduler-settings","name":"test","latitude":"50.049272","longitude":"19.957367"}]

Step-by-step instructions

Find the following nodes in the palette on the left side of the Node-RED, drag them to your workspace and connect them as shown.

  • Light Scheduler

  • vertex action

  • vertex cluster

Go to the Light Scheduler node and in the Global section select the edit icon [1].

Add the longitude and latitude of your location. It can be random if you are just using the light scheduler. If you fail to provide this information Node RED will crash and you will have to do a factory reset!

 

In the calendar, click on Monday’s 8 AM. Then you can expand the bar by dragging it down. In this way, you set time schedule, for example from 8 AM to 1 PM [2]. In the Output section, mark fields as shown below. Make sure to mark the type of variable as number [3].

 

Go to the vertex action node and choose direct value mode [4]. Set brightness (scale percent) [5]. Remember to choose the Group you want to be operated [6].

 

Remember to save and click Deploy!

Light Scheduler sends it’s message on every vertex in cluster. When there is lot of vertexes on site it could cause heavy traffic on dali bus. So in this situation remember to use Filter by Vertex node before the Vertex Cluster node. It will limit message from scheduler to one vertex using the provided MAC address.

Â