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. Development
  3. Adding internal messages I_HEARTRATE_REQUEST and I_HEARTRATE_RESPONSE

Adding internal messages I_HEARTRATE_REQUEST and I_HEARTRATE_RESPONSE

Scheduled Pinned Locked Moved Development
5 Posts 3 Posters 1.6k Views 2 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.
  • G Offline
    G Offline
    gonzalonal
    wrote on last edited by
    #1

    Hello everyone.
    Now that the heartbeat concept is embebbed in mysensors core, what do you think about adding two variables, I_HEARTBEAT_REQUEST and I_HEARTBEAT_RESPONSE?

    The way I intend to use them explained below:

    I_HEARTBEAT_REQUEST: When a new or already existing node boots up, it sends this message expecting a I_HEARTBEAT_RESPOSE from the controller with a number as payload. This number represents the frequency in minutes at which the node should send a I_HEARTBEAT_RESPONSE to the controller. A '0' as payload means auto-heartbeat feature disabled. Heartbeat should be answered only if explicit I_HEARTBEAT message receive at the node.

    We should add at the core of MySensors, maybe at process(), a method checking if the time since last heartbeat response has exceed the defined HEARTRATE.

    With this feature, the node will handle the hearbeat on its own. The controller will not need to send I_HEARTBEAT_REQUEST periodically to everynode to check it's status and new nodes will get HEARTBEAT configuration as soon as they bootup.

    Let me know what you think.

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

      This concept would only work on nodes that are awake all the time. Sleeping nodes doesn't have any knowledge of passed time when waking up from pin interrupts.

      G 1 Reply Last reply
      1
      • hekH hek

        This concept would only work on nodes that are awake all the time. Sleeping nodes doesn't have any knowledge of passed time when waking up from pin interrupts.

        G Offline
        G Offline
        gonzalonal
        wrote on last edited by gonzalonal
        #3

        Hi @hek. I get what you mean, but nevertheless it may be intereting having this feature for non-sleeping nodes, such as those nodes monitoring motion for a security system or many other critical examples.

        Don't get me wrong. I know this could also be achieved with the actual mysensors library and some rules in the controller side but it would be nice to have this extra feature.

        1 Reply Last reply
        0
        • G gonzalonal

          Hello everyone.
          Now that the heartbeat concept is embebbed in mysensors core, what do you think about adding two variables, I_HEARTBEAT_REQUEST and I_HEARTBEAT_RESPONSE?

          The way I intend to use them explained below:

          I_HEARTBEAT_REQUEST: When a new or already existing node boots up, it sends this message expecting a I_HEARTBEAT_RESPOSE from the controller with a number as payload. This number represents the frequency in minutes at which the node should send a I_HEARTBEAT_RESPONSE to the controller. A '0' as payload means auto-heartbeat feature disabled. Heartbeat should be answered only if explicit I_HEARTBEAT message receive at the node.

          We should add at the core of MySensors, maybe at process(), a method checking if the time since last heartbeat response has exceed the defined HEARTRATE.

          With this feature, the node will handle the hearbeat on its own. The controller will not need to send I_HEARTBEAT_REQUEST periodically to everynode to check it's status and new nodes will get HEARTBEAT configuration as soon as they bootup.

          Let me know what you think.

          tekkaT Offline
          tekkaT Offline
          tekka
          Admin
          wrote on last edited by
          #4

          @gonzalonal said:

          With this feature, the node will handle the hearbeat on its own. The controller will not need to send I_HEARTBEAT_REQUEST periodically to everynode to check it's status and new nodes will get HEARTBEAT configuration as soon as they bootup.

          I'm trying to wrap my head around your idea - what is the advantage of your suggestion over controller-driven heartbeat requests? For example, what shall happen if a node does not send an expected heartbeat? I assume the controller will try to contact the node by sending a heartbeat request and flag it if no response is received...
          IMHO, this adds complexity with no additional benefit. Also, due to limited HW resources, we better shift the network "sanity" logic to the more powerful controller.

          G 1 Reply Last reply
          0
          • tekkaT tekka

            @gonzalonal said:

            With this feature, the node will handle the hearbeat on its own. The controller will not need to send I_HEARTBEAT_REQUEST periodically to everynode to check it's status and new nodes will get HEARTBEAT configuration as soon as they bootup.

            I'm trying to wrap my head around your idea - what is the advantage of your suggestion over controller-driven heartbeat requests? For example, what shall happen if a node does not send an expected heartbeat? I assume the controller will try to contact the node by sending a heartbeat request and flag it if no response is received...
            IMHO, this adds complexity with no additional benefit. Also, due to limited HW resources, we better shift the network "sanity" logic to the more powerful controller.

            G Offline
            G Offline
            gonzalonal
            wrote on last edited by gonzalonal
            #5

            Hi @tekka.
            I appreaciate your answer and share your opinion.
            Lets focus our efforts in other topics.

            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