Battery & UPS Monitor plugin.

Posted on
Sat Feb 25, 2017 9:30 am
MartyS offline
Posts: 65
Joined: May 06, 2008
Location: Charlotte, North Carolina

Re: Battery & UPS Monitor plugin.

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.

/Marty

Posted on
Sat Feb 25, 2017 12:21 pm
Professor Falken offline
User avatar
Posts: 124
Joined: Mar 29, 2015

Re: Battery & UPS Monitor plugin.

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.

Posted on
Sat Mar 18, 2017 4:09 pm
greenbergm0625 offline
Posts: 10
Joined: Jan 04, 2016

Re: Battery & UPS Monitor plugin.

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

Posted on
Mon Jul 17, 2017 2:11 pm
roquej offline
User avatar
Posts: 250
Joined: Jan 04, 2015

Re: Battery & UPS Monitor plugin.

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

Posted on
Tue Jul 18, 2017 11:56 am
bschollnick2 offline
Posts: 1292
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Battery & UPS Monitor plugin.

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.

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Tue Jul 18, 2017 5:04 pm
roquej offline
User avatar
Posts: 250
Joined: Jan 04, 2015

Re: Battery & UPS Monitor plugin.

Thank you for looking into this.

I am running a Mac min on MacOS Sierra v 10.12.5

JP

Posted on
Sat Jul 22, 2017 9:34 am
slackman1 offline
Posts: 17
Joined: Jun 20, 2011

Re: Battery & UPS Monitor plugin.

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

Posted on
Sat Jul 22, 2017 10:05 am
FlyingDiver offline
Posts: 1657
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Battery & UPS Monitor plugin.

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

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Jul 22, 2017 10:27 am
bschollnick2 offline
Posts: 1292
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Battery & UPS Monitor plugin.

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

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Sun Jul 23, 2017 10:02 am
slackman1 offline
Posts: 17
Joined: Jun 20, 2011

Re: Battery & UPS Monitor plugin.

This works okay for me too! Thanks FlyingDiver!

Gerrit Jan

Posted on
Thu Aug 03, 2017 11:02 am
DomoPat offline
User avatar
Posts: 159
Joined: Jul 17, 2010
Location: Toulouse, France

Re: Battery & UPS Monitor plugin.

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.

Posted on
Thu Oct 12, 2017 1:50 pm
reugster offline
Posts: 3
Joined: Mar 24, 2016

Re: Battery & UPS Monitor plugin.

So is this plugin still available? None of the links seem to work and I would like to try this out.
Thanks
R

Posted on
Sun Oct 15, 2017 8:31 pm
itopota offline
Posts: 10
Joined: Oct 26, 2014

Re: Battery & UPS Monitor plugin.

please can i download this?

Posted on
Tue Oct 17, 2017 11:33 am
bschollnick2 offline
Posts: 1292
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Battery & UPS Monitor plugin.

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

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Who is online

Users browsing this forum: No registered users and 3 guests