Periodic connectivity check - ping vs rest api - which will use the least amount of power? #3812
-
|
I want to keep watch on my On-The-Edge device to make sure it is still online during intervals between rounds. At least for now, my battery + solar is not very reliable and I want to get alerted if the battery is not adequately charged by the solar and dies... But I want this to use the least power possible for obvious reasons. I originally was going to periodically issue a rest api call that returns minimal data (since I am not really concerned about the contents, only that a response is received) like http://IP_address/statusflow. But I can also just issue a ping command periodically and test for success/fail and get the same sort of information I seek. I am just wondering which will use the least amount of power? Or maybe something else entirely? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
The hardware per se is not made to be low-power, thus it doesn't really mater how you check it. I use Homeassistant and have added the device using the provided Homeassistant discovery protocol. This way, I have also access to the uptime counter. And I have added an automation which monitors this value. If it does not get updated for a while, I get a notification. Stability was an issue some years ago, but the latest releases are very stable, this the monitoring is not really needed anymore. But since your power supply is not as stable, this might be worth it. |
Beta Was this translation helpful? Give feedback.
-
|
In response to my original question, I have finally decided to use ping in place of a statusflow web query. This NOT due to power consumption as was my original concern. But I have found in actual use that, if a statusflow request is made when OnTheEdge is actually performing some high-overhead operation (like running a normal round), the response to the statusflow request might timeout. I do NOT feel this is a bug in OnTheEdge as it is genuinely busy doing something of greater importance. From my own experimentation, it does not seem that using ping suffers any significant delay in these cases. Best |
Beta Was this translation helpful? Give feedback.
In response to my original question, I have finally decided to use ping in place of a statusflow web query. This NOT due to power consumption as was my original concern. But I have found in actual use that, if a statusflow request is made when OnTheEdge is actually performing some high-overhead operation (like running a normal round), the response to the statusflow request might timeout. I do NOT feel this is a bug in OnTheEdge as it is genuinely busy doing something of greater importance. From my own experimentation, it does not seem that using ping suffers any significant delay in these cases. Best