www.homeseer.com    
 

Go Back   HomeSeer Message Board > Energy Management Plug-ins > Energy Management Discussion > APCUPSD Plugin (3P)

APCUPSD Plugin (3P) Discussions related to the APCUPSD UPS monitoring plugin.

Reply
 
Thread Tools Display Modes
  #1  
Old February 17th, 2015, 01:55 PM
madigan's Avatar
madigan madigan is offline
Seer Deluxe
 
Join Date: May 2001
Posts: 129
Unhappy 3.0.6.10 won't unzip...

The log shows:
Error unzipping C:\Program Files (x86)\HomeSeer HS3\Updates3\APCUPSD3.0.6.10\hspi_apcupsd_3.0.6.10.zip, Wrong Local header signature: 0x4F44213C on line 0

When I try to manually unzip it in Windows, I get
Cannot Complete the Compressed (zipped) Folders Extraction Wizard
The compressed (zipped) folder is empty...

The log also shows I've downloaded it sucessfully three times, so it looks like there was a problem when the zip was created.
Reply With Quote
  #2  
Old February 17th, 2015, 11:59 PM
pcp pcp is online now
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,686
I contacted HomeSeer asking them to fix it.

I checked it and can reproduce it. The zip files that HS3 downloads are only 2k and the zip files that I asked them to install into the updater are much larger.
Reply With Quote
  #3  
Old February 18th, 2015, 12:05 AM
madigan's Avatar
madigan madigan is offline
Seer Deluxe
 
Join Date: May 2001
Posts: 129
Smile

Thanks!
Reply With Quote
  #4  
Old February 26th, 2015, 06:42 PM
pcp pcp is online now
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,686
Did you try again? Should be fixed (since last week actually)
Reply With Quote
  #5  
Old February 26th, 2015, 07:23 PM
madigan's Avatar
madigan madigan is offline
Seer Deluxe
 
Join Date: May 2001
Posts: 129
Looks like I tried again on the 18th, and everything went fine. I'm using it with a couple of APCs on different computers to try to log ongoing recurring power grid problems here. I just wish APCUPSD could pick up what is supposedly being sent from my WD EX4 NAS, which is connected via USB to a Back-UPS Pro XS 1300. The EX4 is set up in "Network UPS Master mode", but it's either using a port I can't figure out, or some proprietary software that WD tech support doesn't know anything about. At least it sends me an email whenever its UPS switches... Have any thoughts on what might be going on there?

Thanks again
Jim Madigan
Reply With Quote
  #6  
Old March 1st, 2015, 07:28 PM
pcp pcp is online now
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,686
I am not familiar with the WD EX4 NAS but have an XS 1300 here connected to a Windows 7 machine and reports fine all information. When you connect the same UPS to a Windows box, do you get more details from the UPS?

Found this about the apcupsd and Back-UPS Pro XS 1300; might be helpfull: http://askubuntu.com/questions/13229...0-with-apcupsd
Reply With Quote
  #7  
Old March 1st, 2015, 08:10 PM
madigan's Avatar
madigan madigan is offline
Seer Deluxe
 
Join Date: May 2001
Posts: 129
Sorry - I came up with more info I should have posted sooner.

I got into the EX4 via SSH, and started poking around. After googling all the files I could find having to do with UPS support, it seems WD is using something called NUT (Network UPS Tools)
http://www.networkupstools.org/index.html
which seems to be a somewhat distant relative of APCUPSD. There is a mostly-abandoned Windows client for it
https://code.google.com/p/winnut/
and using it I was able to connect with the EX4 and get a dashboard up for the 1300.

Apparently someone is/was working on some kind of driver to connect the two
https://www.mail-archive.com/nut-ups.../msg03831.html
but my linux skills (or any other programming skills, for that matter!) aren't up to the task of making sense of it all.

So there it is - I don't have any idea of the ratio of NUT vs APCUPSD users out there or the difficulty of adding NUT compatiblity, but I'd certainly appreciate being able to keep my eye on that 1300 via HomeSeer.

Thanks
Jim Madigan
Reply With Quote
  #8  
Old March 2nd, 2015, 07:55 PM
pcp pcp is online now
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,686
Thanks. NUT is different from apcupsd; I looked at it a little but did not have a chance to try to support it. So far it does not look like it has the richness of information provided by apcupsd (all the status information).
Reply With Quote
  #9  
Old March 30th, 2015, 07:42 PM
pcp pcp is online now
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,686
I posted an updated version of the plug-in (V3.1) with support for NUT. Give it a try if still interested.
Reply With Quote
  #10  
Old March 30th, 2015, 09:54 PM
madigan's Avatar
madigan madigan is offline
Seer Deluxe
 
Join Date: May 2001
Posts: 129
Thanks for following up - I really am scared of trying to install new software on my NAS - too much data to lose if I screw up.

Is there some configuration I need to do in HS other than set the IP address on the configuration page? I'd been playing with it, so I deleted the UPS3 instance I created and then recreated it - it came back up with the (correct) IP address I'd entered before and port 3493. It shows "tripplite is enabled" (I'm using an APC Back-UPS XS1300G) but the data is never updated. The "UPS3 Last Updated" keeps incrementing, and the time shown in "UPS3 Start Time" seems about right for when I started HS, but all the other fields are showing 0, and "UPS3 Status" shows Offline as of 5/21/1929 11:00:00 AM.

The EX4 is set as "Network UPS Master mode" which seems like the correct choice.

Any thoughts?

Thanks
Jim Madigan

Last edited by madigan; March 30th, 2015 at 10:03 PM. Reason: Additional Info
Reply With Quote
  #11  
Old March 31st, 2015, 05:58 PM
pcp pcp is online now
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,686
You should not need to change anything on the NAS. Do you get any error in the HS3 log (like connection issues which could be related to a firewall)?

Can you check "Debug" and "Log to HomeSeer" in the plugin configuration page and post (or email me) the HS3 log, at least the section where the plugin logs output when it is monitoring the NAS? It should list the variables, information or errors as it communicates with NUT on the NAS. Thanks
Reply With Quote
  #12  
Old April 1st, 2015, 02:32 PM
pcp pcp is online now
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,686
Thank you for performing the test and sending the logs. The issue is an error returned by NUT (I should post an error or warning to the HS3 log in an upcoming version)

PHP Code:
Mar-31 6:51:21 PM         APCUPSD (UPS3Debug    QueryStatusAndEvents NUT - VAR = ERR DRIVER-NOT-CONNECTED
Mar
-31 6:51:21 PM         APCUPSD (UPS3Debug    QueryStatusAndEvents NUT - VAR = 
Per section "15. Why do the client programs say Driver not connected when I try to run them?" from http://www.networkupstools.org/docs/...ry_to_run_them, it means something is not configured right on NUT.

Just to ensure I did not miss anything, could you perform another test enabling Debug and Verbose Debug in the plugin configuration (you can can enable / disable them while HS3 is running) to collect and post or email one of the HS3 log sections that starts with "--------------- refreshTimer START -----------------" and ends with "--------------- refreshTimer END -----------------". This will give me a little more insight. Thank you.

Do you have another NUT client connected (windows client on a PC for example) and does it communicate fine with it?
Reply With Quote
  #13  
Old April 1st, 2015, 04:44 PM
madigan's Avatar
madigan madigan is offline
Seer Deluxe
 
Join Date: May 2001
Posts: 129
I'm sending you the info you requested - let me know if you're unable to read it.

Thanks
Jim Madigan
Reply With Quote
  #14  
Old April 1st, 2015, 05:01 PM
pcp pcp is online now
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,686
Thank you for the additional information and logs. I will look more into it over the weekend but believe know what's going on. In your case multiple UPSes are defined on your NAS and the plugin is quering UPS details for one that is not configured leading to the error. NUT has a feature where one connection supports multiple UPS setups; I will update the plugin to let you pick the NUT UPS to monitor and that I believe should resolve the issue.
Reply With Quote
  #15  
Old April 5th, 2015, 06:01 PM
pcp pcp is online now
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,686
Could you try the attached version of the plugin (zip only contains executable) before I sent it to the updater?

It contains an additional setting on the UPS configuration tab to select the NUT UPS name. Not that if you switch from APCUPSD to NUT the whole configuration page refreshes to re-fetch the list of UPSes from NUT; I might optimize this at some point in the future.

Last edited by pcp; April 14th, 2015 at 10:40 AM. Reason: Version available via updater
Reply With Quote
  #16  
Old April 5th, 2015, 08:19 PM
madigan's Avatar
madigan madigan is offline
Seer Deluxe
 
Join Date: May 2001
Posts: 129
Seems to work, but with a little strangeness - I shut down HS, copied the file over, and restarted. I went into UPS3 and selected NUT and usbhid. The home screen showed USP3 as enabled, but it didn't start updating until after I started poking around in APCUPSD status and events - not sure what was happening (my status update interval is 1 minute, and my network monitoring interval is 3 minutes (?)), so I deleted UPS3 and recreated it - same thing. Maybe a function of how often the EX4 is updating?

Also, I guess I need to go in and manually delete the status events from the home page that NUT doesn't support. The plugin creates all events when a new instance is created, and then changing to NUT leaves the events that don't apply?

Thanks
Jim Madigan
Reply With Quote
  #17  
Old April 5th, 2015, 11:03 PM
pcp pcp is online now
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,686
Thanks for testing. I need to double check, but could be that the update was delayed until the next cycle update which might explain the delay.

I am not following what you mean by "..the status events" - which status events? Are you referring to HS3 devices, NUT events? Not sure. IF you refer to HS3 devices, different NUT UPS support different variables/states. For example the number of values returned by NUT from my NAS does not include some included in yours. I try to map them as much as possible to the choices available in ACPUPSD (but most likely a subset only).

Quote:
Originally Posted by madigan View Post
Seems to work, but with a little strangeness - I shut down HS, copied the file over, and restarted. I went into UPS3 and selected NUT and usbhid. The home screen showed USP3 as enabled, but it didn't start updating until after I started poking around in APCUPSD status and events - not sure what was happening (my status update interval is 1 minute, and my network monitoring interval is 3 minutes (?)), so I deleted UPS3 and recreated it - same thing. Maybe a function of how often the EX4 is updating?

Also, I guess I need to go in and manually delete the status events from the home page that NUT doesn't support. The plugin creates all events when a new instance is created, and then changing to NUT leaves the events that don't apply?

Thanks
Jim Madigan
Reply With Quote
  #18  
Old April 5th, 2015, 11:29 PM
madigan's Avatar
madigan madigan is offline
Seer Deluxe
 
Join Date: May 2001
Posts: 129
The following status events (Status column) from the NUT UPS don't look quite right as they are blank, but I don't know if that's because NUT doesn't support them, or if they haven't updated yet:

UPS3 Start Time
UPS3 Last Updated
UPS3 Status Flags
UPS3 Last on Battery
UPS3 Total Time on Battery

If they're not supported, I might as well delete them, I think.

Thanks
Jim Madigan
Attached Images
 
Reply With Quote
  #19  
Old April 6th, 2015, 08:34 AM
pcp pcp is online now
Super Seer
 
Join Date: Jan 2006
Location: MA
Posts: 1,686
Quote:
Originally Posted by madigan View Post
The following status events (Status column) from the NUT UPS don't look quite right as they are blank, but I don't know if that's because NUT doesn't support them, or if they haven't updated yet:

UPS3 Start Time
UPS3 Last Updated
UPS3 Status Flags
UPS3 Last on Battery
UPS3 Total Time on Battery

If they're not supported, I might as well delete them, I think.

Thanks
Jim Madigan
Status Flags is not updated when using NUT. Last on battery is updated when switching to battery and total time not yet but plan to eventually calculate it (since not provided by NUT). I check for Start Time and Last Updated but should be able to populate these.
Reply With Quote
  #20  
Old April 6th, 2015, 08:11 PM
madigan's Avatar
madigan madigan is offline
Seer Deluxe
 
Join Date: May 2001
Posts: 129
Looks like some other events aren't updating - here's a copy of what the EX4 sent me overnight via email regarding going on battery, and a screenshot of the current HS status.
Thanks
Jim Madigan
Attached Images
  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:17 PM.


Copyright HomeSeer Technologies, LLC