Getting MySensors MQTT Gateway working on OpenHAB 2.2 (Stable)
-
@jogant Finally had time to double check this:
Paper UI:Broker Name mosquitto Subscription Topic mygateway1-out Publish Topic mygateway1-in Send Delay 100 Startup check enabled Metric answer enabled Network sanity check enabled Interval to launch network sanity check 3 Attempts before disconnecting the bridge 3 Heartbeat disabled Attempts before disconnecting nodes 10EDIT: I noticed I have different topics in MQTT, corrected AND I did:
cd /usr/share/openhab2/addons/ wget http://www.oberfoell.com/openhab2/org.openhab.binding.mysensors-2.4.0-SNAPSHOT.jar <== THIS probably fixed it! chown for the same file rm org.openhab.binding.mysensors-2.3.0-SNAPSHOT.jarNow my MQTT Gw is ONLINE, in Paper UI I just selected the bridge for every individual Thing and now it works.
Hope this helps people strugling with this.@masmat Yes!!!! Thank you man. I found 2.4.0 thanks to your message and now it's working!
Love
-
This post is deleted!
-
Hi all, I am a Newbie an trying to get OH2.4 to work with MySensors nodes.
I have a MYS Mqtt ethernet GW up&running (seems to work, can talk to other sensors)
Now I can't get MQTT thing/broker/binding to work in OH2.4. I first tries the manual above, then I read that Musquitto is not needed any more....right??
I have to use MQTT 2.4 Ting binding and MQTT broker right? -> I have installed this and have MQTT broker running on localhost (online) (no channels addes in MQTT broker)
I have added in Things: MysensorsMQTT gateway: broker name: "MQTT Broker" and 'startup check' and 'sanity check' ON
Then I checked from the CLI the file "org.eclipse.smarthome.mqtt.cfg" ->there was still the musquitto entries I made... Also in mqtt-eventbus.cfg was still broker=musquitto. What do I do with this??
In OH log I get errors:****2019-02-10 21:52:35.274 [me.event.ThingUpdatedEvent] - Thing 'mysensors:bridge-mqtt:9954d183' has been updated. 2019-02-10 21:52:35.682 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:9954d183' changed from UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org/openhab/binding/mysensors/internal/protocol/mqtt/MySensorsMqttConnection$MySensorsMqttPublishCallback to INITIALIZING 2019-02-10 21:52:35.685 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:9954d183' changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org/openhab/binding/mysensors/internal/protocol/mqtt/MySensorsMqttConnection$MySensorsMqttPublishCallback**** ---*Next problem:
I installed the MySensors Ethernet gateway thing in OH, configged it with IP of Arduino running the Mys GW. -> This Thing will NOT come 'online'. I can Ping the GW board, all looks OK in GW log:0 MCO:BGN:INIT GW,CP=RNNGA---,REL=255,VER=2.3.1 4 TSM:INIT 5 TSF:WUR:MS=0 11 TSM:INIT:TSP OK 13 TSM:INIT:GW MODE 15 TSM:READY:ID=0,PAR=0,DIS=0 17 MCO:REG:NOT NEEDED 580 GWT:TPC:IP=192.168.178.87 1583 MCO:BGN:STP 1585 MCO:BGN:INIT OK,TSP=1 1588 GWT:TPC:IP=192.168.178.87 2590 GWT:RMQ:MQTT RECONNECT 2798 GWT:RMQ:MQTT CONNECTED 2801 GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT 2807 TSM:READY:NWD REQ 2844 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: 0 MCO:BGN:INIT GW,CP=RNNGA---,REL=255,VER=2.3.1 4 TSM:INIT 5 TSF:WUR:MS=0 11 TSM:INIT:TSP OK 13 TSM:INIT:GW MODE 15 TSM:READY:ID=0,PAR=0,DIS=0 17 MCO:REG:NOT NEEDED 580 GWT:TPC:IP=192.168.178.87 1583 MCO:BGN:STP 1585 MCO:BGN:INIT OK,TSP=1 1588 GWT:TPC:IP=192.168.178.87 2590 GWT:RMQ:MQTT RECONNECT 2798 GWT:RMQ:MQTT CONNECTED 2800 GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT 2807 TSM:READY:NWD REQ 2844 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: 3810 TSF:MSG:READ,254-254-0,s=255,c=3,t=21,pt=1,l=1,sg=0:0 3815 GWT:TPS:TOPIC=mygateway1-out/254/255/3/0/21,MSG SENT 636790 TSF:MSG:READ,254-254-0,s=255,c=3,t=0,pt=1,l=1,sg=0:99 636795 GWT:TPS:TOPIC=mygateway1-out/254/255/3/0/0,MSG SENT 637304 TSF:MSG:READ,254-254-0,s=255,c=3,t=1,pt=0,l=0,sg=0: 637309 GWT:TPS:TOPIC=mygateway1-out/254/255/3/0/1,MSG SENT 637815 TSF:MSG:READ,254-254-0,s=1,c=1,t=16,pt=2,l=2,sg=0:0 637820 GWT:TPS:TOPIC=mygateway1-out/254/1/1/0/16,MSG SENT 637827 TSF:MSG:READ,254-254-0,s=1,c=1,t=15,pt=1,l=1,sg=0:1 637832 GWT:TPS:TOPIC=mygateway1-out/254/1/1/0/15,MSG SENT 637838 TSF:MSG:READ,254-254-0,s=7,c=1,t=0,pt=4,l=4,sg=0:44 637844 GWT:TPS:TOPIC=mygateway1-out/254/7/1/0/0,MSG SENT 637850 TSF:MSG:READ,254-254-0,s=255,c=3,t=0,pt=1,l=1,sg=0:99 637855 GWT:TPS:TOPIC=mygateway1-out/254/255/3/0/0,MSG SENT 900006 TSF:SAN:OKHow do I proceed? Ive tried to find more posts on getting MySensors to work under OH24 but I think it is sooo simple that nobody has any problems to post....right?!
Hope you guys can get this Newbie back on track.... thx a lot! -
Hi all, I am a Newbie an trying to get OH2.4 to work with MySensors nodes.
I have a MYS Mqtt ethernet GW up&running (seems to work, can talk to other sensors)
Now I can't get MQTT thing/broker/binding to work in OH2.4. I first tries the manual above, then I read that Musquitto is not needed any more....right??
I have to use MQTT 2.4 Ting binding and MQTT broker right? -> I have installed this and have MQTT broker running on localhost (online) (no channels addes in MQTT broker)
I have added in Things: MysensorsMQTT gateway: broker name: "MQTT Broker" and 'startup check' and 'sanity check' ON
Then I checked from the CLI the file "org.eclipse.smarthome.mqtt.cfg" ->there was still the musquitto entries I made... Also in mqtt-eventbus.cfg was still broker=musquitto. What do I do with this??
In OH log I get errors:****2019-02-10 21:52:35.274 [me.event.ThingUpdatedEvent] - Thing 'mysensors:bridge-mqtt:9954d183' has been updated. 2019-02-10 21:52:35.682 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:9954d183' changed from UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org/openhab/binding/mysensors/internal/protocol/mqtt/MySensorsMqttConnection$MySensorsMqttPublishCallback to INITIALIZING 2019-02-10 21:52:35.685 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:9954d183' changed from INITIALIZING to UNINITIALIZED (HANDLER_INITIALIZING_ERROR): org/openhab/binding/mysensors/internal/protocol/mqtt/MySensorsMqttConnection$MySensorsMqttPublishCallback**** ---*Next problem:
I installed the MySensors Ethernet gateway thing in OH, configged it with IP of Arduino running the Mys GW. -> This Thing will NOT come 'online'. I can Ping the GW board, all looks OK in GW log:0 MCO:BGN:INIT GW,CP=RNNGA---,REL=255,VER=2.3.1 4 TSM:INIT 5 TSF:WUR:MS=0 11 TSM:INIT:TSP OK 13 TSM:INIT:GW MODE 15 TSM:READY:ID=0,PAR=0,DIS=0 17 MCO:REG:NOT NEEDED 580 GWT:TPC:IP=192.168.178.87 1583 MCO:BGN:STP 1585 MCO:BGN:INIT OK,TSP=1 1588 GWT:TPC:IP=192.168.178.87 2590 GWT:RMQ:MQTT RECONNECT 2798 GWT:RMQ:MQTT CONNECTED 2801 GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT 2807 TSM:READY:NWD REQ 2844 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: 0 MCO:BGN:INIT GW,CP=RNNGA---,REL=255,VER=2.3.1 4 TSM:INIT 5 TSF:WUR:MS=0 11 TSM:INIT:TSP OK 13 TSM:INIT:GW MODE 15 TSM:READY:ID=0,PAR=0,DIS=0 17 MCO:REG:NOT NEEDED 580 GWT:TPC:IP=192.168.178.87 1583 MCO:BGN:STP 1585 MCO:BGN:INIT OK,TSP=1 1588 GWT:TPC:IP=192.168.178.87 2590 GWT:RMQ:MQTT RECONNECT 2798 GWT:RMQ:MQTT CONNECTED 2800 GWT:TPS:TOPIC=mygateway1-out/0/255/0/0/18,MSG SENT 2807 TSM:READY:NWD REQ 2844 TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK: 3810 TSF:MSG:READ,254-254-0,s=255,c=3,t=21,pt=1,l=1,sg=0:0 3815 GWT:TPS:TOPIC=mygateway1-out/254/255/3/0/21,MSG SENT 636790 TSF:MSG:READ,254-254-0,s=255,c=3,t=0,pt=1,l=1,sg=0:99 636795 GWT:TPS:TOPIC=mygateway1-out/254/255/3/0/0,MSG SENT 637304 TSF:MSG:READ,254-254-0,s=255,c=3,t=1,pt=0,l=0,sg=0: 637309 GWT:TPS:TOPIC=mygateway1-out/254/255/3/0/1,MSG SENT 637815 TSF:MSG:READ,254-254-0,s=1,c=1,t=16,pt=2,l=2,sg=0:0 637820 GWT:TPS:TOPIC=mygateway1-out/254/1/1/0/16,MSG SENT 637827 TSF:MSG:READ,254-254-0,s=1,c=1,t=15,pt=1,l=1,sg=0:1 637832 GWT:TPS:TOPIC=mygateway1-out/254/1/1/0/15,MSG SENT 637838 TSF:MSG:READ,254-254-0,s=7,c=1,t=0,pt=4,l=4,sg=0:44 637844 GWT:TPS:TOPIC=mygateway1-out/254/7/1/0/0,MSG SENT 637850 TSF:MSG:READ,254-254-0,s=255,c=3,t=0,pt=1,l=1,sg=0:99 637855 GWT:TPS:TOPIC=mygateway1-out/254/255/3/0/0,MSG SENT 900006 TSF:SAN:OKHow do I proceed? Ive tried to find more posts on getting MySensors to work under OH24 but I think it is sooo simple that nobody has any problems to post....right?!
Hope you guys can get this Newbie back on track.... thx a lot!Hi @rene-mullie,
Seems like the mysensors binding mqtt gw doesnt play nice with the mosquitto broker. You can try running the embedded broker of openhab (paperUi->addons->misc->embedded broker i beleive). Dont forget to configure it under services->misc (not shure since im on my phone right now). And connect your mqtt gateway to this broker. I was not succesful in this because i need the embedded broker on port 1884 since i allready have mosquitto on port 1883 for other stuff. And i <think> mysensors mqtt gateway doesnt want to connect to 1884 but 1883. But you can give it a try. If you have ethernet gateway going and dont have plans to use different controllers (for example to do FOTA updates) i would stick to the ethernet gw for now. Greets
-
I have configged the embedded broker in right way, broker is online on localhost.
I tried to connect Mys mqtt gateway to Embedded mqtt broker in paper UI:Broker Name
MQTT Broker (-> not sure about this name....??)
name of the MQTT broker as defined in the org.eclipse.smarthome.mqtt.cfg file``` (-> if I check this cfg file there is NOTHING about the embedded broker, only old Musquitto stuf...)All is on default port 1883 on both sides...
I get fault in OH log file:
2019-02-10 23:40:56.626 [ERROR] [al.protocol.ip.MySensorsIpConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:15) -
@waspie tried that, still same errors...
What should be the entries in the org.eclipse.smarthome.mqtt.cfg file ? -
@waspie tried that, still same errors...
What should be the entries in the org.eclipse.smarthome.mqtt.cfg file ?@rene-mullie delete it
-
@waspie tried that, still same errors...
What should be the entries in the org.eclipse.smarthome.mqtt.cfg file ?@rene-mullie if im not mistaken that file is to configure mqtt v1 and your using mqtt v2
-
Thx4 your support! I gave up on fixing the old install and started over with brand new install of OH2.4: All was up&running in 45mins!! MQTT2.4 with embedded broker works like a charm. On top the Mysensors MQTT GW Ting was online with 1-click! All my MYsensor nodes where recognized immediately! What a relief!
Hope someone will update Mysensors docu so others will be spared the pain...