[RELEASE] Pixelblaze addressable LED Controller Driver v1.00

Thanks for this, I was able to get my PB setup using your driver.

I have a couple of questions. I’m using Alexa with my Hubitat for voice control. I can get Alexa to recognize β€œon”, β€œoff”, and brightness percentages but I can’t get it to change patterns. Is this possible using Alexa?

When using the new on and off, where it sets the brightness, is it possible to get it to fade over a set time? For example, you could set off to fade out over 3 seconds and on to fade up over 2 seconds.

Thanks.

Glad you're using it, and I hope you have as much fun with your Pixelblaze as I've had with mine!

At this point, Alexa doesn't support the commands for changing patterns because they're not
standard commands in the Hubitat lighting model.

However... I'm almost done with the next version, which will allow you to use Hub's built-in lighting effects commands to change patterns -- it should let Alexa and other integrations control pattern switching, and possibly color and speed on patterns that have UI controls for those things.

Since the Pixelblaze doesn't have internal support for brightness transitions, the only way to make it work smoothly would be for me to blast multiple brightness change messages per second out from the Hub.

Technically, it's possible, but it's a real Hub performance killer, and gets worse very quickly as you add devices, so for the forseeable future, it's not something the driver will support.

1 Like

Have you asked the maker of the PixelBlaze if this feature could be added in the firmware, that would be really nice!

I think if enough of us do ask him, he might consider adding it.

I will ask. He might do it in the longer term for the ESP32-based Pixelblaze3, especially if more people start using Pixelblazes with home automation systems. The current model's CPU and memory are kind of pushed to the wall as it is though.

(edit... and I might actually try adding this to a test version of the driver and see what happens. If your Hub isn't driving a crazy number of devices, you could probably get away with the occasional fade if you were only doing it on one or two Pixelblazes at a time.)

Just updated the Pixelblaze driver (and the child segment driver) to version 2.0!

This version features many performance and reliability improvements, plus:

  • Support for color and speed controls in patterns. - if a pattern includes hsv or rgb
    color controls, the driver will detect them and will allow you adjust the pattern using
    the Hub's normal color bulb controls. Similarly if the pattern includes a "Speed" slider,
    the driver will allow you to control the pattern's speed via the "SetEffectSpeed" command.
    Note that not all patterns have color/speed controls.

  • Greatly Improved Multisegment support -- You no longer need to modify the pattern code to make your segment settings persistent. Multisegment settings are now saved on the hub, and are loaded automatically when you load the new multisegmentforautomation pattern on your Pixelblaze. You can adjust the number and size of segments (up to 12) from the driver. See the multisegment setup guide for details.

In case you were wondering, below are a few of the things you can do with a Pixelblaze (or several!)




2 Likes

Badass @zranger1 I just am able to get back to this now and it was perfect timing. Gonna start playing with patterns now. I am embedding a strip into a concrete countertop that will change it's patterns according to an activity from a harmony remote.

I'll keep you updated with build process...but this is perfect timing!

@zranger1

I have a rather specific question and curious if you can help. I am dividing my strip into segments...no issues there. I also made my own pattern that I have effectively added into the Mutlisegmentation pattern so I can call it no problem.

Here is the issue (and I know it's specific) .

The pattern I'm using is a combination of effects. It's chase ring, then after a set period of time, does a breathe animation, then it goes to a static color. That works perfectly fine, I use deltas to track the "modes."

I plan on using this via triggers, i.e., a switch goes on, that segment turns on and the pattern starts. It will end with a solid state of lights as stated above. The issue is, IF I turn the segment off, and then back on again, the pattern doesn't "run again" it seems as if it just resumes.

Does that make sense. I'm curious if I can get the pattern to start again from the beginning if the segment is turned off then back again.

I know, crazy use case and I can go into detail as to why I'm doing this but let me know if you have any thoughts. It just may be the pattern I made as i am VERY new to building them.

Thanks in advance.

Tony

Hey, @ffingers! Glad to see you back. Do give me an update on the countertops when you can. It sounds really cool! We're way overdue for a kitchen remodel here and my wife is thinking poured countertops as well. Are you embedding channel for the LEDs in the concrete forms? I'd love to see pictures.

The answer to your question is yes, you can do that. It's the blessing and curse of highly programmable devices: the answer is almost always yes, but there's always a little code involved in making it do exactly what you want.

If you're turning individual segments on and off, probably the easiest way is to add a lastState variable to the pattern that tracks the last state of the on/off switch for the segment you're interested in. Then at beforeRender() time, check the variable and if the switch is "on", and lastState was "off", do whatever effect initialization you need.

If you're turning the whole strip on and off from the main device (not the children), you'll probably want to add an exported variable like __restart to your pattern, initialize it to False (0) and again, check at beforeRender() time, and do your effect initialization if it is True. (Then set it to 0 again to be ready for the next cycle.)

To make this work you'll just need to add a SetVariables("__restart",1) command to the on() command handler in the main device driver.

In any case, you might want to download the latest "Multisegment for Automation" pattern again -- I fixed a bug that could potentially cause on/off switching problems this afternoon! :slight_smile:

@zranger1 - I'll definitely keep you updated on the countertops. Quick answer, yes, I'm making a channel in the forms that going to embed (I think) a metal channel with a diffuser in the channel then pour epoxy over it. I know it will make it pretty much permanent depending on how deep epoxy I pour, but I want a diffused look and I want it to be one smooth surface. The LEDs won't be stressed that much so I'm hoping it will work. If you want a good link to an AWESOME process for making them, hit me on PM.

As to your solution - I was thinking about doing that, but couldn't figure it out. The way you articulated it, just hit me how to do it so thanks a ton.

I have a cool pattern that does a green chase ring, a few breathes, then constant green. It will trigger every time the kids turn the xbox on :wink: sort of mimicing the old startup procedure for the xbox. I still have to tune the pattern and the code is AWFUL but it works.

1 Like

If Pixelblaze is intended for LED strips with individually addressable LED's, would it also be usable for orchestrating visualisations between various RGB bulbs?
I have about 8-10 RGBW bulbs in an outdoor courtyard, would be great if I could make them do funky stuff together that goes beyond just group on/off and colour change :smiley:

I realise this is still significantly different of course (the individual LED's on a strip are wired for starters which gives more direct control and they all reside on the one device/controller) so I'm not looking for something that has that level of precise steering. But it would be great if there could be automated random colour and brigthness changes between various RGBW bulbs...

If they're low voltage DC bulbs that are wired together and use either the standard 3-wire (WS28xx/NeoPixel) or 4-wire (APA102) protocol, then they'll most likely work with Pixelblaze.

If they're just regular color LED bulbs that go in lights sockets, then no. But if you want to do animation, some manufacturers, Philips for example, support an "entertainment mode" -- a fast way of setting colors in time to music or other events.

If you've got Hue bulbs, their regular app or any of the many Hue apps available on app stores support entertainment mode. If you're technically inclined, you can use diyHue to fool the Hue apps into supporting a large range of other brands of bulb too.

thx zranger1, I'm trying to stay away from Hue for as long as I can (until I'll run into issues on HE and need to separate out my lighting at least :smiley: ) but I've come across [Code Freeze] - Lighting Effects which is a neat randomiser. That'll do the trick for now :wink:

1 Like

@zranger1

Hey, long time. Wanted to say thanks for the driver it has been great. However been running into an issue where I need to initialize it before one of them will work. Is there a polling option or something I should be doing to make sure it is ready to go and don't need to initialize to make it work?

Thanks again, the driver has been great!

Tony

I am trying to set a variable for one of my effects. What is the syntax to send it through the hubitat interface. Example would be to modify the sharpness value

  • varList: {"vars":{"hue":0.573807,"saturation":0.063202,"value":0.522522,"sharpness":84.32465,"location":0.448792}}

The setVariables command can use the whole JSON substring after {"vars":

So, to set sharpness alone, you'd enter:
{"sharpness":84.32}

To set all those variables at once, enter:
{"hue":0.573807,"saturation":0.063202,"value":0.522522,"sharpness":84.32465,"location":0.448792}

It looks like the child devices / segments do not have all of the same effects as the parent. Is this correct or intended? Is there a way to include the same effects in the child devices / segments as are listed in the parent?

Yes, this is intended. Pixelblaze runs a single pattern at a time. The multisegment setup is just a normal pattern that happens to implement segmentation with its own set of per-segment effects.

If you look at the pattern code, you can view and edit the javascript source for all the effects and add your own if you like.

1 Like

This is an awesome integration and I was able to get it running and turn on and off a pixelblaze controller / light strip but I am having trouble figuring out how to call "Next Pattern" by using Button Controller or Rule Machine. Is there a way to do this or do I need to do some programming? For reference I am using a scene controller, Zooz ZEN32. I can use the basic functions fines and can use the devices page on the PIxelblaze to go to Next Pattern or Random Pattern, just wondering if I can easily do this with Button Controller or Rule Machine. Sorry if I'm missing something basic.

Thanks!

I don't think you missed anything. This is one of those things about RM that's a little on the non-obvious side. Here's how you make it work:

  • When you're setting up actions for your rule, select "Run Custom Action"
  • Choose "Actuator" in the "Select capability of action device" list, then choose your device.
  • You should then see a "Select custom command" drop down list, from which you can see all the things the driver can do. previousPattern/nextPattern etc, will be in there somewhere. Select the one you want, and click the "Done" button to move to the next RM page.

Thank you!!!

I played around in custom action but never made it that far. Thanks for the quick and detailed response!

Download the Hubitat app