[SOLVED] H801 MQTT Commands help

Hi, i have a H801 LED module with tasmota running, and I works with som codes found here I this forum, but I need a button / switch, in the tasmota console I can send eg “color 1” and the led strip changes color to red, color 2 fore green etc. I want buttons fore each color, so I need a line to og set that color via MQTT form openhab, my items looks like this now:

Dimmer dH801_Lamp "H801" <dimmablelight> ["Lighting"] {mqtt=">[broker:cmnd/H801/DIMMER:command:*:default],<[broker:stat/H801/RESULT:state:JSONPATH($.Dimmer)]",autoupdate="false"}
Switch sH801_Lamp "H801 Switch" <light> (gAllLights) {mqtt=">[broker:cmnd/H801/POWER:command:*:default],<[broker:stat/H801/RESULT:state:JSONPATH($.POWER)]",autoupdate="false"}
Color cH801_Lamp "H801 Colour" <colorlight> {autoupdate="false"}
Dimmer dH801_Lamp "H801 Colour Temperature" <light> {autoupdate="false"}
String sH801_Colour "H801 Colour MQTT Target" <colorlight> {mqtt=">[broker:cmnd/H801/COLOR:command:*:default],<[broker:stat/H801/RESULT:state:JSONPATH($.Color)]",autoupdate="false"}

i have tried several things, but iam still werry new to this, so nothing seems to work, I need one more line that gives me the command “color 1”

What is?

in the web interface of the led module, that is flashed with tasmota firmware, there is a console, where to input commands, eg “color 1”

You can’t change that console without recoding tasmota. Good luck with that if you haven’t programmed before. But it is open source so you can give it a go.

Colours can be sent to tasmota/sonoff via mqtt
There are other threads on that topic in the forum.

that is what iam asking for, how I send a specifik color via mqtt…

https://github.com/arendst/Sonoff-Tasmota/wiki/Commands

Toward the bottom of the page you will see H801 commands. You can use tasmata UI command line to test and see what the mqtt command should look like.

yes, I know the H801 commands, but I still don’t know how to make the mqtt command…

15:25:25 CMD: color 1
15:25:25 MQT: stat/H801/RESULT = {"POWER":"ON","Dimmer":100,"Color":"FF00000000","HSBColor":"0,100,100","Channel":[100,0,0,0,0],"CT":499}

I think that I could use something like this:

Switch sH801_Lamp "H801 Switch" <light> (gAllLights) {mqtt=">[broker:cmnd/H801/POWER:command:*:default],<[broker:stat/H801/RESULT:state:JSONPATH($.POWER)]",autoupdate="false"}

And replace “POWER” with the color, but everything I tried, does now work…

I gotta sign off for a bit but maybe try COLOR not POWER and use the number of color instead of default.

that was simple… maybe the only thing I not tried… but now I have a problem with the last command…

<[broker:stat/H801/RESULT:state:JSONPATH($.POWER)]",autoupdate="false"}

I have tried removing it… that results in fail in the log, tried replacing “POWER” with “COLOR” that kinda works, now the button is always gray, and not marked on/off, thats fine, but if I make another one for another color there is a failure of duplicated model item, do you have any idea how to fix that…?

Now the whole line looks like that:
Switch sH801_Lamp_test "H801 Switch test" <light> (gAllLights) {mqtt=">[broker:cmnd/H801/COLOR:command:*:1],<[broker:stat/H801/RESULT:state:JSONPATH($.POWER)]",autoupdate="false"}

change to

<[broker:stat/H801/COLOR:state:default]"

Thank you… that seems to work…

Glad to see you got it working!

If you would, to help others in the future, please mark the issue as solved.
Thanks

You should see a check box to select the post that solved the issue. Help folks in a hurry to go straight to the solution.

I have done that… 2 places…

Edit
I can only mark one as a solution…