What Happens to messages from Gateway when Node is not connected.



  • When I publish a message, GW takes care of sending it to the appropriate node. what if the node is not available, will the messages be sent later whenever the node gets reconnected.

    Trying to understand if there is a support for QoS 1/ QoS2 as specified in MQTT documentation, is there a provision to make sure the message is delivered to the Nodes exactly once and receive ACK for the same. Message may be for nodes which may be far away and need multiple hops to reach, similarly the ACK has to be propagated to the client who issued the message.

    I am kinda lost here, someone point me in right direction, has someone implemented or tried something which I am looking to do.


  • Hero Member

    From my experience, messages are lost if a node is not available when the message is sent.

    I'm working on a way to give the system a queue for messages. I use Vera as the controller.
    In my case, it is for messages that are sent too fast for the nodes to process, so messages are sent a few times until ack is received.

    I have it to retry a few times before it gives up, which is good enough for my needs at the moment, but I guess it wouldn't be difficult to implement somehting a bit more complex that keeps messages stored until the node becomes abailable.

    You can read about it here

    http://forum.mysensors.org/topic/131/scene-too-fast-for-gateway/52



  • @ferpando
    I am following your post, but given the size of gateway code maintaining a queue will have space constraints. Just wondering implementing this on controller end will solve the problem or it has to be both ways.
    I am writing my own controller after trying to use openHAB. Unfortunately for ruby there is just one library which is still in development and does not support Quality of Service beyond 0. Need to work on that to achieve messages are delivered exactly once.


  • Hero Member

    @mainali
    Messages are stored on the controller (Vera plugin in this case)
    If messages are generated directly by the gw then it could potentially be a problem if you store too many messages.
    My code deletes the message once it is ack'd, so it won't be sent again.
    If you need to store messages in the gw, maybe you could implement an external eeprom to store the messages until they are sent



  • What gateway are you using ? Vera uses mqtt protocol to send messages to gateway ?


  • Hero Member

    My gateway is an arduino, and I don't think Vera uses mqqt protocol.


Log in to reply
 

Suggested Topics

1
Online

11.2k
Users

11.1k
Topics

112.5k
Posts