Node-RED Particle node keeps sending the very first value

I’m trying to use the node-red-contrib-particle-official.

I’m facing a strange behaviour: the very first value sent is kept on the following messages.

What I have already done:

  1. Created a Particle OAuth client and reported the Client ID and Client Secret to the Particle Publish node.
  2. Populate properties event and payload.
  3. Subscribed to the same event.

Both the Node-RED debug pane and the Particle console list the same value 0.

When sending the messages from the console, the correct value is received.

Am I doing something wrong with the Node-RED node? Thank you for your help!


  • The Node-RED flow
[{"id":"9f2ac2d1.aa9d18","type":"particle-publish","z":"74fa81ef.39a3f","name":"","auth":"e99276df.2a63","scope":"user","product":"","event":"","x":520,"y":160,"wires":[]},{"id":"2211e8fc.d95e9","type":"inject","z":"74fa81ef.39a3f","name":"","props":[{"p":"payload"},{"p":"event","v":"message","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"0","payloadType":"str","x":190,"y":100,"wires":[["9f2ac2d1.aa9d18","5a10778c.04eb1"]]},{"id":"e2a7f909.df0c4","type":"inject","z":"74fa81ef.39a3f","name":"","props":[{"p":"payload"},{"p":"event","v":"message","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"str","x":190,"y":160,"wires":[["9f2ac2d1.aa9d18","5a10778c.04eb1"]]},{"id":"ea29c7ff.b7f688","type":"particle-subscribe","z":"74fa81ef.39a3f","name":"","auth":"e99276df.2a63","scope":"user","product":"","event":"message","device":"","x":140,"y":280,"wires":[["ac72b4a4.edeed8"]]},{"id":"ac72b4a4.edeed8","type":"debug","z":"74fa81ef.39a3f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":280,"wires":[]},{"id":"5a10778c.04eb1","type":"debug","z":"74fa81ef.39a3f","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":530,"y":100,"wires":[]},{"id":"e99276df.2a63","type":"particle-config","clientId":"messages-1188","clientSecret":"9879ec938690619f94f707b88bfae5992a6c277d"}]

I tried the non-official node-red-contrib-particle with the same configuration and it works fine.

No answers on the forum, so I raised a ticket at https://github.com/particle-iot/node-red-contrib-particle-official/issues/1

This is almost certainly a bug in the official Particle node. It was a known bug in the Rules Engine implementation and I thought I fixed it when I made the public version but I forgot I backed that change out during testing because it introduced a different problem so the bug is back again. When I get a chance I’ll fix it for real.

1 Like