Solved Problems with APC configuration via apcupsd

I am using APC Smart-UPS 1000 with AP9630 network card. The server and Smart-UPS 1000 are connected to the same network, in which UPS has the address 192.168.88.20. I just want the UPS to notify my server if there is a power outage so that the server shuts down correctly.

The server and UPS are not directly connected by any cable (USB, Serial, etc.), only via the network via a router.

Here are the contents of my /usr/local/etc/apcupsd/apcupsd.conf file:
Code:
UPSNAME myapc
UPSCABLE smart
UPSTYPE net
DEVICE 192.168.88.20:80

And then:
Code:
# apcaccess status
APC      : 001,021,0530
DATE     : 2024-05-24 13:35:57
HOSTNAME : myserver
VERSION  : 3.14.14 (31 May 2016) freebsd
UPSNAME  : Not found
CABLE    : Ethernet Link
DRIVER   : NETWORK UPS Driver
UPSMODE  : Not found
STARTTIME: 2024-05-24 13:34:39
SHARE    : ShareUPS
MASTERUPD: 2024-05-24 13:35:57
MASTER   : 192.168.88.20:80
STATUS   : SLAVE
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000400
END APC  : 2024-05-24 13:36:31

First of all, I can’t even understand whether the server can communicate with the UPS via the network using the APC AP9630 network card and be turned off in the event of an accident? Or is some kind of cable, for example USB, required between the server and APC?

If they can communicate, what's wrong with my configuration? I just replaced a few lines in the configuration file according to the sample.

Also, I used pcnet with my credentials but no luck:
Code:
UPSTYPE pcnet
DEVICE 192.168.88.20:mylogin:mypassword
 
I've not done anything with a network card, but first thing I would do is set up a pcap on the server and trigger a power out on the UPS and see if server receives anything.
A quick look at my conf file (I usually copy apcupsd.conf.sample then edit) I think UPSCABLE may want to be "ether".
Have you tried pointing a browser at 192.168.88.20 port 80?
 
  • Thanks
Reactions: dnb
Right now my settings are:

Code:
UPSNAME apc
UPSCABLE ether
UPSTYPE pcnet
DEVICE 192.168.88.20:mylogin:mypassword

Now I think that the UPSTYPE should be PCNET, because in this case I can at least specify the logs and password with which I log in through the web interface of the AP9630 network card.
 
For those who, like me, will be puzzling over how to connect the UPS via the network only, without cables.

There are required steps in the APC web interface (both steps are required):
  1. Configuration -> Shutdown. Set "User name" to any name (apc, for example). Then set "Authentication Phrase" (> 15 symbols, numbers and letters in my case). Enable HTTP and HTTPS protocols.
  2. Configuration -> PowerChute Clients. Set IP of server running apcupsd.
apcupsd config:
Code:
UPSNAME myapc
UPSCABLE ether
UPSTYPE pcnet
DEVICE 192.168.88.2:apc:[Authentication Phrase that was specified in the APC web interface]

The rest of the settings can be left as default. My mistake was that I did not complete step 1. And so I thought that in DEVICE I could simply specify the APC Web Interface Administrator credentials.
 
  • Like
Reactions: mer
Back
Top