My Garadget + MQTT + OpenHAB Setup

Tags: #<Tag:0x00007f6170cf3b80> #<Tag:0x00007f6170cf3400>

Have you looked in your openhab.log and events.log for clues, when the garadget publish its status message?
Have you installed the JSONPATH service?


JSONPATH is installed via PaperUI -> Add-ons -> Transformations

openhab.log (DEBUG for binding MQTT enabled):

2020-04-03 17:52:05.799 [INFO ] [.reconnect.PeriodicReconnectStrategy] - Try to restore connection to ''. Next attempt in 60000ms
2020-04-03 17:52:05.802 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '' with clientid 1c4f52b1-ccdd-4e3e-b366-0683051246e2


2020-04-03 17:52:05.864 [hingStatusInfoChangedEvent] - 'mqtt:topic:mosquitto:garage' changed from OFFLINE (BRIDGE_OFFLINE) to ONLINE

That appears to be your openHAB subscribing to a topic

That appears to be your device publishing to a topic.

Topics do not match (character case matters)

1 Like

That’s it. You saved my day, thx a lot.

1 Like

Well, first of all thanks for these useful hints to get garadget working via MQTT.
I am interested in polling the status and get these information. The rule example has been deleted. Being a MQTT beginner, I was not able to figure out how to do that. How the rule look like?

Thanks and happy eastern

Found it with

rule "Poll garadget status via MQTT"
	    Time cron "0 * * * * ?"   // every minute
		val mqttActions = getActions("mqtt","mqtt:systemBroker:embedded-mqtt-broker")

By the way, you can just do

Time cron "0 * * * * ?"

* means every possible value, which in the minute field means every minute. You could also say */1 but that would be redundant.
For every 5 minutes you’d use */5, and so on.

Thanks @JimT. That’s right and is changed accordingly.