Node-red-contrib-counter

@kxn25
UPDATE: after more research, this is not a bug in node-red-contrib-counter, it is an issue with how javascript handles decimals. Ther is a great explaination at http://adripofjavascript.com/blog/drips/avoiding-problems-with-decimal-math-in-javascript.html

The solution for you is to use whole numbers and device by 1000 when you want to use it. Here is an updated flow as an example:

[{"id":"33f1976d.907798","type":"inject","z":"674b54ba.c0ebf4","name":"increment","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":380,"y":420,"wires":[["381f2c71.f7670c"]]},{"id":"381f2c71.f7670c","type":"counter","z":"674b54ba.c0ebf4","name":"","init":"0","step":"1","lower":"","upper":"","mode":"increment","outputs":"1","x":540,"y":480,"wires":[["295107a1.67cc58","b98146ef.0ab288"]]},{"id":"b98146ef.0ab288","type":"change","z":"674b54ba.c0ebf4","name":"flow.counter = count ","rules":[{"t":"set","p":"counter","pt":"flow","to":"count","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"count/1000","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":480,"wires":[["ea0c2a5f.fcd858"]]},{"id":"9b5e941a.b9cbf","type":"inject","z":"674b54ba.c0ebf4","name":"reset","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"num","x":110,"y":480,"wires":[["6f0843b0.c5be9c"]]},{"id":"6f0843b0.c5be9c","type":"change","z":"674b54ba.c0ebf4","name":"delete flow.counter, reset count","rules":[{"t":"set","p":"reset","pt":"msg","to":"true","tot":"bool"},{"t":"delete","p":"counter","pt":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":480,"wires":[["381f2c71.f7670c"]]},{"id":"295107a1.67cc58","type":"debug","z":"674b54ba.c0ebf4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"count","targetType":"msg","x":710,"y":420,"wires":[]},{"id":"ea0c2a5f.fcd858","type":"debug","z":"674b54ba.c0ebf4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"count","statusType":"msg","x":930,"y":480,"wires":[]}]