apcupsd connection problem

zkab

New Member
Joined
Dec 23, 2023
Messages
8
Reaction score
0
Credits
81
I have Fedora 41 workstation with apcupsd installed.
One the same LAN I have a APCUPS 750i with a network card AP9640.
I can't get my APCUPS to connect properly to workstation/apcupsd.
When I start apcupsd it looks fine but after some minutes connection is lost.
192.168.1.21 is ip of the network card AP9640.
Appreciate help.
Here is my output:

Code:
╰─➤  cat apcupsd.conf
## apcupsd.conf v1.1 ##

UPSNAME Raivo
UPSCABLE ether
UPSTYPE pcnet
DEVICE 192.168.1.21:apc:xxxxxx
LOCKFILE /var/lock
SCRIPTDIR /etc/apcupsd
PWRFAILDIR /etc/apcupsd
NOLOGINDIR /etc
ONBATTERYDELAY 6
BATTERYLEVEL 5
MINUTES 3
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 0.0.0.0
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSCLASS standalone
UPSMODE disable
STATTIME 0
STATFILE /var/log/apcupsd.status
LOGSTATS off
DATATIME 0

╰─➤  sudo systemctl stop apcupsd.service; sudo systemctl start apcupsd.service; sudo systemctl status apcupsd.service
● apcupsd.service - APC UPS Power Control Daemon for Linux
     Loaded: loaded (/usr/lib/systemd/system/apcupsd.service; enabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf, 50-keep-warm.conf
     Active: active (running) since Sun 2024-12-15 13:42:24 CET; 32ms ago
 Invocation: 5319e301d5114d83893747836d547e04
    Process: 42895 ExecStartPre=/bin/rm -f /etc/apcupsd/powerfail (code=exited, status=0/SUCCESS)
   Main PID: 42897 (apcupsd)
      Tasks: 3 (limit: 76099)
     Memory: 532K (peak: 1.3M)
        CPU: 8ms
     CGroup: /system.slice/apcupsd.service
             └─42897 /sbin/apcupsd -b -f /etc/apcupsd/apcupsd.conf

Dec 15 13:42:24 asus-nuc systemd[1]: Starting apcupsd.service - APC UPS Power Control Daemon for Linux...
Dec 15 13:42:24 asus-nuc systemd[1]: Started apcupsd.service - APC UPS Power Control Daemon for Linux.
Dec 15 13:42:24 asus-nuc apcupsd[42897]: apcupsd 3.14.14 (31 May 2016) redhat startup succeeded
Dec 15 13:42:24 asus-nuc apcupsd[42897]: NIS server startup succeeded

╰─➤  apcaccess
APC      : 001,018,0437
DATE     : 2024-12-15 13:43:06 +0100  
HOSTNAME : asus-nuc
VERSION  : 3.14.14 (31 May 2016) redhat
UPSNAME  : Raivo
CABLE    : Ethernet Link
DRIVER   : PCNET UPS Driver
UPSMODE  : Stand Alone
STARTTIME: 2024-12-15 13:42:24 +0100  
STATUS   : 
MBATTCHG : 5 Percent
MINTIMEL : 3 Minutes
MAXTIME  : 0 Seconds
NUMXFERS : 0
TONBATT  : 0 Seconds
CUMONBATT: 0 Seconds
XOFFBATT : N/A
STATFLAG : 0x05000000
END APC  : 2024-12-15 13:43:06 +0100  

─➤  sudo systemctl status apcupsd.service  
● apcupsd.service - APC UPS Power Control Daemon for Linux
     Loaded: loaded (/usr/lib/systemd/system/apcupsd.service; enabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf, 50-keep-warm.conf
     Active: active (running) since Sun 2024-12-15 13:42:24 CET; 1min 22s ago
 Invocation: 5319e301d5114d83893747836d547e04
    Process: 42895 ExecStartPre=/bin/rm -f /etc/apcupsd/powerfail (code=exited, status=0/SUCCESS)
   Main PID: 42897 (apcupsd)
      Tasks: 7 (limit: 76099)
     Memory: 3.9M (peak: 4.9M)
        CPU: 25ms
     CGroup: /system.slice/apcupsd.service
             ├─42897 /sbin/apcupsd -b -f /etc/apcupsd/apcupsd.conf
             ├─42986 /usr/bin/sh /etc/apcupsd/apccontrol commfailure Raivo 1 1
             ├─42987 /usr/bin/sh /etc/apcupsd/commfailure Raivo 1 1
             ├─42990 /bin/mail -s "asus-nuc Communications with UPS Raivo lost" root
             └─42992 sendmail -i -- root

Dec 15 13:42:24 asus-nuc systemd[1]: Starting apcupsd.service - APC UPS Power Control Daemon for Linux...
Dec 15 13:42:24 asus-nuc systemd[1]: Started apcupsd.service - APC UPS Power Control Daemon for Linux.
Dec 15 13:42:24 asus-nuc apcupsd[42897]: apcupsd 3.14.14 (31 May 2016) redhat startup succeeded
Dec 15 13:42:24 asus-nuc apcupsd[42897]: NIS server startup succeeded
Dec 15 13:43:19 asus-nuc apcupsd[42897]: Communications with UPS lost.
Dec 15 13:43:19 asus-nuc sendmail[42992]: My unqualified host name (asus-nuc) unknown; sleeping for retry
 


the apcups is not the most simple setup out there. I wrote a small program (it is not finished so ignore errors) but it will help with basic UPS configuration. it looks like you have the stuff you need installed. try this program and it may help finalize or finish the set up. http://www.arctic-penguin.com/Software.aspx
download the configurator program. If you need help with it or the ups just respond here and I will jump in again.
 
Thanks for your answer ... what I really want is to understand how to configure apcupsd and not just run a program that will configure it for me.
Can you tell me what is wrong with my configuration and why loose connection with UPS after a couple of minutes?
PS.
I solved the error msg: My unqualified host name (asus-nuc) unknown; sleeping for retry
 
Thanks for your answer ... what I really want is to understand how to configure apcupsd and not just run a program that will configure it for me.
Can you tell me what is wrong with my configuration and why loose connection with UPS after a couple of minutes?
PS.
I solved the error msg: My unqualified host name (asus-nuc) unknown; sleeping for retry
when I wrote the program to do the configurations I wrote it so I would no longer have to play in config files. So the knowledge of just looking at it is gone. I made the program so I would not have to. There is no guaranty that the program will fix your issue. I read the help screens and played a little to make the program work. You would notice that hovering over a setting will give you the system help information. That is how I did it. If you want to make it work, try the program, if you want to understand why it worked then you have to do that on your own. Or use the program and see the differences which can clue you in also.
 
also, if you do use the program please use the update option first thing so that we make sure you have latest version that is mostly working.
 



Top