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 3.2k 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.
  • C Offline
    C 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
      • H Offline
        H 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.

        C 1 Reply Last reply
        0
        • H 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.

          C Offline
          C 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
            • H Offline
              H 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

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              12

              Online

              12.1k

              Users

              11.2k

              Topics

              113.4k

              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