node-red-contrib-particle 0.0.7

Node-RED node to connect to Particle devices. Used to call functions, read variables or listen to Server-Sent Events (SSEs)

npm install node-red-contrib-particle


Node-RED node to connect to Particle Devices, either via local cloud, or the cloud. This can be used to connect to the Particle Core/Photon/P1/Electron, call functions, read variables or listen to Server-Sent-Events (SSEs).


npm install node-red-contrib-particle


Three separate nodes are provided to interact with Particle Devices – call a function, read a variable and subscribe to SSEs. The nodes have both INPUT and OUTPUTs – sending appropriate messages (e.g. topic & msg.payload) to the INPUT allows you to change the parameters dynamically.

Where appropriate, the OUTPUT provides returned data from the Particle cloud after a query has been made.

Please refer to the help sidebar in node-RED for full details on each node.

Basic Example

Write something similar to this in your Particle Build code:

void loop() {
    Particle.publish("randomnumber", String(random(100)), PRIVATE);

In node-RED, drop a Particle SSE node into the workspace, and connect a debug node to view the output:

[todo: image]

Configure the Particle node by adding your own Particle configuration credentials and access token.

View the results via the debug node.


I keep getting an Error in the ParticleSSE node!
It's likely your access token is incorrect. Regenerate a new token in, and try again with the new token in the configuration node.

Local Cloud and SSE Limitations

There are current limitations with the local cloud package from Particle, which prevents any subscription of device-specific and device-and-event-specific events. Effectively, if you are attempting to subscribe to a local cloud, you are currently only able to listen in on the public firehose (ALL SSEs), or on the event-specific public firehose. Use a function node to parse out what you need.

An equivalent of such requests using the RESTful API will resemble:




This is a forked project that built off @krvarma's node-red-contrib-sparkcore initial work (0.0.12).

Additional features implemented from node-red-contrib-particle 0.0.2+:

  • local cloud SSE (limited) support
  • configuration node implementation
  • dynamic property setting
  • implementation of separate nodes for clarity
  • renaming to Particle and other cosmetic fixes.

Node Info

Version: 0.0.7
Updated 8 months, 3 weeks ago
License: MIT
Rating: 4.0
(1 )


0 in the last day
123 in the last week
924 in the last month


  • particle-cloud
  • ParticleSSE in
  • ParticleFunc out
  • ParticleVar


  • node-red
  • particle
  • core
  • photon
  • electron
  • P1
  • node-red
  • iot
  • spark
  • device


  • chuank