[RELEASE] WLED Universal Driver

Great, thanks!

Hi
I have a led strip set up on a ESP32 running WLED and I am trying to integrate it to my Hubitat. I copied the WLED Universal driver's code, set my IP to a static one and created the virtual device without issue using it. My problem is that the on toggle works, but nothing is happening when I switch it off. I am not even trying to integrate the segments, presets, or whatnot: just on and off.
What am I missing here, can someone shed some light??
Thanks for the insight,

I'm having trouble commanding WLED from the application. I can't seem to start any playlist. I've also renamed the playlist in WLED, but it is not updating in the Hubitat device.

Any help / ideas?

Can you share the log or send me in a PM, please? Particularly of the "List Playlists" and the "Set Playlist" command?

Is the Segment ID set in Hubitat matching the one defined in WLED? Default for most devices with one segment should be "0". The on toggle may simply toggle the main power and all segments while the off switch (if "Power Off Main Controller with Segment" is not set, which is the default) or any other command is specific to the defined segment ID.

If this is all set correctly, can you share the log of the driver or ping me via PM to investigate (On, Off, Force Refresh)?

Hi @user3992, I got a chance today to use your driver, nice work! I did, however come across a small issue.

When I tried to replace a preset the driver errored with a 'no property .n'; it was on my line 562. It was where you were preparing the 'existingname' for the debug log statement. I located it in the driver, added some more debug logs to see what was happening and I found that the 'getPresetsData()[]' function was only returning the preset name and nothing else. So there was no '.n' property and therefore the driver errored. I removed the '.n' and the preset was replaced without issue.

Hopefully I'm explaining ok, I'm not a groovy expert and don't know the more advanced syntax; just enough to muddle thru. Let me know if you need any more details.
Thanks

Thank you! That was very helpful. I actually messed this up in the last version. Preset data used to be an object including the complete Json returend from WLED with the .n porperty for name. As there was no use all this in HE where we simply want to call presets and all the info cluttered up the state variables I extracted and simply keept the name as a string (here private handlePresetsInfo(presetsData)).
I'll push out a fixed version.

1 Like

Glad I could help.

Is there a way to send a color command to two outputs at the same time with this driver on the basic ESP 32 board?

Having an issue adding a couple of WLED lamps I've made. used your driver but I keep getting this error. Any help would be appreciated.

Got it to work on regular Dashboard but not Easy Dashboard so no big deal at this point.