DIY Power Outage Alarm

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

jasper9

Community Member
View Badges
Joined
Sep 23, 2020
Messages
71
Reaction score
64
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!
 

TOP 10 Trending Threads

WHICH AREA OF REEFKEEPING MOST NEEDS A GENUINE BREAKTHROUGH?

  • Lighting

    Votes: 3 4.3%
  • Pumps and water flow

    Votes: 2 2.9%
  • Water testing and monitoring

    Votes: 22 31.9%
  • Controllers, apps, and device compatibility

    Votes: 8 11.6%
  • Filtration and nutrient export

    Votes: 1 1.4%
  • Automatic feeding

    Votes: 7 10.1%
  • Leak prevention and tank safety

    Votes: 7 10.1%
  • Equipment reliability and repairability

    Votes: 15 21.7%
  • Other (leave a comment in the thread)

    Votes: 4 5.8%
Back
Top
Home
Post thread…
Market
What's new