OpenHAB Mysensors binding 2.4: cant get mqtt gateway online
-
I've still found no solution but if I use the new embedded broker in OpenHAB2 and connect the the MySensors MQTT gateway to that broker everything works fine.
But I'd no success in connecting the MySensors MQTT gateway to a working MQTT-broker (MQTT2) or in creating a SystemBroker (MQTT2).So for those of you that are willing to use the embeeded broker, this works fine with the MySensors MQTT gateway.
Just use embedded-mqtt-broker as broker name in the MQTT gateway configuration.@timo I connected to the embedded broker over port 1884
. But i cant seem to discover my nodes. This is my broker thing:mqtt:broker:embedded-mqtt-broker[host="192.168.1.2", port="1884", qos=1, clientID="gateway1", reconnectTime=20000, keepAlive=60000, secure=false, username="xxx", password="yyy"]This is my mqtt-bridge thing:
Bridge mysensors:bridge-mqtt:mygateway [brokerName="embedded-mqtt-broker", port="1884", topicPublish="mygateway1-in", topicSubscribe="mygateway1-out", startupCheckEnabled=false]{ }Its weird because i can see the messages from the nodes coming in in the log vieuwer (mysensors binding is in TRACE).
2019-02-06 16:47:14.968 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/0' : 87 2019-02-06 16:47:14.971 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:14.990 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/1/1/0/1' : 37.2 2019-02-06 16:47:14.993 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/1/1/0/1' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:15.024 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:47:15.028 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:26.746 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:47:26.748 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:34.072 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:47:34.075 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:37.114 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:47:37.116 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:38.438 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/1/1/0/1' : 37.3 2019-02-06 16:47:38.441 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/1/1/0/1' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:38.459 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:47:38.462 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:40.157 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:47:40.160 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:43.224 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:47:43.226 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:50.169 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:47:50.172 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:56.542 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:47:56.545 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:59.582 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:47:59.585 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:01.876 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:48:01.879 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:02.648 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:02.653 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:05.680 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:05.682 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:13.580 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:48:13.583 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:25.308 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:48:25.312 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:25.454 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:25.458 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:28.486 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:28.489 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:31.551 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:31.553 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:34.585 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:34.588 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:37.006 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/1/1/0/1' : 37.2 2019-02-06 16:48:37.008 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/1/1/0/1' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:37.039 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:48:37.042 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:44.873 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:44.875 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:47.916 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:47.919 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:48.720 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/3/1/0/23' : 31 2019-02-06 16:48:48.722 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/3/1/0/23' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:48.744 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/2/1/0/0' : 22.7 2019-02-06 16:48:48.746 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/2/1/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:48.762 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/1/1/0/1' : 37.3 2019-02-06 16:48:48.764 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/1/1/0/1' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:48.786 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:48:48.788 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:50.971 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:50.973 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:54.038 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:54.044 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*And can you point me to the docs on how to setup the binding ? I found them before but cant seem to find them anymore.
Thanks
-
@timo I connected to the embedded broker over port 1884
. But i cant seem to discover my nodes. This is my broker thing:mqtt:broker:embedded-mqtt-broker[host="192.168.1.2", port="1884", qos=1, clientID="gateway1", reconnectTime=20000, keepAlive=60000, secure=false, username="xxx", password="yyy"]This is my mqtt-bridge thing:
Bridge mysensors:bridge-mqtt:mygateway [brokerName="embedded-mqtt-broker", port="1884", topicPublish="mygateway1-in", topicSubscribe="mygateway1-out", startupCheckEnabled=false]{ }Its weird because i can see the messages from the nodes coming in in the log vieuwer (mysensors binding is in TRACE).
2019-02-06 16:47:14.968 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/0' : 87 2019-02-06 16:47:14.971 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:14.990 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/1/1/0/1' : 37.2 2019-02-06 16:47:14.993 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/1/1/0/1' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:15.024 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:47:15.028 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:26.746 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:47:26.748 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:34.072 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:47:34.075 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:37.114 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:47:37.116 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:38.438 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/1/1/0/1' : 37.3 2019-02-06 16:47:38.441 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/1/1/0/1' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:38.459 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:47:38.462 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:40.157 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:47:40.160 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:43.224 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:47:43.226 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:50.169 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:47:50.172 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:56.542 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:47:56.545 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:47:59.582 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:47:59.585 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:01.876 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:48:01.879 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:02.648 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:02.653 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:05.680 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:05.682 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:13.580 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:48:13.583 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:25.308 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:48:25.312 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:25.454 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:25.458 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:28.486 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:28.489 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:31.551 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:31.553 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:34.585 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:34.588 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:37.006 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/1/1/0/1' : 37.2 2019-02-06 16:48:37.008 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/1/1/0/1' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:37.039 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:48:37.042 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:44.873 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:44.875 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:47.916 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:47.919 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:48.720 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/3/1/0/23' : 31 2019-02-06 16:48:48.722 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/3/1/0/23' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:48.744 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/2/1/0/0' : 22.7 2019-02-06 16:48:48.746 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/2/1/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:48.762 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/1/1/0/1' : 37.3 2019-02-06 16:48:48.764 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/1/1/0/1' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:48.786 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/109/255/3/0/32' : 500 2019-02-06 16:48:48.788 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/109/255/3/0/32' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:50.971 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:50.973 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]* 2019-02-06 16:48:54.038 [TRACE] [ansport.mqtt.internal.ClientCallback] - Received message on topic 'mygateway1-out/1/255/4/0/0' : 0200010068057A890103 2019-02-06 16:48:54.044 [TRACE] [ansport.mqtt.internal.ClientCallback] - Topic match for 'mygateway1-out/1/255/4/0/0' using regex mygateway1-out/[^/]*/[^/]*/[^/]*/[^/]*/[^/]*And can you point me to the docs on how to setup the binding ? I found them before but cant seem to find them anymore.
Thanks
@jimmy-loyens Could you please check if the embedded-mqtt-broker thing is online? I suppose not. If the embedded broker addon (misc) is installed OpenHAB automatically discovers this embedded broker, just add that thing from inbox.
Now connect your MySensors MQTT gateway (hardware) to the IP and Port of the embedded-broker. After that your MySensors-bridge configuration should work. The port configuration at this point is not needed, but should do no harm, it'll be ignored.Documentation for the binding: https://github.com/tobof/openhab2-addons/wiki
-
is there any reason to prefer MQTT over Ethernet? If getting MQTT to work is this much of a pain why are we bothering?
Maybe I'm missing something@waspie it's not so much pain. I have it working fine. Setup could be simpler, but it works.
The main advantage, at least for me, is unifying all over mqtt. I have mysensors, but also some server monitoring scripts, a vacuum cleaner control, etc.
It's really nice to have a single layer of abstraction between openhab and everything else.
-
is there any reason to prefer MQTT over Ethernet? If getting MQTT to work is this much of a pain why are we bothering?
Maybe I'm missing something -
I'm still planning to use MQTT as I have it tied to about 20 esp8266s around the house so I would never abandon it :)
One problem I'm having now that I switched over to the embedded broker is the LWT doesn't seem to work right.
I have a module in each car that when it disconnects send a LWT of off so I know to automatically close garage doors. Using the embedded broker has broken this for some reason??? So I start to think why not just use ethernet for mysensors. Fix one problem create 10 more :\
-
I'm still planning to use MQTT as I have it tied to about 20 esp8266s around the house so I would never abandon it :)
One problem I'm having now that I switched over to the embedded broker is the LWT doesn't seem to work right.
I have a module in each car that when it disconnects send a LWT of off so I know to automatically close garage doors. Using the embedded broker has broken this for some reason??? So I start to think why not just use ethernet for mysensors. Fix one problem create 10 more :\
@waspie Well, I do use an MySensors ethernet gateway with the MySensors binding which works fine.
In addition to that I have MQTT devices, for example may heating unit (ebusd) which I connect via Mosquitto and the generic MQTT binding to OpenHAB. MySensors is not involved here.
My advice: use the ethernet gateway with the MySensors binding and keep Mosquitto for the rest. There were some changes in the MQTT implementation of Openhab in 2.4 which lead to some problems, like the one in this thread and I've found some more, while trying to adapt the new configuration and I'm sure there will be some changes to that in the next release. I'm currently using two Openhab instances (2.3 and 2.4) in parallel till all problems are solved. -
@jimmy-loyens Could you please check if the embedded-mqtt-broker thing is online? I suppose not. If the embedded broker addon (misc) is installed OpenHAB automatically discovers this embedded broker, just add that thing from inbox.
Now connect your MySensors MQTT gateway (hardware) to the IP and Port of the embedded-broker. After that your MySensors-bridge configuration should work. The port configuration at this point is not needed, but should do no harm, it'll be ignored.Documentation for the binding: https://github.com/tobof/openhab2-addons/wiki
@timo Hi Tomo.
Both the embedded broker thing and the mqtt gateway are online, i can see the mqtt messages in the logvieuwer but i cant discover nodes. I should say i have mosquitto running on port 1883 (for my milight hub) and embedded broker on port 1884. Do you think this is a problem? can i have both brokers on 1883? btw thanks for the link
-
@timo Hi Tomo.
Both the embedded broker thing and the mqtt gateway are online, i can see the mqtt messages in the logvieuwer but i cant discover nodes. I should say i have mosquitto running on port 1883 (for my milight hub) and embedded broker on port 1884. Do you think this is a problem? can i have both brokers on 1883? btw thanks for the link
@jimmy-loyens
1 broker per port otherwise one won't start. Sounds like mys is connecting to 1883 and not 1884 -
@jimmy-loyens
1 broker per port otherwise one won't start. Sounds like mys is connecting to 1883 and not 1884@waspie I think the embedded broker connects to 1884 since i can see the messages from my nodes. But you might be right that mysensors is connecting to the wrong broker/port. Allso noticed the embedded broker is really slowing down my RPI3. Just uninstalled it and everything speeds up again :disappointed_relieved: Guess i have to wait till everything can connect to mosquitto :disappointed:
-
@waspie I think the embedded broker connects to 1884 since i can see the messages from my nodes. But you might be right that mysensors is connecting to the wrong broker/port. Allso noticed the embedded broker is really slowing down my RPI3. Just uninstalled it and everything speeds up again :disappointed_relieved: Guess i have to wait till everything can connect to mosquitto :disappointed:
i may tinker with things some more in the next day or two to see if i can get MYS to connect to an external broker. i'm assuming @TimO knows best and if he can't get it to work i probably can't either but i'm not in love with how the embedded broker works (plus all the extra garbage it puts in the logs).
-
i may tinker with things some more in the next day or two to see if i can get MYS to connect to an external broker. i'm assuming @TimO knows best and if he can't get it to work i probably can't either but i'm not in love with how the embedded broker works (plus all the extra garbage it puts in the logs).
@waspie Well, it's working for @Guillermo-Schimmel and it's working in my development environment. This bugs the hell out of me. But maybe that's a problem that will be fixed with a update to OH2.
-
@waspie Well, it's working for @Guillermo-Schimmel and it's working in my development environment. This bugs the hell out of me. But maybe that's a problem that will be fixed with a update to OH2.
-
Hello!
I currently have a working Openhab2.2 with mqtt1 binding + mosquitto + MySensors MQTT gateway (+ others) installed in RPi. As I'm migrating the Openhab install to FreeNas jail I figure I should try to use the latest versions of the openhab + bindings.
But it seems that I'm facing the same issue as others: cant get my MySensor mqtt Gateway to connect to an external mqtt broker.
What I've tried was a clean install of Openhab 2.4 + mqtt2 binding + MySensor 2.4 binding, then configuring a Mqtt broker Thing (stays online) and finally a MySensor Gateway binding (never connects, show "No connection to broker: <whatever name I use>")
I tried using the embedded Mqtt and the gateway was able to connect (but I didn't check if messages were coming/going as I will definitely use an external mqtt server)
As a Java programmer myself, I tried to check the code in Github (next step will be try to create a local dev env, but for that I'll need more time to check the right steps for that) and the only odd things I notice were:
Dependency on old mqtt1 code, e.g.: the "MySensorsMqttConnection,java" class is using the MqttService from the package org.eclipse.smarthome.io.transport.mqtt.
- Is this package correct? it seems that it is the old mqtt binding code. The Mqtt stuff I found in openhab2-addons seems to use openhab packages.
a. Where would this smarthome package code be?
Potential Class version differences:
2. I have no idea (and didn't check the provided jar for the MySensor plugin) how the dependencies are managed in openhab runtime, but could it be that the MySensors package depends (or packs) a different version of the "core" mqtt code than the one that openhab2 runtime classloader is providing? then weird things could happen (if method signatures/classes are same I guess) - Is this package correct? it seems that it is the old mqtt binding code. The Mqtt stuff I found in openhab2-addons seems to use openhab packages.
-
Hello!
I currently have a working Openhab2.2 with mqtt1 binding + mosquitto + MySensors MQTT gateway (+ others) installed in RPi. As I'm migrating the Openhab install to FreeNas jail I figure I should try to use the latest versions of the openhab + bindings.
But it seems that I'm facing the same issue as others: cant get my MySensor mqtt Gateway to connect to an external mqtt broker.
What I've tried was a clean install of Openhab 2.4 + mqtt2 binding + MySensor 2.4 binding, then configuring a Mqtt broker Thing (stays online) and finally a MySensor Gateway binding (never connects, show "No connection to broker: <whatever name I use>")
I tried using the embedded Mqtt and the gateway was able to connect (but I didn't check if messages were coming/going as I will definitely use an external mqtt server)
As a Java programmer myself, I tried to check the code in Github (next step will be try to create a local dev env, but for that I'll need more time to check the right steps for that) and the only odd things I notice were:
Dependency on old mqtt1 code, e.g.: the "MySensorsMqttConnection,java" class is using the MqttService from the package org.eclipse.smarthome.io.transport.mqtt.
- Is this package correct? it seems that it is the old mqtt binding code. The Mqtt stuff I found in openhab2-addons seems to use openhab packages.
a. Where would this smarthome package code be?
Potential Class version differences:
2. I have no idea (and didn't check the provided jar for the MySensor plugin) how the dependencies are managed in openhab runtime, but could it be that the MySensors package depends (or packs) a different version of the "core" mqtt code than the one that openhab2 runtime classloader is providing? then weird things could happen (if method signatures/classes are same I guess)By creating the file org.eclipse.smarthome.mqttbroker.cfg in the service folder (/usr/local/etc/openhab2/services in my case, chown to openhab), with the contents
name=mosquitto host=192.168.1.69 secure=false port=1883 username= password= retain=trueI was able to just create the MySensors MQTT gateway (using paperui) and it stayed online (no mqtt broker defined, but its addon is installed). I had the impressions that with the latest versions it should be possible to do everything in the PaperUI, and that the broker would use the mqtt2 addon (but in paper ui, service, config, mqtt tab, mqtt system broker connection, manage->plus button -> expert mode, I get to see the contents of the cfg file above)
But unfortunately, it seems that the discovery services enters a endless loop (maybe I need to update my arduinos sketch to the latest mysensors code?) and I don't get any auto discovered things. If I trigger a new discovery it will stop the previous one and start again.
Finally, I was able to manually create a thing, and link items on it. Eventually my battery level and humidity were displayed in the paper ui control page (after some weird delay, not updating once it shows in the log. the temperature didn't show up though).
Not sure if my understanding is off (or paperui is limited in this sense) but in the "thing" creation page I only get to specify one child id. Then my multi sensors/value nodes would need to be define in multiple things? As I can't properly define channels for each child id, and I'm not sure what var1-5 are all about.
I'll try defining things/channels/items directly in files in the following days, because so far I couldn't enjoy most of the benefits of this new version (auto discovery, logical grouping of physical device in "things", questionable "do-it-all in paper ui"), and I'm almost considering using mqtt1 binding in the new install :(
- Is this package correct? it seems that it is the old mqtt binding code. The Mqtt stuff I found in openhab2-addons seems to use openhab packages.