Aircoookie WLED integration to HE

I saw this the other day on DrZzs youtube live stream which looked really cool so it got me wondering has anyone created a driver or have any integration with it for HE?


1 Like

I've not used WLED but I have used McLighting and DIYHue to integrate addressable LEDs into Hubitat. You're not going to get as much benefit from something like this until their is wider MQTT support in HE. At the moment, unless you can write your own driver using MQTT or HTTP methods, you are going to be limited in what you can implement in HE.

2 Likes

Thanks mate. I can probably get away with using the HTTP API's for it and the mobile app. My guess is some day someone will release a HE driver for it though.

Bored Thanksgiving morning, so that someday would be today :slight_smile:

Add device manually, set device type to WLED, set the URI base in preferences (eg. http://[wled_ip].)

Basic functionality is implemented making JSON API calls. Should be able to use it like any other RGBW light. Will eventually add effects/pallete function.

8 Likes

Mate your a legend thank you!!

Sweet cannot wait! I will keep an eye out for it :smile:

Well the command is there.. should be able to call it from a rule, but I haven't tried it yet.

1 Like

Last update for the day -- setEffect takes 4 parameters now (effect id, speed, intensity, palette). I had some difficulty adding all the parameters when editing the rule/action, but eventually got them in with some trial an error. Some bug with Rule Machine I guess.

Select "Run Custom Action":
image

Select "Dimmer" and add parameters:

Sample Rule:
image

1 Like

I am working on a driver for WLED which uses MQTT (requires MQTT broker). This will allow real-time status updates from WLED to Hubitat when controlled by WLED's web UI, the WLED app or a button. I started working on it before seeing this topic, so will finish it anyway and post a link here.

1 Like

Here's the driver I promised: [Release] WLED Driver (beta)

4 Likes

Any chance you can add a state check for when the WLED's are turned on either by using the app or by power failure/restart? No rush but would be nice to not loose sync in HE due to that occurring.

1 Like

Since the driver is mostly polling and not listening for anything from WLED, you can add in runEvery5Minutes(refresh) to the update function to schedule a refresh of all the device settings. Hoping to find some time to support the multi-segments in 0.9 and will add in a refresh scheduler then as well.

If you need things in sync, you can use muxa's driver. It's definitely more efficient, but does require a MQTT broker to be set up.

1 Like

Excellent that would be great.

I was using the MQTT but I believe my Synology MQTT broker was causing it all to drop off and I didn't want to run another MQTT elsewhere as to reduce complexity/additional things running in the environment.

I'm trying to get this working, but no response from the ESP8266 running WLED. Can you clarify the format for the base URL? Thanks

Great driver. Works well for my WLED setup for basic things like turning on when my patio door opens and turning on/off and dimming with Alexa. It responds quickly! Have not tried out customizing effects yet from the driver. Only issue is when turning off via Alexa, Alexa says the device is not responding. I'm guessing WLED is not passing a response back to hubitat maybe, which is what Alexa uses to know it happened?
Anyway, great job. Thank you!

I am having the same issue with getting the correct syntax for the base URL field. Can someone share an example? Thanks!

Am a noob here, can someone explain how to add step by step.

Thank You :smiley: :smiley:

This works awesome. Thanks a ton! I use WLED all around my house for permanent christmas lights as well as other strips for cabinet lights and effect/night lights in my kids' rooms. Being able to use your driver to control it through hubitat with Google Assistant and smart buttons has been fantastic.

I've noticed an odd quirk when multiple segments exist though. The on an off controls the entire strip, not just the segment, which makes sense, but remaining controls affect either the first segment (0) or which ever segment is set in the preferences.

For example, I have segment 0 and segment 1 setup to balance the light level between a 30/m section and 60/m section on the lower and top part of my kids' bunkbed. When I send a command to set the effect type, speed, etc, it affects the segment defined in the preferences only. If I send a command to set the hue or colour temperature, it sets it for segment 0 regardless of what is set in the preferences. Set Level acts on the entire strip using the master level setting, ignoring the per-strip levels I have setup, which actually is fine in my situation.

Is there anyway you could tweak the code to affect the segment setup in the preferences for all settings? Maybe even make it so I can set multiple segments in the preferences as well so I can change them in sync, but have the per segment levels remain as it currently works so that i can continue to balance my strips.

Just getting all of the settings controlled per the set segment would be enough though, as i could add each segment as a separate light in HE even thought on/off would still control both of them and then sync them with a rule when necessary.

Thanks for your time put into making this. I'd look into tweaking this myself if I had the skillset, but unfortunately I'm a high level tinkerer and I'm not capable in the coding department.

Didn't even know segments was working for effects :smiley: Driver is based on the JSON API, but I didn't write this driver with segments in mind since the functionality was just being introduced. However, made the required change to color to support the specific segment. Updated code on github.

Brightness is a global setting on WLED. I don't think you can set individual segments even through the WebUI. Appears that it is adjusting the intensity of the RGB value for each of the individual segments versus the "brightness" setting.

Been meaning to get around to writing a SmartApp to manage these WLED devices, but kind of low priority at the moment. To control per-segment brightness/on/off, I'd have to rewrite the individual segment controls as an RGB adjustment instead of changing the global settings. Someday....

Follow instructions here to add a custom driver:
https://docs.hubitat.com/index.php?title=How_to_Install_Custom_Drivers

Added refresh intervals to this driver if you're still using it. Just update the code and save preferences with the appropriate interval.