Hi,
Today, the bell button worked fine, but openHAB missed updates on a different channel from the same device. After I restarted openHAB, that problematic channel was fine again. From the debug log of the mqtt binding I could see that it subscribed correctly to the channel in both scenarios.
I had a close look to the logs of moqsuitto now and I think I’ve found an issue that might be related to that.
The log shows a button press on the bell button, as well as an update of the device mode of my door device.
Subscriber ce05f2fc-7936-4193-ab5a-f5e87258aa60 is openHAB, subscriber b12211e3-9cc0-4f92-80d4-edf2808cf7ef1611310210630 is “MQTTBox” on my laptop. In MQTTBox, I have subscribed only to the device mode.
1611313412: Received PUBLISH from DP-door-thing (d0, q1, r1, m82, 'homie/door-thing/bell/button', ... (4 bytes))
1611313412: Sending PUBACK to DP-door-thing (Mid: 82)
1611313412: Sending PUBLISH to homie-ota-671 (d0, q0, r0, m0, 'homie/door-thing/bell/button', ... (4 bytes))
1611313412: Sending PUBLISH to mqtt-explorer-36b27257 (d0, q0, r0, m0, 'homie/door-thing/bell/button', ... (4 bytes))
1611313412: Sending PUBLISH to ce05f2fc-7936-4193-ab5a-f5e87258aa60 (d0, q0, r0, m0, 'homie/door-thing/bell/button', ... (4 bytes))
1611313412: Received PUBLISH from DP-door-thing (d0, q1, r1, m83, 'homie/door-thing/bell/button', ... (5 bytes))
1611313412: Sending PUBACK to DP-door-thing (Mid: 83)
1611313412: Sending PUBLISH to homie-ota-671 (d0, q0, r0, m0, 'homie/door-thing/bell/button', ... (5 bytes))
1611313412: Sending PUBLISH to mqtt-explorer-36b27257 (d0, q0, r0, m0, 'homie/door-thing/bell/button', ... (5 bytes))
1611313412: Sending PUBLISH to ce05f2fc-7936-4193-ab5a-f5e87258aa60 (d0, q0, r0, m0, 'homie/door-thing/bell/button', ... (5 bytes))
1611313412: Received PUBLISH from DP-door-thing (d0, q1, r1, m84, 'homie/door-thing/device/mode', ... (4 bytes))
1611313412: Sending PUBACK to DP-door-thing (Mid: 84)
1611313412: Sending PUBLISH to homie-ota-671 (d0, q0, r0, m0, 'homie/door-thing/device/mode', ... (4 bytes))
1611313412: Sending PUBLISH to mqtt-explorer-36b27257 (d0, q0, r0, m0, 'homie/door-thing/device/mode', ... (4 bytes))
1611313412: Sending PUBLISH to b12211e3-9cc0-4f92-80d4-edf2808cf7ef1611310210630 (d0, q1, r0, m47, 'homie/door-thing/device/mode', ... (4 bytes))
1611313412: Sending PUBLISH to ce05f2fc-7936-4193-ab5a-f5e87258aa60 (d0, q0, r0, m0, 'homie/door-thing/device/mode', ... (4 bytes))
1611313412: Received PUBACK from b12211e3-9cc0-4f92-80d4-edf2808cf7ef1611310210630 (Mid: 47)
The subscriptions from openHAB look like this:
1611310431: Received SUBSCRIBE from ce05f2fc-7936-4193-ab5a-f5e87258aa60
1611310431: homie/door-thing/bell/button (QoS 0)
1611310431: ce05f2fc-7936-4193-ab5a-f5e87258aa60 0 homie/door-thing/bell/button
1611310431: Sending SUBACK to ce05f2fc-7936-4193-ab5a-f5e87258aa60
1611310431: Sending PUBLISH to ce05f2fc-7936-4193-ab5a-f5e87258aa60 (d0, q0, r1, m0, 'homie/door-thing/bell/button', ... (5 bytes))
1611310431: Received SUBSCRIBE from ce05f2fc-7936-4193-ab5a-f5e87258aa60
1611310431: homie/door-thing/device/mode (QoS 0)
1611310431: ce05f2fc-7936-4193-ab5a-f5e87258aa60 0 homie/door-thing/device/mode
1611310431: Sending SUBACK to ce05f2fc-7936-4193-ab5a-f5e87258aa60
1611310431: Sending PUBLISH to ce05f2fc-7936-4193-ab5a-f5e87258aa60 (d0, q0, r1, m0, 'homie/door-thing/device/mode', ... (5 bytes))
What you can see is, that openHAB does subscribe with a QoS level of 0. So either I interpreted the code wrong or looked at the wrong code location, or there is a bug in the MQTT homie implementation.
@David_Graeff : Can you tell me how I can configure the homie-MQTT binding to subscribe with a QoS level of 1? – I’m using openHABian 3.0.0 - Release Build
Best regards,
stedon81
P.S.: @rlkoshak : Seems that you have been right already in your first post - might be related to wrong QoS level