Page 4 of 5

Re: Battery & UPS Monitor plugin.

PostPosted: Sat Feb 25, 2017 9:30 am
by MartyS
Professor Falken wrote:
Does anyone know if it is possible to have one Mac monitor two UPS's (and, if so, would this plug-in then allow monitoring of both)?

I have two separate UPS's that power a bunch of AV gear, as well as the the Indigo Mac mini, AD2Pi, modem, routers, switches, etc. One is an APC, but the other is another brand. I was hoping to use this plugin (and the Mac's built-in power monitor settings) to monitor both UPS's, but I am not sure that is possible.

If not I suppose I could use the separate APC plug-in for that one and this plug-in for the other one, but I was trying to avoid plugin bloat, plus the program for the APC one looks rather complex to set up.

Thanks for any advice.

I know it's not what you have, but the APCUPSD plugin supports multiple APC UPSes (each attached to different servers) being monitored. I'm sorry that it appears to be complex to setup — I'd be glad to help you get the new release installed and setup. You'll see that the plugin itself is straightforward — only the external package the plugin relies on that takes some non-normal steps. The nice thing is, the external package usually installs with a perfectly usable configuration right from the beginning so while it has lots of options, most don't have to be understood or tweaked.

Internally, I have revised the new APCUPSD plugin to be more adaptable to other UPS brands. If this other one you have has a definable way (like a program that can be run) to get its status/states I may be able to include it into the plugin.

Re: Battery & UPS Monitor plugin.

PostPosted: Sat Feb 25, 2017 12:21 pm
by Professor Falken
I'm sorry that it appears to be complex to setup — I'd be glad to help you get the new release installed and setup. You'll see that the plugin itself is straightforward — only the external package the plugin relies on that takes some non-normal steps.


Thanks a lot, that's very nice of you to offer. I'll have to look into it.

As you said, the plugin looks pretty straightforward-- I didn't mean to imply that it was difficult. It was when reading about the actual underlying APC program that I started to wonder how difficult it would all be.

First I have to see if I can locate the old data cables to run from the UPS's back to the Mac USB. Back when I set them up, I never had any intention of monitoring them or anything, and I probably just stuck those with all my other unused cables. But every time I jump on the forum, I realize there is more and more that I can get Indigo to do for me.

Re: Battery & UPS Monitor plugin.

PostPosted: Sat Mar 18, 2017 4:09 pm
by greenbergm0625
Hello -

I have installed V 1.03 on Indigo 7 and while it seems to work and detect a power failure but the email notification does not go out. Are there other configuration options for email (smtp server, passwords, etc) or did I miss something ?

Thanks in advance

Re: Battery & UPS Monitor plugin.

PostPosted: Mon Jul 17, 2017 2:11 pm
by roquej
Getting the following error when I tested the the plugin.

Traceback (most recent call last):
File "plugin.py", line 217, in runConcurrentThread
ValueError: invalid literal for int() with base 10: '15 remaining pre'

UPS and Battery Monitor Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
UPS and Battery Monitor Power Status - UPS Power
UPS and Battery Monitor UPS Model - - CP 1500C (id=13631488)
UPS and Battery Monitor Charging Status - False
UPS and Battery Monitor Battery Charge - 100
UPS and Battery Monitor Refreshing in 1 Minutes
UPS and Battery Monitor Error Error in plugin execution runConcurrentThread:

Any suggestions:

JP

Re: Battery & UPS Monitor plugin.

PostPosted: Tue Jul 18, 2017 11:56 am
by bschollnick2
roquej wrote:
Getting the following error when I tested the the plugin.
Traceback (most recent call last):
File "plugin.py", line 217, in runConcurrentThread
ValueError: invalid literal for int() with base 10: '15 remaining pre'

UPS and Battery Monitor Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
UPS and Battery Monitor Power Status - UPS Power
UPS and Battery Monitor UPS Model - - CP 1500C (id=13631488)
UPS and Battery Monitor Charging Status - False
UPS and Battery Monitor Battery Charge - 100
UPS and Battery Monitor Refreshing in 1 Minutes
UPS and Battery Monitor Error Error in plugin execution runConcurrentThread:


What OS are you running under?

I'll take a look at the code. But you're the first reporting this issue.

Re: Battery & UPS Monitor plugin.

PostPosted: Tue Jul 18, 2017 5:04 pm
by roquej
Thank you for looking into this.

I am running a Mac min on MacOS Sierra v 10.12.5

JP

Re: Battery & UPS Monitor plugin.

PostPosted: Sat Jul 22, 2017 9:34 am
by slackman1
Hi,

I'm getting the same error as roquej, with the minor difference of getting '14 remaining...', running Indigo 7.0.3 on OS X 10.11.6...
The error only occurs when the UPS switches to battery power:
---
UPS and Battery Monitor Power Status - UPS Power
UPS and Battery Monitor UPS Model - -Back-UPS BR1500GI FW:878.L3 .I USB FW:L3 (id=10813440)
UPS and Battery Monitor Charging Status - False
UPS and Battery Monitor Battery Charge - 84
UPS and Battery Monitor Refreshing in 1 Minutes
UPS and Battery Monitor Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 217, in runConcurrentThread
ValueError: invalid literal for int() with base 10: '14 remaining pre'

UPS and Battery Monitor Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
---
Could you please take a look at this? This plugin seems to work fine furthermore and seems much easier to configure then apcupsd...

Best regards, Gerrit Jan

Re: Battery & UPS Monitor plugin.

PostPosted: Sat Jul 22, 2017 10:05 am
by FlyingDiver
I think I ended up fixing this in my copy of the plugin. Try changing line 171 of plugin.py from:

Code: Select all
      charging = not data[1].endswith ("discharging")

to:
Code: Select all
      charging = data[1].find("discharging") == -1

Re: Battery & UPS Monitor plugin.

PostPosted: Sat Jul 22, 2017 10:27 am
by bschollnick2
FlyingDiver wrote:
I think I ended up fixing this in my copy of the plugin. Try changing line 171 of plugin.py from:

Code: Select all
      charging = not data[1].endswith ("discharging")

to:
Code: Select all
      charging = data[1].find("discharging") == -1


Thank you. I'll be placing this onto Github, and making the change...

- Benjamin

Re: Battery & UPS Monitor plugin.

PostPosted: Sun Jul 23, 2017 10:02 am
by slackman1
This works okay for me too! Thanks FlyingDiver!

Gerrit Jan

Re: Battery & UPS Monitor plugin.

PostPosted: Thu Aug 03, 2017 11:02 am
by DomoPat
It did not work for me ! I have exactly the same error after changing line 171. In my case the variable 'sec' was not parsed correctly, I had to replace lines 174 and 175:

Code: Select all
         min      = data[2][0:time.find(":")+1]
         sec      = data[2][time.find(":")+2:-10]


with:

Code: Select all
         min,sec = time.split(':')


and now the plugin works as intended.

Re: Battery & UPS Monitor plugin.

PostPosted: Thu Oct 12, 2017 1:50 pm
by reugster
So is this plugin still available? None of the links seem to work and I would like to try this out.
Thanks
R

Re: Battery & UPS Monitor plugin.

PostPosted: Sun Oct 15, 2017 8:31 pm
by itopota
please can i download this?

Re: Battery & UPS Monitor plugin.

PostPosted: Tue Oct 17, 2017 11:33 am
by bschollnick2
itopota wrote:
please can i download this?


I have to upload some of these to my github account, since it appears that dropbox has eliminated the public links....

I'll try to get this done today. If you're in a rush for it, please email me at benjamin AT schollnick DOT net, and I'll email you the latest version.

- Benjamin

Re: Battery & UPS Monitor plugin.

PostPosted: Wed Jan 24, 2018 1:09 pm
by Different Computers
I just landed a free Tripp Lite 1500LCD UPS. Am I correct in my understanding that if I plug it in via USB to my Mac, and the Mac then shows the UPS battery status and the UPS's current mains power/no mains status, that this plugin will work with it?

I'll be using it on a MacBook Pro with a battery--does that throw any curve balls into the mix?