DIY Power Outage Alarm

  • Thread starter Thread starter jasper9
  • Start date Start date
  • Tagged users None

jasper9

Community Member
View Badges
Joined
Sep 23, 2020
Messages
71
Reaction score
68
Location
Louisville, CO
What state or country do you live in
Colorado
Rating - 0%
0   0   0
I have my tank on two GFCI circuits that I was worried I might trip on accident so I wanted a way of being notified when this happens. I know you can set up the Apex to do this, even when you are on a battery backup or UPS but I wanted to do this across multiple circuits to put my mind at ease.

I use Raspberry Pi, but any linux-like single board computer like that will work. I won't outline how to set it up, you can google for that easily.

For the notifications, I use a cloud based monitoring service called Site24x7. The way it works is you set up the PI to tell the service "hey i'm ok!" on a schedule. If the service doesn't hear from the PI for a configurable duration it will send you a warning message, and will then send you an outage message if it continues.

To create the monitor:

* Create an account on Site24x7, that should be self explanatory

* Create a "Heartbeat Monitor" type of check under the Servers section:
Screen Shot 2022-01-07 at 2.47.51 PM.png



Add in the basic details. The Threshold & Availability section is where you can configure the timings. If I recall correctly 15 minute is the fastest it allows for a warning message.

Screen Shot 2022-01-07 at 2.51.47 PM.png


Now it'll give you multiple options for how to invoke the check. This is the part where the PI talks to the service. I set mine up to use the scheduler called Cron that is built into the OS. If you've never done this before you might need to google or youtube for how to edit cron (or crontab) for your specific distribution. In short, for the distro i'm using `crontab -e` puts me in edit mode with my default text editor, and `crontab -l` lists it.

This tab in the screenshot shows you exactly something close to what you need to put in place. The columns of 0 1 * * * are the timing of the schedule, in order of the row above it m (minute) h (hour) dom (day of month) mon (month) dow (day of week). If you can't figure this out, here are some examples. For me and my alert settings I set it up to fire every 10 minutes of every day with: 0,10,20,30,40,50 * * * *

1641592485514.png


Really that's it. Once it phones home a few times and establishes a baseline, unplug or shutdown the Pi and wait for an alert to come through. Easy peasy.
 
I have my tank on two GFCI circuits that I was worried I might trip on accident so I wanted a way of being notified when this happens. I know you can set up the Apex to do this, even when you are on a battery backup or UPS but I wanted to do this across multiple circuits to put my mind at ease.

I use Raspberry Pi, but any linux-like single board computer like that will work. I won't outline how to set it up, you can google for that easily.

For the notifications, I use a cloud based monitoring service called Site24x7. The way it works is you set up the PI to tell the service "hey i'm ok!" on a schedule. If the service doesn't hear from the PI for a configurable duration it will send you a warning message, and will then send you an outage message if it continues.

To create the monitor:

* Create an account on Site24x7, that should be self explanatory

* Create a "Heartbeat Monitor" type of check under the Servers section:
Screen Shot 2022-01-07 at 2.47.51 PM.png



Add in the basic details. The Threshold & Availability section is where you can configure the timings. If I recall correctly 15 minute is the fastest it allows for a warning message.

Screen Shot 2022-01-07 at 2.51.47 PM.png


Now it'll give you multiple options for how to invoke the check. This is the part where the PI talks to the service. I set mine up to use the scheduler called Cron that is built into the OS. If you've never done this before you might need to google or youtube for how to edit cron (or crontab) for your specific distribution. In short, for the distro i'm using `crontab -e` puts me in edit mode with my default text editor, and `crontab -l` lists it.

This tab in the screenshot shows you exactly something close to what you need to put in place. The columns of 0 1 * * * are the timing of the schedule, in order of the row above it m (minute) h (hour) dom (day of month) mon (month) dow (day of week). If you can't figure this out, here are some examples. For me and my alert settings I set it up to fire every 10 minutes of every day with: 0,10,20,30,40,50 * * * *

1641592485514.png


Really that's it. Once it phones home a few times and establishes a baseline, unplug or shutdown the Pi and wait for an alert to come through. Easy peasy.
Nice! I'm going to have to try this. You can never have too many projects running Pi (or similar) :-) Thanks for sharing!
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top