Alarms and security

If we want to integrate a security system with our luminaires, we need a flow that can switch off all the lights in the building and reset the sensors. This article shows how to do this very easily.

The signal that the flow will receive is generated by an external security system, which could be sent from a relay switch or BMS system () . After this action, the alarm is activated so that after the time for leaving the building, all the lights are switched off and the sensors are reset. The time for leaving the building is defined in the delay node.

How to commission it?

[{"id":"ae45a6db.8ad2d8","type":"tab","label":"ALARM","disabled":false,"info":""},{"id":"84a80fa4.913ce","type":"inject","z":"ae45a6db.8ad2d8","name":"Alarm on","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":240,"y":120,"wires":[["c8aaabfc.b8d838"]]},{"id":"a275cf00.700b1","type":"comment","z":"ae45a6db.8ad2d8","name":"TCP/IP Modbus or relay switch with alarm signal","info":"","x":360,"y":80,"wires":[]},{"id":"7ce68841.93f648","type":"vertex action","z":"ae45a6db.8ad2d8","name":"","typeButton":"single","bPayload":{"action":"off","group":"6dde92f2-f0af-4eb6-90f7-a96d2b05543d","param":null,"priority":"254"},"bState":"","defaultpriority":true,"x":710,"y":120,"wires":[["e7df0fde.e9d6d"]]},{"id":"c8aaabfc.b8d838","type":"delay","z":"ae45a6db.8ad2d8","name":"","pauseType":"delay","timeout":"5 ","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":400,"y":120,"wires":[["7ce68841.93f648","93c7adf1.0f818"]]},{"id":"93c7adf1.0f818","type":"change","z":"ae45a6db.8ad2d8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"RESET","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":220,"wires":[["193a39dd.907d96","c9c26200.2e4fd"]]},{"id":"e7df0fde.e9d6d","type":"vertex cluster","z":"ae45a6db.8ad2d8","rate":90,"x":1050,"y":120,"wires":[]},{"id":"10be0a4b.47b4d6","type":"comment","z":"ae45a6db.8ad2d8","name":"List of sensor to be reset","info":"","x":970,"y":180,"wires":[]},{"id":"193a39dd.907d96","type":"dali2devs","z":"ae45a6db.8ad2d8","name":"Sensor/2","uid":"00B2BD33E61F28C143","dali2dev":"0","devStatus":2,"instanceType":3,"dali2t1":"10","dali2t2":"","instanceData":{"InstanceStatusFlags":0,"InstanceType":3,"Resolution":2,"InstanceError":false,"InstanceActive":false,"InstanceGroup0":255,"InstanceGroup1":255,"InstanceGroup2":255,"EventScheme":2,"EventPriority":4,"EventFilter":3,"EventFilterSize":1,"FeatureType":[],"InputValue":0,"InstanceValue":0,"InstanceDetails":{"DeadtimeTimer":2,"HoldTimer":1,"ReportTimer":254,"Catching":0,"InstanceActive":true},"DataModelRecipe":["Dali2Instance303_config"],"INSTNR":0},"mode":"","x":920,"y":220,"wires":[[]]},{"id":"c9c26200.2e4fd","type":"dali2devs","z":"ae45a6db.8ad2d8","name":"Sensor/2","uid":"00075CB9E561A0ABA0","dali2dev":"0","devStatus":2,"instanceType":3,"dali2t1":"10","dali2t2":"","instanceData":{"InstanceStatusFlags":0,"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,"InstanceValue":0,"InstanceDetails":{"DeadtimeTimer":2,"HoldTimer":1,"ReportTimer":254,"Catching":0,"InstanceActive":true},"DataModelRecipe":["Dali2Instance303_config"],"INSTNR":0},"mode":"","x":920,"y":260,"wires":[[]]},{"id":"653009e0.767cb8","type":"comment","z":"ae45a6db.8ad2d8","name":"Time for leave after alarm activation","info":"","x":480,"y":160,"wires":[]},{"id":"6f390f84.e933d","type":"comment","z":"ae45a6db.8ad2d8","name":"Turn off all the light on the object","info":"","x":770,"y":80,"wires":[]}]
image-20240524-080831.png

Step by step instructions

  1. Find the following nodes in the Node-RED palette and drag them to workspace then connect them as as above.

  • Inject

  • delay

  • vertex action

  • change node

  • DALI2 Devs

  • vertex node

image-20240524-084324.png

 

Now that the flow is prepared, we need to create an alarm group containing all the lights that need to be switched off. To do this we need to go back to the modern UI. This process will be similar to this article .

  1. Go to the main menu of vertex controller and click Control Groups tab [1].

  1. At New Group field [2] type name for the alarm group.

  2. Now you can go to Assign devices tab [3].

  3. Press Select All button [4] and drag them to the the alarm group created before [5].

 

We have now created an alarm group for no and assigned all the devices. Now it's time to go back to NodeRED and change the settings in each node to get everything up and running.

  1. Go to the delay node and enter delay time [6].

 

  1. At Vertex action choose single button [7] as a mode and Recall off [8] as an action. As control group select previously created alarm group [9].

  1. With change node we want to reset sensors on site. So we need to set payload message to RESET.
    To do that select string type from the list and write RESET [10] on text field.

 

  1. Select all sensors in the building at DALI2 devs node [11].

  1. Select Deploy.