@Rob_Pope I had a similar problem in the past… It was due to OpenHab 2 loading up the default mqtt.cfg config file (with the sample <broker> name)… it was my mistake since I removed the comments from the lines without adjusting the broker name… After I fixed the mistake, the <broker> info still remained (as a second broker) in OH2 “internal database” (I don’t know how to call it :)) and was causing errors because all other parameters for <broker> were null.
Try to check with the Karaf Console (ssh openhab@localhost -p 8101 with password: habopen) what has been already stored in the OH2 “internal database” by using:
config:edit org.openhab.mqtt config:property-list
Also, you can use: config:list to show you all bindings configs stored.
You can start clean by configuring your mqtt.cfg and mqtt-eventbus.cfg and clearing out whatever is stored already by: config:delete org.openhab.mqtt and then restarting OH2 to reload the .cfg files
Thanks for your response @Dim - It turns out the internal database had three configurations in there. A delete and restart of OH2 fixed the issue for me.
BR,
Dim
Ps: @jflarente: That’s a big discussion… check out the thread referenced above. I believe that the short answer is no because this is by design.
@Dim, would you be willing to write this posting up as a quick tutorial as a top level thread under Tutorials and Examples? I think this really important and not well known and it actually answers a lot of questions I had. Eventually I can see this migrating to the official docs.
Absolutely. I will give it a try and write some examples on how to “manage” configurations that are already stored within the OpenHab 2 OSGi cache. I am not an expert in Apache Karaf, so I will need help to “iron-out” any errors
Please Help, I spent the day trying to debug.
I have run out of ides…
The best I can tell when I press the switch It triggers a event
2017-01-20 17:00:24.129 [INFO ] [t.mqtt.internal.MqttBrokerConnection] - Starting MQTT broker connection ''
2017-01-20 17:02:56.931 [DEBUG] [inding.mqtt.internal.MqttItemBinding] - Publishing command ON to control/SW010101/command
But the broker does not see any <> messages from OH2:
1484950320: Sending CONNACK to paho-263225371366065 (0, 0)
1484950321: Received PUBLISH from paho-263225371366065 (d0, q0, r0, m0, ‘control/SW010101/command’, … (2 bytes))
1484950322: Received PUBLISH from WallSwitch001 (d0, q0, r0, m0, ‘control/SW010101/SW1/state’, … (1 bytes))
1484950330: Received PINGREQ from Openhab2
1484950330: Sending PINGRESP to Openhab2
the broker does see Openhab:
1484950210: Sending CONNACK to Openhab2 (0, 0)
1484950217: Received PINGREQ from WallSwitch001
they don’t display well, had to replace the brackets with ‘
‘mqttbroker’.url=tcp://10.1.0.22:1869’
‘mqttbroker’.clientId=Openhab2
’mqttbroker’.user=xxxxxxxxx
’mqttbroker’.pwd=xxxxxxxxxxxx
getting these errors now
17-01-20 18:15:41.872 [ERROR] [t.mqtt.internal.MqttBrokerConnection] - MQTT connection to ‘’ was lost: Connection lost : ReasonCode 32109 : Cause : null