Battery & UPS Monitor plugin.

Posted on
Wed Jan 24, 2018 1:57 pm
greenbergm0625 offline
Posts: 22
Joined: Jan 04, 2016

Re: Battery & UPS Monitor plugin.

I was able to install this plugin but never able to get the email notification working - see my earlier post on this topic.

For example, I disconnected the UPS from utility power, and the plugin detected the Mac was on battery, but there was no notification by email of the event.

If you are able to figure this out let me know.

Indigo can detect a power failure on the USB interface device (since it is plugged in to an outlet) and send an email on that, and the Power settings on the Mac will shut down the Mac when the UPS gets low. Getting an email on low power UPS would be nice also.

Posted on
Wed Jan 24, 2018 7:32 pm
Fishysan offline
Posts: 86
Joined: Feb 01, 2012

Re: Battery & UPS Monitor plugin.

Hey greenb,

Could be your config, could be firewall preventing plugins from going out, etc.

Meanwhile, just create your own triggers based on device change. Lots of options!

Great plugin, and it's simplicity is gold. Thanks Ben!
Attachments
Screen Shot 2018-01-24 at 8.28.04 PM.png
Screen Shot 2018-01-24 at 8.28.04 PM.png (61.59 KiB) Viewed 24413 times

Posted on
Wed Jan 24, 2018 7:37 pm
Fishysan offline
Posts: 86
Joined: Feb 01, 2012

Re: Battery & UPS Monitor plugin.

To add, personally I send iMessages/SMS for notifications that need attention with AppleScript. Like so;
Code: Select all
tell application "Messages"
   send "Alert: UPS battery level below 20%!" to buddy "you@gmail.com" of (service 1 whose service type is iMessage)
end tell

Posted on
Thu Jan 25, 2018 6:47 am
greenbergm0625 offline
Posts: 22
Joined: Jan 04, 2016

Re: Battery & UPS Monitor plugin.

Fishysan wrote:
To add, personally I send iMessages/SMS for notifications that need attention with AppleScript. Like so;
Code: Select all
tell application "Messages"
   send "Alert: UPS battery level below 20%!" to buddy "you@gmail.com" of (service 1 whose service type is iMessage)
end tell


I’m able to send emails no issue from other plugins including BettterEmail which works great.

The UPS plugin seems to have some native email capability, but it’s not clear how it works, since there is no configuration to set for email server or other parameters.

When testing nothing happens for a notification.




Sent from my iPhone using Tapatalk

Posted on
Thu Jan 25, 2018 6:56 am
FlyingDiver offline
User avatar
Posts: 7184
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Battery & UPS Monitor plugin.

greenbergm0625 wrote:
The UPS plugin seems to have some native email capability, but it’s not clear how it works, since there is no configuration to set for email server or other parameters.


I just looked at the code. The config dialog does imply that it'll send emails, but there's no code to actually do so. Looks like the author intended to implement that, and never did.

Just trigger on device changes and use BetterEmail to send the notices. I trigger on PowerSource state changes and also BatteryLevel less than certain amounts.

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

Posted on
Thu Jan 25, 2018 8:33 am
greenbergm0625 offline
Posts: 22
Joined: Jan 04, 2016

Re: Battery & UPS Monitor plugin.

I'll try that next. The download links are all dead - does anyone know where I can get the latest version ?

After several upgrades I no longer have this on my Indigo server machine

Thanks

Posted on
Thu Jan 25, 2018 8:46 am
Fishysan offline
Posts: 86
Joined: Feb 01, 2012

Re: Battery & UPS Monitor plugin.


Posted on
Fri Jan 26, 2018 6:49 pm
greenbergm0625 offline
Posts: 22
Joined: Jan 04, 2016

Re: Battery & UPS Monitor plugin.

Thanks all. This now works - it was never clear to me that you could create a device (and a trigger like other devices) after the plugin was installed.

Maybe I overlooked the obvious.

Posted on
Fri Jan 26, 2018 9:03 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Battery & UPS Monitor plugin.

Different Computers wrote:
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?


As long as the Mac OS recognizes it as an UPS, then you're correct.

If it doesn't, please let me know, and we can try to resolve the 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
Sat Jan 27, 2018 11:17 am
greenbergm0625 offline
Posts: 22
Joined: Jan 04, 2016

Errors when testing UPS - unplugged from outlet

Here is snippet from my Indigo Log file after I unplugged the UPS from the wall to test:



Jan 27, 2018, 12:10:26 PM
UPS and Battery Monitor Power Status - UPS Power
UPS and Battery Monitor UPS Model - -Smart-UPS 750 FW:UPS 09.3 / ID=18 (id=9895936)
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:

Traceback (most recent call last):
File "plugin.py", line 217, in runConcurrentThread
ValueError: invalid literal for int() with base 10: '03 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 - -Smart-UPS 750 FW:UPS 09.3 / ID=18 (id=9895936)
UPS and Battery Monitor Charging Status - False
UPS and Battery Monitor Battery Charge - 89
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: '19 remaining pre'

UPS and Battery Monitor Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Received INSTEON "Insteon Motion Garage" off (button 1)

Posted on
Sat Jan 27, 2018 12:30 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Errors when testing UPS - unplugged from outlet

greenbergm0625 wrote:
Here is snippet from my Indigo Log file after I unplugged the UPS from the wall to test:



Jan 27, 2018, 12:10:26 PM
UPS and Battery Monitor Power Status - UPS Power
UPS and Battery Monitor UPS Model - -Smart-UPS 750 FW:UPS 09.3 / ID=18 (id=9895936)
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:

Traceback (most recent call last):
File "plugin.py", line 217, in runConcurrentThread
ValueError: invalid literal for int() with base 10: '03 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 - -Smart-UPS 750 FW:UPS 09.3 / ID=18 (id=9895936)
UPS and Battery Monitor Charging Status - False
UPS and Battery Monitor Battery Charge - 89
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: '19 remaining pre'

UPS and Battery Monitor Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Received INSTEON "Insteon Motion Garage" off (button 1)


I'll try to take a look at this, this weekend... Presumably they changed the formatting on the output, which broke something....

------
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
Sat Jan 27, 2018 12:42 pm
greenbergm0625 offline
Posts: 22
Joined: Jan 04, 2016

Re: Battery & UPS Monitor plugin.

Great. I am running Indigo 7.1.1 on OSX 10.12.6.

I'm using a Mac mini and the UPS is connected via USB. The exact model is in the last log snippet I posted.
Let me know if you need any additional data for debugging

Thanks for you help.

Posted on
Tue Jun 12, 2018 5:47 am
greenbergm0625 offline
Posts: 22
Joined: Jan 04, 2016

Re: Battery & UPS Monitor plugin.

Hi it’s been 6 months since my last post. Any news on this plugin or should we consider it closed and there will be no further updates ?

Thanks


Sent from my iPhone using Tapatalk

Posted on
Tue Oct 22, 2019 7:54 am
shapa offline
Posts: 483
Joined: Sep 08, 2014
Location: Swindon

Re: Battery & UPS Monitor plugin.

The same error :)

"ValueError: invalid literal for int() with base 10: '19 remaining pre'"

Any chance to see it fixed?

Posted on
Tue Jan 28, 2020 2:59 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Battery & UPS Monitor plugin.

This error is now 2 years old...

And beside this, in our case the Trigger “Power Source” “Becomes Equal to (AC Power or UPS Power) also doesn’t work anymore.
Only the” Battery is being Charged” is working.

We have sent and email to the developer but unfortunately we get no response and I'm afraid that after 2 years radio silence this is a dead plugin?

Does anyone know another plugin that supports the Apple Energy Saver/APC ups?

Who is online

Users browsing this forum: No registered users and 1 guest