Alarm override

This flow enables you to implement a override lighting scenario triggered by e.g fire alarm event.

When the alarm will be triggered, main flow logic will be blocked by a switch node and the lights brightness will be set to a specific override level. When the alarm will be disabled, lights will go back to their minimal level and main logic messages will be passed through the switch node.

The DALI Input module works as a communication bridge between non-dali switches, buttons, relays, alarms etc. For more information on DALI INPUT 4446 visit:

[{"id":"d26bd93d.9dbaf8","type":"tab","label":"Flow 8","disabled":false,"info":""},{"id":"e7c12687.199de8","type":"group","z":"d26bd93d.9dbaf8","name":"","style":{"fill":"#c8e7a7","label":true},"nodes":["4621ec2d.bb3784","42eb69c8.a6baf8","c67174b3.149708","ac176207.46fef","7f6c811d.ea0c9","3131f576.8bad7a","8b9351d4.72764","559a412a.1a1af","72621b5d.69f0c4","43e1e679.f57e88"],"x":314,"y":59,"w":892,"h":402},{"id":"4621ec2d.bb3784","type":"dali2devs","z":"d26bd93d.9dbaf8","g":"e7c12687.199de8","name":"DALI INPUT","uid":"007A259D3975772DDC","dali2dev":"0","devStatus":2,"instanceType":1,"dali2t1":90,"dali2t2":"","instanceData":{"InstanceStatusFlags":2,"InstanceType":1,"Resolution":1,"InstanceError":false,"InstanceActive":true,"InstanceGroup0":255,"InstanceGroup1":255,"InstanceGroup2":255,"EventScheme":2,"EventPriority":3,"EventFilter":3,"EventFilterSize":1,"FeatureType":[],"InputValue":0,"InstanceDetails":{"ShortTimer":25,"ShortTimerMin":8,"DoubleTimer":0,"DoubleTimerMin":9,"RepeatTimer":8,"StuckTimer":20},"DataModelRecipe":["Dali2Instance301_config"],"INSTNR":0},"mode":"normal","x":410,"y":260,"wires":[["42eb69c8.a6baf8"]]},{"id":"42eb69c8.a6baf8","type":"switch","z":"d26bd93d.9dbaf8","g":"e7c12687.199de8","name":"","property":"payload.IUEVENT","propertyType":"msg","rules":[{"t":"eq","v":"4","vt":"num"},{"t":"eq","v":"5","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":660,"y":260,"wires":[["c67174b3.149708","3131f576.8bad7a"],["ac176207.46fef","8b9351d4.72764"]]},{"id":"c67174b3.149708","type":"vertex action","z":"d26bd93d.9dbaf8","g":"e7c12687.199de8","name":"100%","typeButton":"single","bPayload":{"action":"setbrightness","group":"41b3cc30-1377-4ef0-9e19-3bb6b5d12506","param":"100","priority":"254"},"bState":"","defaultpriority":true,"x":860,"y":220,"wires":[["7f6c811d.ea0c9"]]},{"id":"ac176207.46fef","type":"vertex action","z":"d26bd93d.9dbaf8","g":"e7c12687.199de8","name":"min level","typeButton":"single","bPayload":{"action":"minlevel","group":"41b3cc30-1377-4ef0-9e19-3bb6b5d12506","param":null,"priority":"254"},"bState":"","defaultpriority":true,"x":870,"y":300,"wires":[["7f6c811d.ea0c9"]]},{"id":"7f6c811d.ea0c9","type":"vertex cluster","z":"d26bd93d.9dbaf8","g":"e7c12687.199de8","rate":90,"x":1080,"y":260,"wires":[]},{"id":"3131f576.8bad7a","type":"change","z":"d26bd93d.9dbaf8","g":"e7c12687.199de8","name":"","rules":[{"t":"set","p":"fire_alarm","pt":"global","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":100,"wires":[[]]},{"id":"8b9351d4.72764","type":"change","z":"d26bd93d.9dbaf8","g":"e7c12687.199de8","name":"","rules":[{"t":"set","p":"fire_alarm","pt":"global","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":420,"wires":[[]]},{"id":"5a2216d4.ed3458","type":"dali2devs","z":"d26bd93d.9dbaf8","name":"PIR","uid":"003560E1C1A0ED8CAD","dali2dev":"0","devStatus":2,"instanceType":3,"dali2t1":"10","dali2t2":"5","instanceData":{"InstanceStatusFlags":2,"InstanceType":3,"Resolution":2,"InstanceError":false,"InstanceActive":true,"InstanceGroup0":255,"InstanceGroup1":255,"InstanceGroup2":255,"EventScheme":2,"EventPriority":4,"EventFilter":3,"EventFilterSize":1,"FeatureType":[],"InputValue":0,"InstanceDetails":{"DeadtimeTimer":2,"HoldTimer":1,"ReportTimer":20,"Catching":0},"DataModelRecipe":["Dali2Instance303_config"],"INSTNR":0},"mode":"","x":390,"y":580,"wires":[["d992fbaf.0da318"]]},{"id":"d992fbaf.0da318","type":"vertex action","z":"d26bd93d.9dbaf8","name":"PIR","typeButton":"motionsensor","bPayload":{"PRESENCE":{"action":"setbrightness","group":"0efc9ef58896d0b1839b65d7af598531","param":"50","priority":"255"},"TRANSITION":{"action":null,"group":"0efc9ef58896d0b1839b65d7af598531","param":null,"priority":"0"},"NOPRESENCE":{"action":"off","group":"0efc9ef58896d0b1839b65d7af598531","param":null,"priority":"254"}},"bState":"","defaultpriority":true,"x":560,"y":580,"wires":[["e8274433.1be388"]]},{"id":"c1a8830a.f880b","type":"vertex cluster","z":"d26bd93d.9dbaf8","rate":90,"x":1010,"y":620,"wires":[]},{"id":"dc200ac8.01bf98","type":"dali2devs","z":"d26bd93d.9dbaf8","name":"Button","uid":"0000000829E23C2559","dali2dev":"0","devStatus":2,"instanceType":1,"dali2t1":90,"dali2t2":"","instanceData":{"InstanceStatusFlags":2,"InstanceType":1,"Resolution":1,"InstanceError":false,"InstanceActive":true,"InstanceGroup0":255,"InstanceGroup1":255,"InstanceGroup2":255,"EventScheme":2,"EventPriority":3,"EventFilter":84,"EventFilterSize":1,"FeatureType":[],"InputValue":0,"InstanceDetails":{"ShortTimer":25,"ShortTimerMin":10,"DoubleTimer":0,"DoubleTimerMin":10,"RepeatTimer":8,"StuckTimer":20},"DataModelRecipe":["Dali2Instance301_config"],"INSTNR":0},"mode":"normal","x":390,"y":680,"wires":[["814e413b.d80d2"]]},{"id":"814e413b.d80d2","type":"vertex action","z":"d26bd93d.9dbaf8","name":"button","typeButton":"single","bPayload":{"action":"setbrightness","group":"0efc9ef58896d0b1839b65d7af598531","param":"21","priority":"254"},"bState":"","defaultpriority":true,"x":570,"y":680,"wires":[["e8274433.1be388"]]},{"id":"e8274433.1be388","type":"switch","z":"d26bd93d.9dbaf8","name":"","property":"fire_alarm","propertyType":"global","rules":[{"t":"false"}],"checkall":"true","repair":false,"outputs":1,"x":810,"y":620,"wires":[["c1a8830a.f880b"]]},{"id":"559a412a.1a1af","type":"comment","z":"d26bd93d.9dbaf8","g":"e7c12687.199de8","name":"Alarm ON/OFF","info":"","x":540,"y":220,"wires":[]},{"id":"72621b5d.69f0c4","type":"comment","z":"d26bd93d.9dbaf8","g":"e7c12687.199de8","name":"Alarm ON: global variable set to true; VA:100%","info":"","x":960,"y":160,"wires":[]},{"id":"43e1e679.f57e88","type":"comment","z":"d26bd93d.9dbaf8","g":"e7c12687.199de8","name":"Alarm OFF: global variable set to false; VA:min level","info":"","x":990,"y":360,"wires":[]},{"id":"56ef7fd1.91f17","type":"comment","z":"d26bd93d.9dbaf8","name":"enable/disable main flow logic","info":"","x":820,"y":580,"wires":[]}]

Step-by-step instructions

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

  • dali2devs x3

  • vertex action x4

  • vertex cluster

  • change x2

  • switch x2

 

Alarm override logic

2. Go to the dali2devs node properties. Select the input units' serial number [1], set Dali2Device to Dali2 Input Unit [2] and set the Mode to normal [3]. In the event filters you want to have only two marked - button released and button pressed [4]

3. Switch node:

Depending on the input signal, whether the “Button“ is pressed or released, the switch node will direct the logic to trigger the alarm scene or not.

In the Switch node set the property to msg.payload.IUEVENT. In the section below set a double equal ‘==’ sign and choose the number type of input. In the data fields set event “4” (Button pressed) to trigger output 1 and set event “5” (Button released) to trigger output 2.

 

4. Change nodes:

These two nodes are responsible for setting the fire_alarm state to ON and OFF. This variable will be used to block or allow messages in the main flow.

In the Rules section check that the mode says Set, choose the global variable type from the dropdown list and name it eg. fire_alarm. When the fire alarm is ON (Switch node output 1) we set the boolean value to true, when it is OFF (Switch node output 2) we set the boolean value to false.

5. Vertex action nodes:

Two vertex action nodes are connected directly to the two outputs of the switch node. If the alarm event is triggered, lights in the chosen group will light up to 100%. When the alarm is cancelled, the luminaires will dim down to their minimum level.

In the 100% vertex action node set the mode to single button, set action to set brightness, choose a group and set the brightness value. In the min level vertex action node set the mode to single button, set action as Recall min level and choose a group.

Main flow logic

The fire alarm will block all other possibilities for manual and automatic control. All main logic flows need to have a blocking switch node introduced.

In the blocking switch node properties set your global variable and call it precisely what you named the alarm override variable in the change nodes, in this case: fire_alarm. Set the conditions for allowing messages to go through to is false.

 

Do not forget to click Done and Deploy!