[Release] SmartUPS VBS Version

Kindly post an image of your UPS device page.

When I run the smartups.vbs or trigger eventghost refresh

My apcupsd tray status

corresponding section in the driver

image

It looks like you don't have a NOMPOWER value in APC so the parse is getting tripped up on it. Try just commenting out line 259 (put double slashes at the beginning of the line '//').

1 Like

I agree with @FriedCheese2006, the NOMPOWER element is not in the Debug input message. Line 259 should be commented out on your system, then try again. There is a status element value of "" so hopefully it will work.

commenting that line previously caused a cascade of errors further in.

I commented out line 259 and 275 and it appears to be much better.

image

image

Now if I can just keep the UPS USB from going offline. I think I found an advanced power setting and disabled USB selective power.

image

I am still getting one error.

Just turn off debug logging :laughing:. It looks like the error is just because the last message does not have the VBReferer field set. Looks cosmetic to me. I get the same error if I have debug logging enabled.

2 Likes

Although it does not seem to be throwing an error, I would comment out lines 294 and 295 becuase they post fields that do not exist on your system.

sendEvent(name: nomPower, value: nomPower, displayed: this.currentNomPower != nomPower ? true : false)

sendEvent(name: power, value: power, displayed: this.currentPower != power ? true : false)

1 Like

In the last month I received two notifications about the UPS being offline. Pulling and replugging the UPS' cable at the Windows computer end fixed it, but I have no idea why the error occurred.

Obviously if this occurs even once a day, it is a major issue.

Try using a different USB port.

Thanks. Been through all that (ports/USB2.0/3.0/3.1 etc.) , drivers, etc.) hoping this latest option setting solves it.

Changed Github as follows

  1. Updated EventGhost link in Readme.md to point to the Github repository
  2. Updated SmartUPS.groovy commented out lines that updated the Device Network Id, now lines 180-185

Did not update version or HPM info. No reason to update your version of SmartUPS.groovy with a Repair when the DNI code was previously commented out.

Note: This version DOES NOT incorporate changes recently noted in this thread when field NOMPOWER is missing.

2 Likes

FYI, UPS USB hasn't dropped since that windows change 6 days ago.

Just haven't had time to work on any integration or testing. A coworker got RIF'd and I got stuck with a couple more projects and 2 of them are technical hot garbage (SAN fabrics).

1 Like

Just wondering, was Step 11 in the Readme.md implemented?

11. Adjust Windows Power Settings

  • On Power and Batteries change "Put Computer to Sleep" to Never Unless you can figure out a way to wake the machine as needed

It's never been set for anything other than never in any modes. While it's a win10 "desktop," it's very much a home server, runs media, I remote into it, it runs my UBNT controller, VBox with an ES cookie server on Ubuntu, etc.

I've little doubt the windows USB power setting was the culprit for the UPS comms losss.

I struggled for a long time trying to get the EventGhost webserver to respond to commands from Hubitat but eventually got it to work, so I thought I'd mention it here for other noobies who have the same problem:

EventGhost should have permission to bypass the firewall: Start Menu -> Search “Firewall” -> Allow an app or feature through Windows Firewall -> "change settings" button -> check the entry for "EventGhost". If it doesn't exist, click 'Allow another app' -> browse to "eventghost.exe" in your "Program Files (x86)" folder -> Open

1 Like