Page 3 of 5

Re: Battery & UPS Monitor plugin.

PostPosted: Thu Aug 15, 2013 8:08 pm
by rhanson
OK, I'm late to the party here. So if I have a UPS and the apc daemon, then is the plugin all I need to get the simulated bad shutdown? Or do I need to go ahead and adjust the launchctl params as indicated in the middle of this thread?

If I have a non-apc ups, but it's supported by the OSX battery preferences pane, then will the plugin (by itself) be able to cause the auto-restarting shutdown?

Re: Battery & UPS Monitor plugin.

PostPosted: Sat Aug 24, 2013 1:32 pm
by rhanson
OK, I have the UPS device created, and it communicates with the UPS correctly. UPS is correctly identified by OSX, and functions correctly.

However, the plugin's trigger for AC Power On/Off doesn't fire. If I use a trigger for Charging Status, that works fine.

Here's what the log says for AC and UPS power:

UPS and Battery Monitor Power Status - AC Power
UPS and Battery Monitor UPS Model - -CRCA102*AF1
UPS and Battery Monitor Charging Status - True
UPS and Battery Monitor Battery Charge - 120
UPS and Battery Monitor Sleeping for 5 minutes (300)

UPS and Battery Monitor Power Status - UPS Power
UPS and Battery Monitor UPS Model - -CRCA102*AF1
UPS and Battery Monitor Charging Status - False
UPS and Battery Monitor Battery Charge - 118
UPS and Battery Monitor Sleeping for 5 minutes (300)

In addition, the Indigo built-in Power Failure event doesn't trigger either, but I'm not sure whether that's looking at the OSX UPS status or some Insteon controller or what.

Does anyone have any issues with the AC power status trigger?

Edit: looking at the plug-in code, the ACPower state is defined as boolean, but it stores a string "AC Power" or "UPS Power". Changing that to a string, and changing the trigger to match text does the trick.

Still no idea what the built-in Indigo power-failure trigger does, though.

Re: Battery & UPS Monitor plugin.

PostPosted: Sun Aug 25, 2013 9:34 am
by sandconformgorgecloud
It would be great of the refresh time could be changed from a trigger (for example, when I'm at home, or when my Mac Pro is on, I need a check every minute, when only my mini server runs, I could make it every 5 minutes).

Re: Battery & UPS Monitor plugin.

PostPosted: Tue Aug 27, 2013 5:54 pm
by rhanson
I agree, I think it should be user-defined. Furthermore, once it knows it's in battery mode, it should poll every minute. 5 minutes is a long time on battery. Finally, I would get rid of the log messages every 5 minutes. Report at startup, and then only when things change.

Re: Battery & UPS Monitor plugin.

PostPosted: Mon Sep 02, 2013 8:58 am
by richy240
This is a great plugin, and seemingly very stable. One nice addition would be to suppress the refresh logging. It's nice to know that things are working ok, but it tends to fill up my log. Maybe an option to only log issues?

Re: Battery & UPS Monitor plugin.

PostPosted: Fri Sep 06, 2013 6:42 am
by bschollnick2
I'll look at adding in a user option to suppress the logging, and an option to switch to 1 minute updates, after a power loss.

Thanks for the feedback.

- Ben

Re: Battery & UPS Monitor plugin.

PostPosted: Mon Sep 09, 2013 12:34 pm
by bschollnick2
richy240 wrote:
This is a great plugin, and seemingly very stable. One nice addition would be to suppress the refresh logging. It's nice to know that things are working ok, but it tends to fill up my log. Maybe an option to only log issues?


Okay, I have a version that I need to test, that includes:

* The option to only log when a power failure occurs
* A separate refresh timer when a power failure occurs

I need to test this today / tomorrow, but then I should be able to release it.

- Ben

Re: Battery & UPS Monitor plugin.

PostPosted: Mon Sep 09, 2013 9:27 pm
by rhanson
Ben - see your PM inbox.

Re: Battery & UPS Monitor plugin.

PostPosted: Tue Sep 10, 2013 9:17 am
by bschollnick2
v1.03 is ready for use.

https://dl.dropboxusercontent.com/u/241 ... tor103.zip

Improvements include, option to only log to the system log when a power failure has occurred.
Along with the ability to set a Refresh Timer for when a power failure has occurred.

- Ben

Re: Battery & UPS Monitor plugin.

PostPosted: Tue Sep 10, 2013 11:44 am
by sandconformgorgecloud
Seems to works good !
But my question is : if I check the battery level every 6 hours, when the power is lost, is there any action we can make?
On my last test it was saying power failure only while it checked it (so 45 seconds after the lost of power).

It's clear I don't need an update on the battery every minute, but in case of a power failure, I need to shut down some computers/NAS immediately or the soonest possible to avoid battery to be completely down. My Mac Mini Server alone can last 2 hours.

That's why I ask this question, and ask for another feature (but ok this is a "+" :) ), to be able to change dynamically the check value (but if I'm wrong and we can receive a power failure without a check, it's ok).

So when my Mac Pro is on, I need to check really often, if not, I can check less often, if my NAS is off too, then I can check rarely.

Thanks :)

EDIT: To be more specific, I don't use email notifications, but I could, but my need is to make automatic shutdowns via Shell Scripts, and not to ask me to shutdown :)

Re: Battery & UPS Monitor plugin.

PostPosted: Tue Sep 10, 2013 12:46 pm
by bschollnick2
ssciboz wrote:
Seems to works good !
But my question is : if I check the battery level every 6 hours, when the power is lost, is there any action we can make?
On my last test it was saying power failure only while it checked it (so 45 seconds after the lost of power).


No that is correct. The Refresh time is the only time that it checks the UPS status.
My suggestion is the default of 2 minutes, with 1 Minute on the power failure timer.

ssciboz wrote:
[That's why I ask this question, and ask for another feature (but ok this is a "+" :) ), to be able to change dynamically the check value (but if I'm wrong and we can receive a power failure without a check, it's ok).
So when my Mac Pro is on, I need to check really often, if not, I can check less often, if my NAS is off too, then I can check rarely.


This makes sense. I'm not sure how quickly I can get to this, but I'll see what I can do.

- Ben

Re: Battery & UPS Monitor plugin.

PostPosted: Mon Nov 14, 2016 12:40 pm
by McJohn
Hello Ben,

Is the Battery & UPS Monitor plugin completely compatible with the new Indigo 7?

Kind regards,

John

Re: Battery & UPS Monitor plugin.

PostPosted: Mon Nov 14, 2016 5:38 pm
by durosity
Just FYI if you find it doesn’t work then try out APCupsD and its plugin - it fully works (for me anyway) and is a lot of powerful than using the macOS UPS system.. for example it’ll give you info about the state of the batteries

Re: Battery & UPS Monitor plugin.

PostPosted: Tue Nov 15, 2016 1:56 am
by Coolcaper
McJohn wrote:
Hello Ben,

Is the Battery & UPS Monitor plugin completely compatible with the new Indigo 7?

Kind regards,

John


Working well on mine so far!


Sent from my iPhone using Tapatalk

Re: Battery & UPS Monitor plugin.

PostPosted: Thu Feb 23, 2017 3:16 pm
by Professor Falken
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.