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. Feature Requests
  3. Keepalive

Keepalive

Scheduled Pinned Locked Moved Feature Requests
6 Posts 4 Posters 2.8k Views 1 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.
  • clippermiamiC Offline
    clippermiamiC Offline
    clippermiami
    Hero Member
    wrote on last edited by
    #1

    I was experimenting with a Temp/Hum sensor this weekend and I noticed that the environment in which the sensor "lives" doesn't change much at all. The code onl;ine skips the send if the last value is the same as the current value. In this case as a result there was no update to the Vera gateway for over 14 hours, to the point where I assumed something might be wrong. So I manually reset the sensor to forcean update.

    How about a "Keepalive" function in the Library that can be included in he sketch to update the Gateway every "N" minutes whether there is a value change or not. One could declare the keepalive period in the sketch, say 1 hour, so that the sensor would send an update to the Gateway even if there was no change.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andriej
      wrote on last edited by
      #2

      And what's the problem with making a loop in code and forcing node to send values?

      :-)

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

        yes, by default we try to minimize message sending in the examples. But like Andrej says you could just allow it to send one message each X sleep cycle.

        clippermiamiC 1 Reply Last reply
        0
        • hekH hek

          yes, by default we try to minimize message sending in the examples. But like Andrej says you could just allow it to send one message each X sleep cycle.

          clippermiamiC Offline
          clippermiamiC Offline
          clippermiami
          Hero Member
          wrote on last edited by
          #4

          @hek Which is what I ended up doing in the code I modified for the triple sensor device. I was merely suggesting that it might be nice to have a standardized keepalive routine in the library, call it and it takes care of it for you.

          1 Reply Last reply
          0
          • greglG Offline
            greglG Offline
            gregl
            Hero Member
            wrote on last edited by
            #5

            Hi guys ...
            i agree sending the values periodically helps if the radio transmission is not ack'ed. I was testing yesterday a sketch and looks like i have another dodgy radio module. probably 80% packets were successful, but other 20% resulted in Vera not being told the door was open or closed...

            So i added this "hack" which whilst it works could be better coded im sure!!

            if (counter < 1000000){
            counter++ ;
            // Serial.println(counter);
            } else {
            Serial.println("sending status");
            gw.sendVariable(CHILD_ID_DOORA, V_LOCK_STATUS, trippedA?DOOR_CLOSED:DOOR_OPEN); // Send value change to gw
            counter = 0;
            }

            I was thinking... since debug message prints "Ack: received OK" - what if the library repeated the transmission when the ACK was not received.. Hek i do recall a short discussion on this...not sure if its to be in 1.4 or what...

            Cheers,

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

              Next version will use the burst mode which result in much better success rate for packages. I hope you won't need to resent same data.

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


              18

              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