MQTT 2.5 Homie QoS

Tags: #<Tag:0x00007f617189ac18> #<Tag:0x00007f617189ab00>

Hello!

I use emq broker and i see in my dashboard that OH subscribes to each of devices’s topic with QoS 0, but it should be QoS 1. My configuration for mqtt service is QoS 1.

What am i missing in configurations? How to force OH subscribe to homie-device topics with QoS 1?

It’s the publisher that defines the QOS, not the subscriber. The QOS can be defined on a message by message basis, but it’s the publisher that needs to define it, not the subscriber.

If you have OH configured with QOS 1, it should publish any messages with QOS 1, but it’s the job of your other devices to publish with QOS 1 for those topics oh subscribes to.

I think I’m having the same problem.
I’m using mosquitto as MQTT Broker with openhab 2.5.3.
My setup is working so far but all messages are sent as QOS 0.

In the Paper UI I setup the Broker connection with QOS1

And also set the channel to QOS1:

However looking at the debug log of mosquitto shows:
1586939556: Received PUBLISH from openHab (d0, q0, r1, m0, ‘/waldwiese/shelfclock/modeCmd’,… (4 bytes))
q0 = QOS 0 retain flag (r1) is sent though

Also it shows that openhab is subscribing at QOS 0:
1586938824: Received SUBSCRIBE from openHab
1586938824: /waldwiese/shelfclock/modeState (QoS 0)
1586938824: openHab 0 /waldwiese/shelfclock/modeState
1586938824: Sending SUBACK to openHab

@rlkoshak I just started out with mqtt but as far as my understanding goes your statement is wrong.
According to https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/ QOS is defined on the published Message and on the subscription of the client.

We will look at the two sides of the message delivery separately because there are subtle differences between the two. The client that publishes the message to the broker defines the QoS level of the message when it sends the message to the broker. The broker transmits this message to subscribing clients using the QoS level that each subscribing client defines during the subscription process. If the subscribing client defines a lower QoS than the publishing client, the broker transmits the message with the lower quality of service.

Thats exactly the behavior I’m seeing here too:
I published a test message with mqtt-explorer manually set to QOS1
The Broker publishes it to openhab that is subscribed.
Because openhab is subscribed at QOS 0 the publish gets downgraded to QOS 0 though.

1586941611: Received PUBLISH from mqtt-explorer-17bdc32a (d0, q1, r0, m56597, ‘/waldwiese/shelfclock/modeState’, … (4 bytes))
1586941611: Sending PUBACK to mqtt-explorer-17bdc32a (Mid: 56597)
1586941611: Sending PUBLISH to openHab (d0, q0, r0, m0, ‘/waldwiese/shelfclock/modeState’, … (4 bytes))

Am I missing any obvious configuration option or is this indeed a bug in openHab 2.5.3?