Hi, some time ago I’ve created a flow to detect single/double/triple click. I put it here so others can use it.
Copy and select Import in the node-RED to use the flow.
[{"id":"92cf627f.2ad4a","type":"inject","z":"93c7e767.1355c8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":200,"wires":[["6223891d.e5d878"]]},{"id":"c2dbb31a.6f1e9","type":"debug","z":"93c7e767.1355c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":950,"y":200,"wires":[]},{"id":"99fa2425.52ef38","type":"trigger","z":"93c7e767.1355c8","op1":"","op2":"0","op1type":"nul","op2type":"num","duration":"2000","extend":false,"units":"ms","reset":"","bytopic":"all","name":"","x":540,"y":200,"wires":[["27db4813.6c4fb8"]]},{"id":"6223891d.e5d878","type":"function","z":"93c7e767.1355c8","name":"","func":"counter = flow.get(\"counter\") | 0;\ncounter++;\n\nflow.set(\"counter\", counter);\n\nreturn msg;","outputs":1,"noerr":0,"x":350,"y":200,"wires":[["99fa2425.52ef38"]]},{"id":"27db4813.6c4fb8","type":"change","z":"93c7e767.1355c8","name":"clear counter","rules":[{"t":"set","p":"payload","pt":"msg","to":"counter","tot":"flow"},{"t":"set","p":"counter","pt":"flow","to":"0","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":200,"wires":[["c2dbb31a.6f1e9"]]},{"id":"aead153b.dced68","type":"mqtt in","z":"93c7e767.1355c8","name":"","topic":"node/push-button:0/push-button/-/event-count","qos":"2","broker":"732137d.d2b0dc8","x":270,"y":120,"wires":[["6223891d.e5d878"]]},{"id":"732137d.d2b0dc8","type":"mqtt-broker","z":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willPayload":"","birthTopic":"","birthQos":"0","birthPayload":""}]
Martin