Hello all,
How should I troubleshoot Mosquitto binding?
I like the new forum. I need some fresh eyes to help troubleshoot my Problem.
I think that I may have a problem with MQTT binding. I used to run MQTT with RFM69HW with little to no problems. But now I’m having issues while trying to setup a new ESP node. The ESP indicates that it cannot connect to the broker. I’ve tested Mosquitto with the following commands as well as a simple andriod app (MyMQTT).
1st step. Confirm MQTT is working
Terminal 1
mosquitto_sub -v -t ‘test/topic’
Terminal 2
mosquitto_pub -t ‘test/topic’ -m ‘helloWorld’
Both terminal 1 and the Android App respond properly with “helloWorld”
2nd step. (Check permissions) I admit that I’m not sure what I’m looking at here.
pi@RasPi /tmp/mymosquitto $ ls -l
total 4
drwxr-xr-x 2 pi pi 4096 Sep 27 19:22 openHAB-tcplocalhost1883
pi@RasPi /tmp/mymosquitto/openHAB-tcplocalhost1883 $ ls -l
total 0
Here is the setup.
Raspberry Pi B+
Openhab distribution-1.7.1
--------------------------------- OpenHAB openhab.log --------------------------------------
2015-09-27 19:22:50.544 [INFO ] [o.i.t.m.i.MqttBrokerConnection] - Starting MQTT broker connection ‘mymosquitto’
--------------------------------- OpenHAB MQTT Transport --------------------------------------
#
# Define your MQTT broker connections here for use in the MQTT Binding or MQTT
# Persistence bundles. Replace <broker> with a id you choose.
#
# URL to the MQTT broker, e.g. tcp://localhost:1883 or ssl://localhost:8883
mqtt:mymosquitto.url=tcp://localhost:1883
# Optional. Client id (max 23 chars) to use when connecting to the broker.
# If not provided a default one is generated.
mqtt:mymosquitto.clientId=openHAB
--------------------------------- OpenHAB Items --------------------------------------
Switch MQTTLED (test) {mqtt=">[mymosquitto:/demo/gpio/2:command:ON:1],>[mymosquitto:/demo/gpio/2:command:OFF:0]"}
--------------------------------- Generic ESP8266 --------------------------------------
System Info
Uptime: 20 minutes
IP: 192.168.2.189
GW: 192.168.2.1
Build: 20
Unit: 16
STA MAC: 18:fe:34:fe:60:5d
AP MAC: 1a:fe:34:fe:60:5d
ESP Chip ID: 16670813
ESP Flash Size: 524288
Free Mem: 25448
Main Settings
Name: demo
Admin Password: pass
SSID: MYSSID
WPA Key: MYPASSWD
WPA AP Mode Key: configesp
Unit nr: 16
Protocol: OpenHAB MQTT
Controller IP: 192.168.2.125
Controller Port: 1883
Sensor Delay: 60
Message Delay (ms): 1000
Sleep Mode: 0
Optional Settings 0.0.0.0
Fixed IP Octet: 0.0.0.0
ESP IP: 0.0.0.0
ESP GW: 0.0.0.0
ESP Subnet: 0.0.0.0
Syslog IP: 0.0.0.0
Syslog Level: 0
UDP port: 0
Serial log Level: 3
Web log Level: 3
Baud Rate: 115200