DIY Power Outage Alarm

jasper9

Community Member
View Badges
Joined
Sep 23, 2020
Messages
71
Reaction score
67
Location
Louisville, CO
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.
 

Karen00

2500 Club Member
View Badges
Joined
Jan 7, 2020
Messages
3,565
Reaction score
6,491
Location
Toronto
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.
Nice! I'm going to have to try this. You can never have too many projects running Pi (or similar) :) Thanks for sharing!
 

Being sticky and staying connected: Have you used any reef-safe glue?

  • I have used reef safe glue.

    Votes: 65 85.5%
  • I haven’t used reef safe glue, but plan to in the future.

    Votes: 5 6.6%
  • I have no interest in using reef safe glue.

    Votes: 3 3.9%
  • Other.

    Votes: 3 3.9%
Back
Top