Switch

Hello everyone, Could you tell me how to make it so that when you manually write a command on the MQTT server, the command is read on OpenHAB as well. The fact is that there is a button, a squeak of Python and a relay. When the script is running, the relay is successfully triggered, but the button in the service does not change the status. I know how to do this, you need to check the status of the MQTT topic via Rules. But the dilemma is that I can’t find the team to check for the second day.

In openhab you need a mqtt binding(connection to mqtt broker/server) than you can add an mqtt-thing(related to a topic). Changes to the topic will recoqnized by openhab automatically.

see here

1 Like

But, he dont work automatically. Work only EspEasy, but not openhab

You have to set up openHAB to listen to whatever topic it is that you are interested in. openHAB cannot guess which one that is.

What is how?

Can you show us what you have done in openHAB so far?

I only connected MQTT and one ESPEasy thing.

To observe mqttserver data i recoment MQTT Explorer. Easy to use for simple validation. Maybe its usefull to find right topics for mqtt item definition.

I don`t need something like Explorer. I need switch button OpenHAB with python file.

for debugging purposes only

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.