Mysensors and two MQTT gateways

My Openhab version is 2.4. Everything work fine, with one gateway. I add another one with different topics. When turn light I see in openhab log

Publishing message 0 to topic ‘2s/29/27/1/1/2’
But not change values form sensors. When disable first gateway and re-enable second gateway have values from sensors.
This is a bug ? How can get to work it ?

Welcome.
Sorry, I do not use MQTT. I do know there is a version 1 & a version 2 binding. OpenHAB 2.4 is 11 months old and 2.5 is scheduled to be released on December 15. Perhaps you want to try the 2.5 Milestone 5 testing version. I do know there have been huge changes in the past year.

With so little info it’s hard to assist. Please see this topic How to ask a good question / Help Us Help You

2 Likes

I have configuration with this Installation · tobof/openhab-addons Wiki · GitHub

This is debug messages. Working sensor:

23:59:22.352 [DEBUG] [ho.client.mqttv3.internal.ClientState] - openHAB2: received bytes count=1
23:59:22.352 [DEBUG] [ho.client.mqttv3.internal.ClientState] - openHAB2: received bytes count=18
23:59:22.353 [DEBUG] [.mqttv3.internal.wire.MqttInputStream] - null: Automatic Reconnect Successful: PUBLISH qos:0 retained:false dup:false topic:“1p/4/0/1/0/1” payload:[hex:36362e30 utf8:“66.0” length:4]
23:59:22.354 [DEBUG] [ho.client.mqttv3.internal.ClientState] - openHAB2: received key=0 message=PUBLISH qos:0 retained:false dup:false topic:“1p/4/0/1/0/1” payload:[hex:36362e30 utf8:“66.0” length:4]
23:59:22.354 [DEBUG] [.client.mqttv3.internal.CommsCallback] - openHAB2: new msg avail, notify workAvailable
23:59:22.355 [DEBUG] [.client.mqttv3.internal.CommsReceiver] - openHAB2: network read message
23:59:22.355 [DEBUG] [.client.mqttv3.internal.CommsCallback] - openHAB2: call messageArrived key=0 topic=1p/4/0/1/0/1
23:59:22.356 [DEBUG] [.client.mqttv3.internal.CommsCallback] - openHAB2: notify spaceAvailable
23:59:22.357 [DEBUG] [.client.mqttv3.internal.CommsCallback] - openHAB2: wait for workAvailable
23:59:22.360 [DEBUG] [org.eclipse.jetty.server.HttpChannel ] - sendResponse info=null content=DirectByteBuffer@2d9f14b2[p=0,l=154,c=32768,r=154]={<<<event: message\nda…mStateEvent"}\n\n>>>}\n\n\",\“oldValue\…lv:battery”,"id} complete=false committing=false callback=Blocker@7ceabfff{null}
23:59:22.360 [INFO ] [smarthome.event.ItemStateChangedEvent] - GF_Hallway_Humidity changed from 65.9 to 66.0

Not working:

23:59:23.136 [DEBUG] [ho.client.mqttv3.internal.ClientState] - openHAB2: received bytes count=1
23:59:23.136 [DEBUG] [ho.client.mqttv3.internal.ClientState] - openHAB2: received bytes count=20
23:59:23.136 [DEBUG] [.mqttv3.internal.wire.MqttInputStream] - null: Automatic Reconnect Successful: PUBLISH qos:0 retained:false dup:false topic:“2p/27/2/1/0/4” payload:[hex:3939352e38 utf8:“995.8” length:5]
23:59:23.137 [DEBUG] [ho.client.mqttv3.internal.ClientState] - openHAB2: received key=0 message=PUBLISH qos:0 retained:false dup:false topic:“2p/27/2/1/0/4” payload:[hex:3939352e38 utf8:“995.8” length:5]
23:59:23.137 [DEBUG] [.client.mqttv3.internal.CommsCallback] - openHAB2: new msg avail, notify workAvailable
23:59:23.138 [DEBUG] [.client.mqttv3.internal.CommsReceiver] - openHAB2: network read message
23:59:23.138 [DEBUG] [.client.mqttv3.internal.CommsCallback] - openHAB2: call messageArrived key=0 topic=2p/27/2/1/0/4
23:59:23.138 [DEBUG] [.client.mqttv3.internal.CommsCallback] - openHAB2: notify spaceAvailable
23:59:23.139 [DEBUG] [.client.mqttv3.internal.CommsCallback] - openHAB2: wait for workAvailable

What more info you need ? Everything work but not acquiring values from second MQTT topic.
This is problem with addon MySensors binding Installation · tobof/openhab-addons Wiki · GitHub

Maybe some configuration info. It sounds rather like some duplication - whichever was the last to get configured works, pushing out the other one.

What broker are you using?

This is problem in [org.openhab.binding.mysensors-2.4.0-SNAPSHOT.jar]. I install fresh 2.5.milestone version with org.openhab.binding.mysensors-2.5.0-SNAPSHOT. In Paper UI in services created MQTT broker.
Next copying my items

Contact FF_Bathroom_Motion “Detector [%s]” (FF_Bathroom, gMotion) [“MotionDetector”] {channel=“mysensors:motion:gw:FF_Bathroom_motion:tripped”}
Number FF_Bathroom_Heating “FF_Bathroom Heat [%.1f °C]” (FF_Bathroom, gHeating) [“HVAC”] {channel=“”}
Number FF_Bathroom_Temperature “Temperature” (FF_Bathroom, gTemperature) [“Temperature”] {channel=“mysensors:temperature:gw:FF_Bathroom_temp:temp”}
Number FF_Bathroom_Humidity “Humidity [%d %%]” (FF_Bathroom, gHumidity) [“Humidity”] {channel=“mysensors:humidity:gw:FF_Bathroom_hum:hum”}
Number FF_Bathroom_lightlv “Light Lv [%d lx]” (FF_Bathroom, gLightLv) [“Lighting”] {channel=“mysensors:light-level:gw:FF_Bathroom_lightlv:level”}
Number OU_Driveway_temp “[%.1f °C]” (OU_Driveway, gMeteo) { channel=“mysensors:temperature:gw2:OU_Driveway_temp:temp” }
Number OU_Driveway_Hum " [%d %%]" (OU_Driveway, gMeteo) [“Humidity”] {channel=“mys$
Number OU_Driveway_hpa " [%.1f hPa]” (OU_Driveway, gMeteo) { channel=“mysensors:baro:gw2:OU_Driveway_hpa:pressure” }

and things:

Bridge mysensors:bridge-mqtt:gw [ brokerName=“mosquitto”, topicPublish=“1s”, topicSubscribe=“1p”, startupCheckEnabled=false , sendDelay=200]
{
humidity FF_Bathroom_hum [ nodeId=1, childId=0 ]
temperature FF_Bathroom_temp [ nodeId=1, childId=1 ]
motion FF_Bathroom_motion [ nodeId=1, childId=2 ]
light-level FF_Bathroom_lightlv [ nodeId=1, childId=3 ] }

Bridge mysensors:bridge-mqtt:gw2 [ brokerName="mosquitto", topicPublish="2s", topicSubscribe="2p", startupCheckEnabled=false, sendDelay=200 ] 
{ 
  temperature OU_Driveway_temp [ nodeId=27, childId=0 ]
  humidity OU_Driveway_hum [ nodeId=27, childId=1 ]
  baro OU_Driveway_hpa [ nodeId=27, childId=2 ]
  dust OU_Driveway_pm25  [ nodeId=27, childId=3 ]
  dust OU_Driveway_pm100 [ nodeId=27, childId=4 ] }

Still work like in 2.4. No update from second gw2.

What’s your mqtt configuration like?

In this time I give up. Added second gw with generic mqtt configuration. And it works. So this is problem with MySensors binding. Operate with only one config. First gw works too with mysensors binding.