[quote=“stefaanbolle, post:71, topic:190658”]My openhab 1.8.3 is running on 192.168.1.40
Mosquitto is also running on 192.168.1.40
Vera is 192.168.1.251
Below my logs
Mosquitto
1473231011: New connection from 192.168.1.251 on port 1883.
1473231011: Sending CONNACK to 192.168.1.251 (0, 5)
1473231011: Socket error on client <unknown>, disconnecting.
vera
50 09/07/16 8:50:11.868 luup_log:188: SensorMqtt: Connecting to MQTT, mqttServerIp: 192.168.1.40 mqttServerPort: 1883... <0x2c2eb680>
35 09/07/16 8:50:11.869 luup_log:188: SensorMqtt: Authenticating with username: openhab <0x2c2eb680>
50 09/07/16 8:50:11.872 luup_log:188: SensorMqtt: Successfully connected to broker: 192.168.1.40 on port 1883 <0x2c2eb680>
50 09/07/16 8:50:11.873 luup_log:188: SensorMqtt: MQTT connection status changed from "Disconnected" to "Connected" <0x2c2eb680>
35 09/07/16 8:50:11.976 luup_log:188: SensorMqtt: Connection down: /usr/lib/lua/mqtt_library.lua:382: MQTT.client:handler(): Not connected <0x2c2eb680>
50 09/07/16 8:50:11.977 luup_log:188: SensorMqtt: MQTT connection status changed from "Connected" to "Disconnected" <0x2c2eb680>
35 09/07/16 8:50:32.127 luup_log:188: SensorMqtt: Watch event - device: 150 variable: Timestamp value Wed 08:41 => Wed 08:50 <0x32ceb680>
50 09/07/16 8:50:32.131 luup_log:188: SensorMqtt: Sending [Netatmo] Timestamp changed to Wed 08:50 from Wed 08:41 on topic {} <0x32ceb680>
35 09/07/16 8:50:32.131 luup_log:188: SensorMqtt: Publish topic: {} message:{"DeviceId":150,"DeviceName":"Netatmo","DeviceType":"urn:akbooer-com:device:Netatmo:1","OldTimestamp":"Wed 08:41","RoomId":9,"RoomName":"3-Netatmo","ServiceId":"urn:akbooer-com:serviceId:Netatmo1","Time":1473231032,"Timestamp":"Wed 08:50","Variable":"Timestamp"} <0x32ceb680>
50 09/07/16 8:50:32.132 luup_log:188: SensorMqtt: Connecting to MQTT, mqttServerIp: 192.168.1.40 mqttServerPort: 1883... <0x32ceb680>
35 09/07/16 8:50:32.133 luup_log:188: SensorMqtt: Authenticating with username: openhab <0x32ceb680>
50 09/07/16 8:50:32.136 luup_log:188: SensorMqtt: Successfully connected to broker: 192.168.1.40 on port 1883 <0x32ceb680>
50 09/07/16 8:50:32.137 luup_log:188: SensorMqtt: MQTT connection status changed from "Disconnected" to "Connected" <0x32ceb680>
35 09/07/16 8:50:36.125 luup_log:188: SensorMqtt: Connection down: socket_client:receive(): closed <0x332eb680>
50 09/07/16 8:50:36.126 luup_log:188: SensorMqtt: MQTT connection status changed from "Connected" to "Disconnected" <0x332eb680>
checksums (just reuploaded latest download from github page)
MD5(/usr/lib/lua/mqtt_library.lua)= d277c620e1d55b6981c905d0a336216f
MD5(/usr/lib/lua/utility.lua)= 9bb0529b5a3d4368376a37ba9453dc4f
[/quote]
After seeing this, I went back and scrubbed/inspected each and every client authentication step and found a typo in the variable name for the mqtt broker password! I have fixed that typo, added the mqtt client id to the info logging and committed the changes to git.
Please try the latest version of the plugin on GitHub including the dependency utility.lua (I didn’t update it but your checksum doesn’t match the GitHub checksum so perhaps you missed this one when I upgraded SensorMqtt to use the Paho 0.3 mqtt lua client. Here are the checksums for everything.
[code]
$ find . -type f -not -path ‘./.git/*’ -exec openssl dgst -md5 {} ;
MD5(./Dependencies/usr/lib/lua/JSON.lua)= 7df77af31f3854a8db9dc82fcf789dea
MD5(./Dependencies/usr/lib/lua/mqtt_library.lua)= d277c620e1d55b6981c905d0a336216f
MD5(./Dependencies/usr/lib/lua/utility.lua)= 70673ff99bbc4015803facd6fe6687b5
MD5(./Plugin/D_SensorMqtt1.json)= c7d8b12e2e5fe2d61edfd614b815f9e1
MD5(./Plugin/D_SensorMqtt1.xml)= 4326276bc240949c9914fb8bb1043c6b
MD5(./Plugin/I_SensorMqtt1.xml)= 3ff8c0074b14a9908586d70c3e507fc1
MD5(./Plugin/J_SensorMqtt1.js)= 5d63ee1c3e28221be85dea901c4a0993
MD5(./Plugin/L_SensorMqtt1.lua)= 9dce0494565d602abf15a89110aa27f5
MD5(./Plugin/S_SensorMqtt1.xml)= 23bc8fa230b8be8c29b130d6f9ce95c0
[code]
I really, really appreciate your patience in running numerous tests. Had I not been traveling, I would have set up an authenticated broker instance running 1.4.10 to mimic your config and dug in to find this on my own. I’m pretty sure we nailed it though and thanks again for all your help and patience![/code]