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?
Hi
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 '127.0.0.1'. Next attempt in 60000ms
2020-04-03 17:52:05.802 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '127.0.0.1' with clientid 1c4f52b1-ccdd-4e3e-b366-0683051246e2
events.log:
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)
@rossko57
That’s it. You saved my day, thx a lot.
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
EDIT:
Found it with
rule "Poll garadget status via MQTT"
when
Time cron "0 * * * * ?" // every minute
then
val mqttActions = getActions("mqtt","mqtt:systemBroker:embedded-mqtt-broker")
mqttActions.publishMQTT("garadget/Garagentor/command","get-status")
end
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 @jimtng. That’s right and is changed accordingly.