Request for Plugin - APC UPS management interface

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo
Forum rules
This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo
tintivilus
Posts: 31
Joined: Wed Feb 18, 2009 2:38 pm

Request for Plugin - APC UPS management interface

Post by tintivilus »

I have a few APC UPS units with ethernet snmp/web/telnet management cards installed. It'd be nice to have Indigo able to interact with these devices

- remote turn on/off of UPS connected equipment, like for rebooting a router when a ping test fails
- gather power supply metrics (voltage, frequency, etc) to trigger events like re-writing IOlinc settings after a power fluctuation

I think the same protocol is used for the managed power strips, which I could imagine being a useful alternative to a pile of appliancelincs in some situations.

Maybe one could whip up some python glue to apcupsd? I don't have a clear enough understanding of how plugins generally work to suggest much of a design.
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Request for Plugin - APC UPS management interface

Post by jay (support) »

Added to the wish list.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
Perry The Cynic
Posts: 857
Joined: Mon Apr 07, 2008 9:46 pm

Re: Request for Plugin - APC UPS management interface

Post by Perry The Cynic »

Given that Mac OS already has integrated power management software (that basically treats a USB-attached UPS as if it was a laptop battery), shouldn't such a plugin hook into the Mac OS power management APIs instead? That way, any (Mac-)supported UPS would benefit. And weirdos who run Indigo on laptops get some benefit, too...

Cheers
-- perry
tintivilus
Posts: 31
Joined: Wed Feb 18, 2009 2:38 pm

Re: Request for Plugin - APC UPS management interface

Post by tintivilus »

I was actually thinking of the ethernet interface (not sure if SNMP would cover it), not the USB one. I'm not aware of any OS X builtin support for remote UPS management.

You're right that it should be reasonable to use built-in OS X UPS hooks to see power events from a locally connected UPS.
Perry The Cynic
Posts: 857
Joined: Mon Apr 07, 2008 9:46 pm

Re: Request for Plugin - APC UPS management interface

Post by Perry The Cynic »

Plug an USB-connectible UPS into a Mac and open the Energy Saver preferences. You'll see the same stuff that a laptop would show - essentially, a battery that is the UPS. At the same time, the power management APIs also reflect this "battery".

It depends on what you're trying to do, of course. If you want to detail-fiddle things like switching plug groups and power-off cadences, you won't see it there. If that's what you want, you may want to interface Indigo to NUT (the Network UPS Tools), which is the Open Source standard way to talk to UPS devices. That, too, has drivers for all kinds of UPS devices, so it would work for most devices out there.
arwatson2000
Posts: 34
Joined: Mon Oct 17, 2011 5:46 pm

Re: Request for Plugin - APC UPS management interface

Post by arwatson2000 »

Is there any update on how have Indigo email you when the power supply of the battery is low? Or how long you have been on battery supply?

This would be helpful to know.

thank you.
bschollnick2
Posts: 1355
Joined: Sun Oct 17, 2004 8:21 am
Location: Rochester, Ny
Contact:

Re: Request for Plugin - APC UPS management interface

Post by bschollnick2 »

arwatson2000 wrote:Is there any update on how have Indigo email you when the power supply of the battery is low? Or how long you have been on battery supply?

This would be helpful to know.
arwatson2000, good news. Your post has encouraged me to make an Indigo plugin to handle this. It's not done yet, but I am about half way done with it.

What sort of options do you think might be useful?

Everyone else, for UPS / Laptop Battery support, what do you think would be useful for Indigo?
------
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
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

Re: Request for Plugin - APC UPS management interface

Post by Dewster35 »

Haha... Ben. I would like to request the plugin to conjure a 42' yacht. Also having it deliver on a trailer and parked in my driveway would be a plus. Obviously this is more of a nice to have feature than a must have feature.

You are indeed a wizard!
User avatar
durosity
Posts: 4810
Joined: Thu May 10, 2012 3:21 pm
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Request for Plugin - APC UPS management interface

Post by durosity »

Sounds awesome.. Will this plugin just be for UPS devices that OSX recognises via USB, or are you intending for support for ethernet cards too?
Computer says no.
automaton
Posts: 103
Joined: Fri May 23, 2008 8:35 am

Re: Request for Plugin - APC UPS management interface

Post by automaton »

apcupsd has the capability to call shell scripts on various power failure states, which could then interact with Indigo (for instance updating a variable). There is also a apcupsd management TCP port, as well a a web server, that can be queried for status.

I have apcupsd alert me directly when there are issues.
bschollnick2
Posts: 1355
Joined: Sun Oct 17, 2004 8:21 am
Location: Rochester, Ny
Contact:

Re: Request for Plugin - APC UPS management interface

Post by bschollnick2 »

durosity wrote:Sounds awesome.. Will this plugin just be for UPS devices that OSX recognises via USB, or are you intending for support for ethernet cards too?
This uses Mac OS X's built-in power management / UPS Recognition, so I don't think there will be direct support for ethernet cards.

But if someone has an ethernet based UPS, and is willing to send me the documentation on it, I can certainly explore adding it in.

- Ben
------
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
bschollnick2
Posts: 1355
Joined: Sun Oct 17, 2004 8:21 am
Location: Rochester, Ny
Contact:

Re: Request for Plugin - APC UPS management interface

Post by bschollnick2 »

Dewster35 wrote:Haha... Ben. I would like to request the plugin to conjure a 42' yacht. Also having it deliver on a trailer and parked in my driveway would be a plus. Obviously this is more of a nice to have feature than a must have feature.

You are indeed a wizard!
Yeah, I thought about that one, but I figured it would be easier to code a money production plugin. This way I can customize whatever I buy, instead of having to accept what someone else considered a useable 42' yacht.

Sadly, Matt took out the right pantone green generator that I needed. So I'll have to make the money the old fashion way, my day job.

- Ben
------
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
Locked

Return to “Extending Indigo with Plugins and Python”