[SOLVED] Wled PLEASE MAKE THIS WORK IN OPENHAB

@regnets Great, it works almost fully except that Wled_Color can’t find an item when linking things?

Have you tried the non merged Wled binding that is found on this forum? What works better using it by mqtt binding or via the wled binding?

@matt1 Thank you, I didn’t know about it, now I have it installed, it works and it looks like the problem. I am thinking is it because I use the firmware version for WLED_0.x.x_ESP8266_1M_ota.bin (I use ESP-01S RGB LED Controller Module) and it is not fully functional?

Do you have the latest iOS app or is that android? Try basic ui in a browser to check if it works in there. Older iOS version of it did that where the drop down lists were empty. It may be possible to use a mapping on the selection elements to fix it.

The other possible reason is when u drop a jar into the addons folder openhab may need more than one reboot for the cache to be created. Try a few reboots.

Regarding if it could be caused by your model of esp I doubt it as the binding should still display the full list in the selection drop down list. The list is hard encoded and should display fine, either it is the binding not loading correctly or a bug in your display ui, hence test it in basic ui.

thanks! I will try rebooting the system several times as well as with the basic interface. The items are all linked in Things, Android app version is the latest. As for my esp, I think there is no problem because previously using the solution of "Regnets Andreas " above, it works fully, except for Color.

Yeah that looks like it wont work as it is probably sending the wrong format for colour…

Type number : WLED_Color “WLED: Color” [ commandTopic=“wled/785f2a/col” ]

And then it uses a rule to send a packet. The above line should be removed from the things file and a unbound control created for the rule to use in a items file. see @aditya_Sharma post in this thread which has an example that looks like it will work.

Let me know which way works better once you solve the drop down list issue, which BTW it works fine here on Android app on my tablet, on my iOS phone and with Basic UI.

@matt1 The problem was fixed after I restarted Pi3 by re-powering it. Thank you so much.

I hope someone can help me out here. I thought getting my WLED light integrated via MQTT would be super easy but somehow it is just not working. Instead of sending ON/OFF it is sending 1/0 thus just dimming the light. Here is my config

Thing:

Thing topic WledSchrank1 "Schrank rechts" @ "Wohnzimmer" {
    Channels:
        Type switch    :   power               "Licht"              [ stateTopic="wled/schrank1/g", commandTopic="wled/schrank1", transformationPattern="MAP:WLED.map" ]
}

Item:

Switch WLED_schrank1             "Schrank rechts [%s]"     <light> (grSchrank) { channel="mqtt:topic:mosquitto:WledSchrank1:power" }

Sitemap part

Switch item=WLED_schrank1

Map

=Unknown
0=OFF
1=ON
...
255=ON

What am I missing here?

There is a non merged binding here:

Try adding

, on="ON", off="OFF"

to your channel.

Thank you! This combined with remaking the things (somehow they seemed to not update properly) makes it work for me.

Hi,
got it half working via MQTT (colour yes, switch, effect & palette settings no).
But I when I look up with MQTTExplorer I can see various topics - but no “api” topic:
image
It seems, the transformations don’t publish any values.
Any idea what I need to check to make this working? (I’m using mosquitto)

Thanks,
Boby

Never mind, seems the example on Github is not fully working. I got it working now with additional rules - here’s the final ruleset to make everything work:

rule “WLED: Adapt Color Parameter to WLED Notation”

when

Item WLED_Color received update

then

val HSBType newState = triggeringItem.state

val rgb = 16777215 + newState.getRGB

val mqttActions = getActions("mqtt","mqtt:broker:mosquitto")

mqttActions.publishMQTT("wled/wztv/col","" + rgb)

end

rule “WLED: Effect”

when

Item WLED_Effect  received update or

Item WLED_Effect_Speed received update or

Item WLED_Effect_Intensity received update

then

val mqttActions = getActions("mqtt","mqtt:broker:mosquitto")

val effect = transform("MAP", "WLEDEffectMapping.map",WLED_Effect.state.toString)

mqttActions.publishMQTT("wled/wztv/api","&" + effect + "&SX=" + ((WLED_Effect_Speed.state as Number) * 255 / 100 ) + "&IX=" + ((WLED_Effect_Intensity.state as Number) * 255 / 100))

end

rule “WLED: Brightness”

when

Item WLED_Dimmer received update

then

val mqttActions = getActions("mqtt","mqtt:broker:mosquitto")

mqttActions.publishMQTT("wled/wztv/api","&A=" + ((WLED_Dimmer.state as Number) * 255 / 100 ))

end

rule “WLED: Palette”

when

Item WLED_Palette received update

then

val mqttActions = getActions("mqtt","mqtt:broker:mosquitto")

val palette = transform("MAP", "WLEDPaletteMapping.map",WLED_Palette.state.toString)

mqttActions.publishMQTT("wled/wztv/api","&" + palette)

end

Yes OLD setup is broken.
Now the new setup is ready with MQTT 2.5 and WLED latest version. I shall upload the latest one.
The discussion thread is here