more G-Labs products

Author Topic: UPS support & widget (apcupsd)  (Read 1550 times)

March 03, 2016, 02:31:05 AM
Read 1550 times

amselem

  • **
  • Information
  • Jr. Member
  • Posts: 25
Hello

Inspired by this thread 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!

March 03, 2016, 04:20:03 AM
Reply #1

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
Nice addition!  I'll give it a try on RPi and let you know how it works.

March 03, 2016, 04:59:36 AM
Reply #2

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
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.

March 03, 2016, 11:05:35 AM
Reply #3

amselem

  • **
  • Information
  • Jr. Member
  • Posts: 25
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?

March 03, 2016, 01:37:41 PM
Reply #4

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
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..

March 03, 2016, 04:30:23 PM
Reply #5

bkenobi

  • *****
  • Information
  • Global Moderator
  • Posts: 1525
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)

April 18, 2016, 12:32:41 AM
Reply #6

maxflax

  • ***
  • Information
  • Full Member
  • Posts: 90
Why bother writing the communication code your self when you just can use Nut http://networkupstools.org/