Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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. 

Panel
panelIconId1f7e2
panelIcon:green_circle:
panelIconText🟢
bgColor#E3FCEF

Import the ready made flow using the instructions here: Importing a Node-RED flow or follow the instructions below.

Code Block
[{"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"}]
Image RemovedImage Added

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].

Image Removed1.jpgImage Added

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].

Image RemovedImage Removed2.jpgImage Added3.jpgImage Added

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

Image Removed456.jpgImage Added

Remember to save and click deploy Deploy!