Please be aware that this is a legacy version of the support site. If you have software version 3.1.30 or higher go to MODERN Home

(Classic) Daylight Harvesting & Motion Sensor

This function implements the functionality of Daylight Harvesting and Motion Sensor. If movement is detected, the luminaires are set to a brightness level corresponding with the current daylight harvesting value. It eliminates lighting “jumps“ while Daylight Harvesting is active and Motion sensor triggers fixed brightness values.

Flow

[{"id":"b5cf2f8a.7e67d","type":"tab","label":"Flow 6","disabled":false,"info":""},{"id":"704a844f.87c9ec","type":"vertex feedback","z":"b5cf2f8a.7e67d","name":"","primarygroup":"ef70a3f4e74cee2c3ebff8491907ed71","x":320,"y":440,"wires":[["371bb7be.4925"]]},{"id":"45228343.6ba62c","type":"vertex daylightHarvesting","z":"b5cf2f8a.7e67d","name":"Daylight Harvesting","primarygroup":"ef70a3f4e74cee2c3ebff8491907ed71","target":"200","tolerance":"2","P":0.25,"I":0.03,"D":0,"min":-25,"max":25,"x":650,"y":380,"wires":[["ce8d389d.9756e8","0c0b512447f588bb"]]},{"id":"ce8d389d.9756e8","type":"vertex action","z":"b5cf2f8a.7e67d","name":"","typeButton":"directv","bPayload":{"action":"setbrightnesslog","group":null,"param":0,"priority":"0"},"bState":"","defaultpriority":false,"x":890,"y":380,"wires":[["ce478c01.e83"]]},{"id":"5ee8e578.5a0d8c","type":"vertex action","z":"b5cf2f8a.7e67d","name":"","typeButton":"motionsensor","bPayload":{"PRESENCE":{"action":"setbrightness","group":null,"param":"100","priority":"255"},"TRANSITION":{"action":"setbrightness","group":null,"param":"44","priority":"0"},"NOPRESENCE":{"action":"setbrightness","group":null,"param":"0","priority":"254"}},"bState":"","defaultpriority":true,"x":670,"y":540,"wires":[["e32e152b.617d68"]]},{"id":"ce478c01.e83","type":"vertex cluster","z":"b5cf2f8a.7e67d","rate":"50","x":1130,"y":460,"wires":[]},{"id":"371bb7be.4925","type":"function","z":"b5cf2f8a.7e67d","name":"daylight filter","func":"var tmp1;\nvar tmp;\nfor(var gr in msg.payload)\n{\n tmp = msg.payload[gr].valueType\n tmp1 = msg.payload[gr].value\n \n}\n\nif(tmp !==\"cct\"& tmp1 !==null )\n{\n return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":490,"y":440,"wires":[["45228343.6ba62c"]]},{"id":"ceb786fc.befe78","type":"dali2devs","z":"b5cf2f8a.7e67d","name":"Motion Sensor Instance","uid":"00000003A4214709BC","dali2dev":"0","devStatus":2,"instanceType":3,"dali2t1":"10","dali2t2":"2","mode":"","x":350,"y":540,"wires":[["5ee8e578.5a0d8c"]]},{"id":"e9bee633.fa1468","type":"dali2devs","z":"b5cf2f8a.7e67d","name":"Light Sensor Instance","uid":"00000003A4214709BC","dali2dev":"2","devStatus":2,"instanceType":4,"dali2t1":"10","dali2t2":"","mode":"","x":340,"y":380,"wires":[["45228343.6ba62c"]]},{"id":"af722060.937e6","type":"comment","z":"b5cf2f8a.7e67d","name":"change payload function","info":"","x":870,"y":580,"wires":[]},{"id":"63d92d25.570164","type":"comment","z":"b5cf2f8a.7e67d","name":"Configure the light sensor","info":"","x":350,"y":340,"wires":[]},{"id":"89f34c0d.13126","type":"comment","z":"b5cf2f8a.7e67d","name":"Configure the motion sensor","info":"","x":360,"y":600,"wires":[]},{"id":"e32e152b.617d68","type":"function","z":"b5cf2f8a.7e67d","name":"motion flow dhv1","func":"if(msg.topic.includes(\"MOTIONSENSOR/PRESENCE\")||msg.topic.includes(\"MOTIONSENSOR/TRANSITION\"))\n{\n for(var gr in msg.payload.parameter.value)\n {\n\t msg.payload.parameter.value[gr] = flow.get(\"dhv1\");\n }\n return msg;\n}\nreturn msg","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":870,"y":540,"wires":[["ce478c01.e83"]]},{"id":"f927b0bedce6dd89","type":"comment","z":"b5cf2f8a.7e67d","name":"Specify DH parameters","info":"","x":640,"y":340,"wires":[]},{"id":"0c0b512447f588bb","type":"change","z":"b5cf2f8a.7e67d","name":"","rules":[{"t":"set","p":"dhv1","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":890,"y":440,"wires":[[]]}]

Instructions

  1. Drag & Drop the following nodes onto the workspace:

  • dali2devs x2

  • Daylight Harvesting

  • vertex feedback

  • daylight filter function → Daylight harvesting

  • function x2

  • vertex action x2

  • vertex cluster

  • change

See how to configure the Daylight Harvesting node here → Daylight harvesting.

Configure the function and change nodes

2. Go to the change node properties. The configuration is shown below. The node writes flow variable “dhv1“ with msg.payload value coming from the output of Daylight Harvesting node.

3. Go into the motion flow dhv1. Make sure that the code is as in the screenshot below.

Configure the vertex action nodes

4. Configure the lower vertex action node in a standard way for a multisensor. An example of such configuration can be found below or here → Multisensor (DALI-2 sensor).

5. Configure the vertex action node linked with the daylight harvesting node (the upper one) in the direct value mode. Check how to do that here → Daylight harvesting.

Confirm and deploy

6. Make sure that a correct group is set in all needed nodes.

7. Select the Deploy button. The program is now sent to Vertex.