I tried the flow on the google group but the double press doesn't work, I got two "single events" for some reason msg.count stay = 1 I'm not sure why I've never used msg.count... maybe this was written for an older version of node-red?
Edit: Sorry I think I got it, for some reason when the flow is imported the timed-counter loose some settings
Hope that will help someone else
I'm leaving this here in the case that can help someone else
[{"id":"6def0a28.c0dac4","type":"timed-counter","z":"7cc53c0e.cfd8cc","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":2300,"y":860,"wires":[["40d79de.c9ef9e4"]]},{"id":"4442ebe6.cbd40c","type":"switch","z":"7cc53c0e.cfd8cc","name":"","property":"payload.value","propertyType":"msg","rules":[{"t":"eq","v":"1","vt":"str"},{"t":"eq","v":"0","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":2150,"y":880,"wires":[["6def0a28.c0dac4"],["a4fade63.72ccd"]]},{"id":"40d79de.c9ef9e4","type":"function","z":"7cc53c0e.cfd8cc","name":"Single/Double/Long","func":"var pressTime;\n\nif (msg.count >= 2 && msg.payload.value == '1')\n{\n msg.payload = \"double\";\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n}\nif (msg.count == 1){\n if (msg.payload.value == '1') { //Pressed\n pressTime = Date.now(); \n //node.send({payload:{pressTime}});\n context.set('pressTime',pressTime);\n }\n pressTime = context.get('pressTime');\n //node.send({payload:{pressTime}});\n if (msg.payload.value === '0' && pressTime !== null) { //Released\n releaseTime = Date.now(); \n \n var timeDiff = releaseTime-pressTime;\n //node.send({payload:{timeDiff}});\n if (releaseTime-pressTime>350) {msg.payload = \"long\";}\n else {msg.payload = \"single\";}\n context.set('pressTime',null);\n context.set('releaseTime',null);\n return msg;\n }\n}","outputs":1,"noerr":0,"x":2500,"y":880,"wires":[["93be91ac.a3d7e8"]]},{"id":"93be91ac.a3d7e8","type":"debug","z":"7cc53c0e.cfd8cc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":2696.250015258789,"y":880.0000019073486,"wires":[]},{"id":"a4fade63.72ccd","type":"timed-counter","z":"7cc53c0e.cfd8cc","name":"","timelimit":"350","timeunit":"1","withhold":true,"fixedtimeout":false,"pertopic":false,"x":2300,"y":900,"wires":[["40d79de.c9ef9e4"]]},{"id":"ba9d9965.589358","type":"delay","z":"7cc53c0e.cfd8cc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"8","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1990,"y":840,"wires":[["4442ebe6.cbd40c"]]},{"id":"47c4f184.73c2d8","type":"function","z":"7cc53c0e.cfd8cc","name":"Double","func":"node.send({ payload: {\"value\":\"1\"} });\nnode.send({ payload: {\"value\":\"0\"} });\nnode.send({ payload: {\"value\":\"1\"} });\nnode.send({ payload: {\"value\":\"0\"} });","outputs":1,"noerr":0,"x":1840,"y":840,"wires":[["ba9d9965.589358"]]},{"id":"3f51bc93.7b1ec4","type":"function","z":"7cc53c0e.cfd8cc","name":"Single","func":"node.send({ payload: {\"value\":\"1\"} });\nnode.send({ payload: {\"value\":\"0\"} });","outputs":1,"noerr":0,"x":1830,"y":880,"wires":[["39aba5b6.6d3bc2"]]},{"id":"b5ddd272.b5564","type":"function","z":"7cc53c0e.cfd8cc","name":"Long","func":"node.send({ payload: {\"value\":\"1\"} });\nnode.send({ payload: {\"value\":\"0\"} });","outputs":1,"noerr":0,"x":1830,"y":920,"wires":[["ab0da844.5ade48"]]},{"id":"ab0da844.5ade48","type":"delay","z":"7cc53c0e.cfd8cc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1990,"y":920,"wires":[["4442ebe6.cbd40c"]]},{"id":"bb481312.8baad","type":"inject","z":"7cc53c0e.cfd8cc","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"","x":1700,"y":840,"wires":[["47c4f184.73c2d8"]]},{"id":"2e72cb09.7d773c","type":"inject","z":"7cc53c0e.cfd8cc","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":1700,"y":880,"wires":[["3f51bc93.7b1ec4"]]},{"id":"1b11f668.944d2a","type":"inject","z":"7cc53c0e.cfd8cc","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":1700,"y":920,"wires":[["b5ddd272.b5564"]]},{"id":"39aba5b6.6d3bc2","type":"delay","z":"7cc53c0e.cfd8cc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"4","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":1990,"y":880,"wires":[["4442ebe6.cbd40c"]]},{"id":"e1561be4.c4a218","type":"comment","z":"7cc53c0e.cfd8cc","name":"Emulation of press/release events","info":"","x":1920,"y":800,"wires":[]}]
The timed-counter node can be found here