How can I get APC UPS battery % into Hub

NUT is another new to me package. I have no idea how to verify the UPS' compatibility.

A quick search does not look too promising...

https://networkupstools.org/ddl/APC/index.html

The model etched into the case says it's an XS1000, sticker on bottom says it's a BX1000G. Neither are listed but the Smart-UPS 1000 is listed. I can only find out by trying.

Here is another site that might be useful. Seems like older APC ups’s are supported, but I am not sure what integrations are possible.

http://www.apcupsd.org

1 Like

if you have a smart ups (expensive model) which i do with a optional network card it has telnet access.

i have recently used telnet to write a sendmail program..
I will be coding something using telnet to log into the ups and get status and optionally check runtime and then hopefully parse it and shutdown if below a value
ie

Schneider Electric Network Management Card AOS v6.8.2
(c) Copyright 2019 All Rights Reserved Smart-UPS & Matrix-UPS APP v6.8.0

Name : netups Date : 09/11/2020
Contact : Unknown Time : 14:19:51
Location : Unknown User : Administrator
Up Time : 101 Days 16 Hours 21 Minutes Stat : P+ N+ A+

IPv4 : Enabled IPv6 : Disabled
Ping Response : Enabled

HTTP : Enabled HTTPS : Enabled
FTP : Enabled Telnet : Enabled
SSH/SCP : Disabled SNMPv1 : Disabled
SNMPv3 : Disabled

Super User : Enabled RADIUS : Disabled
Administrator : 4 Enabled Device User : 1 Enabled
Read-Only User : 1 Enabled Network-Only User : Disabled

Type ? for command listing
Use tcpip command for IP address(-i), subnet(-s), and gateway(-g)

apc>detstatus -rt
E000: Success
Runtime Remaining: 2 hr 19 min 0 sec

also use this command to check if on battery

apc>detstatus -ss
E000: Success
Status of UPS: Online - Green Mode
Last Transfer: UPS battery test
Input Status: Acceptable
Next Battery Replacement Date: 07/26/2070

It may have been 'expensive' in 2007 when I purchased it, but it certainly is not smart for 2020. Still going strong after a battery replacement.

1 Like

If you have a Rpi and want a guide on how to get NUT setup and working with HE, check this thread out. Down near the end I linked the guide I used and a few posts later filled in missing pieces for me. I have it notify me when the power source has changed and do a saving shutdown for HE. I also use it to detect when the TV is in use.

2 Likes

Apcupsd on a rapsberry pi, and this if you want it in hubitat [RELEASE] APC UPS Monitor Driver

I have edited the apcupsd script (it’s Perl) so they when there is a power-on event it does something. I documented that here hubitat/SmarterBulbs at master · bdwilson/hubitat · GitHub

1 Like

FWIW I have been using NUT server for over 10 years on two Qnap NAS. I have never found a UPS it couldn’t connect to whether APC or Cyber Power.

3 Likes

My new Eaton 1500 UPS has no problems with the NUT UPS function built into my Synology NAS, and there is a device driver for NUT here in the forums that works great.

Here's my shutdown rule, copied from the driver thread:

Thank you everyone for all of the interesting, creative, and diverse solutions. I have a lot of reading to do. I am attempting to do this on a very small $$ budget, so the Qnap NAS or any NAS is ruled out.

The only remaining bit of my puzzle is the power % issue, the other stuff is working. When and if I get the UPS' power %, it likely will alter my solution. My UPS is good for 287 minutes, and I do a graceful shutdown at 180 minutes. This may or my not work in the real world, and I prefer getting it 100% right.

My current power solution

  • An older not-smart UPS backup for Cable Modem, Router, and HE hub

  • A Ring Zwave Gen2 extender running with a modified version of bcopelands driver that resets the extender device's power status at HE hub initialization.

  • An RM shown at the end of this, notifying me after a 5 minute outage

  • An old mains powered Samsung phone used as a dashboard, no sim chip, with it's own battery backup (not on UPS), with three MacroDroid macros that at this time do not communicate with the HE hub or any other devices. They are:

    • Power off (Screen is shut off to preserve battery, then turned on when power is restored)
    • Power on
    • Reboot Power on (in case the phone's battery gives up)
    • The Power on macros send an email for outages > 5 minutes to my Verizon phone's SMS via email using an email to address of
      my-cell-number@vtext.com
      including the date and time power was restored, and the outage duration in days hh:mm:ss
  • A TP-Link Kasa Wifi plug between the UPS plug and the HE Hub, allows for hub reboot in case the hub must be power cycled to restart after a graceful shutdown. This occurs when the hub is gracefully shutdown, but the UPS does not lose backup power, and subsequently power is restored. In all other cases: hub does not get shutdown, Ups loses backup power, this is not needed.

  • I'm going to add a RM rule that notifies me when the hub initializes.

My RM shutdown rule


image

1 Like

here is the device type i promised to get an apc smart ups with netword card status, so you can gracefully shutdown.

So true! Spending more time and effort on this than I want or expected. Too many changes, hardware adjustments, software packages, software changes, power restored reboot issues, etc, etc. Note no RPi here, attempted this with an older W10 laptop, apcupsd, and a ups to USB connector cable. Unable to dedicate laptop 100% plugged in to UPS for power.

Although a bit pricey, the easiest and most sensible solution for me, when I'm ready to do it, is replacing my older dumb APC UPS with an "APC SmartConnect UPS" using @kahn-hubitat's driver. The SMC1000C is currently $299 on Amazon

you still need the buy the network card for that.. Check the smartups driver thread i have posted some cheap links or ideas to get an smt1500 used on ebay.

An APC sales rep I spoke with yesterday (Sep 14) stated the models ending with a "C" have the wifi card built in.

cool didnt know that..

im probably just going to use the 1500 i have currently at our cottage that i have my qnap on as i will also put the cable modem and router on the same ups. I have a 9631 net card from amazon used coming today to put in.

also be aware the smc models have less run capacity than the smt even at the same rating

ie smc1500 != smt1500
ie
compare APC Smart-UPS Runtime Chart | APCGuard.com
and APC Smart-UPS Entry Level Runtime Chart | APCGuard.com
for your smc1000

3 hrs vs 1 hr

SMT models definitely out perform the SMC versions.
https://www.apc.com/shop/us/en/tools/compare-products/y2k41/SMT1500C|SMC1500C

FWIW I now have this working with my dumb UPS and my Windows 10 laptop. only issue is I am still unable to send notifications such as onbattery, offbattery, but get an update every 10 (user adjustable) minutes.

You must have a method to run a PHP script. I've run a WAMP server for years for my website development and testing, so that helped. Should you get beyond that hurdle, the remainder or the info is at the following:

1 Like

Updating this thread with my solution
Modified the APC UPS Monitor Driver to work with some VBS scripts I wrote that interface with the apcupsd app.

Shutdown is event driven when the apcupsd app issues a "doshutdown" event. Big plus no PHP server required, and little or no modification to apcupsd scripts.

2 Likes