npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-red-contrib-zblight

v1.0.1

Published

Node-red node for controlling zigbee light bulbs.

Downloads

28

Readme

node-red-contrib-zblight

This project is an addon node for node-red, which allows you to control power and brightness of various zigbee based smart-bulbs using a Digi XBEE series 2 module.

Requirements

This requires the following npm packages to work properly:

  • node-red-node-serialport
  • xbee-api

Install these via npm, inside your node-red directory:

npm install node-red-node-serialport xbee-api node-red-contrib-zblight

XBEE Setup

You will need to have an XBEE Series 2 module to communicate with the zigbee network, series 1/xbee 802.15.4 modules will not work. The XBEE Radio will need to have the Zigbee Coordinator firmware flashed in to it.

In addition, you will need to make sure the following settings are correct:

  • ATZS = 2
  • ATEE = 1
  • ATEO = 1
  • ATAO = 1
  • ATAP = 1

This ensures that the xbee can communicate with Zigbee ZDO/ZCL devices, which is required by the Zigbee Home Automation Profile. The ATAP=1 also ensures that the xbee is placed into API mode.

Usage

flow mqtt-flow The node generates an API packet to be sent to the xbee module. You will need to configure the zblight node with the MAC address of the bulb you want to control, and the type of bulb you want to control.

Control of the bulbs is done fairly simply. Send a message to the node, with one of the following in the payload:

  • on
    • Turns the light on
  • off
    • Turns the light off
  • toggle
    • Toggles the light on or off
  • 0 - 255
    • Dims the light
  • 2700 - 6500
    • Sets the color temperature (if supported)
  • [0-255],[0,255]
    • Sets the hue and saturation (if supported)

If you dim a bulb, then turn it off, the next time you turn it on, it will be at the same brightness level.

config

You can also do more advanced grouping, by simply connecting a single output node to multiple zblight nodes.

grouping ui

In order to figure out the MAC address of the bulbs, as well as making sure the bulb joined your XBEE zigbee coordinator, you can use the Digi XCTU Software discovery mode. xctu

This will show all of the zigbee devices connected to your network, and the routing table between them. On my test network (above), I have A GE Link bulb (7E), A Cree Connected (E2), and a Philips Hue White (00)

If your bulbs do not connect to your network, or if they have been joined to a different network previously, they will need to be factory reset. For the Link and the Cree bulbs, this is done with a specific on/off pattern, for the hue bulbs, they have to be reset with either a touchlink remote, or the hue hub.

Compatibility

Currently, the node has been tested with the following bulbs:

  • GE Link
  • Cree Connected
  • Philips Hue White (RGBW bulbs should work, but have not been tested)
  • Osram/Sylvania Lightify (White, Tunable White, and RGBW)

Those are the bulbs I currently have, and have been able to test. I will be looking at aquiring more bulbs (including the Philips Hue RGBW bulbs) to add more compatibility.
These bulbs all support turning power on and off, as well as dimming with this node. The Osram/Sylvania Lightify (Tunable White and RGBW) bulbs have been tested to work with color temperature, as well as hue/saturation changes.