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) Space logic

The Node-RED flow for space logic functionality is suitable in venues like sports halls or large meeting rooms that are divided by moving partitions. Routing is based on the states of reed switches or other devices that are either open or closed. Read the flow description below and import the flow into your Node-RED.

 

Flow

[{"id":"e8df18d.55a2ae8","type":"tab","label":"Space Logic","disabled":false,"info":""},{"id":"2c351898.5fad48","type":"comment","z":"e8df18d.55a2ae8","name":"Switches K1 and K2","info":"","x":210,"y":640,"wires":[]},{"id":"422552f2.31d17c","type":"comment","z":"e8df18d.55a2ae8","name":"Space logic switches. Value either true or false based on command type.","info":"","x":1010,"y":640,"wires":[]},{"id":"782fb3b9.c24cdc","type":"switch","z":"e8df18d.55a2ae8","name":"open = TRUE, closed = False ","property":"payload.IUEVENT","propertyType":"msg","rules":[{"t":"eq","v":"5","vt":"num"},{"t":"neq","v":"5","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":700,"y":720,"wires":[["ef87ca25.126d28"],["6ca8d3f6.951a2c"]]},{"id":"ef87ca25.126d28","type":"change","z":"e8df18d.55a2ae8","name":"K1 TRUE","rules":[{"t":"set","p":"K1","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":900,"y":700,"wires":[[]]},{"id":"6ca8d3f6.951a2c","type":"change","z":"e8df18d.55a2ae8","name":"K1 FALSE","rules":[{"p":"K1","pt":"flow","t":"set","tot":"bool","to":"false"}],"action":"","property":"","from":"","to":"","reg":false,"x":910,"y":740,"wires":[[]]},{"id":"9df70e3e.12b5b","type":"change","z":"e8df18d.55a2ae8","name":"K2 TRUE","rules":[{"t":"set","p":"K2","pt":"flow","to":"true","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":1580,"y":680,"wires":[[]]},{"id":"233023a5.bbdd9c","type":"change","z":"e8df18d.55a2ae8","name":"K2 FALSE","rules":[{"p":"K2","tot":"bool","t":"set","pt":"flow","to":"false"}],"action":"","property":"","from":"","to":"","reg":false,"x":1570,"y":740,"wires":[[]]},{"id":"d23b5e1a.87d5b","type":"comment","z":"e8df18d.55a2ae8","name":"area A, control commands","info":"","x":1830,"y":940,"wires":[]},{"id":"d6c131f1.e2037","type":"DALI2 Devs Common","z":"e8df18d.55a2ae8","name":"Control device, area A","outputs":4,"uid":"7595AB7600007363","savedSettings":[{"instanceType":1,"isDisabled":false,"mode":"dimmb"},{"instanceType":1,"isDisabled":false,"mode":"normal"},{"instanceType":1,"isDisabled":false,"mode":"dimmb"},{"instanceType":1,"isDisabled":false,"mode":"normal"}],"x":120,"y":1160,"wires":[["ff031d0c.58706"],["741a338d.e59edc"],["89f74c06.5256d"],["d0bf045a.d34af8"]]},{"id":"cb6bc99f.57dca8","type":"switch","z":"e8df18d.55a2ae8","name":"open = TRUE, closed = False ","property":"payload.IUEVENT","propertyType":"msg","rules":[{"t":"eq","v":"5","vt":"num"},{"t":"neq","v":"5","vt":"num"}],"checkall":"true","repair":false,"outputs":2,"x":1360,"y":700,"wires":[["9df70e3e.12b5b"],["233023a5.bbdd9c"]]},{"id":"718696d3.2e6a68","type":"comment","z":"e8df18d.55a2ae8","name":"Control devices","info":"","x":120,"y":1020,"wires":[]},{"id":"3e148b39.23ba64","type":"comment","z":"e8df18d.55a2ae8","name":"routing commands based on switch positions","info":"","x":1210,"y":980,"wires":[]},{"id":"ba0bc43c.fe3978","type":"vertex action","z":"e8df18d.55a2ae8","name":"ON + DIM UP","typeButton":"dimm","bPayload":{"DON":{"action":"setbrightness","group":"c3e184237d6bde10c7a2c04833345a27","param":"100","priority":"254"},"HOLDUP":{"action":"upaction","group":"c3e184237d6bde10c7a2c04833345a27","param":null,"priority":"254"},"HOLDDOWN":{"action":"upaction","group":"c3e184237d6bde10c7a2c04833345a27","param":null,"priority":"254"},"DOFF":{"action":"setbrightness","group":"c3e184237d6bde10c7a2c04833345a27","param":"100","priority":"254"}},"bState":false,"defaultpriority":true,"x":1850,"y":980,"wires":[["527eb900.69bf98"]]},{"id":"8235d345.783be","type":"vertex action","z":"e8df18d.55a2ae8","name":"50%","typeButton":"single","bPayload":{"action":"setbrightness","group":"c3e184237d6bde10c7a2c04833345a27","param":"50","priority":"254"},"bState":false,"defaultpriority":true,"x":1820,"y":1040,"wires":[["527eb900.69bf98"]]},{"id":"6b4f3aa7.771484","type":"vertex action","z":"e8df18d.55a2ae8","name":"10%","typeButton":"single","bPayload":{"action":"setbrightness","group":"c3e184237d6bde10c7a2c04833345a27","param":"10","priority":"254"},"bState":false,"defaultpriority":true,"x":1820,"y":1160,"wires":[["527eb900.69bf98"]]},{"id":"cd662248.6c17f","type":"comment","z":"e8df18d.55a2ae8","name":"area B, control commands","info":"","x":1850,"y":1300,"wires":[]},{"id":"349d3326.34549c","type":"comment","z":"e8df18d.55a2ae8","name":"area C, control commands","info":"","x":1840,"y":1740,"wires":[]},{"id":"4db5ab69.4fd834","type":"comment","z":"e8df18d.55a2ae8","name":"Send to vertex cluster node","info":"","x":2130,"y":1060,"wires":[]},{"id":"ff031d0c.58706","type":"change","z":"e8df18d.55a2ae8","name":"area A / command 1","rules":[{"t":"set","p":"topic","pt":"msg","to":"A1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1100,"wires":[["e85200df.4e042"]]},{"id":"741a338d.e59edc","type":"change","z":"e8df18d.55a2ae8","name":"area A / command 2","rules":[{"t":"set","p":"topic","pt":"msg","to":"A2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1140,"wires":[["e85200df.4e042"]]},{"id":"89f74c06.5256d","type":"change","z":"e8df18d.55a2ae8","name":"area A / command 3","rules":[{"t":"set","p":"topic","pt":"msg","to":"A3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1180,"wires":[["e85200df.4e042"]]},{"id":"d0bf045a.d34af8","type":"change","z":"e8df18d.55a2ae8","name":"area A / command 4","rules":[{"t":"set","p":"topic","pt":"msg","to":"A4","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1220,"wires":[["e85200df.4e042"]]},{"id":"9e32158f.56b068","type":"DALI2 Devs Common","z":"e8df18d.55a2ae8","name":"Control device, area B","outputs":4,"uid":"F7FE9A0700007366","savedSettings":[{"instanceType":1,"isDisabled":false,"mode":"dimmb"},{"instanceType":1,"isDisabled":false,"mode":"normal"},{"instanceType":1,"isDisabled":false,"mode":"dimmb"},{"instanceType":1,"isDisabled":false,"mode":"normal"}],"x":120,"y":1460,"wires":[["c781ed12.52355"],["5d649e0a.51305"],["666ba3f9.b6cf5c"],["19fe9846.c971b8"]]},{"id":"c781ed12.52355","type":"change","z":"e8df18d.55a2ae8","name":"area B / command 1","rules":[{"t":"set","p":"topic","pt":"msg","to":"B1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1400,"wires":[["3d50da62.28a7a6"]]},{"id":"5d649e0a.51305","type":"change","z":"e8df18d.55a2ae8","name":"area B / command 2","rules":[{"t":"set","p":"topic","pt":"msg","to":"B2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1440,"wires":[["3d50da62.28a7a6"]]},{"id":"666ba3f9.b6cf5c","type":"change","z":"e8df18d.55a2ae8","name":"area B / command 3","rules":[{"t":"set","p":"topic","pt":"msg","to":"B3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1480,"wires":[["3d50da62.28a7a6"]]},{"id":"19fe9846.c971b8","type":"change","z":"e8df18d.55a2ae8","name":"area B / command 4","rules":[{"t":"set","p":"topic","pt":"msg","to":"B4","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1520,"wires":[["3d50da62.28a7a6"]]},{"id":"15ab6ed5.6729d1","type":"DALI2 Devs Common","z":"e8df18d.55a2ae8","name":"Control device, area C","outputs":4,"uid":"7595AB7600007363","savedSettings":[{"instanceType":1,"isDisabled":false,"mode":"normal"},{"instanceType":1,"isDisabled":false,"mode":"normal"},{"instanceType":1,"isDisabled":false,"mode":"normal"},{"instanceType":1,"isDisabled":false,"mode":"normal"}],"x":120,"y":1700,"wires":[["38222069.b77f8"],["efaa7b84.569d68"],["9f464891.fdaab8"],["62794825.c80d78"]]},{"id":"38222069.b77f8","type":"change","z":"e8df18d.55a2ae8","name":"area C / command 1","rules":[{"t":"set","p":"topic","pt":"msg","to":"C1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1640,"wires":[["c993b039.586c6"]]},{"id":"efaa7b84.569d68","type":"change","z":"e8df18d.55a2ae8","name":"area C / command 2","rules":[{"t":"set","p":"topic","pt":"msg","to":"C2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1680,"wires":[["c993b039.586c6"]]},{"id":"9f464891.fdaab8","type":"change","z":"e8df18d.55a2ae8","name":"area C / command 3","rules":[{"t":"set","p":"topic","pt":"msg","to":"C3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1720,"wires":[["c993b039.586c6"]]},{"id":"62794825.c80d78","type":"change","z":"e8df18d.55a2ae8","name":"area C / command 4","rules":[{"t":"set","p":"topic","pt":"msg","to":"C4","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":420,"y":1760,"wires":[["c993b039.586c6"]]},{"id":"e5b02031.390be","type":"link in","z":"e8df18d.55a2ae8","name":"Komennot kytkimelle","links":["e85200df.4e042","3d50da62.28a7a6","c993b039.586c6"],"x":815,"y":1400,"wires":[["79cd8422.cc644c"]]},{"id":"e85200df.4e042","type":"link out","z":"e8df18d.55a2ae8","name":"Kytkimille","links":["e5b02031.390be"],"x":595,"y":1160,"wires":[]},{"id":"3d50da62.28a7a6","type":"link out","z":"e8df18d.55a2ae8","name":"Kytkimille","links":["e5b02031.390be"],"x":575,"y":1460,"wires":[]},{"id":"c993b039.586c6","type":"link out","z":"e8df18d.55a2ae8","name":"Kytkimille","links":["e5b02031.390be"],"x":575,"y":1700,"wires":[]},{"id":"a17d18ab.da9428","type":"switch","z":"e8df18d.55a2ae8","name":"K1 open?","property":"K1","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1220,"y":1020,"wires":[["18556615.6d844a"]]},{"id":"79cd8422.cc644c","type":"switch","z":"e8df18d.55a2ae8","name":"area A/B/C","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"A","vt":"str"},{"t":"cont","v":"B","vt":"str"},{"t":"cont","v":"C","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":950,"y":1400,"wires":[["18556615.6d844a","bb8d71af.d0f18","535c94.49cb036c"],["a17d18ab.da9428","51a3115e.62ada","111d46ca.6e27e9"],["cb352239.7502f","11c3d2c3.e5ae9d","c1c04fe3.1596f"]]},{"id":"18556615.6d844a","type":"switch","z":"e8df18d.55a2ae8","name":"command number 1/2/3/4","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"1","vt":"str"},{"t":"cont","v":"2","vt":"str"},{"t":"cont","v":"3","vt":"str"},{"t":"cont","v":"4","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1610,"y":1080,"wires":[["ba0bc43c.fe3978"],["8235d345.783be"],["a6c27cec.9778b"],["6b4f3aa7.771484"]]},{"id":"51a3115e.62ada","type":"switch","z":"e8df18d.55a2ae8","name":"K2 open?","property":"K2","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1240,"y":1860,"wires":[["c1c04fe3.1596f"]]},{"id":"535c94.49cb036c","type":"switch","z":"e8df18d.55a2ae8","name":"K1 open?","property":"K1","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1240,"y":1920,"wires":[["6c18247c.646a6c"]]},{"id":"6c18247c.646a6c","type":"switch","z":"e8df18d.55a2ae8","name":"K2 open?","property":"K2","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1380,"y":1920,"wires":[["c1c04fe3.1596f"]]},{"id":"bb8d71af.d0f18","type":"switch","z":"e8df18d.55a2ae8","name":"K1 open?","property":"K1","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1340,"y":1380,"wires":[["111d46ca.6e27e9"]]},{"id":"cb352239.7502f","type":"switch","z":"e8df18d.55a2ae8","name":"K2 open?","property":"K2","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1340,"y":1460,"wires":[["111d46ca.6e27e9"]]},{"id":"11c3d2c3.e5ae9d","type":"switch","z":"e8df18d.55a2ae8","name":"K1 open?","property":"K1","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1220,"y":1080,"wires":[["3c6363cd.ef992c"]]},{"id":"3c6363cd.ef992c","type":"switch","z":"e8df18d.55a2ae8","name":"K2 open?","property":"K2","propertyType":"flow","rules":[{"t":"true"}],"checkall":"true","repair":false,"outputs":1,"x":1360,"y":1080,"wires":[["18556615.6d844a"]]},{"id":"527eb900.69bf98","type":"link out","z":"e8df18d.55a2ae8","name":"","links":["1e576381.bf69ac"],"x":1995,"y":1060,"wires":[]},{"id":"5912906e.c5e5f","type":"link out","z":"e8df18d.55a2ae8","name":"","links":["1e576381.bf69ac"],"x":1995,"y":1440,"wires":[]},{"id":"1f8f502a.a76ae","type":"link out","z":"e8df18d.55a2ae8","name":"","links":["1e576381.bf69ac"],"x":1995,"y":1860,"wires":[]},{"id":"199f0998.e33276","type":"comment","z":"e8df18d.55a2ae8","name":"routing commands based on area tags","info":"","x":890,"y":1340,"wires":[]},{"id":"54146456.0b0d9c","type":"inject","z":"e8df18d.55a2ae8","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"K1","payloadType":"flow","x":270,"y":720,"wires":[[]]},{"id":"21b6bad9.5a2cd6","type":"inject","z":"e8df18d.55a2ae8","name":"","repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"K2","payloadType":"flow","x":270,"y":760,"wires":[[]]},{"id":"111d46ca.6e27e9","type":"switch","z":"e8df18d.55a2ae8","name":"command number 1/2/3/4","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"1","vt":"str"},{"t":"cont","v":"2","vt":"str"},{"t":"cont","v":"3","vt":"str"},{"t":"cont","v":"4","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1610,"y":1420,"wires":[["2c411097.59df5"],["c8a94a84.8c1e18"],["cc56a67c.0d1078"],["391327bc.bd0ca8"]]},{"id":"c1c04fe3.1596f","type":"switch","z":"e8df18d.55a2ae8","name":"command number 1/2/3/4","property":"topic","propertyType":"msg","rules":[{"t":"cont","v":"1","vt":"str"},{"t":"cont","v":"2","vt":"str"},{"t":"cont","v":"3","vt":"str"},{"t":"cont","v":"4","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":1590,"y":1860,"wires":[["3ee34798.0e9638"],["43fc9163.4e172"],["66157f60.26a8b"],["8a2fd5ee.d64b28"]]},{"id":"a6c27cec.9778b","type":"vertex action","z":"e8df18d.55a2ae8","name":"OFF + DIM DOWN","typeButton":"dimm","bPayload":{"DON":{"action":"setbrightness","group":"c3e184237d6bde10c7a2c04833345a27","param":"0","priority":"254"},"HOLDUP":{"action":"downaction","group":"c3e184237d6bde10c7a2c04833345a27","param":null,"priority":"254"},"HOLDDOWN":{"action":"downaction","group":"c3e184237d6bde10c7a2c04833345a27","param":null,"priority":"254"},"DOFF":{"action":"setbrightness","group":"c3e184237d6bde10c7a2c04833345a27","param":"0","priority":"254"}},"bState":false,"defaultpriority":true,"x":1860,"y":1100,"wires":[["527eb900.69bf98"]]},{"id":"2c411097.59df5","type":"vertex action","z":"e8df18d.55a2ae8","name":"ON + DIM UP","typeButton":"dimm","bPayload":{"DON":{"action":"setbrightness","group":"4297d4f9ba0fa8ab8cb208b943f7ba22","param":"100","priority":"254"},"HOLDUP":{"action":"upaction","group":"4297d4f9ba0fa8ab8cb208b943f7ba22","param":null,"priority":"254"},"HOLDDOWN":{"action":"upaction","group":"4297d4f9ba0fa8ab8cb208b943f7ba22","param":null,"priority":"254"},"DOFF":{"action":"setbrightness","group":"4297d4f9ba0fa8ab8cb208b943f7ba22","param":"100","priority":"254"}},"bState":false,"defaultpriority":true,"x":1850,"y":1340,"wires":[["5912906e.c5e5f"]]},{"id":"c8a94a84.8c1e18","type":"vertex action","z":"e8df18d.55a2ae8","name":"50%","typeButton":"single","bPayload":{"action":"setbrightness","group":"4297d4f9ba0fa8ab8cb208b943f7ba22","param":"50","priority":"254"},"bState":false,"defaultpriority":true,"x":1820,"y":1400,"wires":[["5912906e.c5e5f"]]},{"id":"391327bc.bd0ca8","type":"vertex action","z":"e8df18d.55a2ae8","name":"10%","typeButton":"single","bPayload":{"action":"setbrightness","group":"4297d4f9ba0fa8ab8cb208b943f7ba22","param":"10","priority":"254"},"bState":false,"defaultpriority":true,"x":1820,"y":1520,"wires":[["5912906e.c5e5f"]]},{"id":"cc56a67c.0d1078","type":"vertex action","z":"e8df18d.55a2ae8","name":"OFF + DIM DOWN","typeButton":"dimm","bPayload":{"DON":{"action":"setbrightness","group":"4297d4f9ba0fa8ab8cb208b943f7ba22","param":"0","priority":"254"},"HOLDUP":{"action":"downaction","group":"4297d4f9ba0fa8ab8cb208b943f7ba22","param":null,"priority":"254"},"HOLDDOWN":{"action":"downaction","group":"4297d4f9ba0fa8ab8cb208b943f7ba22","param":null,"priority":"254"},"DOFF":{"action":"setbrightness","group":"4297d4f9ba0fa8ab8cb208b943f7ba22","param":"0","priority":"254"}},"bState":false,"defaultpriority":true,"x":1860,"y":1460,"wires":[["5912906e.c5e5f"]]},{"id":"3ee34798.0e9638","type":"vertex action","z":"e8df18d.55a2ae8","name":"ON + DIM UP","typeButton":"dimm","bPayload":{"DON":{"action":"setbrightness","group":"cde6f52018e491f708b5e384e00db187","param":"100","priority":"254"},"HOLDUP":{"action":"upaction","group":"cde6f52018e491f708b5e384e00db187","param":null,"priority":"254"},"HOLDDOWN":{"action":"upaction","group":"cde6f52018e491f708b5e384e00db187","param":null,"priority":"254"},"DOFF":{"action":"setbrightness","group":"cde6f52018e491f708b5e384e00db187","param":"100","priority":"254"}},"bState":false,"defaultpriority":true,"x":1830,"y":1780,"wires":[["1f8f502a.a76ae"]]},{"id":"43fc9163.4e172","type":"vertex action","z":"e8df18d.55a2ae8","name":"50%","typeButton":"single","bPayload":{"action":"setbrightness","group":"cde6f52018e491f708b5e384e00db187","param":"50","priority":"254"},"bState":false,"defaultpriority":true,"x":1800,"y":1840,"wires":[["1f8f502a.a76ae"]]},{"id":"8a2fd5ee.d64b28","type":"vertex action","z":"e8df18d.55a2ae8","name":"10%","typeButton":"single","bPayload":{"action":"setbrightness","group":"cde6f52018e491f708b5e384e00db187","param":"10","priority":"254"},"bState":false,"defaultpriority":true,"x":1800,"y":1960,"wires":[["1f8f502a.a76ae"]]},{"id":"66157f60.26a8b","type":"vertex action","z":"e8df18d.55a2ae8","name":"OFF + DIM DOWN","typeButton":"dimm","bPayload":{"DON":{"action":"setbrightness","group":"cde6f52018e491f708b5e384e00db187","param":"0","priority":"254"},"HOLDUP":{"action":"downaction","group":"cde6f52018e491f708b5e384e00db187","param":null,"priority":"254"},"HOLDDOWN":{"action":"downaction","group":"cde6f52018e491f708b5e384e00db187","param":null,"priority":"254"},"DOFF":{"action":"setbrightness","group":"cde6f52018e491f708b5e384e00db187","param":"0","priority":"254"}},"bState":false,"defaultpriority":true,"x":1840,"y":1900,"wires":[["1f8f502a.a76ae"]]},{"id":"add17c84.296ee","type":"comment","z":"e8df18d.55a2ae8","name":"Saving area tag and command number tag to message topic","info":"For example:\ntopic = A1 -> area A, command 1\ntopic = C3 -> area C, command 3","x":540,"y":1040,"wires":[]},{"id":"3db8f3ed.bb72fc","type":"comment","z":"e8df18d.55a2ae8","name":"routing commands based on command number tag","info":"","x":1590,"y":880,"wires":[]},{"id":"9712d64e.e682b8","type":"comment","z":"e8df18d.55a2ae8","name":"Send to vertex cluster node","info":"","x":2130,"y":1440,"wires":[]},{"id":"3fef21a6.a67c7e","type":"comment","z":"e8df18d.55a2ae8","name":"Send to vertex cluster node","info":"","x":2130,"y":1860,"wires":[]},{"id":"687e5243.cdf02c","type":"DALI2 Devs Common","z":"e8df18d.55a2ae8","name":"K1","outputs":1,"uid":"7CBE1BD9000D7E44","savedSettings":[{"instanceType":1,"isDisabled":false,"mode":"normal"},{"instanceType":1,"isDisabled":true,"mode":"normal"},{"instanceType":1,"isDisabled":true,"mode":"normal"},{"instanceType":1,"isDisabled":true,"mode":"normal"},{"instanceType":1,"isDisabled":true,"mode":"normal"},{"instanceType":1,"isDisabled":true,"mode":"normal"}],"x":510,"y":720,"wires":[["782fb3b9.c24cdc"]]},{"id":"4cd721e9.7cdaa","type":"DALI2 Devs Common","z":"e8df18d.55a2ae8","name":"K2","outputs":1,"uid":"7CBE1BD9000D7E44","savedSettings":[{"instanceType":1,"isDisabled":true,"mode":"normal"},{"instanceType":1,"isDisabled":false,"mode":"normal"},{"instanceType":1,"isDisabled":true,"mode":"normal"},{"instanceType":1,"isDisabled":true,"mode":"normal"},{"instanceType":1,"isDisabled":true,"mode":"normal"},{"instanceType":1,"isDisabled":true,"mode":"normal"}],"x":1130,"y":700,"wires":[["cb6bc99f.57dca8"]]}]

Flow overview

 

Flow structure description

The flow can be divided into several main parts responsible for the whole functionality. The order of these parts is the same as the flow of the signal in this program, so Part II follows Part I, etc.

  1. Part I (see the flow image) is responsible for detecting the input signals from the control devices e.g. buttons and assigning these signals to tags representing appropriate virtual “areas”. The tags are stored in msg.topic objects.
    Example:
    Area A, command 1 -> msg.topic = A1
    Area C, command 3 -> msg.topic = C3

  2. Part II (a switch node) checks in which area has the event been detected. If the event comes from the original area of the command then Part C is skipped.

  3. Part III checks the state of the reed switches (find reed switches K1 and K2 at the top of the flow). The message passes if all the switches are open between the sending and receiving areas.

  4. Part IV checks the command to be triggered on a group of luminaires.

During the routing, the msg.topic is reserved for this functionality. So if you need msg.topic for other action, place that action after the routing nodes.

What can I modify?

  1. Select the reed switches and buttons in appropriate dali2devs nodes.

  2. Define actions to be triggered in vertex action nodes after Part IV.

  3. Test the flow using inject nodes.

  4. Add more reed switches and areas in the flow if you have more of these in your office.

Add extra functions and areas if you want to. All you need to do is to edit the tags and filtering of the messages. The tags can be thought of as a sort of matrix: x-axis = area code, y-axis = command number code, etc. Messages can be filtered based on any parameter of the tags.