MQTT GW - QOS
-
Hello all, is there any whay to change the QOS from a message from a MQTT publish from MySensors GW? I would like to send messages on QOS2! And if possible, not from all of them, only the most important, like switches (temperatures for example I don't need to).
Thank You all
-
@soloam MySensors currently uses pubsubclient MQTT library. As for now it doesn't support publishing with QoS 1 and 2. There were pull requests with code for QoS 1, but developer refused to implement that. He says its due to low RAM available on arduino platform.
-
I'm not 100% sure, but I think this is the discussion @monte is referring to, in case anyone wants to learn more: https://github.com/knolleary/pubsubclient/pull/206
-
@mfalkvidd yes, it is
-
@monte said in MQTT GW - QOS:
@soloam MySensors currently uses pubsubclient MQTT library. As for now it doesn't support publishing with QoS 1 and 2. There were pull requests with code for QoS 1, but developer refused to implement that. He says its due to low RAM available on arduino platform.
Correct me if I'm wrong... But when you send a message as QOS1 or QOS2 aren't you basically putting the load and hard work on the MQTT server? Basicly you are telling the server to keep trying until all the subscribers receive the message.
My main problem is that I'm having a lot of messages that arrive to the MQTT server, but never arrive to OpenHab (subscriber). This is making me fail a lot of triggers. I think that I'll give Ethernet GW a try and see if that improves
-
@soloam it works on either section of message's path. When you choose QoS 1 or 2 it have to be resend by client to server if no ack is received from server and only then it will be handled by it to ensure other clients receive it. That's how I understand it. That creates a problem since you have to buffer messages which are being send. You should read thread on github with argument against it.
If you say that MQTT server receives you messages from GW, then problem can't be in it. You should look into Openhab setup. I don't beleive that adding QoS to your GW would solve your issue. Try to subscribe to the topic with another MQTT client, something like MQTT Dashboard for android. Basically topics are named this way mysensors-out/node-id/sensor-id/command-type/ack-flag/message-sub-type
Try to subscribe to mysensors-out/# - you should see all outgoing messages from GW.
-
Hi @Soloam, not sure if you managed to solve your problem. I would recommend using Mosquitto MQTT broker open source or Pro version since they both support all MQTT QoS levels (including QoS 0, QoS 1, QoS 2).
Suggested Topics
-
Arduino Celebrates 10 years (Malmö/Sweden)
Announcements • 29 Mar 2014, 17:08 • hek 29 Mar 2014, 17:08 -
LAN8720A - will mysensors work with this module
Development • 13 Nov 2024, 17:06 • Marcin 15 Nov 2024, 10:59 -
PJON and Minicore not working
Development • 8 days ago • Trand 8 days ago -
MQTT-Help me understand about the MQTT Gateway.
Development • 28 days ago • dpcons 17 days ago -
Adding Listen only device to my system.
Development • 26 Feb 2025, 00:39 • dpcons 26 Feb 2025, 06:26 -
Radio waking up for no reason.
Development • 4 Jul 2020, 21:09 • Sasquatch 15 Jan 2025, 08:33