[RELEASE] Pixelblaze addressable LED Controller Driver v1.00

First and foremost I would like to thank you for taking the time to write a driver and share it with this awesome community!
I had actually purchased a pixelblaze and funny enough, the same exact LED strips you're using before I started looking into using this with my home automations.
When I found this thread, I was a happy camper.

Long story short, I followed your README and set up the driver code, virtual device, and filled out the appropriate information (I think), but am having no such luck getting it to function.
I noticed in the IP address section, it says to include port #.
Do I have to set up port forwarding on my router for the pixelblaze?

I apologize if I'm missing something simple here as the custom drivers are new territory for me.
Thank you in advance for your help.

Hi!
Check the pixelblaze setup docs, but I'm pretty sure the port number is 81. So, the IP address you enter in the driver setup box will be in the form 192.168.1.104:81. (of course with your IP address in place of the 192.168...) If it doesn't connect immediately, on the Hubitat driver page, press the disconnect button, then the reconnect button, and everything should be OK. I wouldn't expect you'd have to change anything on your router, unless you know it's blocking ports on your LAN.
Also, be sure you've set the patterns for on and off in the driver.

(of course, this is assuming you've got the pixelblaze set up on your wifi -- if you don't, let me know, maybe I can help. )

Just an update -- I still have a new driver on the way, but I've been rethinking how I handle LED strips at home. I got tired of using multiple lighting control apps, and now everything goes through DIYhue, so I can use the factory Hue app for all lighting. I've written a protocol remapper that can convince DIYhue that virtually anything is a Hue device, including zwave motion sensors and bulbs attached to the Hubitat. It's running (as of yesterday), but twitchy atm. I'll post as soon as I think it's solid enough.

Thanks for the prompt reply!
I went back through the "standard" setup documentation and didn't see the port listed, then lo and behold in the "advanced" section under websockets, there it was, port 81...Doh.

It did indeed connect immediately and it works great.
Having the ability to set the global brightness level and active pattern based on motion, time, or literally any trigger is phenomenal.
Already made some simple motion rules with it that perform as expected in 30 minutes of playing.

A couple more basic questions for you.
What are you using getPatterns and setVariable for?
After using getPatterns, I see a pattern list in the device configs, but am unsure of what to use it for.
Along the same lines, when would I find myself needing to disconnect, reconnect, or initialize in normal use?

Glad to hear it's working for you!

Disconnect/reconnect are artifacts of my development process -- i.e., I caused a lot of crashes in the early going! In this version though, reconnect is useful if you reset your pixelblaze, since the current one doesn't automatically reconnect. The next version will have it, even though the pixelblazes have been very stable, and I have rarely needed to reconnect.

getPatterns is exposed to the user because there's no great way to automatically determine when somebody has edited or changed the pixelblaze's pattern list. I'll probably add automatic polling of some sort, but for now, if you add/delete/edit a pattern, you have to call getPatterns before the Hubitat will know about it.

setVariables can be used to set user defined variables in Pixelblaze patterns. Check the pixelblaze expression documentation for how to export variables in patterns so you can do this. You can use it to change the color, animation speed, etc. in response to a rule.

Presents wrapped, food prepared, house quiet... I finally have a moment to get this cleaned up and posted. I've updated the Pixelblaze driver to v1.00. See the first post in this thread for details and the pointer to the repository.

Merry Christmas & Happy Holidays all!

I have just put a new experimental alpha version of the pixelblaze driver in the repository in case anyone wants to play with it. This version allows you individual control of multiple segments per LED strip via child drivers and a special pixelblaze pattern.

To use it,

  1. Download and install HubitatPixelblazeDriverX.groovy and PixelblazeSegmentChild.groovy to your hub. When setting up the handler for your pixelblaze, select the "Pixelblaze Alpha X" driver.
  2. Download the pixelblaze pattern "Multisegment V1.epe" from the repository, and import it into your pixelblaze. This pattern must be selected and running on your pixelblaze for the whole segmentation trick to work.
  3. Set up the IP and options for the new pixelblaze device and make sure you can turn it on and off from your hub. Once you're connected, click the "Get Variables" button, and then the "Reset Children" button. This will read the current segmentation setup from the pixelblaze and create appropriate new child devices. I'll make it simpler and more bulletproof over the next few versions.
  4. Huzzah! Now you should be able to go to the individual child devices and use them like RGB lights -- on/off, set color, etc. You can still turn the whole strip on and off from the main pixelblaze driver. Note that if you switch away from the Multisegment pattern on the pixelblaze, the child devices will stop working. No worries -- they'll work again when you switch back.

Notes:
This is a very new thing -- possibly wobbly in places. If you have problems, questions or feature requests, just ask me!

The strip is initially divided into 4 equal segments. At this point, changing the number of segments requires editing the pixelblaze pattern. If you feel comfortable doing this, change the pattern to your liking, then "Reset Children" on the hub driver. The driver can adapt to any number of segments.

From the child driver, you can dynamically change the size of a segment using the "Set Size" command. Segments are filled from 0 up -- increasing the size of a lower numbered zone shrinks everything past it. In this version, I do very little parameter validation, so be a bit careful. (Maybe make a note of how many pixels the zone had initially, so you can reset it.)

Per zone special effects are not yet implemented, but are coming soon! :slight_smile:

1 Like

I've never noticed this before. Am I understanding correctly that yiu can adress change different segments independantly ?

This looks neat.

Looking closer this may be way too complicated for me.

It does indeed support dividing a strip into segments that are treated by the hub as essentially independent devices. As for complexity, I'd say... basic soldering skills, a little knowledge of electronics, plus familiarity with javascript or any similar language. It's not turnkey, but it's really not bad.

The pixelblaze's great strength is that it's user programmable, without any tools other than a web browser. It's fantastic for experimentation and prototyping. If you're looking for LED strip software that runs on similar hardware, but might be simpler to configure and integrate with a home control system, check out ESPHome and the Tasmota firmware.

1 Like

@zranger1

Just wanted to post and say thanks for this. I have been using LEDs (RGBs) forever with zigbee controllers mated either to the hub or via Philips Hue. I always wanted to mess with pixel LEDs but didn't know where to start nor did I have a really good project to use it for.

I am building some cabinetry and other stuff for video game system in a media room and found the perfect project for individually addressable LEDs but in terms of controller and integration I was lost until I found this thread.

I needed something that would integrate with Hubitat and was about to go the arduino route until I found this thread and the Pixelblaze and that you built a driver. IMMEDIATELY sold me.

Got my strip, PB and your code up and running in less than 20 minutes. It does EXACTLY what I'm looking for. The segmentation was absolutely key to what I wanted to do. The fact that you have effects per segmentation is also amazing. Really, you took ALL the hard work from me having to learn this (haha thanks).

My next big thing is going to be to add a few of my own patterns to the multisegment epe so I can do some custom stuff - need to brush up on my js a bit. If I have some questions - could I ping you. Never really did patterns like this before.

Seriously though - thank you. This was DEAD simple from my end and now I can spend more time tinkering rather than just trying to make it work.

Amazing work and thanks!!!

You're most welcome! I'm really glad you can use it! I'd be glad to answer questions and help with the scripting language any time.

The one issue you may run into (that I'll fix in the next update -- still a couple of weeks away) is that if the Pixelblaze loses power it is possible to lose your segment settings. The workaround is, once you've got the segments set up the way you like, to just take note of what the sizes are and code them into the script's initialize() function. This is a great way to get started playing with this pattern too.

At around line 207, there's a loop that goes through and initializes all the segments to their default values. Once you know what you want, just delete or comment out this loop and
set the segments up yourself with the appropriate SetSegxxx() calls; Then save the pattern, and your segments will be safe from power outages.

Excellent! I will purchase pixelblaze and some SK6812 RGBW from BTF lighting and see how I go.

I think my question has been answered above but I have shelves that I will be putting strips into. I only want to use one channel on the PB (yet to arrive), so I can have segments per shelf on one PB channel and then control them individually via child devices :grinning:

Another question, I am planning to run multipule pixelblaze's connected together via Pixelblaze Firestorm. Does this app talk to firestorm or individual PB's? Any issues you can foresee from multipule PB's? ie triggering patterns directly on PB's rather than firestorm timing may be off? I see there is a Firestorm API.

I am moving from miLights (non addressable strips) using plugin:


Just wanted to flag for anyone wishing to use a rf remote control for strips, you can use the milight remote and this plugin (and esp device). It has the ability to forward remote presses to HE via MQTT for use in other apps/rule machine, so I would imagine we could easily use it for pixelblaze segments on/off etc.
Currently I control my strip lights and blinds etc from 1 remote!

Samburner3, yes, you can use the available Multisegment pattern to set up multiple segments on a single LED strip, connected to a single Pixelblaze. Each segment will have its own child device.

For multiple Pixelblazes, just set up a Hubitat device for each, optionally with child devices for segments. The driver talks directly to the Pixelblaze over websockets. It doesn't interact with Firestorm (which does the same thing) at all. They should coexist happily.

2 Likes

Hi, I'm super new to the smart home field & microcontroller things. Pixelblaze sounds perfect for my needs, to connect with Hubitat & complete control over lighting pattern heavy-lifting-free. I have a few questions:

  1. Can Pixelblaze run 2 strips in sync & optionally with different pattern?
  2. Can I use one Pixelblaze to run 2 strips at the same time to achieve 1) or I'd need 2 Pixelblazes for 2 strips?
  3. I found there is an 8 Channel Output Expander. Is it for extending one Pixelblaze to capable of running 7-8 more strips/channels or it is actually for something else?

Thanks!

Hi!

Here's the quick overview. For more specific answers about setup and wiring, head on over to the Pixelblaze forum.

One Pixelblaze runs a single pattern at a time, and drives one LED strip. The LED strip can be very long -- a couple of thousand pixels or more. Most LED strips can be easily cut and resoldered, so you can say, divide a strip in two, and wire the two pieces on opposite sides of a room far apart if you need to.

Or, if you use the output expander, you can cut a very long strip into several shorter pieces for ease of wiring. The Pixelblaze still sees all the pieces as a single continuous strip.

Although a Pixelblaze only runs one pattern at a time, the pattern can be programmed to do different things on different regions of the strip, making it look like you're running two or more patterns. (That's what my Multisegment pattern does. )

If you really want to run multiple strips doing completely independent things, you'll need multiple Pixelblazes. Since Pixelblaze got its start in the Maker/LED Art world, it's easy to
sync multiple Pixelblazes using the available Firestorm app. (Firestorm requires a separate computer)

Other things: When the brightness is up, LED strips eat quite a lot of power. Check the specs of the LEDs you plan to buy and be sure to get an appropriately large power supply. Very long strips may require slightly more complex power wiring to avoid voltage drop, which causes inconsistent color along the strip.

Also, data bandwidth becomes an issue as your strips get longer. WS2812 family LEDs run at a constant 800Khz, which sounds fast, but isn't really. With WS2812s, your maximum frame
rate will decrease pretty quickly after 500 or so LEDs. If you're building something larger, I'd recommend using APA 102 family strips. They're brighter, and can be driven much faster - well into the Mhz range.

Brilliant idea! Now I see the picture how the multisegment function could be utilized. Thank you so much!

I got it. So this is where the expander come to play i.e. to divide the signal sequence into smaller segments, right?

Would anyone be willing to point me at exact hardware needed to set this up?

  1. A compatible digital RGB strip & a power supply
  2. Pixelblaze (the strip controller)
  3. HE (obviously)

Up near the top of this thread, there's a lot of information about hardware. My first time out, this is what I used:

Strip:
https://www.amazon.com/BTF-LIGHTING-Individually-Addressable-Flexible-Non-Waterproof/dp/B079ZW1265

Power Supply:
https://www.amazon.com/LETOUR-Supply-Converter-Adapter-Lighting/dp/B01HJA3OUG

Plus Hubitat and Pixelblaze of course. Note that this is all 5v equipment. There's 12v stuff
out there too, but for this purpose, 5v is easier to use. The 30A power supply is overkill for a single strip - you could go w/10 or 15A - and it's also not a thing you want hanging out where there's the slightest possibility that a child might get to the easily exposed contacts. If safety is more of a concern than super high output, you could get a wall-wart 5v power supply. Amazon has tons of 'em.

PPTOR, the expander is one of those things... if you need it, you'll know why. Most people don't. I've got one that I mostly use for experimentation. From my perspective, the principal benefit is that it lets you work with mixed LED types as a single strand.

FWIW, Ben @ Pixelblaze is working on a new output expander that will drive a lot more channels and pixels, but again, it's not something that most people will necessarily need.

Download the Hubitat app