Hello
so I made a complete new installation just to have a clean setup. I installed
- mysql for persistence
- mosquitto/mqtt which is running, I can see the data coming in at the mosquitto logfile.
I installated Openhab2 Snapshot-release (Build 694) like in the manual descriped.
I still have the problem that Openhab does not receive mqtt-messages.
What I have found out so far from the logfiles is that the mosquitto itself receives data from my arduino board. Openhab is also registered at mosquitto. But openhab does not get/receive/see any mqtt-message.
This is what the openhab.log says:
> 2017-01-07 14:00:06.584 [DEBUG] [.binding.mqtt.internal.MqttActivator] - MQTT binding has been started.
> 2017-01-07 14:00:06.602 [DEBUG] [org.openhab.binding.mqtt ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService}={event.topics=openhab/*, service.pid=org.openhab.mqtt-eventbus, component.name=org.openhab.binding.mqtt.eventbus, component.id=179, service.id=305, service.bundleid=207, service.scope=bundle} - org.openhab.binding.mqtt
> 2017-01-07 14:00:06.620 [DEBUG] [ng.mqtt.internal.MqttEventBusBinding] - MQTT: Activating event bus binding.
> 2017-01-07 14:00:06.629 [DEBUG] [ng.mqtt.internal.MqttEventBusBinding] - Initializing MQTT Event Bus Binding
> 2017-01-07 14:00:06.631 [DEBUG] [ng.mqtt.internal.MqttEventBusBinding] - MQTT Event Bus Binding initialization completed.
> 2017-01-07 14:00:06.639 [DEBUG] [org.openhab.binding.mqtt ] - ServiceEvent REGISTERED - {org.osgi.service.event.EventHandler}={event.topics=openhab/*, component.name=org.openhab.binding.mqtt.MqttItemBinding, component.id=180, service.id=307, service.bundleid=207, service.scope=bundle} - org.openhab.binding.mqtt
> 2017-01-07 14:00:06.657 [DEBUG] [org.openhab.binding.mqtt ] - ServiceEvent REGISTERED - {org.openhab.model.item.binding.BindingConfigReader, org.openhab.binding.mqtt.MqttBindingProvider}={component.name=org.openhab.binding.mqtt.genericbindingprovider, component.id=181, service.id=306, service.bundleid=207, service.scope=bundle} - org.openhab.binding.mqtt
> 2017-01-07 14:00:06.660 [DEBUG] [org.openhab.core.compat1x ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.model.item.BindingConfigReader}={service.id=308, service.bundleid=184, service.scope=singleton} - org.openhab.core.compat1x
> 2017-01-07 14:00:06.681 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_1000L_Oben' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.698 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_1000L_Unten' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.707 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_300L_Oben' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.719 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_300L_Unten' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.722 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_HZ_Vorlauf' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.725 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_HZ_Ruecklauf' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.727 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'Heizung_Temp_Brauchwasser' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.730 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'WK1_Temp' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.733 [DEBUG] [binding.mqtt.internal.MqttItemConfig] - Loaded MQTT config for item 'WK1_Hum' : 1 subscribers, 0 publishers
> 2017-01-07 14:00:06.737 [DEBUG] [org.openhab.binding.mqtt ] - BundleEvent STARTED - org.openhab.binding.mqtt
This is what mosquitto-logging says, you also see the received message from my arduino board:
> Starting daemon mosquitto with command '/usr/local/sbin/mosquitto' and options '-c /etc/mosquitto/mosquitto.conf'...
> 1483777247: mosquitto version 1.4.10 (build date 2017-01-04 20:04:09+0100) starting
> 1483777247: Config loaded from /etc/mosquitto/mosquitto.conf.
> 1483777247: Opening ipv4 listen socket on port 1883.
> 1483777247: Opening ipv6 listen socket on port 1883.
> 1483777304: New connection from 192.168.2.114 on port 1883.
> 1483777304: New client connected from 192.168.2.114 as arduinoClient (c1, k15).
> 1483777304: Sending CONNACK to arduinoClient (0, 0)
> 1483777304: Received SUBSCRIBE from arduinoClient
> 1483777304: /openHAB/Test_Switch1/# (QoS 0)
> 1483777304: Sending SUBACK to arduinoClient
> 1483777307: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_1000L_Oben', ... (5 bytes))
> 1483777307: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_1000L_Unten', ... (5 bytes))
> 1483777307: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_300L_Oben', ... (5 bytes))
> 1483777307: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_300L_Unten', ... (5 bytes))
> 1483777312: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_HZ_Vorlauf', ... (5 bytes))
> 1483777312: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_HZ_Ruecklauf', ... (5 bytes))
> 1483777313: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_Brauchwasser', ... (5 bytes))
> 1483777318: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/WK1_Temp', ... (4 bytes))
> 1483777318: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/WK1_Hum', ... (3 bytes))
> 1483777326: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_1000L_Oben', ... (5 bytes))
> 1483777326: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_1000L_Unten', ... (5 bytes))
> 1483777326: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_300L_Oben', ... (5 bytes))
> 1483777326: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_300L_Unten', ... (5 bytes))
> 1483777331: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_HZ_Vorlauf', ... (5 bytes))
> 1483777331: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_HZ_Ruecklauf', ... (5 bytes))
> 1483777331: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_Brauchwasser', ... (5 bytes))
> 1483777336: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/WK1_Temp', ... (4 bytes))
> 1483777336: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/WK1_Hum', ... (3 bytes))
> 1483777345: New connection from 127.0.0.1 on port 1883.
> 1483777345: New client connected from 127.0.0.1 as openhab.1483777344878 (c1, k60).
> 1483777345: Sending CONNACK to openhab.1483777344878 (0, 0)
> 1483777345: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_1000L_Oben', ... (5 bytes))
> 1483777345: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_1000L_Unten', ... (5 bytes))
> 1483777345: Received PUBLISH from arduinoClient (d0, q0, r0, m0, '/openHAB/Heizung_Temp_300L_Oben', ... (5 bytes))
my config for mqtt from openhab looks like this:
> # URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883
> mqtt:openHAB.url=tcp://127.0.0.1:1883
This configuration is also shown in the karaf.console
What I am doing wrong? I think I should see the messages mosquitto receives also in the openhab-logging.
Do I have to give some special rights to the user?
Please give me some hints. If you need further information let me know.
Thanks so far.
Greetings Gerhard