...
NodeRed flow:
Code Block |
---|
[{"id":"463437f9.dd86a8","type":"tab","label":"Multiple sensors to Vertex Action","disabled":false,"info":""},{"id":"4eabee83.2562f","type":"group","z":"463437f9.dd86a8","name":"Incorrect","style":{"stroke":"#ff3f3f","fill":"#ffbfbf","label":true,"color":"#ff0000","label-position":"n"},"nodes":["b8f3ec05.aea928","2ab3617c.777f76","6d1ba9c4.6aeb9","25ee059.d3e137a","9b11bc35.aa856","e5bc2fd6.9ea6a","e72d29dd.e884","ee592f75.794d8","528a5ffd.1eb02","d7a95c3c.92cb28"],"x":7414,"y":419399,"w":1412,"h":262},{"id":"b8f3ec058b0cf8a1.aea928a69ad8","type":"vertex clustergroup","z":"463437f9.dd86a8","gname":"4eabee83.2562fCorrect","ratestyle":5,{"xstroke":1390"#92d04f","yfill":540"#e3f3d3","wireslabel":[]}true,{"idlabel-position":"2ab3617c.777f76n","typecolor":"dali2devs#009919"},"znodes":["463437f9e80d35a8.dd86a86d7d1","gd361885a.96a2c8":,"4eabee8339f5c80b.2562f08bad","nameb88f58bc.dff27":"Motion Sensor no1,"ec01ed4.c44cc9","uid61f904f6.91ebd4":,"00000003A4214709BCbb07db98.3080b","dali2dev":"11"94e89581.61b18"],"instanceTypex":114,"dali2t1y":90139,"dali2t2w":""1412,"mode":"","x":190,"y":460,"wires":[["9b11bc35.aa856"]]h":242},{"id":"6d1ba9c4d176b7eb.6aeb9c2ce1","type":"dali2devsgroup","z":"463437f9.dd86a8","gname":"4eabee83.2562fGlobal values","namestyle":{"Motion Sensor no2","uid":"00000003A4214709BC","dali2devstroke":"#a4a4a4","label":true,"color":"8#777777","instanceTypefill":1"#d1d1d1","dali2t1label-position":"10n"},"dali2t2nodes":["f610cec.980f33","mode":""6f775291.3e5eac"],"x":19014,"y":54019,"wiresw":[["9b11bc35.aa856"]]372,"h":102},{"id":"25ee059e80d35a8.d3e137a6d7d1","type":"dali2devsvertex action","z":"463437f9.dd86a8","g":"4eabee838b0cf8a1.2562fa69ad8","name":"Motion Sensor no3sensor","uidtypeButton":"00000003A4214709BCmotionsensor","dali2devbPayload":{"11PRESENCE","instanceType":1,"dali2t1:{"action":"10setbrightness","dali2t2group":"1d606bc8d9eb7c1241805d7b07c81f1d","modeparam":"50","xpriority":190,"y255":620},"wiresTRANSITION":[["9b11bc35.aa856"]]},{"idaction":"9b11bc35.aa856setbrightness","typegroup":"switch1d606bc8d9eb7c1241805d7b07c81f1d","zparam":"463437f9.dd86a850","gpriority":"4eabee83.2562f0"},"nameNOPRESENCE":"Presence/Transition/NoPresence{"action":"setbrightness","propertygroup":"payload.MSEVENT1d606bc8d9eb7c1241805d7b07c81f1d","propertyTypeparam":"msg0","rulespriority":[{"t":"eq"254"}},"vbState":"0","vtdefaultpriority":"num"}true,{"tx":"eq"470,"vy":"1"260,"vtwires":[["num94e89581.61b18"]]},{"tid":"eqd361885a.96a2c8","vtype":"2dali2devs","vtz":"num463437f9.dd86a8"}],"checkallg":"true8b0cf8a1.a69ad8","repairname":false,"outputs":3"Motion Sensor no1","xuid":500,"y00000003A4214709BC":540,"wiresdali2dev":[["ee592f75.794d80"],["528a5ffd.1eb02"],["d7a95c3c.92cb28"]]},{"id":"e5bc2fd6.9ea6a","type":"vertex action","z":"463437f9.dd86a8","g":"4eabee83.2562f","name":"Direct Value","typeButton":"single","bPayload":{"action":"setbrightness","group":"1d606bc8d9eb7c1241805d7b07c81f1d","param":"50","priority":"254"},"bState":"","defaultpriority":true,"x":1100,"y":500instanceType":3,"dali2t1":"10","dali2t2":"","mode":"","x":130,"y":180,"wires":[["e80d35a8.6d7d1"]]},{"id":"39f5c80b.08bad","type":"dali2devs","z":"463437f9.dd86a8","g":"8b0cf8a1.a69ad8","name":"Motion Sensor no2","uid":"00000003A4214709BC","dali2dev":"0","instanceType":3,"dali2t1":"10","dali2t2":"","mode":"","x":130,"y":260,"wires":[["b8f3ec05e80d35a8.aea9286d7d1"]]},{"id":"e72d29ddb88f58bc.e884dff27","type":"commentdali2devs","z":"463437f9.dd86a8","g":"4eabee838b0cf8a1.2562fa69ad8","name":"ThisMotion flow does not check and compare values from all sensorsSensor no3","infouid":"00000003A4214709BC","xdali2dev":790"0","yinstanceType":6403,"wiresdali2t1":[]},{"id"10","dali2t2":"ee592f75.794d8","typemode":"change","zx":130,"463437f9.dd86a8y":340,"gwires":[["4eabee83e80d35a8.2562f6d7d1"]]},{"nameid":"f610cec.980f33","rulestype":[{"t"es cct","z":"set463437f9.dd86a8","pg":"payloadd176b7eb.c2ce1","ptname":"msg","tostartTime":"level07:00","totfinishTime":"flow"}19:00","colorLevels":[4500,5000,6500,6500,5000,5000,6500,6500,5000,4500,3000],"actioncolorLabels":["07:00","property"09:00"","from"09:20"","to"10:50"","reg11:10":false,"x12:30":870,"y12:50":500,"wires"14:[["e5bc2fd6.9ea6a"]]},{"id":"528a5ffd.1eb02","type":"vertex action","z":"463437f9.dd86a8","g":"4eabee83.2562f","name":"Direct Value","typeButton":"single","bPayload":{"action":"setbrightness","group":"1d606bc8d9eb7c1241805d7b07c81f1d","param":"50","priority":"254"},"bState":"","defaultpriority":true,"x":1100,"y":540,"wires":[["b8f3ec05.aea928"]]},{"id":"d7a95c3c.92cb28","type":"vertex action","z":"463437f9.dd86a8","g":"4eabee83.2562f","name":"Direct Value","typeButton":"single","bPayload":{"action":"setbrightness","group":"1d606bc8d9eb7c1241805d7b07c81f1d","param":"50","priority":"254"},"bState":"","defaultpriority":true,"x":1100,"y":580,"wires":[["b8f3ec05.aea928"]]},{"id":"8b0cf8a1.a69ad8","type":"group","z":"463437f9.dd86a8","name":"Correct","style":{"stroke":"#92d04f","fill":"#e3f3d3","label":true,"label-position":"n","color":"#009919"},"nodes":["e80d35a8.6d7d1","d361885a.96a2c8","39f5c80b.08bad","b88f58bc.dff27","931d822f.61c8d","ec01ed4.c44cc9","61f904f6.91ebd4","bb07db98.3080b","90fa4b74.21e36","ff7fa553.91a68"],"x":74,"y":139,"w":1412,"h":262},{"id":"e80d35a8.6d7d1","type":"vertex action","z":"463437f9.dd86a8","g":"8b0cf8a1.a69ad8","name":"Motion sensor","typeButton":"motionsensor","bPayload":{"PRESENCE":{"action":"setbrightness","group":"1d606bc8d9eb7c1241805d7b07c81f1d","param":"50","priority":"255"},"TRANSITION":{"action":"setbrightness","group":"1d606bc8d9eb7c1241805d7b07c81f1d","param":"50","priority":"0"},"NOPRESENCE":{"action":"setbrightness","group":"1d606bc8d9eb7c1241805d7b07c81f1d","param":"0","priority":"254"}},"bState":"","defaultpriority":true,"x":530,"y":260,"wires":[["931d822f.61c8d"]]},{"id":"d361885a.96a2c8","type":"dali2devs","z":"463437f9.dd86a8","g":"8b0cf8a1.a69ad8","name":"Motion Sensor no1","uid":"00000003A4214709BC","dali2dev":"0","instanceType":3,"dali2t1":"10","dali2t2":"","mode":"","x":190,"y":180,"wires":[["e80d35a8.6d7d1"]]00","14:20","17:00","19:00"],"brightnessLevels":[50,80,100,100,80,80,100,100,80,50,30],"brightnessLabels":["07:00","09:00","09:20","10:50","11:10","12:30","12:50","14:00","14:20","17:00","19:00"],"sendFrequencyInMinutes":1,"cctMin":2700,"cctMax":6500,"x":100,"y":60,"wires":[[],["6f775291.3e5eac"]]},{"id":"6f775291.3e5eac","type":"change","z":"463437f9.dd86a8","g":"d176b7eb.c2ce1","name":"","rules":[{"t":"set","p":"level","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":80,"wires":[[]]},{"id":"b8f3ec05.aea928","type":"vertex cluster","z":"463437f9.dd86a8","g":"4eabee83.2562f","rate":5,"x":1330,"y":520,"wires":[]},{"id":"39f5c80b2ab3617c.08bad777f76","type":"dali2devs","z":"463437f9.dd86a8","g":"8b0cf8a14eabee83.a69ad82562f","name":"Motion Sensor no2no1","uid":"00000003A4214709BC","dali2dev":"011","instanceType":31,"dali2t1":"10"90,"dali2t2":"","mode":"","x":190130,"y":260440,"wires":[["e80d35a89b11bc35.6d7d1aa856"]]},{"id":"b88f58bc6d1ba9c4.dff276aeb9","type":"dali2devs","z":"463437f9.dd86a8","g":"8b0cf8a1.a69ad8","name":"Motion Sensor no3","uid":"00000003A4214709BC","dali2dev":"0","instanceType":3,"dali2t1":"10","dali2t2":"","mode":"4eabee83.2562f","xname":190,"y":340"Motion Sensor no2","wiresuid":[["e80d35a8.6d7d1"]]},{"id00000003A4214709BC","dali2dev":"931d822f.61c8d8","typeinstanceType":"switch"1,"zdali2t1":"463437f9.dd86a810","gdali2t2":"8b0cf8a1.a69ad8","namemode":"Presence/Transition/NoPresence","propertyx":130,"payload.MSEVENTy":520,"propertyTypewires":[["msg","rules":[{"t9b11bc35.aa856"]]},{"id":"eq25ee059.d3e137a","vtype":"0dali2devs","vtz":"num463437f9.dd86a8"},{"tg":"eq4eabee83.2562f","vname":"1Motion Sensor no3","vtuid":"num00000003A4214709BC"},{"tdali2dev":"eq11","vinstanceType":"2"1,"vtdali2t1":"num10"}],"checkalldali2t2":"true","repairmode":false,"outputs":3,"x":820130,"y":260600,"wires":[["bb07db98.3080b"],["ec01ed4.c44cc9"],["ec01ed4.c44cc99b11bc35.aa856"]]},{"id":"ec01ed49b11bc35.c44cc9aa856","type":"vertex clusterswitch","z":"463437f9.dd86a8","g":"8b0cf8a14eabee83.a69ad82562f","ratename":5"Presence/Transition/NoPresence","xproperty":1390"payload.MSEVENT","ypropertyType":260"msg","wiresrules":[]},{"idt":"61f904f6.91ebd4eq","typev":"vertex action0","zvt":"463437f9.dd86a8num"},{"gt":"8b0cf8a1.a69ad8eq","namev":"Direct Value1","typeButtonvt":"directvnum"},"bPayload":{"actiont":"setbrightnesseq","groupv":"1d606bc8d9eb7c1241805d7b07c81f1d2","paramvt":0"num"}],"prioritycheckall":"254true"},"bStaterepair":false,"outputs":3,"defaultpriorityx":true440,"xy":1240520,"ywires":220,"wires":[["ec01ed4.c44cc9[["ee592f75.794d8"],["528a5ffd.1eb02"],["d7a95c3c.92cb28"]]},{"id":"bb07db98e5bc2fd6.3080b9ea6a","type":"changevertex action","z":"463437f9.dd86a8","g":"8b0cf8a14eabee83.a69ad82562f","name":"Direct Value","rulestypeButton":"single","bPayload":[{"t"action":"setbrightness","group":"1d606bc8d9eb7c1241805d7b07c81f1d","param":"50","priority":"254"},"bState":"set","pdefaultpriority":true,"payloadx":1040,"pty":"msg"480,"towires":[["level","totb8f3ec05.aea928"]]},{"id":"flowe72d29dd.e884"}],"actiontype":"comment","propertyz":"463437f9.dd86a8","fromg":"4eabee83.2562f","toname":"This flow does not check and compare values from all sensors","info":"reg":false,"x":1060730,"y":220620,"wires":[["61f904f6.91ebd4"]]},{"id":"90fa4b74ee592f75.21e36794d8","type":"injectchange","z":"463437f9.dd86a8","g":"8b0cf8a14eabee83.a69ad82562f","name":"Presence","propsrules":[{"pt":"payloadset"},{"p":"topicpayload","vtpt":"strmsg"}],"repeatto":"level","crontabtot":"flow"}],"onceaction":false,"onceDelay":0.1,"topic":"","payload":"{\"MSEVENT\": 0, \"UID\": \"FAKE1\"}","payloadType":"json","property":"","from":"","to":"","reg":false,"x":500810,"y":320480,"wires":[["e80d35a8e5bc2fd6.6d7d19ea6a"]]},{"id":"ff7fa553528a5ffd.91a681eb02","type":"injectvertex action","z":"463437f9.dd86a8","g":"8b0cf8a1.a69ad84eabee83.2562f","name":"Direct Value","typeButton":"single","bPayload":{"action":"setbrightness","namegroup":"No presence1d606bc8d9eb7c1241805d7b07c81f1d","propsparam":[{"p"50","priority":"payload254"},{"pbState":"topic","vtdefaultpriority":true,"strx"}]:1040,"repeaty":""520,"crontabwires":[["b8f3ec05.aea928"]]},{"onceid":false,"onceDelay":0.1d7a95c3c.92cb28","topictype":"vertex action","payloadz":"{\"MSEVENT\": 2, \"UID\": \"FAKE1\"}","payloadType":"json","x":510,"y":360,"wires":[["e80d35a8.6d7d1"]]},{"id":"d176b7eb.c2ce1","type":"group","z":"463437f9.dd86a8","name":"Global values","style":{"stroke":"#a4a4a4","label":true,"color":"#777777","fill":"#d1d1d1","label-position":"n"},"nodes":["f610cec.980f33","6f775291.3e5eac"],"x":74,"y":19,"w":372,"h":102463437f9.dd86a8","g":"4eabee83.2562f","name":"Direct Value","typeButton":"single","bPayload":{"action":"setbrightness","group":"1d606bc8d9eb7c1241805d7b07c81f1d","param":"50","priority":"254"},"bState":"","defaultpriority":true,"x":1040,"y":560,"wires":[["b8f3ec05.aea928"]]},{"id":"ec01ed4.c44cc9","type":"vertex cluster","z":"463437f9.dd86a8","g":"8b0cf8a1.a69ad8","rate":5,"x":1330,"y":260,"wires":[]},{"id":"f610cec61f904f6.980f3391ebd4","type":"esvertex cctaction","z":"463437f9.dd86a8","g":"d176b7eb8b0cf8a1.c2ce1a69ad8","name":"Direct Value","startTimetypeButton":"07:00directv","finishTimebPayload":"19:00","colorLevels":[4500,5000,6500,6500,5000,5000,6500,6500,5000,4500,3000],"colorLabels":["07:00","09:00","09:20","10:50","11:10","12:30","12:50","14:00","14:20","17:00","19:00"],"brightnessLevels":[50,80,100,100,80,80,100,100,80,50,30],"brightnessLabels":["07:00","09:00","09:20","10:50","11:10","12:30","12:50","14:00","14:20","17:00","19:00"],"sendFrequencyInMinutes":1,"cctMin":2700,"cctMax":6500,"x":160,"y":60,"wires":[[],["6f775291.3e5eac{"action":"setbrightness","group":"1d606bc8d9eb7c1241805d7b07c81f1d","param":0,"priority":"254"},"bState":"","defaultpriority":true,"x":1180,"y":220,"wires":[["ec01ed4.c44cc9"]]},{"id":"bb07db98.3080b","type":"change","z":"463437f9.dd86a8","g":"8b0cf8a1.a69ad8","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"level","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":220,"wires":[["61f904f6.91ebd4"]]},{"id":"6f77529194e89581.3e5eac61b18","type":"changeswitch","z":"463437f9.dd86a8","g":"d176b7eb8b0cf8a1.c2ce1a69ad8","name":"Presence/Transition/NoPresence","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"setMOTIONSENSOR/PRESENCE","pvt":"levelstr"},{"ptt":"floweq","tov":"payloadMOTIONSENSOR/TRANSITION","totvt":"msgstr"}],{"actiont":"eq","propertyv":"MOTIONSENSOR/NOPRESENCE","fromvt":"str"}],"tocheckall":"true","regrepair":false,"outputs":3,"x":350740,"y":80260,"wires":[["bb07db98.3080b"],["ec01ed4.c44cc9"],["ec01ed4.c44cc9"]]}] |
This is example flow related to: Change node - Setting and triggering variables
...
One of the above commands is sent directly to the vertex cluster node
OR
It can be splited by the msg.payload.MSEVENTtopic value:
...
Tricks & tips:
Fake sensor events:
...