Anyone try to program multi functions on single rf 433mhz button (single press/double press/triple press) on node-red?
If yes please share the flow?
Anyone try to program multi functions on single rf 433mhz button (single press/double press/triple press) on node-red?
If yes please share the flow?
I already figured out how.
If someone have same problem here is solution flow for node-red:
[{“id”:“60d23b4b.041e64”,“type”:“switch”,“z”:“5c2a0070.710c5”,“name”:“hallway-switch-01”,“property”:“raw.data”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“0xA42078”,“vt”:“str”},{“t”:“eq”,“v”:“0xA42074”,“vt”:“str”},{“t”:“eq”,“v”:“0xA42072”,“vt”:“str”},{“t”:“eq”,“v”:“0xA42071”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:4,“x”:318.33336639404297,“y”:1153.3334121704102,“wires”:[[“f844814b.47cd1”],,,]},{“id”:“574226fa.7b8d58”,“type”:“rfx-PT2262-in”,“z”:“5c2a0070.710c5”,“name”:“”,“port”:“7a18e91e.2262f8”,“deviceList”:“372f3955.7633c6”,“topicSource”:“all”,“topic”:“PT2262/0x371A26”,“x”:83.33332824707031,“y”:1161.666669845581,“wires”:[[“60d23b4b.041e64”,“d04cd775.5be0d8”]]},{“id”:“f844814b.47cd1”,“type”:“change”,“z”:“5c2a0070.710c5”,“name”:“switch-01-01.hallway”,“rules”:[{“t”:“set”,“p”:“payload”,“pt”:“msg”,“to”:“1”,“tot”:“str”},{“t”:“set”,“p”:“topic”,“pt”:“msg”,“to”:“home/hallway/switch-01-01”,“tot”:“str”}],“action”:“”,“property”:“”,“from”:“”,“to”:“”,“reg”:false,“x”:539.6667251586914,“y”:1123.333366394043,“wires”:[[“daabb718.94b618”]]},{“id”:“daabb718.94b618”,“type”:“timed-counter”,“z”:“5c2a0070.710c5”,“name”:“”,“timelimit”:“1000”,“withhold”:true,“fixedtimeout”:false,“x”:770.0000152587891,“y”:1128.000032901764,“wires”:[[“4ccf9380.8c9abc”]]},{“id”:“4ccf9380.8c9abc”,“type”:“function”,“z”:“5c2a0070.710c5”,“name”:“button-press-single/double”,“func”:“if (msg.count==2 || msg.payload!=="1")\n{\n msg.payload = "double";\n return msg;\n}\nif (msg.count==1 || msg.payload!=="1")\n{\n msg.payload = "single";\n return msg;\n}\n else {\n msg.payload = "error";\n return msg;\n}”,“outputs”:1,“noerr”:0,“x”:1032.000129699707,“y”:1126.000033378601,“wires”:[[“7c4a4013.5f2b”,“264e88fe.54dce8”]]},{“id”:“264e88fe.54dce8”,“type”:“switch”,“z”:“5c2a0070.710c5”,“name”:“”,“property”:“payload”,“propertyType”:“msg”,“rules”:[{“t”:“eq”,“v”:“single”,“vt”:“str”},{“t”:“eq”,“v”:“double”,“vt”:“str”}],“checkall”:“true”,“repair”:false,“outputs”:2,“x”:1307.0000381469724,“y”:1121.9999999999998,“wires”:[[“a88c36fc.6f0678”],[“496730bb.dd02”]]},{“id”:“a88c36fc.6f0678”,“type”:“api-call-service”,“z”:“5c2a0070.710c5”,“name”:“”,“server”:“992ece2a.6135e”,“service_domain”:“light”,“service”:“turn_on”,“data”:“{ "entity_id": "light.mqtt_light_hallway" }”,“mergecontext”:“”,“x”:1510.6666259765625,“y”:1066,“wires”:[]},{“id”:“496730bb.dd02”,“type”:“api-call-service”,“z”:“5c2a0070.710c5”,“name”:“”,“server”:“992ece2a.6135e”,“service_domain”:“light”,“service”:“turn_off”,“data”:“{ "entity_id": "light.mqtt_light_hallway" }”,“mergecontext”:“”,“x”:1506.6666259765625,“y”:1132,“wires”:[]},{“id”:“7a18e91e.2262f8”,“type”:“rfxtrx-port”,“z”:“”,“port”:“/dev/ttyUSB0”,“enableDebug”:true,“rfyVenetianMode”:“EU”},{“id”:“372f3955.7633c6”,“type”:“PT2262-device-list”,“z”:“”,“name”:“Sensor”,“devices”:[{“device”:[“PT2262”,“anteroom”],“payload”:“open”,“rawData”:“0x37f20a”,“pulseWidth”:463},{“device”:[“PT2262”,“bedroom”],“payload”:“open”,“rawData”:“0x875a0a”,“pulseWidth”:463},{“device”:[“PT2262”,“hallway”],“payload”:“motion”,“rawData”:“0x371a26”,“pulseWidth”:405}]},{“id”:“992ece2a.6135e”,“type”:“server”,“z”:“”,“name”:“hassio”,“url”:“http://hass-web-ui”,“pass”:“hass-web-ui-pass”}]