At some point I always have to make a run to a site to deal with hardware thats locked up. That could be a PTP link or a Comcast, Charter modem or router. So I figured I needed to see what could be done to minimize the trips for simple reboots.
First off I wanted to do at least three things.
1. To detect power failure at remote site.
2. The ability to reboot Modem, Back Haul radios etc.
3. To be controlled via Mikrotik scripts and SSH.
I looked and really couldn't find anything that really fit my needs. So that means time to make it!
Particle Electron 3G, External antenna, LiPo battery allows it to alert me to the power outage (otherwise no power no alert)
Particle shield.
Relay board from a PowerSwitchTail. (I soldered it into the normally closed position so that the relay only activates to break the circuit.
DC jack to power & charge Electron and also act as a power source monitor. (When DC is lost it triggers the GPIO)
Particle devices come with a $2.99 per month data service that covers 1MB of data. Its UDP and that allows for a heck of a lot of queries or alerts. It has tons of available GPIO pins so you could add additional relays or temp sensors etc.
The LiPo last about a day on its own. You can get larger ones and also limit the power usage in code.
I also use locking DC plugs so idiots don't accidentally unplug it.
The Mikrotik devices can use the new tool fetch features to control the unit. You have to code the Electron of course to whatever feature set you desire. I build a simple On, Off, Reboot command set. And then you can hook it up to pushover.net or Amazon SNS etc.
Currently it sends me a SMS and Pushover notification when power goes out. I can SSH into it or have a Mikrotik control it through the particle API using fetch.
I also made a mini version for locations without racks. It utilizes an external PowerSwitchTail for outlet control.