[RELEASE] Pixelblaze addressable LED Controller Driver v1.00

@mebejedi, Glad to hear it works with Webcore. I'm fairly hardcore about keeping my house local only -- it's something I wouldn't have been able to test.

On connecting/disconnecting, here's the expected behavior:

The driver is written to automatically disconnect its websocket after two minutes of inactivity (no new commands). I did this because keeping a websocket open creates constant network traffic, which is not something anybody needs with a house full of devices and a busy hub

The only effect this should have on operation is a slight delay - maybe a second or two - in command response when you give the device a command after it has gone idle. I see this, for example, when I turn the Pixelblaze on in the morning after it's been off for the night.

If the hub is rebooted or loses power, the pattern list should be reloaded shortly after it comes back up. If the pixelblaze gets rebooted, it may be several minutes before the hub refreshes the pattern list, but commands should still work, and you can always use the Initialize or Get Patterns/Get Variables commands if you need it refreshed immediately.

That's cool. I just really like Webcore (and it runs locally).

I just need to figure out a way to create buttons/switches for selecting different lighting modes for the Hubitat Dashboard app. Guess I'll have to make some vitual switches.

BTW, where did you get your Halloween/Flame pattern? That's awesome!

It's a modification of the FireFlies pattern, from the Pixelblaze pattern library. (maybe 3 or 4 pages in -- there's no good way to make a direct link.)

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!)


3 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