[Release] WLED MQTT Driver (beta)

There it is. Thank you.

muxa appreciate the WLED mqtt driver.

While I do not have mqtt integration I found your driver helpful in creating a non-mqtt version.

I ran across one issue with setPreviousEffect
The numbers would cycle down until 1 and then it would jump to 100 bypassing 0.

I was able to correct this by changing the 1s to 0s

def setPreviousEffect(){
def currentEffectId = device.currentValue("effectNumber") ?: 0
currentEffectId--
if (currentEffectId < 0)
currentEffectId = state.effects.size() - 1
setEffect(currentEffectId)
}

While I am not using your exact driver, I assume the downward number skip of 0 would be the same.

Update 1.2.1

Fixed setPreviousEffect skipping 0

Thanks @EVOXGSR for pointing this out.

Your welcome, but i think @EVOXGSR is the real hero here. :slight_smile:

Oops :blush:
Updated

OK how do add a new device using this driver do I create a virtual device?

Yes, you must create a virtual device

I'm now very successfully using this driver on 6 WLED devices.

Thank you Muxa.

A question: Using the group topic in WLED one can control all devices at the same time. This works but I can't add this virtual device to Google Home. I suspect because there is no IP address (tried using one of the device's IP). Any thoughts?

Can you elaborate what this virtual device is and how it's conigured?

I expose WLED devices individually to Google Home via Hubitat's build-in Google Home integration, and devices appear in Google Home as individual lights.

You could group your individual WLED lights in Hubitat and expose the group to Google Home instead of using a group topic.

1 Like

In WLED there are two MQTT topics. A device one and a group one. Adding the device topic controlled virtual device to Google works great, but I get an error when I try to add a device controlled by the group topic. This device works fine in Hubitat but it says it's not supported in the log when I try add it to Google. It's not the end of the world if it can't work.

I just started out using Wled for some holiday lights and found this driver. Is it still supported? I see the last update was in April?

Thanks

I am currently using it on build 0.10.2 with no problems. (Have not yet tried on 0.11)

I'm on .11 and will give it a try then..

It requires routing the control through MQTT, so make sure you have a broker set up.

I Have never messed with MQTT.... Is this difficult or time consuming?

I spent the weekend looking to see if anyone has added Zigbee or Z-wave support to Arduino but came up empty handed.

MQTT is not hard, but requires a different server / computer / raspberry PI to run. This is what keeps the statuses of WLED and writes them to Hubitat. once set up you can use the same server to integrate a few other things like homebuilt sensors, tasmota, ESPeasy ... etc...

I'm getting this error when I run a rule machine rule, it's supposed to fade up two WLED devices.

error groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method java.lang.Integer#minus. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [class java.lang.Character] [class java.lang.Number] on line 5885 (appButtonHandler)

I swear it used to work. Only happens when fade up is selected

Hello has anyone figured out multiple segment mapping. I've fixed the off command but cannot send proper effects as my setup has a segment 1 and 2.

The driver does not currently support segments.

There are a number of ways to implement segments. I'm inclining towards child devices, so that each segment is a child device and can be controlled individually. The parent (main device) can control all segments together as if it was a single segment.

Since WLED has an API that exposes segment configuration, the child devices can be created automatically from the segments configured in WLED.

Any other ideas?

Sorry about that I commented in the wrong thread as Iā€™m using the non mqtt version.