Page 5 of 7

Re: Battery & UPS Monitor plugin.

PostPosted: Wed Jan 24, 2018 1:57 pm
by greenbergm0625
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.

Re: Battery & UPS Monitor plugin.

PostPosted: Wed Jan 24, 2018 7:32 pm
by Fishysan
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!

Re: Battery & UPS Monitor plugin.

PostPosted: Wed Jan 24, 2018 7:37 pm
by Fishysan
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

Re: Battery & UPS Monitor plugin.

PostPosted: Thu Jan 25, 2018 6:47 am
by greenbergm0625
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

Re: Battery & UPS Monitor plugin.

PostPosted: Thu Jan 25, 2018 6:56 am
by FlyingDiver
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.

Re: Battery & UPS Monitor plugin.

PostPosted: Thu Jan 25, 2018 8:33 am
by greenbergm0625
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

Re: Battery & UPS Monitor plugin.

PostPosted: Thu Jan 25, 2018 8:46 am
by Fishysan

Re: Battery & UPS Monitor plugin.

PostPosted: Fri Jan 26, 2018 6:49 pm
by greenbergm0625
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.

Re: Battery & UPS Monitor plugin.

PostPosted: Fri Jan 26, 2018 9:03 pm
by bschollnick2
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.

Errors when testing UPS - unplugged from outlet

PostPosted: Sat Jan 27, 2018 11:17 am
by greenbergm0625
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)

Re: Errors when testing UPS - unplugged from outlet

PostPosted: Sat Jan 27, 2018 12:30 pm
by bschollnick2
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....

Re: Battery & UPS Monitor plugin.

PostPosted: Sat Jan 27, 2018 12:42 pm
by greenbergm0625
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.

Re: Battery & UPS Monitor plugin.

PostPosted: Tue Jun 12, 2018 5:47 am
by greenbergm0625
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

Re: Battery & UPS Monitor plugin.

PostPosted: Tue Oct 22, 2019 7:54 am
by shapa
The same error :)

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

Any chance to see it fixed?

Re: Battery & UPS Monitor plugin.

PostPosted: Tue Jan 28, 2020 2:59 am
by McJohn
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?