0

I have a SonoffS31 flashed with Tasmota. I have set up a Raspberry Pi running OpenHAB and an MQTT broker. In the paper UI of openHAB, I have created a Thing that represents the switch.

I have set the MQTT state topic of the switch to: stat/sonoffS31-1/POWER and it correctly displays the switch's state when I manually change the switch.

I have set the MQTT command topic to: cmnd/sonoffS31-1/Power.

My problem is that this command only allows me to turn off the switch via the openHAB UI. If I attempt to turn on the switch (via the UI) it just returns to the off position.

What is the correct MQTT command topic to toggle the switch?

0

I realized I was not specifying a payload for the command. Specifying a payload for the on and off commands fixed my problem.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.