HomeGenie Forum

Automation Program Plugins and Wizard Scripting => APP Contributions => Topic started by: amselem on March 03, 2016, 02:31:05 AM

Title: UPS support & widget (apcupsd)
Post by: amselem on March 03, 2016, 02:31:05 AM
Hello

Inspired by this thread http://www.homegenie.it/forum/index.php?topic=546.0 (http://www.homegenie.it/forum/index.php?topic=546.0) I've written a basic widget to show UPS status.

I've tested with HG running under Windows and apcupsd as a Windows Service.
This APP supports mail and pushalot notifications.

I'm open to any suggestions and improvements.

Thank you!
Title: Re: UPS support & widget (apcupsd)
Post by: bkenobi on March 03, 2016, 04:20:03 AM
Nice addition!  I'll give it a try on RPi and let you know how it works.
Title: Re: UPS support & widget (apcupsd)
Post by: bkenobi on March 03, 2016, 04:59:36 AM
It looks like this version works with network connected UPS modules.  I don't have such a unit, so I can't say if the code works on RPi but I can say it doesn't work with a USB connected UPS.  I'm going to try modifying my APP to utilize this widget though.
Title: Re: UPS support & widget (apcupsd)
Post by: amselem on March 03, 2016, 11:05:35 AM
My UPS is not directly network connected, it connects to my Windows pc via an USB cable. Then apcupsd opens a local port for the applications that wants to talk with the UPS (it's like sharing an USB printer in Windows).
I thought that this method was also valid with RPi but it looks like you're talking to the UPS directly?  If not possible, do you think that you can merge the two communication modes in one APP? Or it isn't worth the hassle?
Title: Re: UPS support & widget (apcupsd)
Post by: [email protected] on March 03, 2016, 01:37:41 PM
Id be interested in this, as I was planning on doing something with my UPS (old APC one - modified with two very large external batteries) - connecting via usb to serial and then using it for monitoring voltage and mains failure + obviously the usual..
Title: Re: UPS support & widget (apcupsd)
Post by: bkenobi on March 03, 2016, 04:30:23 PM
I didn't write the core to my UPS code.  It was provided by another user and I simply added to it.  In fact, it's been so long since I looked at it, I don't remember how it's communicating.  It could be via a network connection.   8)
Title: Re: UPS support & widget (apcupsd)
Post by: maxflax on April 18, 2016, 12:32:41 AM
Why bother writing the communication code your self when you just can use Nut http://networkupstools.org/ (http://networkupstools.org/)