Custom Template LED strip

I was wanting to create a template for my LED strip. I have a dashboard in my kitchen I use to control everything and I'd like to add LED strip control to this. I'm using the setup here:

It's an individually addressable LED strip with a pixelblaze controller.

The ideal functionality would be on/off, and a 'selector' like we have with the hub modes. but instead using a list of patterns. There are also patterns that take inputs, such as ones that are solid colors but you can easily change which color that is.

Would it be possible to create a template like this? or map/modify a RGB bulb one to send the correct commands? Or even using multiple templates? Maybe one for color input, and one for pattern select?

Maybe somebody who knows more about CSS and the template mechanism will come up with a better answer. I haven't played with dashboards much yet. I'm using the default Philips Hue app and a not-yet-ready-for-prime-time hacked up fork of diyHue to control my pixelblazes along with the rest of my lights.

Give me a day or two to do some reading -- It's likely I can make the driver cooperate better with dashboards. At least, I can expose the ColorControl capability so you could use the color bulb template with the default color picker to set the overall color in patterns that support it.

No, you cannot create a new template through CSS. Only the templates that are there are available. There is not template for effects. The only thing you might be able to use is the music control template since it has forward and backward buttons. But you'd have to hack up the driver quite a bit to get it to work.

That would be awesome!

Do you know if it would be possible to get the list selector template that choosing a mode uses? Zranger1's driver fetches a list of patterns from the pixelblaze and stores those in hubitat. So they'd be accessible we'd just need to be able to map to that list instead of modes.

No, you cannot create a custom template. The only templates that are available are the ones that are there.

I was thinking I could do this via the LightEffect capability, which can at least display the pattern name, and would let you select a pattern by index, but there doesn't seem to be a template for this either. (Or did I just miss something?)

Abusing the music control a little is an interesting idea. In general, none of the home automation platforms are good at reconfigurable devices, so I've been tossing around the idea of using sneaky sideband tricks like this to get around the limitations. Currently, I'm testing a driver version that lets you create color bulbs as child devices.

You'll have to add an exported variable to your pixelblaze patterns for it to work, but you can also divide the LED strip into multiple "zones", with a child device for each, and control them (on/off/brightness/hsv color) independently. If all goes well, I'll have this up tomorrow. Working from home though.... I'm still kinda in constant distraction mode.

There is not.

Or you could just use a link tile to link directly to the device's web interface (since most addressable controllers are web based) and avoid trying to build it in hubitat all together, which is what I've done/

This "zones" thing sounds completely fantastic. I have a great usecase for this. I'm using one strip under a bridge and have a sign in front of that bridge that is lit by the same strip. With the "zones" it would make it super easy for me to control the two independently... which is way better than what i was thinking. I was planning on basically hacking each pixel blaze pattern to mark out pixels that were in the sign.

Did you have any luck with the zones code? I'm finding more and more use cases for it. I'd be happy to help to try to finish it up if you haven't had time to complete it.

I wrote the protocol, finished the Pixelblaze side code, wrote a quick and dirty Python zone controller (which I'm still using) and then... the virus thing hit and all was chaos for a long time. Looks like all I have to do to get the Hubitat side working is finish the child device implementation.

I'll do the cleanup and post what I have working to the repository tomorrow and you can tell me what it needs. This actually should be easier now, since there are a lot more examples of parent/child driver code lately.

Ok, the alpha version that supports multiple segments per LED strip is in the repository at

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.

This is very early alpha -- 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 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: