Bifrost - Control pixelblaze with Philips Hue switches

Hi all,

I’ve got a couple of Pixelblaze controllers running lighting in my kitchen and bar, and I wanted an easy way to control them without needing a web browser. I’ve also got Philips Hue lights, and a raspberry Pi in my network box. I’ve built a system that can cycle through playlists from the hue switches, turn the lights on and off, and set brightness.

You configure the switch as normal in the hue app, but don’t use it to control normal hue lights), then need to run a few docker containers (a Hue to MQTT bridge, an MQTT server, and my MQTT to Pixelblaze code), which needs a bit of configuration and somewhere running docker to actually host things, but then you can map between lights and pixelblaze instances with a bit of YAML configuration, and set the actual playlists to use in the pixelblaze UI as normal (but don’t run them, the switch will cycle through them but gets very confused if the playlist is already doing that!)

The container is up on the docker registry, including an example docker-compose.yml file to get the three containers up and running on a Pi or similar, I’ve not tried any other platforms and my docker knowledge is extremely limited, but I imagine it’d work elsewhere.

Docker has more information, hopefully it’s useful to someone else!



Very cool! I’ve been working on something like this, but portable. It definitely has fewer capabilities so far than you described.

1 Like

I’ve made use of the excellent python library to do the pixelblaze communication, just pushed everything to github (although it’s not complicated particularly it might be useful as an example if you’re trying to do something similar?) GitHub - tomoinn/bifrost: Bridge from MQTT to Pixelblaze

1 Like

Right now it’s in C++ on an esp32 breakout. I’m still fighting with the websocket client. My hope is to build something necklace-ish that packs a PB with a sensor board, a seeeduino xiao esp32, and a potentiometer to control brightness. The idea is that the packaged PB would act as an AP for a sync network that controlled whatever wearables you were doing that night and fed them audio data. I’ll probably try to build in a small amp for a connected mic.

1 Like

@TomO, this is all kinds of cool! And your setup looks great too!

Thanks for writing the python library, certainly simplified what I had to do! I did find I had to be quite careful with managing how the pixelblaze objects were instantiated to avoid some kind of stale state, but once that was done it was plain sailing.

Those bottle shelves are IKEA bookcases, I routed out a channel for the pixels on each one and connected power rails on the top and bottom, the power supply and controller are in one of the opaque sections. I’ve got a mapping defined for each shelf so I can do patterns that light up depending on the shelf index which works really nicely too.


A few updates!

  • New version of the python library increases stability
  • Correctly sets the play from playlist state
  • Pixelblazes can be identified by name or by style IP addresses, bypassing detection and slightly improving speed (just use the IP address instead of the name)
  • MQTT messages with the key bifrost/SWITCH_NAME/[ON|OFF|UP|DOWN] can be sent directly to simulate presses on the named switch. I added this because I’ve retired my Hue hub in favour of home assistant, but kept the dimmers directly attached over zigbee. If you’re in a similar position I’ve added a Home Assistant blueprint at Control PixelBlaze with ZHA Hue Dimmer Switches - Blueprints Exchange - Home Assistant Community which will replicate the previous behaviour you’d have with the Hue hub and the Hue2MQTT container

As before, let me know if it’s useful :slight_smile:


…I’ve retired my Hue hub in favour of home assistant…

Interesting, @TomO - I’m planning to do something similar. Definitely less than thrilled about Philips adding an internet account login requirement to the hub to somehow “improve security”. What zigbee hardware did you wind up using for this? Did you have any trouble getting it to work?

@zranger1 I’m using a raspberry pi 4 to run the home assistant instance, with Sonoff ZBDongle E - ZigBee USB 3.0 Dongle Plus – Local Bytes to talk to zigbee things, running everything in docker containers. It pretty much just worked, unpaired the bulbs from the hue hub and they became available for discovery using ZHA, and reset the dimmer switches with a toothpick and likewise, they all just appeared and worked. I expected it to be harder than it was, that’s for sure.