MQTT GW - QOS


  • Hardware Contributor

    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.


  • Mod

    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 🙂


  • Hardware Contributor

    @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.


  • Banned

    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).


Log in to reply
 

Suggested Topics

  • 1
  • 10
  • 1
  • 2
  • 3
  • 5

12
Online

11.4k
Users

11.1k
Topics

112.7k
Posts