Before I go reinventing someone elses wheel....


M M
 

Does anybody have something like the below already operational?
or even close?
We have a few repeaters at hilltop sites...  each site has internet,
and around 400 AH of 12 volt battery.   Each site as internet brought
in via an Ubiquity 5 gig microwave shot.  The Ubiquity and the router
are run off the 12 volt battery.

And occasionally a site loses AC power.

We'd like to set up a Pi (connected to the router via an ethernet
cable) to run off the battery bank and use a 5 volt wall wart to
function as the local AC power sensor.  Or maybe the wall wart
drives a relay coil and the relay contacts are used to tell the
Pi that the AC power has failed.

On a power fail we'd like the Pi to send an email message to a list
of addresses (probably 8 to 10 addresses)...   Something like
"AC power has failed at (site name) at (local time) on
(day of week) (date)"...
i.e. "AC power has failed at Mike's house at 14:30 on Sunday
October 31 2021".

Then when AC power returns it goes through it's cold boot cycle
and then sends an email (to the same list)... something like
"AC power has returned at (site name) at (local time) on
(day of week) (date)".

And every so often (settable) it sends a status message to a
separate list of email addresses... something like "(site name)
AC power monitor is on line, the last power fail was at (time)
on (day of week) (date), last power return was at (time) on
(day of week) (date)".  Initially the status email will probably
be daily at noon, but once the folks are comfortable that
the unit is reliable the status messages will probably be
backed off to weekly.

Note that when the Pi cold boots it has to note the time,
day and date from it's RTC board, then it needs to wait a
minute or so (to allow the microwave internet link to
re-establish), then pings the us.ntp.org server to verify
the link is actually up (and BTW to verify the actual time
and date).

Comments, suggestions, etc are welcome.

I don't mind buying a commercial product as
long as there isn't a  monthly charge and it's
a stand-alone device (i.e. not cloud based).

Thanks in advance

Mike WA6ILQ   (callsign //at// gmail //dot// com)


Join RaspberryPi-4-HamRadio@groups.io to automatically receive all group messages.