I’m trying to get a good balance between polling my sensors frequently enough, and power/data savings. (This is with an electron.)
Currently, I take a sensor reading, decide whether to publish or not, then go to sleep for enough time to wake up at the next minute. I.e., poll at 12:00, 12:01, 12:02, etc… The electron is awake for about 20 seconds out of every minute, then asleep for 40 seconds. (I will probably increase this interval to 5 minutes, but 1 minute works well for experimentation purposes.)
I’m using normal sleep (not deep), with the “sleep_network_standby” option.
What I’m wondering is when/if the electron will send keepalives, when going through this continuous sleep/awake cycling. Yesterday, I was seeing “device came online” in the console log every 5 cycles (i.e., 5 minutes). Now, I never see “device came online” in the logs, and I didn’t change anything. Is “device came online” synonymous with a keepalive?