Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. General Discussion
  3. does MySensors use a guaranteed transport protocol or a best effort ?

does MySensors use a guaranteed transport protocol or a best effort ?

Scheduled Pinned Locked Moved General Discussion
10 Posts 7 Posters 1.5k Views 9 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dualarrow
    wrote on last edited by
    #1

    I'm looking at using MySensors for various controls and it looks pretty good so far, but I have been unable to locate anything that indicates if it uses a guaranteed delivery protocol or a best effort. Eg, if I used it to control a sprinkler valve and a repeater sends out a message to turn it off but the receiver misses the 1st message, what happens ? Does the sprinkler valve get left on or will it retry the transmission ?

    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      It's up to the controller to implement the resend functionality.
      I think some of them will retry a few times (if they don't receive the ack-message from the node).

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dualarrow
        wrote on last edited by
        #3

        So am I correct in saying the gateway gives no guaantee that a message a controller asks it to send will actually reach a node ?

        Presumably you would have to have a sensor on the node that could read the state of the switch so the controller could send the message then conform it was received.

        It would be good in that event to have a ping capability on the node so that if the node loses communication wih the gateway (or controller) that it could put itself in a default state. In the case of a sprinkler, that could be an off state.

        B 1 Reply Last reply
        0
        • D dualarrow

          So am I correct in saying the gateway gives no guaantee that a message a controller asks it to send will actually reach a node ?

          Presumably you would have to have a sensor on the node that could read the state of the switch so the controller could send the message then conform it was received.

          It would be good in that event to have a ping capability on the node so that if the node loses communication wih the gateway (or controller) that it could put itself in a default state. In the case of a sprinkler, that could be an off state.

          B Offline
          B Offline
          boylucky
          wrote on last edited by
          #4

          @dualarrow - what about to try implement a mechanism that would send the same message which was received by the controller or better by the gateway back to the node. Then the node would check if such message received and the node will be sure that the message arrived or in your question vice versa (node would send the message back to the gateway).

          mfalkviddM hekH 2 Replies Last reply
          0
          • B boylucky

            @dualarrow - what about to try implement a mechanism that would send the same message which was received by the controller or better by the gateway back to the node. Then the node would check if such message received and the node will be sure that the message arrived or in your question vice versa (node would send the message back to the gateway).

            mfalkviddM Offline
            mfalkviddM Offline
            mfalkvidd
            Mod
            wrote on last edited by
            #5

            @boylucky sounds a bit like MySensor's software ack feature? Documentation: https://www.mysensors.org/view/167#sending-data (see the "ack" parameter)

            For a very confusing earlier discussion on a smilar topic, see https://forum.mysensors.org/topic/3346/discussion-reliable-delivery

            1 Reply Last reply
            0
            • B boylucky

              @dualarrow - what about to try implement a mechanism that would send the same message which was received by the controller or better by the gateway back to the node. Then the node would check if such message received and the node will be sure that the message arrived or in your question vice versa (node would send the message back to the gateway).

              hekH Offline
              hekH Offline
              hek
              Admin
              wrote on last edited by
              #6

              @boylucky

              This is exactly what the destination node(or gateway) does when ack is enabled on the message.

              @dualarrow
              No "guaranteed" delivery. But if you receive an ack message back, you know it has been delivered. If no ack (within a reasonable time), then you have the possibility to resend the message again. The main reason this hasn't been implemented has been discussed a few times over the years. TL;DR Requires large buffers in repeaters/nodes.

              NeverDieN 1 Reply Last reply
              2
              • B Offline
                B Offline
                boylucky
                wrote on last edited by
                #7

                @mfalkvidd and @hek - ok, thanks for this info :) I did not know that as I am new in mysensors. Good to know that it is already implemented in mysensors.
                Thanks.

                1 Reply Last reply
                1
                • hekH hek

                  @boylucky

                  This is exactly what the destination node(or gateway) does when ack is enabled on the message.

                  @dualarrow
                  No "guaranteed" delivery. But if you receive an ack message back, you know it has been delivered. If no ack (within a reasonable time), then you have the possibility to resend the message again. The main reason this hasn't been implemented has been discussed a few times over the years. TL;DR Requires large buffers in repeaters/nodes.

                  NeverDieN Offline
                  NeverDieN Offline
                  NeverDie
                  Hero Member
                  wrote on last edited by NeverDie
                  #8

                  @hek said in does MySensors use a guaranteed transport protocol or a best effort ?:

                  Requires large buffers in repeaters/nodes.

                  How large is "large"? e.g. the nRF52840 has 256K of RAM memory, and 1MB of flash.... ESP32 has 512KB of SRAM.... Maybe worth revisiting?

                  The sprinkler valve scenario given by the OP is a good example of where you want to be absolutely sure the message got through.

                  CarywinC 1 Reply Last reply
                  0
                  • JohnRobJ Offline
                    JohnRobJ Offline
                    JohnRob
                    wrote on last edited by
                    #9

                    I'm just starting with MySensors so here I'm just thinking at a system level.
                    I have two suggestions / questions regarding the status of "important" nodes.

                    1. is it not possible to pole the sensor and request status?

                    2. If in this case the the valve controlling node could be programmed to report the status of the valve at an increased rate when it is "on". Or perhaps better, increase the report rate for a time after shutting off.

                    1 Reply Last reply
                    0
                    • NeverDieN NeverDie

                      @hek said in does MySensors use a guaranteed transport protocol or a best effort ?:

                      Requires large buffers in repeaters/nodes.

                      How large is "large"? e.g. the nRF52840 has 256K of RAM memory, and 1MB of flash.... ESP32 has 512KB of SRAM.... Maybe worth revisiting?

                      The sprinkler valve scenario given by the OP is a good example of where you want to be absolutely sure the message got through.

                      CarywinC Offline
                      CarywinC Offline
                      Carywin
                      wrote on last edited by
                      #10

                      @neverdie The bulk of MySensors nodes run on Atmega328P, with 2k of SRAM they're already quite resource-constrained in some of these sensors.

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      12

                      Online

                      11.7k

                      Users

                      11.2k

                      Topics

                      113.1k

                      Posts


                      Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • MySensors
                      • OpenHardware.io
                      • Categories
                      • Recent
                      • Tags
                      • Popular