Community discussions

MikroTik App
 
User avatar
Adam McLaughlin
Member Candidate
Member Candidate
Topic Author
Posts: 149
Joined: Sat Mar 31, 2007 5:36 am
Location: Santa Rosa, California
Contact:

A script to watch the battery voltage?

Tue May 29, 2007 7:35 pm

Hi Everyone,

I would like to have a RB133C watch it's input voltage, and then let me know what's going on.

This particular Rb1333C is solar powered, so keeping it in a happy state is very important for me. Has anyone tried making a script for this?

Thanks in advance,

Adam
 
odie
Member Candidate
Member Candidate
Posts: 216
Joined: Wed Mar 23, 2005 8:31 am
Location: Austria
Contact:

Re: A script to watch the battery voltage?

Sun Jun 03, 2007 11:59 pm

a good solar charge controller should have a undervoltage cut of
we built a smal thing that can monitor the line voltage/ batt voltage and temp
in connection with a small powersupply that has a charger for a battery included we use these as powersupplies with monitoring for our stations
it also works with the mikrotik ups packet ;-))
scripts for temp and powerfail and low batt alarms are also reday....
 
User avatar
Adam McLaughlin
Member Candidate
Member Candidate
Topic Author
Posts: 149
Joined: Sat Mar 31, 2007 5:36 am
Location: Santa Rosa, California
Contact:

Re: A script to watch the battery voltage?

Mon Jun 04, 2007 3:30 am

The Rb133 installation does have a battery monitor gadget that looks at the solar panel, and has a cut off function.

I would like to put together some kind of early warning, or status script to look this over.

May I see your scripts as an example when configured through the U.P.S. packet?

Adam
 
odie
Member Candidate
Member Candidate
Posts: 216
Joined: Wed Mar 23, 2005 8:31 am
Location: Austria
Contact:

Re: A script to watch the battery voltage?

Mon Jun 04, 2007 10:49 am

here it is - it also works with apc smart ups .....


:set sysname [/system identity get name]
:set datetime ([/system clock get date] . " " . [/system clock get time])

# Erster Lauf und Flags noch uninitialisiert?
:if (("-" . $flagonbatt)="-") do {:global flagonbatt 0}
:if (("-" . $flagbatlow)="-") do {:global flagbatlow 0}

:set curonbatt false
:set curbatlow false
/system ups monitor [/system ups find name "ups1"] once do {:set curonbatt $on-battery; :set curbatlow $low-battery}

:if (($curonbatt) && ($flagonbatt=0)) do {
:global flagonbatt 1
/tool e-mail send from="ups" to="somwwhere" server="1.1.1.1" subject=($sysname . " ist ohne Strom!") body=($sysname . " hat keinen Saft seit " . $datetime)
:log info "Power-Fail: Email gesendet"
}

:if ((!$curonbatt) && ($flagonbatt=1)) do {
:global flagonbatt 0
/tool e-mail send from="ups" to="somewhere" server="1.1.1.1" subject=($sysname . " hat wieder Strom") body=($sysname . " saftelt wieder seit " . $datetime)
:log info "Power-Restore: Email gesendet"
}

:if (($curbatlow) && ($flagbatlow=0)) do {
:global flagbatlow 1
/tool e-mail send from="ups" to="somewhere" server="1.1.1.1" subject=($sysname . " Batterie leer!") body=($sysname . " hat fast keine Batterie mehr - " . $datetime)
:log info "Batt-Low: Email gesendet"
}

:if ((!$curbatlow) && ($flagbatlow=1)) do {
:global flagbatlow 0
/tool e-mail send from="ups" to="somwhere" server="1.1.1.1" subject=($sysname . " Batterie nachgeladen") body=($sysname . " Battery-Low beendet - " . $datetime)
:log info "Batt-Low-Ende: Email gesendet"
}
 
e2346437
Frequent Visitor
Frequent Visitor
Posts: 64
Joined: Sun Mar 12, 2006 1:35 am

Re: A script to watch the battery voltage?

Sat Jun 23, 2007 2:32 pm

Some more explanation on this script please? Does it only have to be run once at startup or does it need to be run every 5 minutes or so? Any chance of an English translation?
 
odie
Member Candidate
Member Candidate
Posts: 216
Joined: Wed Mar 23, 2005 8:31 am
Location: Austria
Contact:

Re: A script to watch the battery voltage?

Sat Jun 23, 2007 2:52 pm

hi

should be run every minute or fewer - as you like it ...
i ll work on an englih version soon..
 
WirelessRudy
Forum Guru
Forum Guru
Posts: 3119
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: A script to watch the battery voltage?

Sat Sep 15, 2007 12:47 am

Hi Guys,

Lokking for something similar. Several of my AP's (rb532A's) are running on ordinary 12V battery's with low amp battery charges. In case of a powercut the rb's run much longer then similar costing UPC's
Also, lost already some standard MT 12v adapters. With battery don't need them.

By monitoring the voltage input (POE supply) I would like to have the router send me an warning message by mail when the power drops below a certain voltage. This way I know when there is a powercut (charger down) but the rb still runs on the battery. This way I can intervene before the router really goes down because of power drop.

A UPC can't do the job. It maintains the same output power untill it ´dies´. Connecting the rb's serial to the UPC is not an option since the rb's are up in masts and powered by POE.

So, my question, if your script uses the UPC package, how is actually the voltage monitored? Just on the board where it comes in by POE? I don't know of any voltage monitor on the rb's so far?
 
odie
Member Candidate
Member Candidate
Posts: 216
Joined: Wed Mar 23, 2005 8:31 am
Location: Austria
Contact:

Re: A script to watch the battery voltage?

Sat Sep 15, 2007 10:16 am

hi
you cant monitor the voltage directly
but you can messure the input voltage - if you split it from poe
and just plug it in into the power jack
should work with our module that you can plug into the serial port

a new version oft the voltage/temp control script will be postet on wiki in e few days

regards
 
WirelessRudy
Forum Guru
Forum Guru
Posts: 3119
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: A script to watch the battery voltage?

Sat Sep 15, 2007 2:35 pm

hi
you cant monitor the voltage directly
but you can messure the input voltage - if you split it from poe
and just plug it in into the power jack
should work with our module that you can plug into the serial port

a new version oft the voltage/temp control script will be postet on wiki in e few days

regards
Sounds interisting. But what if the rb is inside an outdoor case 6 meters high in a mast? the box has no more space to have any module connectiong to the serial port.
And how do you split the power from the POE port to lead it to the power jack?
I don´t know..... :?
 
odie
Member Candidate
Member Candidate
Posts: 216
Joined: Wed Mar 23, 2005 8:31 am
Location: Austria
Contact:

Re: A script to watch the battery voltage?

Sat Sep 15, 2007 6:11 pm

the module is tiny - a bit larger then a wireless module - should fit with a short serial cable
and when you put only the 2 pairs of the network cable with data into the rj45 plug an the other 2 pairs (blue=+/brown=-) into a plug for the powerjack you have won ...
or just use a rj45 double connector and get the voltge from there....
 
User avatar
Adam McLaughlin
Member Candidate
Member Candidate
Topic Author
Posts: 149
Joined: Sat Mar 31, 2007 5:36 am
Location: Santa Rosa, California
Contact:

Re: A script to watch the battery voltage?

Sat Sep 15, 2007 6:50 pm

I am very interested in this; as we have several Routerboards out there mounted in solar powered installations with batteries.

Please post what you have; I am quite interested!!

Adam
 
tully
MikroTik Support
MikroTik Support
Posts: 502
Joined: Fri May 28, 2004 11:07 am

Re: A script to watch the battery voltage?

Sat Sep 15, 2007 7:11 pm

The RB333 has an input voltage monitor.

See page 9 of the manual http://www.routerboard.com/pdf/rb333ugBe.pdf
 
User avatar
ghmorris
Member Candidate
Member Candidate
Posts: 284
Joined: Fri May 28, 2004 12:14 pm
Location: Minden, Ontario, Canada
Contact:

Re: A script to watch the battery voltage?

Sat Sep 15, 2007 10:01 pm

I have died and gone to heaven. We have a power monitor and just need to script against it to be able to watch what is going on in a storm.

Thank you John!!

George
 
WirelessRudy
Forum Guru
Forum Guru
Posts: 3119
Joined: Tue Aug 08, 2006 5:54 pm
Location: Spain

Re: A script to watch the battery voltage?

Sun Sep 16, 2007 12:31 am

:D Yeah, now we are getting somewhere....

Odie: I am definately interested in your modules. You make these yourself? Or where to get them. I´m not a elec.dude so don´t want to make it myself. If it all would fit in a watertight standard box I definately want to get something like that. 8)

Tully: Yeah, the rb333 will probably my future investment for AP's. That will solve my problem in new future setups. Thanks, I thougt I red something like that but couldn't find it last night.... must have been too tired! :?

Browsing on the web found this: http://www.ipenabled.com/sp2.html
Maybe a bit more on cash spending but could be handy for some occasions and would also give the ability to monitor lots more, water, temp. etc. If you don´t want to work with your hands but let your wallet speak could be a nice alternative. :)
 
BobcatGuy
Member Candidate
Member Candidate
Posts: 240
Joined: Thu Apr 19, 2007 7:41 am

Re: A script to watch the battery voltage?

Mon Jan 07, 2008 12:54 pm

Is this thread dead? I was looking around for a method to do this as well.

I have found a device that can monitor temp, and external temp, voltage on 3 different inputs (eg solar panel, battery, etc) it also has a load sensor, I don't recall how much of a load it will handle. The odd ball thing is that the device needs 3 - 6 volts to work, but can monitor voltages higher then that. The best part is that it has a serial interface that ti sends the data to. Now, it seems all good, but I have no clue on scripting, but I'm sure the device will work for what seems to be wanted. It is small enough to fit in an anttenna enclosure with a RB.

In search of the serial device I also came across a device that had a RJ45 connector, and a small processor on it, wit several analog, and digital inputs and outputs. They were mentioning that it could be programmed with basic, as well as otehr programming laguages, since it had ram on it, and an eeprom, assuming it runs a scrip on it as well, and could monitor or do whatever you want with ethernet connectivity. This device was about 1 inch wide, 2 inches long, and 1 inch tall. very small!

But to my original question, is this idea dead? or is there a use for this voltage monitoring?
 
illiniwireless
Member Candidate
Member Candidate
Posts: 152
Joined: Mon Dec 26, 2005 12:36 am
Location: USA

Re: A script to watch the battery voltage?

Tue Jan 22, 2008 6:59 am

I don't know much about scripting but what I use for battery backups are standard ups's. The 1 at our main gateway was 160 dollars at office max and is a 24 volt unit. Then I remove the origainal battery and hook up larger deepcell batteries. I have 4 large batteries in 2 seperate series for 24 volt setup and it is capable of very long run times (have tested up to 4 hours and still going). There is a cisco 2800 with 2 wics, a fortigate 400 router, a trendnet 24 port switch, 1 pc for intermapper network monitor and 3 seperate wireless radios outside the building. I also have another unit that was 60 dollars at walmart and it is a 12 volt unit. On this one I only used 2 deepcell batteries because I didn't have to hook them in series because of the unit being 12 volts. With a setup like this you don't have to worry about low voltage and the charger is built in. However it can take a while to recharge low batteries due to there size. Hope this helps.

Who is online

Users browsing this forum: raiser and 7 guests