Feeling Refreshed
I own and host (with friends and family) a handful of Helium Hotspots and I like to keep an eye on them to know they are operating well, get a heads up on potential problems and in general satiate my curiosity for data.
It is very easy to fall into the trap of endlessly refreshing Miner Dashboards, the Helium Explorer and the various community apps that have come about to monitor a Hotspot's status.
I, and likely you, should not do this. It is not a great use of time and probably causes more worry than it should.
My Approach
To remedy this desire for updates and insights, I have put together a set of scripts running on a Raspberry Pi that utilize the Helium Blockchain API and the application Pushover to keep me up to date without overloading me with information.
These scripts rely on the concept of a "Hotspot Heartbeat" record used to monitor the gaps of Hotspot activity recorded to the Helium Blockchain. The scripts also collect other information for a few utilities I will write about later, but let's focus on just the activity monitoring for now.
The end result of this script is a message posted to the application Pushover on my mobile devices and a view on a (very basic) local webpage on the RaspberryPi hosting them.
If all is well, these charts are simple blue lines and pyramids, providing me with activity gaps over the past 3-ish days.
If all is not well, the charts are filled in with red, which helps me at a glance identify a potential issue I can investigate and monitor.
| Yay 👍 | Not Yay 👎 | | :---------------------------: | :-------------------------------------------: | | | |
these are not my actual hotspots, they are associated to a wallet I selected at random.
What is a "Heartbeat"?
The "Hotspot Heatbeat" is a snapshot of hotspot status at a specific point in time, this script
records the Heartbeat for every Hotspot in my Wallet every 3 minutes via a cron
. The plots are
generated at the top of every hour, and the message is sent to Pushover every 8 hours or if a
Hotspots Status has changed.
A change in status is when a Hotspot has been innactive for more than a specified number of Blocks, I use
450
for my "inactive" status.
Here is an example heartbeat.json
file that is saved by this script, it is lightweight, but that
keeps storage low and later steps fast and human readable.
The structure of a heartbeat.json
entry is detailed here:
Next Steps
Checkout the other posts in this series where I will cover in more detail how I get this data from the Helium API and checkout the code on my Github