Supplies:
Wire the green/white to the common leg of relay # 1 or the first common if you are using a DPDT and the orange/white to the normally open (NO) leg.
Then wire the green to the second common leg (DPDT) or to the common of the second relay and the orange to the NO leg.
Then wire the green to the second common leg (DPDT) or to the common of the second relay and the orange to the NO leg.
Then tie in your 12V transformer to the positive and negative polls on your relay(s). Throw everything into your plastic container and you are just about done.
At your POP, plug the router into the UPS and then plug the 12V adapter into the mains power outside of the UPS. Then plug the ethernet cable into an available port on the MTK.
When power is live on the 12V transformer, the relay is actuated and the cable we wired up is now looped up. With the loopback active, the port on your router comes up and the script running at the bottom of the page sends a message to you indicating that power is restored. When the power goes down, the UPS will keep the router up, but the relay will fail and thus the loopback will fail. The router’s script will see the change in port status and send you an email saying the port is down.
This script was written by a clever guy named Manuel, and I’ve adapted it to work in other situations.
Schedule the above script to run every 15 seconds or so.
If done correctly, you should be able to scrape all of this together for less than $15. If you spend $15 putting this together and it saves you a truck roll in the middle of the night, then it was well worth it!
Happy hacking my friends.
Tidak ada komentar:
Posting Komentar