I have a location on a mountain top that has electricity that gets knocked out every time a thunderstorm passes by. It’s a long electrical line up the side of the mountain. There is a cabin at this location which is a summer home of a local person. I would normally just install a full solar system and be done with it, but the land owner does not want the panels in the yard. There are at times very high winds at this location as well so it would take a pretty substantial structure to hold the panels as well.
My idea was to use my normal solar battery and a normal ac charger connected to the battery. I would design it in such a way that the battery would cycle and charge similar to a normal solar system. for example charge to a certain voltage and then turn off, then start charging again once the battery drops. I don’t think a continues charge would be good for the battery.
So the the question is, how do I get alerted that there is no electrical power and I am running on battery only?
I have a normal zonet router on the Ethernet side to provide wireless to the property owner when they are staying at there. Knowing this if elctricty is out that router would be off and the Ethernet side of things would show disconnected. So is there a way to monitor port activity? And send an alert if the either is down?
A small 12v battery and a 6 amp marine type (like for a sailboat) charger does it for me. If you select a good charger, it will have multiple stage charging, which is for leaving it connected to the battery. Also normally has a ground isolation circuit. That helps keep the unit from becoming a lightning target.
I use a RB433ah if I need to check input voltage. That is a good indication the charger has failed.
Thank You, the suggested charger seems like a good answer to that issue.
The second question is not to check that the charger/battery has failed but if the power is out. This gives me time to call the power company and inform them that the line is down again and gives them time to restore power without my service being out.
I was wanting to know if there is a way the mikrotik unit can alert me that the ether1 port LINK is down. Because the router in the building would be unpowered.
Yes. But this is not my idea. I remember this from another post recently. A hub or switch is connected to the mains power with a wall wart. Connect the hub/switch to one of the ethernet ports. When the power is up, the port will show ‘Running’. If the power is out, it will not. Then you can use a scheduled script to notify you by email when it is out.
how do I get alerted that there is no electrical power and I am running on battery
Depending on your Routerboard (some do not support voltage reporting), and if the power drops a volt or so when it’s on backup, you can use this script, run from scheduler every minute or 5. It disables the ftp service so you can see something go orange on Dude.
vthres 138 means 'set the alert threshold to 13.8 volts (as seen by the routerboard) :-
:global vthresh 138
:global voltage [/sys health get voltage]
:global emails 2
:global to “me@myemailaddress.com”
:global server “my.smtp.server.com”
:global goodtext “Power OK”
:global badtext “Power Has Failed”
:global stat
:global ostat
:global cnt
:if ([:typeof $cnt] = “unknown”) do={:set cnt 0}
:global goodbody ([/system identity get name]." “.$goodtext)
:global badbody ([/system identity get name].” ".$badtext)
For monitoring th Running State of a port, use this script, again from scheduler every once in a while. ‘port’ is 1=ether1 etc. ‘emails’ is how many emails you want it to send on a state change :-
:global port 2
:global emails 2
:global to “me@myemailaddress.com”
:global server “my.smtp.server.com”
:global goodtxt “Power OK”
:global badtxt “Power Has Failed”
:global stat
:global ostat
:global cnt
:global goodbody ([/system identity get name]." “.$goodtxt)
:global badbody ([/system identity get name].” ".$badtxt)
imho is simpler to add an old rb133, powered directly by th ac, added to Dude.
if power fails, rb133 goes down, then you could have any notification you want from dude
and a RB/433AH, RB/411AH, RB/435G or someting. Then you can make an Dude-Trape to “heath” and the Powerinput on the Routerboard. If the AC input form Meanwell is down, the DC output goes 1,5volt down. The dude can see this and send an mail.
I have the dude on site running on a PC into ac mains direct and not on the ups to prolong the battery life when ac power is lost, so my plan is to monitor ether port which is connected to dude and when ac power is lost then use a script like the one listed to send a SMS text like “SiteX on battery power countdown = Xhrs:mins” and follow up sms text “siteX ac power restored” if no follow up text received before “X” time, then i have to travel to that site, i would welcome any advice on this.
Which brings me to a question. Is there a way to program the serial port on an RB4xx board to recognize the state of a switch, whether it is open or closed?
In my quest to gain some basic knowledge of scripting i tried the “For monitoring th Running State of a port, use this script, again from scheduler every once in a while. ‘port’ is 1=ether1 etc. ‘emails’ is how many emails you want it to send on a state change :-”
Changed /sys service enable ftp to /ip service enable ftp which now enables/disables ftp on ROS 5.9 but I cannot figure out the syntax errors for