APC UPS with USB connection

I have an older APC ups with only the USB connection. I have connected it to the PC I am running HA on. I tried to add the integration Network UPS tools and I get the connection page. Where do I go from here? What would the login/passwod be?

Thanks for any help

Assuming you are running HAOS, Install the NUT addon.

Set it up to connect to your UPS.

Then install the NUT integration.

2 Likes

I know this is a bit of a old post. But I am totally brand new to home assistant. But I am interested to see if it could possibly connect directly to my older APC UPSā€™s via USB. I have just installed home assistant on a old x86 laptop. Seems to be running ok. Scanned and picked up my google devices, ill add my sonoff devices later if I can get some more integration going with my UPSā€™s and also my solar charge controller.
Without adding more integration than what I currently have availble with ewelink and google assistant(s) I need to factor in the power cost of running another device and if it is really worthwhile.
Back to the APC UPS - I might be mistaken - But does homeassistant want to connect to the UPS service that is running on another device? I know if I plug it into a windows machine - load up the software - it creates a webservice. I dont want to add extra devices in. If I plug the UPS in directly to the laptop running homeassistant - I was getting a array of errors on a loop. Are there drivers or something that needs to be installed? I really am a bit clueless.
The other device that I really really want to get integrated - is my epsolar tracer charge controller. There are plenty of free projects out there online how to talk to the controller with python, but how would I connect that onto this headless OS? Is there a way in the homeassistant webview to bring up a console? Is there a GUI on there that I dont know about? Even if I got code running on the homeassistant machine - how would I make it interface with the front end?

Any pointers that you guys have will be really appreciated! I dont mind reading up about how to integrate. But I just feel like I dont even know where to start at all.
FYI - I have no problem figuring out some code - I have worked in DOS my whole life im not scared of commands or writing a script.
Thanks again.

How have you got Home Assitant installed on the Laptop?

As a bare metal HAOS install or something else?

That is off topic here. Please start a new topic for that.

Hi Tom
Thanks for replying.

ā€œBaremetalā€ as in installed directly on the machine yes.
So the machine has direct access to the ports.

I used the method described by Tom on my HA installation. Home Assistant OS directly on a small stationary I5 PC. I was lucky to find the special USB cable to the ASP UPS (bought many years ago, on its second battery now) and the rest was as the descripton says.

1 Like

What is the APC UPS model number?

Hi guys.
Sorry been so busy with work. Cant wait till next week so I can have a few days to chill a bit.
@tom_l I have two APC SmartUPS 1000 upsā€™s. (Old machines but in perfect working order.)

I have just plugged the one in so long with the USB cable. (once it is up it would be amazing to get both running but one step at a time.)
Since my message yesterday I have done a couple of min of googling and scratching and it seems to make a bit more sense now how it fits together.

I have managed to install Network UPS Tools now. And the service/addon is started. But I think the next piece I am missing is the configuration syntax.

I think this is why I am not getting further. This is the default (except for my username and password.)

Log file is full of errors.

Thanks again for replying. Appreciate it.

Look on the compliance plate of your UPS and find the exact model number. Search for it here

Which driver does it suggest?

Hi Tom
Thanks for replying.
I am using the correct driver according to the link. Thank you for that.
I had a power out to my laptop earlier and interestingly enough I saw that there is some form of comms with the UPS. Although it shortly goes into that failed loop again. Ill paste the log into here. You will see the UPS is sending a shutdown message and that is correct - I use these as inverters with solar panels. So to the APC the battery runtime is finished regardless of battery voltage.

Here is the log
[15:40:19] INFO: Starting the UPS monitor and shutdown controllerā€¦
kill: No such process
0.000000 Using power down flag file /etc/killpower
0.001101 UPS: myups@localhost (primary) (power value 1)
0.001894 [D1] debug level is ā€˜1ā€™
0.002699 [D1] debug level is ā€˜1ā€™
0.003504 Warning: running as one big root process by request (upsmon -p)
0.004355 [D1] Saving PID 3689 into /run/nut/upsmon.pid
Init SSL without certificate database
0.009367 [D1] Trying to connect to UPS [myups@localhost]
474.827194 User [email protected] logged into UPS [myups]
0.012556 [D1] Logged into UPS myups@localhost
0.014703 [D1] Critical UPS: myups@localhost
0.015729 [D1] Shutting down any UPSes in PRIMARY modeā€¦
474.832369 Client [email protected] set FSD on UPS [myups]
0.017664 [D1] This system is a primaryā€¦ waiting for secondaries to logoutā€¦
0.018658 Executing automatic power-fail shutdown
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
s6-svscanctl: fatal: unable to control /var/run/s6/services: No such file or directory
5.040848 Unable to call shutdown command: s6-svscanctl -t /var/run/s6/services
Network UPS Tools upsmon 2.8.0
[15:40:24] INFO: upsmon stopped, restartingā€¦
[15:40:25] INFO: Starting the UPS monitor and shutdown controllerā€¦
kill: No such process
0.000000 Using power down flag file /etc/killpower
0.001030 UPS: myups@localhost (primary) (power value 1)
0.001774 [D1] debug level is ā€˜1ā€™
0.002541 [D1] debug level is ā€˜1ā€™
0.003252 Warning: running as one big root process by request (upsmon -p)
0.003916 [D1] Saving PID 3732 into /run/nut/upsmon.pid
Init SSL without certificate database
0.008794 [D1] Trying to connect to UPS [myups@localhost]
481.103288 User [email protected] logged into UPS [myups]
0.012008 [D1] Logged into UPS myups@localhost
0.014046 [D1] Critical UPS: myups@localhost
0.015037 [D1] Shutting down any UPSes in PRIMARY modeā€¦
481.108260 Client [email protected] set FSD on UPS [myups]
0.016829 [D1] This system is a primaryā€¦ waiting for secondaries to logoutā€¦
0.017763 Executing automatic power-fail shutdown
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
Network UPS Tools upsmon 2.8.0
s6-svscanctl: fatal: unable to control /var/run/s6/services: No such file or directory
5.036644 Unable to call shutdown command: s6-svscanctl -t /var/run/s6/services
[15:40:30] INFO: upsmon stopped, restartingā€¦
[15:40:31] INFO: Starting the UPS monitor and shutdown controllerā€¦
kill: No such process
0.000000 Using power down flag file /etc/killpower
0.001019 UPS: myups@localhost (primary) (power value 1)
0.001701 [D1] debug level is ā€˜1ā€™
0.002487 [D1] debug level is ā€˜1ā€™
0.003171 Warning: running as one big root process by request (upsmon -p)
0.003860 [D1] Saving PID 3775 into /run/nut/upsmon.pid
Init SSL without certificate database
0.008779 [D1] Trying to connect to UPS [myups@localhost]
487.378558 User [email protected] logged into UPS [myups]
0.012084 [D1] Logged into UPS myups@localhost
0.014135 [D1] Critical UPS: myups@localhost
0.015120 [D1] Shutting down any UPSes in PRIMARY modeā€¦
487.383499 Client [email protected] set FSD on UPS [myups]
0.016777 [D1] This system is a primaryā€¦ waiting for secondaries to logoutā€¦
0.017654 Executing automatic power-fail shutdown
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
491.951962 Data for UPS [myups] is stale - check driver
s6-svscanctl: fatal: unable to control /var/run/s6/services: No such file or directory
5.036681 Unable to call shutdown command: s6-svscanctl -t /var/run/s6/services
Network UPS Tools upsmon 2.8.0
[15:40:36] INFO: upsmon stopped, restartingā€¦
[15:40:37] INFO: Starting the UPS monitor and shutdown controllerā€¦
kill: No such process
0.000000 Using power down flag file /etc/killpower
0.000864 UPS: myups@localhost (primary) (power value 1)
0.001476 [D1] debug level is ā€˜1ā€™
0.002220 [D1] debug level is ā€˜1ā€™
0.002852 Warning: running as one big root process by request (upsmon -p)
0.004134 [D1] Saving PID 3819 into /run/nut/upsmon.pid
Init SSL without certificate database
0.009361 [D1] Trying to connect to UPS [myups@localhost]
493.709049 User [email protected] logged into UPS [myups]
0.012520 [D1] Logged into UPS myups@localhost
0.013626 Poll UPS [myups@localhost] failed - Data stale
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
5.015131 Poll UPS [myups@localhost] failed - Data stale
{ā€œmessageā€:ā€œEvent nut.ups_event fired.ā€}Network UPS Tools upsmon 2.8.0
10.016010 Poll UPS [myups@localhost] failed - Data stale
15.016454 Poll UPS [myups@localhost] failed - Data stale
20.016910 Poll UPS [myups@localhost] failed - Data stale
25.017324 Poll UPS [myups@localhost] failed - Data stale
30.017746 Poll UPS [myups@localhost] failed - Data stale
35.018159 Poll UPS [myups@localhost] failed - Data stale
40.018586 Poll UPS [myups@localhost] failed - Data stale
45.019027 Poll UPS [myups@localhost] failed - Data stale

So maybe the setup is ā€œalmostā€ correct.
But when I try and load the NUT integration, it cant connect past this stage.

Tried the IP address / apcadmin - mypassword # all as default # My homeassist login name and password.
Couldnt get any of those to connect.

Are there other credentials I have missed maybe?

Not that I know of.

So you are using the UPS as an inverter? :face_with_raised_eyebrow:

Yup. Been using two of them as inverters for the past 3 years. Fitted a fan in each one. These boys still have transformers so they get a bit warm under load.
They connect to a shared battery bank (4x100ah batteries at 24v)
Have two battery balancers keeping them balanced.

Solar panels on roof going into a epsolar 40amp charge controller.
I use the charge controller load control to flick a relay which turns my utility power off. So when the batteries are fully charged - i.e. in the day - load control turns on - switches off the power.
As soon as the sun goes - or the load exceeds the sun output and it dips into battery power then the load control turns off and I am back onto utility.
Im in south africa so keeping batteries pretty full is essential - we have alot of loadshedding.
Because the UPS are sine wave they very happily run my slow cooker,fridge, washing machine, all my house lights, fans, computers, tv, internet.
Just need to balance the loads between the two. It does about 800watts per unit.
Thats where a bit of manual automation helps I currently use sonoff smart switches to do washing - then cook food - put fans on etc.
So far the tinkering I have done in homeassistant I can see that I am definitely in.
Even without integration to the UPSā€™s there is still alot in here that google/ewelink cant offer.

BUT! If I can get talking to the UPSā€™s then I can probably have some custom scripts - ill be able to see when the load is high - the washing machine is probably running - then it can keep the slow cooker off for instance.
Likewise when I connect to my charge controller oneday ill be able to get a live view of my power generation and ill be able to utilize more of the incoming sun than I currently do.
Oneday I will get a proper inverter. Integration will then be much easier. But I have much more important needs on the cards currently. So far I have spent very little money on this as I already had the UPSā€™s.
So ya. Just going to keep it going for the meantime.

p.s. dont worry I do have fuses and breakers at every possible point along the way with distribution boards too. Even though my setup looks dodgy it is very safe lol

Just FYI to everyone that is trying to install the NUT Integration in host field use: a0d7b954-nut and for the user and password fields, the user and password used in NUT Add-on configuration.

1 Like

Thanks for this, I was trying with localhost and the IP of my server without success for hours.