OH3 MQTT Subscribing String from a sensor published topic

Perhaps if you can confirm what your topic is, and the payload that gets published to the topic we can help you.

In general, to use MQTT in openHAB you will need to:

  1. Install an MQTT broker, and connect openHAB to that broker using a Bridge/Broker Thing.
  2. Create a Generic MQTT Thing for your sensor device, then add the topic you wish to subscribe to into a new Channel within the Thing.
  3. Link the Channel to an Item

This step by step in the docs might help.

This bit should be easy: we’d set up a rule which gets triggered when the Item is updated, then perform a command on your other Item depending on the payload.

1 Like