
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
node-red-contrib-lifx
Advanced tools
With this node you can control LIFX light bulbs using Node-RED. The module is mostly a wrapper for unofficial (but great) lifxjs library.
This node depends on lifxjs library version 0.2.1, which should be compatible with the latest versions of LIFX firmware (1.5 was tested).
If you use older versions of firmware (probably before 1.2), use version 0.2.x of this package or v0.2 branch.
You can install latest release from npm. In your Node-RED directory run:
npm install node-red-contrib-lifx
Alternatively you can clone repository into nodes/ directory and install npm dependencies manually:
cd path/to/node-red/
cd nodes
git clone https://github.com/jnv/node-red-contrib-lifx
cd node-red-contrib-lifx
npm install
Once you restart Node-RED server, there should be a lifx node available in the nodes palette under output category.

On every received message node sends commands to all LIFX light bulbs.
Initial configuration can be set through node's configuration options, including debug mode for underlying lifxjs library, which dumps network communication. Node will send initial configuration to light bulbs each time the graph is deployed.

Both initial configuration and message works with the following parameters, which are passed to lifxjs library:
on (bool) – whether the light should be on, or off; true by defaulthue (uint16) – primary color of light; 0xCC15 by defaultsaturation (uint16) – “how much of color” to use, generally 0x0000 for white and 0xFFFF for full color; 0xFFFF by defaultluminance (uint16) – light intensity; 0x8000 by defaultwhiteColor (uint16) – color temperature (?); 0x0000 by defaultfadeTime (uint32) – how quickly the new state should be changed, 0 causes an immediate change, maximum is 0xFFFFFFFF; 0x0513 by defaultNumbers can be passed as strings too.
Node expects a message with the following structure:
{
payload: {
on: true,
hue: 0xCC15,
// etc…
}
}
msg.payload is an object with none, some, or all parameters. Input parameters are stored and merged with previously passed parameters (or defaults) and then sent to light bulbs.
Therefore you can change only one parameter in the payload and the rest will be remembered and resent.
On received message node sends a payload with its current stored state. E.g.:
{
payload: {
on: true,
hue: '0xCC15',
saturation: '0xFFFF',
luminance: '0x8000',
whiteColor: '',
fadeTime: '0x0513'
}
}
FAQs
Control LIFX wifi lightbulbs with Node-RED.
We found that node-red-contrib-lifx demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.