Hi @waltert,
Let’s validate a couple of things (step by step) to get this working.
First of all: Check if the binding is correctly installed and up & running:
Try not to use manual installation methods but rather use Paper UI for installing bindings.
- Remove the
.jar
mqtt binding files from/usr/share/openhab2/addons/
- Install MQTT (binding-mqtt1) from Paper UI
- Use
mqtt1
(notmqtt
) for the binding= name in your/etc/openhab2/services/addons.cfg
(since MQTT is still a 1.x binding) - Fix your
/etc/openhab2/services/mqtt.cfg
(notruntime.conf
) file to contain something like:
mosquitto.url=tcp://localhost:1883
mosquitto.clientId=openhab
mosquitto.qos=0
mosquitto.retain=false
mosquitto.async=true
and post some log output from /var/log/openhab2/openhab.log
related to MQTT.
You can enable DEBUG level of logging for this binding from the Karaf Console (ssh openhab@localhost -p 8101
with password habopen
) by:
log:set DEBUG org.openhab.binding.mqtt
Ps: A lot of the MQTT binding info that you will find online refer to OH1. There are some differences in OH2. These are explained here: http://docs.openhab.org/tutorials/migration.html