I am running openHABian 2.4.0-1
I use mosquitto as my MQTT broker. I had SSL set up to use the OwnTracks binding to receive location data via MQTT. I have transitioned to the GPSTracker binding using HTTP and myopenhab.org. This allowed me to get rid of the SSL portion of the broker setup. This means that I now have a simple broker with one listener on 1883.
I have a working mqtt1 setup with several smart switches. All of my Items are declared using .items
files using the mqtt1 syntax.
I installed openHABian 2.4.0-1 on another Raspberry Pi and figured out to to get mqtt2 configured using mosquitto and a few MQTT smart switches. Simple setup but got it working.
Now I want to begin the migration of my home server. I installed the mqtt2 binding and added the Generic MQTT Broker Thing. I cannot get it to connect to mosquitto.
openhab> bundle:list -l | grep mqtt
211 Ā¦ Active Ā¦ 80 Ā¦ 1.2.0 Ā¦ mvn:org.eclipse.paho/org.eclipse.paho.client.mqttv3/1.2.0 Ā¦ Paho MQTT Client
214 Ā¦ Active Ā¦ 80 Ā¦ 0.10.0.oh240 Ā¦ mvn:org.eclipse.smarthome.binding/org.eclipse.smarthome.binding.mqtt/0.10.0.oh240 Ā¦ Eclipse SmartHome MQTT Binding
215 Ā¦ Active Ā¦ 80 Ā¦ 0.10.0.oh240 Ā¦ mvn:org.eclipse.smarthome.binding/org.eclipse.smarthome.binding.mqtt.generic/0.10.0.oh240 Ā¦ Eclipse SmartHome MQTT Thing Binding
217 Ā¦ Active Ā¦ 80 Ā¦ 0.10.0.oh240 Ā¦ mvn:org.eclipse.smarthome.io/org.eclipse.smarthome.io.transport.mqtt/0.10.0.oh240 Ā¦ Eclipse SmartHome MQTT Transport Bundle
233 Ā¦ Active Ā¦ 80 Ā¦ 1.13.0 Ā¦ mvn:org.openhab.binding/org.openhab.binding.mqtt/1.13.0 Ā¦ openHAB MQTT Binding
241 Ā¦ Active Ā¦ 80 Ā¦ 1.13.0 Ā¦ mvn:org.openhab.io/org.openhab.io.transport.mqtt/1.13.0 Ā¦ openHAB MQTT Transport Bundle
There is nothing in mosquitto.log
at the time of the openHAB restart. I set the openHAB logging level for the mqtt2 bundles to TRACE and captured this in the log:
22.504 [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=128, service.bundleid=215, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.generic.MqttChannelTypeProvider, component.id=21} - org.eclipse.smarthome.binding.mqtt.generic
22.532 [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=129, service.bundleid=215, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.generic.MqttChannelStateDescriptionProvider, component.id=23} - org.eclipse.smarthome.binding.mqtt.generic
22.540 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=130, service.bundleid=215, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.MqttThingHandlerFactory, component.id=24} - org.eclipse.smarthome.binding.mqtt.generic
22.553 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - BundleEvent [unknown:512] - org.eclipse.smarthome.binding.mqtt.generic
23.550 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - BundleEvent STARTING - org.eclipse.smarthome.binding.mqtt.generic
23.555 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - BundleEvent STARTED - org.eclipse.smarthome.binding.mqtt.generic
54.413 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - BundleEvent STARTING - org.eclipse.smarthome.binding.mqtt
54.456 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=373, service.bundleid=214, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.internal.discovery.MqttServiceDiscoveryService, component.id=217} - org.eclipse.smarthome.binding.mqtt
54.524 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=375, service.bundleid=215, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.discovery.HomeAssistantDiscovery, component.id=20} - org.eclipse.smarthome.binding.mqtt.generic
54.536 [DEBUG] [lipse.smarthome.binding.mqtt.generic] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=376, service.bundleid=215, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.generic.internal.discovery.Homie300Discovery, component.id=22} - org.eclipse.smarthome.binding.mqtt.generic
54.542 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory, org.eclipse.smarthome.binding.mqtt.discovery.MQTTTopicDiscoveryService}={service.id=374, service.bundleid=214, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.internal.MqttBrokerHandlerFactory, component.id=218} - org.eclipse.smarthome.binding.mqtt
54.565 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingActions}={service.id=377, service.bundleid=214, service.scope=bundle, component.name=org.eclipse.smarthome.binding.mqtt.action.MQTTActions, component.id=219} - org.eclipse.smarthome.binding.mqtt
54.568 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - BundleEvent STARTED - org.eclipse.smarthome.binding.mqtt
54.642 [DEBUG] [org.eclipse.smarthome.binding.mqtt ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingActions}={service.id=379, service.bundleid=214, service.scope=singleton} - org.eclipse.smarthome.binding.mqtt
54.875 [WARN ] [ternal.TopicSubscribeMultiConnection] - Failed to MQTT subscribe for mqtt:broker:mosquitto on topic homie/+/$homie
54.880 [TRACE] [ternal.TopicSubscribeMultiConnection] - Found suitable bridge mqtt:broker:mosquitto for listing to topic homie/+/$homie
54.882 [WARN ] [ternal.TopicSubscribeMultiConnection] - Failed to MQTT subscribe for mqtt:broker:mosquitto on topic homeassistant/#
54.884 [TRACE] [ternal.TopicSubscribeMultiConnection] - Found suitable bridge mqtt:broker:mosquitto for listing to topic homeassistant/#
I have restarted openHAB. I have cleared out the cache
& tmp
directories and restarted openHAB. I have checked and triple checked that I have the mosquitto host, user, and password entered correctly (I checked the Thing via REST to ensure that the password was correct). The broker Thing will not connect to mosquitto. I cannot figure out what I am doing wrong. Any guidance is appreciated.
Regards.
Mike