MQTT sync'd Christmas strip lights

Bit early for Christmas, but I’ve been making a Christmas strip light display.
The strips are either wrapped around various frames such as Christmas tree shape or poles etc.
This project was more an application for me to learning Python and MQTT rather than boring old C++ that I’ve done for the past 40+ years. So this may well have been done before and better.
I’ve created an MQTT driven LED strip light project that allows me to coordinate and then choreograph a large number of LED strip lights via a Raspberry Pi 3b.
I have a number of cheap 5 metre 12 volt strip lights that use the GS1903 chip driven either by the AllPixel Mini or directly via the Pi’s SPI or PWM outputs with level converters.

Each Raspberry Pi manages up to four strips.
There is any number of Pi’s listening on a WiFi network for Animation sequences arriving via MQTT addressed either globally, grouped, strip specific, to perform from a set of about 40. Each Animation sequence also has options such as colours and such which are provided in the MQTT message.

At this moment (April 2020) I can control via my phone or laptop any of the strips in groups or singles to start an animation of my choice and stop.
The next stage of this project is to create a sequencer / choreographer that lets me send out the various MQTT messages at timed intervals to create a long looping lighting show :slight_smile:

1 Like

I look forward to seeing this develop.

I’ve managed to get a usable system working.
I’m now curious as to what Adam would think of this as I’ve created this in a bubble where I had a vision of what I wanted and didn’t know how to read what Bibliopixel has to offer as it seemed incompatible or going in a different direction with what I was trying to do.
Not sure if my attachments will be visible. But they should show an architectural diagram and a screen capture of the Choreographer I’ve been writing.

Interesting. I’m a little confused though… is it using BiblioPixel under the hood? If so, how exactly?

Hi Adam,
The Choreographer doesn’t use Bibliopixel at all but the Raspberry Pi’s attached to the AllPixel imports the bibliopixel library.
I’m not sure how much of the bibliopixel I’m actually using. I’m guessing it’s really mainly from this - from bibliopixel.drivers.serial import *

I started with one of your Allpixel Strip animation demos from 2 years ago, as the basis rather than your newer JSON/Yaml based system, then hacked them a bit to suit. So it’s very much a bottom up design. I needed to be able to have full control over the integrity of the strip controllers, things like being able to hot plug strips, whilst repairing things :slight_smile:

Oh - so you just used the serial driver and then ported the animations?

I do use the Strip class which inherits the Animation class from Bibliopixel which “Runs” the animations. My hacks were to pass in additions like colour and to make sure they all utilize the “completed” flag. Basically I use their step time to synchronize or calculate each animations duration. So that animations that have a fixed length such as Ping Pong which must complete an up down, can be syn’d with an animation such as Rainbow, which can be stopped at any time without it appearing odd.

Ah, cool. You have the source up somewhere that I could look at?

For you personally, Yes. But I don’t want it public as I’m not sure where I’m going with this. It’s not very python in it’s style as I’ve avoided modules due to debugging issues.