Update 1.0.3: now using new MQTT method calls (instead of deprecated). You'll need to call Reconnect command to update existing devices to use new methods.
Thanks for putting this together mate, I finally got around to setting up MQTT in my house and this is the first thing I have used it for. Once request, It would be good to have an additional change to the driver to support the alarm/strobe capability that flashes to the new Police theme in WLED. I will then tie that to my Alarm, flood system.
EDIT: the Police theme is available under the new beta here.
Currently the effects are hard coded into the driver, but ideally should be loaded from WLED. In order to do that additional configuration will be required, namely an IP address of the WLED device.
I'm thinking of this approach:
add new command to configure driver from IP address
leave hard-coded effects as well so that it works without this additional configuration
I'll only be able to get to do this change in a couple of weeks. Will post an update when there's progress.
I've just realised that there's no need to know the name of the effect. Since the effect can be set by a number I could just use a new configuration parameter to specify effect number which will be activated when alarm/strobe command is issued. I'll look at adding this first.
I am finding that after a couple days (I think) I need to press reconnect in the driver to repair the connection. Anyway this can be sorted out in the driver itself to re-check etc?
I have just turned on Hubitat debug logging on one of my WLEDs so I can monitor it. Btw I'm running the new WLED version 0.9.0-b1 (pre-release) have been since before Xmas but maybe that's part of the issue too. You tried that version? Still works perfectly fine in the WLED app always though.
EDIT: the other thought I had is I run MQTT on my Synology NAS so "maybe" its dropping off after a while. I have just configured RM to do a reconnect daily so I will see how that goes.
Seems to be working fine now I have RM reconnecting twice daily (morning and arvo) which is good. If I had to guess it's either the MQTT (pre-release) OR the Synology MQTT broker I am using.
EDIT: I kept having problems so in the end I had to remove the MQTT setup. I am sure it was my environment e.g. Synology running MQTT or something tho. If I ever deploy a seperate box to run MQTT I will try it again but for now I am trying to minimise additional components were I can.
Here's an alternative driver implementation for WLED. The main difference is that it's configured via HA Discovery topic and available effects are loaded from the device instead of being hard-coded.
Note: it's using the same name, and is intended to replace the old driver.
To configure you'll need to specify the MQTT Client ID that WLED is configured with.
Note: this driver has only been tested with WLED 0.8.6. Let me know if it works with newer versions too.
@jchurch I have not added alarm/strobe capability yet, but with this driver you should be able to set the the right theme by calling setEffect('Police') in Rule Machine.
Doh! I have just discovered that HA Discovery was removed in v0.9.0-b1, which means that the alternative driver won't properly.
Oh, well, will find a different method of loading effects from WLED device.
Ok, here's an update to the original driver. With this update there's now ability to load available effects from the WLED device by calling configure with IP address of your WLED device.
Also improved MQTT reconnect to cap delay at 1 hour.
How do i use a button press (or anything really) to have the wled change effects? I thought i had it figured but now I can't find the thing i'm looking for.