OpenHAB Mysensors binding 2.4: cant get mqtt gateway online
-
Hello, im trying to get mysensors binding to work in openHAB with mqtt gateway. I can get it to work with ethernet or serial gateway but i need mqtt gateway. Hardware is properly setup. I know this because i can connect to mqtt gateway with mycontroller and see all connected nodes and sensors. When i look at the mosquitto broker i can see the messages sent by the gateway. But my mqtt gateway thing stays offline in openHAB paperUi. I guess there is a problem with my mqtt.cfg or mqtt-eventbus.cfg. there isnt alot of documentation out there. I did find an example of how the config files should look in openHAB 2.2 & 2.3 but im running 2.4 and appearently the same .cfg doesnt work. I've been breaking my head over this for the last 3 days but cant find anything on the forums to solve my problem (it gets very confusing, considering the various approaches: mqtt binding1 vs mqtt binding2 vs mysensors binding). Does anyone have the mqtt gateway running in openhab 2.4 using the mysensors binding? Im really lost, any help would be much appreciated. Thanks
-
Hello, im trying to get mysensors binding to work in openHAB with mqtt gateway. I can get it to work with ethernet or serial gateway but i need mqtt gateway. Hardware is properly setup. I know this because i can connect to mqtt gateway with mycontroller and see all connected nodes and sensors. When i look at the mosquitto broker i can see the messages sent by the gateway. But my mqtt gateway thing stays offline in openHAB paperUi. I guess there is a problem with my mqtt.cfg or mqtt-eventbus.cfg. there isnt alot of documentation out there. I did find an example of how the config files should look in openHAB 2.2 & 2.3 but im running 2.4 and appearently the same .cfg doesnt work. I've been breaking my head over this for the last 3 days but cant find anything on the forums to solve my problem (it gets very confusing, considering the various approaches: mqtt binding1 vs mqtt binding2 vs mysensors binding). Does anyone have the mqtt gateway running in openhab 2.4 using the mysensors binding? Im really lost, any help would be much appreciated. Thanks
@jimmy-loyens It seems like the MQTT-gateway thing doesn't connect to mosquitto, I should mention i have the espMiLight binding running wich allso goes over mqtt (wich does connect to mosquitto). When i look in the mosquitto logs i can see the espMiLight bridge connect from IP of openhab but i never see MySensors bridge connect to mosquitto:
[13:15:53] openhabian@openHABianPi:~$ mosquitto -p 1883 -v 1548159358: mosquitto version 1.4.10 (build date Wed, 17 Oct 2018 19:03:03 +0200 ) starting 1548159358: Using default config. 1548159358: Opening ipv4 listen socket on port 1883. 1548159358: Opening ipv6 listen socket on port 1883. 1548159358: New connection from 192.168.1.4 on port 1883. 1548159358: New client connected from 192.168.1.4 as mysensors-1 (c1, k15, u'ope nhabian'). 1548159358: Sending CONNACK to mysensors-1 (0, 0) 1548159358: Received PUBLISH from mysensors-1 (d0, q0, r0, m0, 'mygateway1-out/0 /255/0/0/18', ... (5 bytes)) 1548159358: Received SUBSCRIBE from mysensors-1 1548159358: mygateway1-in/+/+/+/+/+ (QoS 0) 1548159358: mysensors-1 0 mygateway1-in/+/+/+/+/+ 1548159358: Sending SUBACK to mysensors-1 1548159359: Received PUBLISH from mysensors-1 (d0, q0, r0, m0, 'mygateway1-out/1 07/3/1/0/0', ... (2 bytes)) 1548159359: Received PUBLISH from mysensors-1 (d0, q0, r0, m0, 'mygateway1-out/1 07/2/1/0/0', ... (4 bytes)) 1548159359: Received PUBLISH from mysensors-1 (d0, q0, r0, m0, 'mygateway1-out/1 07/1/1/0/1', ... (4 bytes)) 1548159361: New connection from 192.168.1.2 on port 1883. 1548159361: New client connected from 192.168.1.2 as espMilightHub:001 (c1, k15, u'openhabian'). 1548159361: Sending CONNACK to espMilightHub:001 (0, 0) 1548159361: Received SUBSCRIBE from espMilightHub:001 1548159361: milight/states/# (QoS 1) 1548159361: espMilightHub:001 1 milight/states/# 1548159361: Sending SUBACK to espMilightHub:001 1548159363: New connection from 192.168.1.5 on port 1883. 1548159363: New client connected from 192.168.1.5 as milight-hub-8661470 (c1, k1 5, u'openhabian').192.168.1.2 => ip openhab server
192.168.1.4 => ip mqtt gateway
192.168.1.5 => ip milight hub
If i am right there should be 2 more lines like this:New connection from 192.168.1.2 on port 1883. New client connected from 192.168.1.2 as mysensors:gateway (c1, k15, u'openhabian').but these lines never show up in mosquitto log:white_frowning_face:
These are the logs i get when trying to add a mqtt gateway from paperUI:2019-01-22 13:54:57.181 [TRACE] [sors.factory.MySensorsHandlerFactory] - Creating handler for thing: mysensors:bridge-mqtt:bd653924 2019-01-22 13:54:57.195 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge ==> /var/log/openhab2/events.log <== 2019-01-22 13:54:57.196 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:bd653924' changed from UNINITIALIZED to INITIALIZING ==> /var/log/openhab2/openhab.log <== 2019-01-22 13:54:57.203 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist. 2019-01-22 13:54:57.208 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [0, 11, 107] 2019-01-22 13:54:57.212 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog 2019-01-22 13:54:57.216 [TRACE] [sensors.internal.event.EventRegister] - Adding listener org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@5be142 to org.openhab.binding.mysensors.internal.event.EventRegister@646dd1 2019-01-22 13:54:57.219 [TRACE] [sensors.internal.event.EventRegister] - Adding listener org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@10cfe20 to org.openhab.binding.mysensors.internal.event.EventRegister@646dd1 2019-01-22 13:54:57.225 [TRACE] [nsors.handler.MySensorsBridgeHandler] - Registering MySensorsDiscoveryService for bridge 'bd653924' 2019-01-22 13:54:57.224 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - No connection to broker: mosquitto 2019-01-22 13:54:57.232 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection@16f7c2 to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@5be142 2019-01-22 13:54:57.236 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=0, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@5be142 2019-01-22 13:54:57.239 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=0, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@10cfe20 2019-01-22 13:54:57.243 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=11, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@5be142 2019-01-22 13:54:57.247 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=11, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@10cfe20 2019-01-22 13:54:57.251 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=107, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@5be142 2019-01-22 13:54:57.253 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=518, service.bundleid=263, service.scope=singleton} - org.openhab.binding.mysensors 2019-01-22 13:54:57.255 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=107, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@10cfe20 2019-01-22 13:54:57.258 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection@16f7c2 to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@10cfe20 ==> /var/log/openhab2/events.log <== 2019-01-22 13:54:57.269 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:bd653924' changed from INITIALIZING to OFFLINE ==> /var/log/openhab2/openhab.log <== 2019-01-22 13:54:57.275 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [0,11,107] 2019-01-22 13:54:57.279 [DEBUG] [.discovery.MySensorsDiscoveryService] - Starting MySensors discovery scan 2019-01-22 13:54:57.282 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0) 2019-01-22 13:54:57.282 [TRACE] [sensors.internal.event.EventRegister] - Adding listener org.openhab.binding.mysensors.discovery.MySensorsDiscoveryService@1e34cba to org.openhab.binding.mysensors.internal.event.EventRegister@646dd1 2019-01-22 13:54:57.285 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge DONE!For some reason openhab cant connect the mqtt gateway thing to mosquitto, it can however connect the espMiLight hub to mosquitto no problem.
The mqtt gateway itself is happely spewing data wich arrives at the mosquitto broker:
[14:05:04] openhabian@openHABianPi:~$ mosquitto_sub -u openhabian -P y -p 1883 -v -t 'mygateway1-out/#' mygateway1-out/107/3/1/0/0 28 mygateway1-out/107/0/1/0/0 91 mygateway1-out/107/2/1/0/0 20.1 mygateway1-out/107/1/1/0/1 45.4 mygateway1-out/107/2/1/0/0 20.6 mygateway1-out/107/1/1/0/1 43.2I have serial binding and mqtt binding v2 installed. I have both mqtt.cfg and org.eclipse.smarthome.mqtt.cfg configured as follows:
# # Define your MQTT broker connections here for use in the MQTT Binding or MQTT # Persistence bundles. Replace <broker> with an ID you choose. # URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883 mqtt:mosquitto.url=tcp://localhost:1883 # Optional. Client id (max 23 chars) to use when connecting to the broker. # If not provided a random default is generated. mqtt:mosquitto.clientId=openHab # Optional. True or false. If set to true, allows the use of clientId values # up to 65535 characters long. Defaults to false. # NOTE: clientId values longer than 23 characters may not be supported by all # MQTT servers. Check the server documentation. #mqtt:mosquitto.allowLongerClientIds=false # Optional. User id to authenticate with the broker. mqtt:mosquitto.user=openhabian # Optional. Password to authenticate with the broker. mqtt:mosquitto.pwd=y # Optional. Set the quality of service level for sending messages to this broker. # Possible values are 0 (Deliver at most once),1 (Deliver at least once) or 2 # (Deliver exactly once). Defaults to 0. mqtt:mosquitto.qos=1 # Optional. True or false. Defines if the broker should retain the messages sent to # it. Defaults to false. #mqtt:mosquitto.retain=true # Optional. True or false. Defines if messages are published asynchronously or # synchronously. Defaults to true. #mqtt:mosquitto.async=false # Optional. Defines the last will and testament that is sent when this client goes offline # Format: topic:message:qos:retained <br/> #mqtt:mosquitto.lwt=<last will definition>I've been at this for 4 days now and i really want to pull my hear out:rage: :sob: :tired_face:
-
@jimmy-loyens It seems like the MQTT-gateway thing doesn't connect to mosquitto, I should mention i have the espMiLight binding running wich allso goes over mqtt (wich does connect to mosquitto). When i look in the mosquitto logs i can see the espMiLight bridge connect from IP of openhab but i never see MySensors bridge connect to mosquitto:
[13:15:53] openhabian@openHABianPi:~$ mosquitto -p 1883 -v 1548159358: mosquitto version 1.4.10 (build date Wed, 17 Oct 2018 19:03:03 +0200 ) starting 1548159358: Using default config. 1548159358: Opening ipv4 listen socket on port 1883. 1548159358: Opening ipv6 listen socket on port 1883. 1548159358: New connection from 192.168.1.4 on port 1883. 1548159358: New client connected from 192.168.1.4 as mysensors-1 (c1, k15, u'ope nhabian'). 1548159358: Sending CONNACK to mysensors-1 (0, 0) 1548159358: Received PUBLISH from mysensors-1 (d0, q0, r0, m0, 'mygateway1-out/0 /255/0/0/18', ... (5 bytes)) 1548159358: Received SUBSCRIBE from mysensors-1 1548159358: mygateway1-in/+/+/+/+/+ (QoS 0) 1548159358: mysensors-1 0 mygateway1-in/+/+/+/+/+ 1548159358: Sending SUBACK to mysensors-1 1548159359: Received PUBLISH from mysensors-1 (d0, q0, r0, m0, 'mygateway1-out/1 07/3/1/0/0', ... (2 bytes)) 1548159359: Received PUBLISH from mysensors-1 (d0, q0, r0, m0, 'mygateway1-out/1 07/2/1/0/0', ... (4 bytes)) 1548159359: Received PUBLISH from mysensors-1 (d0, q0, r0, m0, 'mygateway1-out/1 07/1/1/0/1', ... (4 bytes)) 1548159361: New connection from 192.168.1.2 on port 1883. 1548159361: New client connected from 192.168.1.2 as espMilightHub:001 (c1, k15, u'openhabian'). 1548159361: Sending CONNACK to espMilightHub:001 (0, 0) 1548159361: Received SUBSCRIBE from espMilightHub:001 1548159361: milight/states/# (QoS 1) 1548159361: espMilightHub:001 1 milight/states/# 1548159361: Sending SUBACK to espMilightHub:001 1548159363: New connection from 192.168.1.5 on port 1883. 1548159363: New client connected from 192.168.1.5 as milight-hub-8661470 (c1, k1 5, u'openhabian').192.168.1.2 => ip openhab server
192.168.1.4 => ip mqtt gateway
192.168.1.5 => ip milight hub
If i am right there should be 2 more lines like this:New connection from 192.168.1.2 on port 1883. New client connected from 192.168.1.2 as mysensors:gateway (c1, k15, u'openhabian').but these lines never show up in mosquitto log:white_frowning_face:
These are the logs i get when trying to add a mqtt gateway from paperUI:2019-01-22 13:54:57.181 [TRACE] [sors.factory.MySensorsHandlerFactory] - Creating handler for thing: mysensors:bridge-mqtt:bd653924 2019-01-22 13:54:57.195 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge ==> /var/log/openhab2/events.log <== 2019-01-22 13:54:57.196 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:bd653924' changed from UNINITIALIZED to INITIALIZING ==> /var/log/openhab2/openhab.log <== 2019-01-22 13:54:57.203 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist. 2019-01-22 13:54:57.208 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [0, 11, 107] 2019-01-22 13:54:57.212 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog 2019-01-22 13:54:57.216 [TRACE] [sensors.internal.event.EventRegister] - Adding listener org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@5be142 to org.openhab.binding.mysensors.internal.event.EventRegister@646dd1 2019-01-22 13:54:57.219 [TRACE] [sensors.internal.event.EventRegister] - Adding listener org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@10cfe20 to org.openhab.binding.mysensors.internal.event.EventRegister@646dd1 2019-01-22 13:54:57.225 [TRACE] [nsors.handler.MySensorsBridgeHandler] - Registering MySensorsDiscoveryService for bridge 'bd653924' 2019-01-22 13:54:57.224 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - No connection to broker: mosquitto 2019-01-22 13:54:57.232 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection@16f7c2 to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@5be142 2019-01-22 13:54:57.236 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=0, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@5be142 2019-01-22 13:54:57.239 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=0, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@10cfe20 2019-01-22 13:54:57.243 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=11, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@5be142 2019-01-22 13:54:57.247 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=11, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@10cfe20 2019-01-22 13:54:57.251 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=107, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@5be142 2019-01-22 13:54:57.253 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=518, service.bundleid=263, service.scope=singleton} - org.openhab.binding.mysensors 2019-01-22 13:54:57.255 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=107, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@10cfe20 2019-01-22 13:54:57.258 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection@16f7c2 to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@10cfe20 ==> /var/log/openhab2/events.log <== 2019-01-22 13:54:57.269 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:bd653924' changed from INITIALIZING to OFFLINE ==> /var/log/openhab2/openhab.log <== 2019-01-22 13:54:57.275 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [0,11,107] 2019-01-22 13:54:57.279 [DEBUG] [.discovery.MySensorsDiscoveryService] - Starting MySensors discovery scan 2019-01-22 13:54:57.282 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0) 2019-01-22 13:54:57.282 [TRACE] [sensors.internal.event.EventRegister] - Adding listener org.openhab.binding.mysensors.discovery.MySensorsDiscoveryService@1e34cba to org.openhab.binding.mysensors.internal.event.EventRegister@646dd1 2019-01-22 13:54:57.285 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge DONE!For some reason openhab cant connect the mqtt gateway thing to mosquitto, it can however connect the espMiLight hub to mosquitto no problem.
The mqtt gateway itself is happely spewing data wich arrives at the mosquitto broker:
[14:05:04] openhabian@openHABianPi:~$ mosquitto_sub -u openhabian -P y -p 1883 -v -t 'mygateway1-out/#' mygateway1-out/107/3/1/0/0 28 mygateway1-out/107/0/1/0/0 91 mygateway1-out/107/2/1/0/0 20.1 mygateway1-out/107/1/1/0/1 45.4 mygateway1-out/107/2/1/0/0 20.6 mygateway1-out/107/1/1/0/1 43.2I have serial binding and mqtt binding v2 installed. I have both mqtt.cfg and org.eclipse.smarthome.mqtt.cfg configured as follows:
# # Define your MQTT broker connections here for use in the MQTT Binding or MQTT # Persistence bundles. Replace <broker> with an ID you choose. # URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883 mqtt:mosquitto.url=tcp://localhost:1883 # Optional. Client id (max 23 chars) to use when connecting to the broker. # If not provided a random default is generated. mqtt:mosquitto.clientId=openHab # Optional. True or false. If set to true, allows the use of clientId values # up to 65535 characters long. Defaults to false. # NOTE: clientId values longer than 23 characters may not be supported by all # MQTT servers. Check the server documentation. #mqtt:mosquitto.allowLongerClientIds=false # Optional. User id to authenticate with the broker. mqtt:mosquitto.user=openhabian # Optional. Password to authenticate with the broker. mqtt:mosquitto.pwd=y # Optional. Set the quality of service level for sending messages to this broker. # Possible values are 0 (Deliver at most once),1 (Deliver at least once) or 2 # (Deliver exactly once). Defaults to 0. mqtt:mosquitto.qos=1 # Optional. True or false. Defines if the broker should retain the messages sent to # it. Defaults to false. #mqtt:mosquitto.retain=true # Optional. True or false. Defines if messages are published asynchronously or # synchronously. Defaults to true. #mqtt:mosquitto.async=false # Optional. Defines the last will and testament that is sent when this client goes offline # Format: topic:message:qos:retained <br/> #mqtt:mosquitto.lwt=<last will definition>I've been at this for 4 days now and i really want to pull my hear out:rage: :sob: :tired_face:
@jimmy-loyens Hi Jimmy. I'm trying to help, but being a complex issue I'm a little lost.
Have you tried the mysensors+mqtt combo without OpenHAB and it's working ok? I would recommend mycontroller.org as a starting point.
I also recommend mqtt.fx client in order to see the mqtt messages. Try to understand them and if possible send some to your sensors.
If and only if the mysensors+mqtt it's ok, then go to openhab.
In PaperUI you should create a thing for the broker. Have you already? Then after the thing for the broker, you have to create a thing for the gateway. And then if both of them are ok, you can discover your sensors.
Please have a look at some of my screens. I have several brokers because I was also very confused. You only need one.

-
@jimmy-loyens Hi Jimmy. I'm trying to help, but being a complex issue I'm a little lost.
Have you tried the mysensors+mqtt combo without OpenHAB and it's working ok? I would recommend mycontroller.org as a starting point.
I also recommend mqtt.fx client in order to see the mqtt messages. Try to understand them and if possible send some to your sensors.
If and only if the mysensors+mqtt it's ok, then go to openhab.
In PaperUI you should create a thing for the broker. Have you already? Then after the thing for the broker, you have to create a thing for the gateway. And then if both of them are ok, you can discover your sensors.
Please have a look at some of my screens. I have several brokers because I was also very confused. You only need one.

@guillermo-schimmel Hi guilleromo, thanks for staying with me.
I have a broker setup and online,
mqtt:broker:mosquito [ host="192.168.1.2", port=1883, qos=1, clientID="openHAB2", reconnectTime=20000, keepAlive=60000, secure=false, username="openhabian", password="xxxx" ]If i create a thing for the gateway i can see the gateway in paperUI but i cant managet to get it online
Bridge mysensors:bridge-mqtt:gateway2 [ brokerName="mosquitto", username="openhabian", password="xxxx", topicPublish="mygateway1-in", topicSubscribe="mygateway1-out", startupCheckEnabled=false ](This line probably looks formilliar, its the same you use with addition of username & password)

In the log it says: "No connection to broker: mosquitto" and i think this is the whole problem since i can see the messages from the gateway appearing on mosquitto when i do:
"mosquitto_sub -u openhabian -P y -p 1883 -v -t 'mygateway1-out/#'"i can allso see the messages on my phone using an mqtt client perscribing to the same topic. But i'm downloading mqtt.fx as i type

-
@guillermo-schimmel Hi guilleromo, thanks for staying with me.
I have a broker setup and online,
mqtt:broker:mosquito [ host="192.168.1.2", port=1883, qos=1, clientID="openHAB2", reconnectTime=20000, keepAlive=60000, secure=false, username="openhabian", password="xxxx" ]If i create a thing for the gateway i can see the gateway in paperUI but i cant managet to get it online
Bridge mysensors:bridge-mqtt:gateway2 [ brokerName="mosquitto", username="openhabian", password="xxxx", topicPublish="mygateway1-in", topicSubscribe="mygateway1-out", startupCheckEnabled=false ](This line probably looks formilliar, its the same you use with addition of username & password)

In the log it says: "No connection to broker: mosquitto" and i think this is the whole problem since i can see the messages from the gateway appearing on mosquitto when i do:
"mosquitto_sub -u openhabian -P y -p 1883 -v -t 'mygateway1-out/#'"i can allso see the messages on my phone using an mqtt client perscribing to the same topic. But i'm downloading mqtt.fx as i type

@jimmy-loyens You have some mosquito/mosquitto mismatch. Have you noticed?
-
@jimmy-loyens You have some mosquito/mosquitto mismatch. Have you noticed?
@guillermo-schimmel No I had not noticed thanks. Corrected it but so far GW stays offline. I have deleted and restarted these files so often over the past coupple of days, this was a fresh file from today:grin:
just did a global search in my files, this was the only occurrence of the misspelling
-
@guillermo-schimmel No I had not noticed thanks. Corrected it but so far GW stays offline. I have deleted and restarted these files so often over the past coupple of days, this was a fresh file from today:grin:
just did a global search in my files, this was the only occurrence of the misspelling
@jimmy-loyens This binding is a little raw. Perhaps you would like to restart the whole OpenHAB.
Also you should enable more debugging in
openhab-cli console. Specificaly to mysensors binding and mqtt. -
@jimmy-loyens This binding is a little raw. Perhaps you would like to restart the whole OpenHAB.
Also you should enable more debugging in
openhab-cli console. Specificaly to mysensors binding and mqtt.@guillermo-schimmel I allready have TRACE on for mysensors binding, i will turn it on for mqtt to (if i can find bundle name). Do you mean reboot openhab server? No problem that will be reboot nr167 for today :grin: :stuck_out_tongue_winking_eye:
-
@guillermo-schimmel I allready have TRACE on for mysensors binding, i will turn it on for mqtt to (if i can find bundle name). Do you mean reboot openhab server? No problem that will be reboot nr167 for today :grin: :stuck_out_tongue_winking_eye:
@jimmy-loyens turned on TRACE logging for mqtt transport, mqtt binding & mqtt thing binding. TRACE logging was allready on for mysensors binding.
Openhab server rebooted.But gateway doesnt come online
This is everything logged about mqtt:
2019-01-22 15:39:26.350 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - BundleEvent STARTING - org.eclipse.smarthome.binding.mqtt 2019-01-22 15:39:26.420 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=482, service.bundleid=270, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.internal.discovery.MqttServiceDiscoveryService, component.id=321} - org.eclipse.smarthome.binding.mqtt 2019-01-22 15:39:26.457 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, org.eclipse.smarthome.binding.mqtt.discovery.MQTTTopicDiscoveryService}={service.id=483, service.bundleid=270, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.internal.MqttBrokerHandlerFactory, component.id=322} - org.eclipse.smarthome.binding.mqtt 2019-01-22 15:39:26.483 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingActions}={service.id=484, service.bundleid=270, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.action.MQTTActions, component.id=323} - org.eclipse.smarthome.binding.mqtt 2019-01-22 15:39:26.494 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - BundleEvent STARTED - org.eclipse.smarthome.binding.mqtt 2019-01-22 15:39:26.514 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - BundleEvent STARTING - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:39:26.598 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=485, service.bundleid=271, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.discovery.HomeAssistantDiscovery, component.id=324} - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:39:26.626 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.type.ChannelTypeProvider, org.eclipse.smarthome.core.thing.type.ChannelGroupTypeProvider, org.eclipse.smarthome.binding.mqtt.generic.internal.generic.MqttChannelTypeProvider}={service.id=486, service.bundleid=271, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.generic.MqttChannelTypeProvider, component.id=325} - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:39:26.643 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=487, service.bundleid=271, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.discovery.Homie300Discovery, component.id=326} - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:39:26.665 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.type.DynamicStateDescriptionProvider, org.eclipse.smarthome.binding.mqtt.generic.internal.generic.MqttChannelStateDescriptionProvider}={service.id=488, service.bundleid=271, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.generic.MqttChannelStateDescriptionProvider, component.id=327} - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:39:26.700 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=489, service.bundleid=271, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.MqttThingHandlerFactory, component.id=328} - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:39:26.722 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - BundleEvent STARTED - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:40:38.064 [TRACE] [sors.factory.MySensorsHandlerFactory] - Creating handler for thing: mysensors:bridge-mqtt:gateway2 2019-01-22 15:40:38.090 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:gateway2' changed from UNINITIALIZED to INITIALIZING 2019-01-22 15:40:38.115 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingActions}={service.id=510, service.bundleid=270, service.scope=singleton} - org.eclipse.smarthome.binding.mqtt 2019-01-22 15:40:38.130 [hingStatusInfoChangedEvent] - 'mqtt:broker:mosquitto' changed from UNINITIALIZED to INITIALIZING 2019-01-22 15:40:38.194 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog 2019-01-22 15:40:38.197 [hingStatusInfoChangedEvent] - 'mqtt:broker:mosquitto' changed from INITIALIZING to OFFLINE 2019-01-22 15:40:38.222 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - No connection to broker: mosquitto 2019-01-22 15:40:38.245 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection@c41f03 to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@16ae66 2019-01-22 15:40:38.266 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection@c41f03 to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@86c4a7 2019-01-22 15:40:38.274 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:gateway2' changed from INITIALIZING to OFFLINE 2019-01-22 15:40:38.281 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0) 2019-01-22 15:40:38.368 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.1.2' with clientid openHAB2 and file store '/var/lib/openhab2/mqtt/192.168.1.2' 2019-01-22 15:40:38.386 [TRACE] [ternal.TopicSubscribeMultiConnection] - Found suitable bridge mqtt:broker:mosquitto for listing to topic homie/+/$homie 2019-01-22 15:40:38.388 [TRACE] [ternal.TopicSubscribeMultiConnection] - Found suitable bridge mqtt:broker:mosquitto for listing to topic homeassistant/# 2019-01-22 15:40:38.407 [TRACE] [.transport.mqtt.MqttBrokerConnection] - subscribeRaw message consumer for topic 'homeassistant/#' from broker '192.168.1.2' 2019-01-22 15:40:38.413 [TRACE] [.transport.mqtt.MqttBrokerConnection] - subscribeRaw message consumer for topic 'homie/+/$homie' from broker '192.168.1.2' 2019-01-22 15:40:38.424 [hingStatusInfoChangedEvent] - 'mqtt:broker:mosquitto' changed from OFFLINE to ONLINE``` -
@jimmy-loyens turned on TRACE logging for mqtt transport, mqtt binding & mqtt thing binding. TRACE logging was allready on for mysensors binding.
Openhab server rebooted.But gateway doesnt come online
This is everything logged about mqtt:
2019-01-22 15:39:26.350 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - BundleEvent STARTING - org.eclipse.smarthome.binding.mqtt 2019-01-22 15:39:26.420 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=482, service.bundleid=270, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.internal.discovery.MqttServiceDiscoveryService, component.id=321} - org.eclipse.smarthome.binding.mqtt 2019-01-22 15:39:26.457 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, org.eclipse.smarthome.binding.mqtt.discovery.MQTTTopicDiscoveryService}={service.id=483, service.bundleid=270, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.internal.MqttBrokerHandlerFactory, component.id=322} - org.eclipse.smarthome.binding.mqtt 2019-01-22 15:39:26.483 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingActions}={service.id=484, service.bundleid=270, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.action.MQTTActions, component.id=323} - org.eclipse.smarthome.binding.mqtt 2019-01-22 15:39:26.494 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - BundleEvent STARTED - org.eclipse.smarthome.binding.mqtt 2019-01-22 15:39:26.514 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - BundleEvent STARTING - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:39:26.598 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=485, service.bundleid=271, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.discovery.HomeAssistantDiscovery, component.id=324} - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:39:26.626 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.type.ChannelTypeProvider, org.eclipse.smarthome.core.thing.type.ChannelGroupTypeProvider, org.eclipse.smarthome.binding.mqtt.generic.internal.generic.MqttChannelTypeProvider}={service.id=486, service.bundleid=271, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.generic.MqttChannelTypeProvider, component.id=325} - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:39:26.643 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=487, service.bundleid=271, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.discovery.Homie300Discovery, component.id=326} - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:39:26.665 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.type.DynamicStateDescriptionProvider, org.eclipse.smarthome.binding.mqtt.generic.internal.generic.MqttChannelStateDescriptionProvider}={service.id=488, service.bundleid=271, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.generic.MqttChannelStateDescriptionProvider, component.id=327} - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:39:26.700 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=489, service.bundleid=271, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.MqttThingHandlerFactory, component.id=328} - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:39:26.722 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - BundleEvent STARTED - org.eclipse.smarthome.binding.mqtt.generic 2019-01-22 15:40:38.064 [TRACE] [sors.factory.MySensorsHandlerFactory] - Creating handler for thing: mysensors:bridge-mqtt:gateway2 2019-01-22 15:40:38.090 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:gateway2' changed from UNINITIALIZED to INITIALIZING 2019-01-22 15:40:38.115 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingActions}={service.id=510, service.bundleid=270, service.scope=singleton} - org.eclipse.smarthome.binding.mqtt 2019-01-22 15:40:38.130 [hingStatusInfoChangedEvent] - 'mqtt:broker:mosquitto' changed from UNINITIALIZED to INITIALIZING 2019-01-22 15:40:38.194 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog 2019-01-22 15:40:38.197 [hingStatusInfoChangedEvent] - 'mqtt:broker:mosquitto' changed from INITIALIZING to OFFLINE 2019-01-22 15:40:38.222 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - No connection to broker: mosquitto 2019-01-22 15:40:38.245 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection@c41f03 to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@16ae66 2019-01-22 15:40:38.266 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection@c41f03 to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@86c4a7 2019-01-22 15:40:38.274 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:gateway2' changed from INITIALIZING to OFFLINE 2019-01-22 15:40:38.281 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0) 2019-01-22 15:40:38.368 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.1.2' with clientid openHAB2 and file store '/var/lib/openhab2/mqtt/192.168.1.2' 2019-01-22 15:40:38.386 [TRACE] [ternal.TopicSubscribeMultiConnection] - Found suitable bridge mqtt:broker:mosquitto for listing to topic homie/+/$homie 2019-01-22 15:40:38.388 [TRACE] [ternal.TopicSubscribeMultiConnection] - Found suitable bridge mqtt:broker:mosquitto for listing to topic homeassistant/# 2019-01-22 15:40:38.407 [TRACE] [.transport.mqtt.MqttBrokerConnection] - subscribeRaw message consumer for topic 'homeassistant/#' from broker '192.168.1.2' 2019-01-22 15:40:38.413 [TRACE] [.transport.mqtt.MqttBrokerConnection] - subscribeRaw message consumer for topic 'homie/+/$homie' from broker '192.168.1.2' 2019-01-22 15:40:38.424 [hingStatusInfoChangedEvent] - 'mqtt:broker:mosquitto' changed from OFFLINE to ONLINE```@jimmy-loyens And everything logged for mysensors binding:
2019-01-22 15:39:45.027 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTING - org.openhab.binding.mysensors 2019-01-22 15:39:45.130 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=507, service.bundleid=263, service.scope=bundle, component.name=org.openhab.binding.mysensors.factory.MySensorsHandlerFactory, component.id=341} - org.openhab.binding.mysensors 2019-01-22 15:39:45.143 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTED - org.openhab.binding.mysensors 2019-01-22 15:40:38.064 [TRACE] [sors.factory.MySensorsHandlerFactory] - Creating handler for thing: mysensors:bridge-mqtt:gateway2 2019-01-22 15:40:38.090 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:gateway2' changed from UNINITIALIZED to INITIALIZING 2019-01-22 15:40:38.106 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge 2019-01-22 15:40:38.158 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist. 2019-01-22 15:40:38.163 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [0, 11, 107] 2019-01-22 15:40:38.194 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog 2019-01-22 15:40:38.197 [TRACE] [sensors.internal.event.EventRegister] - Adding listener org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@16ae66 to org.openhab.binding.mysensors.internal.event.EventRegister@c0307f 2019-01-22 15:40:38.199 [TRACE] [sensors.internal.event.EventRegister] - Adding listener org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@86c4a7 to org.openhab.binding.mysensors.internal.event.EventRegister@c0307f 2019-01-22 15:40:38.204 [TRACE] [nsors.handler.MySensorsBridgeHandler] - Registering MySensorsDiscoveryService for bridge 'gateway2' 2019-01-22 15:40:38.220 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=511, service.bundleid=263, service.scope=singleton} - org.openhab.binding.mysensors 2019-01-22 15:40:38.222 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - No connection to broker: mosquitto 2019-01-22 15:40:38.233 [DEBUG] [.discovery.MySensorsDiscoveryService] - Starting MySensors discovery scan 2019-01-22 15:40:38.245 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection@c41f03 to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@16ae66 2019-01-22 15:40:38.252 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=0, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@16ae66 2019-01-22 15:40:38.254 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=0, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@86c4a7 2019-01-22 15:40:38.256 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=11, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@16ae66 2019-01-22 15:40:38.258 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=11, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@86c4a7 2019-01-22 15:40:38.261 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=107, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@16ae66 2019-01-22 15:40:38.263 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=107, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@86c4a7 2019-01-22 15:40:38.266 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection@c41f03 to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@86c4a7 2019-01-22 15:40:38.274 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:gateway2' changed from INITIALIZING to OFFLINE 2019-01-22 15:40:38.277 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [0,11,107] 2019-01-22 15:40:38.280 [TRACE] [sensors.internal.event.EventRegister] - Adding listener org.openhab.binding.mysensors.discovery.MySensorsDiscoveryService@10bffbb to org.openhab.binding.mysensors.internal.event.EventRegister@c0307f 2019-01-22 15:40:38.281 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0) 2019-01-22 15:40:38.282 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge DONE!It says "Failed connecting to bridge...next retry in 10 seconds (Retry No.:0)" but no retry is ever done to reconnect.
-
@jimmy-loyens And everything logged for mysensors binding:
2019-01-22 15:39:45.027 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTING - org.openhab.binding.mysensors 2019-01-22 15:39:45.130 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=507, service.bundleid=263, service.scope=bundle, component.name=org.openhab.binding.mysensors.factory.MySensorsHandlerFactory, component.id=341} - org.openhab.binding.mysensors 2019-01-22 15:39:45.143 [DEBUG] [org.openhab.binding.mysensors ] - BundleEvent STARTED - org.openhab.binding.mysensors 2019-01-22 15:40:38.064 [TRACE] [sors.factory.MySensorsHandlerFactory] - Creating handler for thing: mysensors:bridge-mqtt:gateway2 2019-01-22 15:40:38.090 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:gateway2' changed from UNINITIALIZED to INITIALIZING 2019-01-22 15:40:38.106 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge 2019-01-22 15:40:38.158 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache file: given_ids.cached exist. 2019-01-22 15:40:38.163 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Cache (given_ids) content: [0, 11, 107] 2019-01-22 15:40:38.194 [DEBUG] [rotocol.mqtt.MySensorsMqttConnection] - Enabling connection watchdog 2019-01-22 15:40:38.197 [TRACE] [sensors.internal.event.EventRegister] - Adding listener org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@16ae66 to org.openhab.binding.mysensors.internal.event.EventRegister@c0307f 2019-01-22 15:40:38.199 [TRACE] [sensors.internal.event.EventRegister] - Adding listener org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@86c4a7 to org.openhab.binding.mysensors.internal.event.EventRegister@c0307f 2019-01-22 15:40:38.204 [TRACE] [nsors.handler.MySensorsBridgeHandler] - Registering MySensorsDiscoveryService for bridge 'gateway2' 2019-01-22 15:40:38.220 [DEBUG] [org.openhab.binding.mysensors ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=511, service.bundleid=263, service.scope=singleton} - org.openhab.binding.mysensors 2019-01-22 15:40:38.222 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - No connection to broker: mosquitto 2019-01-22 15:40:38.233 [DEBUG] [.discovery.MySensorsDiscoveryService] - Starting MySensors discovery scan 2019-01-22 15:40:38.245 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection@c41f03 to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@16ae66 2019-01-22 15:40:38.252 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=0, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@16ae66 2019-01-22 15:40:38.254 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=0, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@86c4a7 2019-01-22 15:40:38.256 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=11, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@16ae66 2019-01-22 15:40:38.258 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=11, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@86c4a7 2019-01-22 15:40:38.261 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=107, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.internal.gateway.MySensorsGateway@16ae66 2019-01-22 15:40:38.263 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event MySensorsNode [nodeId=107, childNumber=0, chidldList={}] to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@86c4a7 2019-01-22 15:40:38.266 [TRACE] [nternal.event.MySensorsEventRegister] - Broadcasting event org.openhab.binding.mysensors.internal.protocol.mqtt.MySensorsMqttConnection@c41f03 to: org.openhab.binding.mysensors.handler.MySensorsBridgeHandler@86c4a7 2019-01-22 15:40:38.274 [hingStatusInfoChangedEvent] - 'mysensors:bridge-mqtt:gateway2' changed from INITIALIZING to OFFLINE 2019-01-22 15:40:38.277 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [0,11,107] 2019-01-22 15:40:38.280 [TRACE] [sensors.internal.event.EventRegister] - Adding listener org.openhab.binding.mysensors.discovery.MySensorsDiscoveryService@10bffbb to org.openhab.binding.mysensors.internal.event.EventRegister@c0307f 2019-01-22 15:40:38.281 [ERROR] [rotocol.mqtt.MySensorsMqttConnection] - Failed connecting to bridge...next retry in 10 seconds (Retry No.:0) 2019-01-22 15:40:38.282 [DEBUG] [nsors.handler.MySensorsBridgeHandler] - Initialization of the MySensors bridge DONE!It says "Failed connecting to bridge...next retry in 10 seconds (Retry No.:0)" but no retry is ever done to reconnect.
@jimmy-loyens I allso have no problem publishing messages to the broker from MQTT.fx.

I currently have no actuator nodes, only sensor nodes so i cant see if gateway sends message on to nodes.If i just send message: "mygateway1-in/170/4/1/0/16 0" to a node that has a door contact on child 4, should this message show up in the serial monitor?
otherwise i can reflash the node with a relay sketch
-
@jimmy-loyens I allso have no problem publishing messages to the broker from MQTT.fx.

I currently have no actuator nodes, only sensor nodes so i cant see if gateway sends message on to nodes.If i just send message: "mygateway1-in/170/4/1/0/16 0" to a node that has a door contact on child 4, should this message show up in the serial monitor?
otherwise i can reflash the node with a relay sketch
@jimmy-loyens Sorry man. I'm lost. we should try to contact the author of mysensors-binding.
The only advice that I have right now. What I would do: Delete all mysensors-mqtt config. Delete openhab caches (a very big json file).
Start again very simple.
-
@jimmy-loyens Sorry man. I'm lost. we should try to contact the author of mysensors-binding.
The only advice that I have right now. What I would do: Delete all mysensors-mqtt config. Delete openhab caches (a very big json file).
Start again very simple.
@guillermo-schimmel Dont worry about it you tried! Do you know who that is?
Where can i find "openhab caches"
-
@guillermo-schimmel Dont worry about it you tried! Do you know who that is?
Where can i find "openhab caches"
@jimmy-loyens https://forum.mysensors.org/topic/7176/openhab-2-2-binding
he is usually at that thread. very nice guy.
Lots of info on that thread also.
-
Is this ok in your installation?
openhab> bundle:list|grep My 191 │ Active │ 80 │ 2.4.0.201812040738 │ MySensors Binding -
@jimmy-loyens https://forum.mysensors.org/topic/7176/openhab-2-2-binding
he is usually at that thread. very nice guy.
Lots of info on that thread also.
@guillermo-schimmel I will give it a try, thank you very much for all your efford. I think i will be needing a little brake right now so since its snowing over here i'll go sleeing with my doughter then start over fresh.:sweat_smile: :snowflake:
Thanks again
-
Is this ok in your installation?
openhab> bundle:list|grep My 191 │ Active │ 80 │ 2.4.0.201812040738 │ MySensors Binding@guillermo-schimmel said in OpenHAB Mysensors binding 2.4: cant get mqtt gateway online:
bundle:list|grep My
openhab> bundle:list|grep My 263 x Active x 80 x 2.4.0.201812040738 x MySensors Binding openhab>yes, its active. but for some reason it looks different
-
Hey @jimmy-loyens !
I needed some time to investigate the problem and after looking into it, I've no clue why this is working for you @Guillermo-Schimmel . :flushed:
With version 2.4.0 and the changes to the mqtt binding I'm not able to connect the MySensors binding to the MQTT broker connection configured in OpenHAB. The MySensors binding uses the MQTT implementation and connection of OpenHAB, it does not connect to the broker itself.
And now the funny part: my development system works fine, so I need to find a way to debug this problem.
@Guillermo-Schimmel Did you configure broker and things in PaperUI or in textual files?
-
Hey @jimmy-loyens !
I needed some time to investigate the problem and after looking into it, I've no clue why this is working for you @Guillermo-Schimmel . :flushed:
With version 2.4.0 and the changes to the mqtt binding I'm not able to connect the MySensors binding to the MQTT broker connection configured in OpenHAB. The MySensors binding uses the MQTT implementation and connection of OpenHAB, it does not connect to the broker itself.
And now the funny part: my development system works fine, so I need to find a way to debug this problem.
@Guillermo-Schimmel Did you configure broker and things in PaperUI or in textual files?
@timo said in OpenHAB Mysensors binding 2.4: cant get mqtt gateway online:
Hey @jimmy-loyens !
I needed some time to investigate the problem and after looking into it, I've no clue why this is working for you @Guillermo-Schimmel . :flushed:
With version 2.4.0 and the changes to the mqtt binding I'm not able to connect the MySensors binding to the MQTT broker connection configured in OpenHAB. The MySensors binding uses the MQTT implementation and connection of OpenHAB, it does not connect to the broker itself.
And now the funny part: my development system works fine, so I need to find a way to debug this problem.
@Guillermo-Schimmel Did you configure broker and things in PaperUI or in textual files?
Some in files, some in Paper UI.
I think I have a mess, but don't want to touch it because it's working so nicely...
-
have a look
Bridge mqtt:broker:mosquittotexto [ host="localhost", port="8884", secure=false, brokername="mosquitto", topicPublish="mysensors1-in", topicSuscribe="mysensors1-out", startupCheckEnabled=false ] { Thing mqtt:topic:miscosas { Channels: Type number : ecovacs_1_battery_level "Ecovacs 01 Battery Level" [ stateTopic="ecovacs/E0000693817701104736/battery_level" ] Type string : ecovacs_1_charge_status "Ecovacs 01 Charge Status" [ stateTopic="ecovacs/E0000693817701104736/charge_status" ] Type string : ecovacs_1_clean_status "Ecovacs 01 Clean Status" [ stateTopic="ecovacs/E0000693817701104736/clean_status" ] Type string : ecovacs_1_vacuum_status "Ecovacs 01 Vacuum Status" [ stateTopic="ecovacs/E0000693817701104736/vacuum_status" ] Type string : ecovacs_1_fan_speed "Ecovacs 01 Fan Speed" [ stateTopic="ecovacs/E0000693817701104736/fan_speed" ] Type number : ecovacs_1_main_brush "Ecovacs 01 Main Brush" [ stateTopic="ecovacs/E0000693817701104736/components/main_brush" ] Type number : ecovacs_1_side_brush "Ecovacs 01 Side Brush" [ stateTopic="ecovacs/E0000693817701104736/components/side_brush" ] Type number : ecovacs_1_filter "Ecovacs 01 Filter" [ stateTopic="ecovacs/E0000693817701104736/components/filter" ] Type number : ecovacs_1_ncommand "Ecovacs 01 Number Command" [ commandTopic="ecovacs/E0000693817701104736/command" ] Type string : porton_a_mano "Garage Porton a Mano" [ stateTopic="mygateway1-out/11/3/1/0/16" ] Type number : server_nextcloud_disk_root "Server Nextloud Root Partition" [ stateTopic="servers/nextcloud/disk/root" ] Type number : server_bluecherry_disk_root "Server Bluecherry Root Partition" [ stateTopic="servers/bluecherry/disk/root" ] } }