Counter

I think maybe someone maybe want a counter ╮(╯_╰)╭

[{"id":"99785fc8.6687a","type":"inject","name":"trigger at start","topic":"","payload":"0","payloadType":"string","repeat":"","crontab":"","once":true,"x":212,"y":255,"z":"9d18b16.f62e75","wires":[["9bc2c452.643d38"]]},{"id":"9bc2c452.643d38","type":"function","name":"counter","func":"msg.payload = parseInt(msg.payload) + 1;\nreturn msg;","outputs":"1","x":553,"y":257,"z":"9d18b16.f62e75","wires":[["fc921218.036df","5cbf5a97.a340a4"]]},{"id":"fc921218.036df","type":"delay","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":552,"y":187,"z":"9d18b16.f62e75","wires":[["9bc2c452.643d38"]]},{"id":"5cbf5a97.a340a4","type":"debug","name":"","active":true,"console":false,"complete":false,"x":855,"y":256,"z":"9d18b16.f62e75","wires":[]}]

Flow Info

Created 10 years, 9 months ago
Updated 9 years, 3 months ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • debug (x1)
  • delay (x1)
  • function (x1)
  • inject (x1)

Tags

  • counter
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option