Using NUT with Ipfire

I understand there is no WUI for the NUT addon.

I am having trouble monitoring my Cyberpower UPS. It is straight forward, USB A to B cable connects CyberPower → IPfire.

I installed NUT with pakfire, IPFire 2.27 (x86_64) - Core Update 161

The driver is working fine,
monitoring is not working

> 
# /usr/sbin/upsdrvctl start
Network UPS Tools - UPS driver controller 2.7.4
Network UPS Tools - Generic HID driver 0.41 (2.7.4)
USB communication driver 0.33
Duplicate driver instance detected! Terminating other driver!
Using subdriver: CyberPower HID 0.4
using 'battery.charge' to set battery low state
using 'battery.runtime' to set battery low state

> # /usr/bin/upsc cyberpower@localhost ups.status
Error: Connection failure: Connection refused

> # upsc upsuser@localhost
Error: Connection failure: Connection refused

I will post my config below
>
**ups.conf**


[cyberpower]

	driver = usbhid-ups
	port = auto
	desc = "Cyberpower" 	
	offdelay = 20
	ondelay = 0
	ignorelb
	override.battery.charge.low = 20
	override.battery.charge.warning = 40
        pollinterval = 15
	
>
**upsd.conf**

LISTEN 127.0.0.1 3493

>
**upsd.users**

[upsuser]
              password="pass###"
              actions = SET
             instcmd = ALL

>
**upsmon,conf**

MONITOR cyberpower 1 upsuser pass### master
MINSUPPLIES 1
SHUTDOWNCMD "/sbin/shutdown -h +0"
POLLFREQ 5
POLLFREQALERT 5
DEADTIME 15
POWERDOWNFLAG /etc/killpower

FWIW, I’m using the apcupsd addon with a CyberPower UPS. It works fine for me.

Thank you for your reply, I did try it, and was not working,

I guess I will give it another try,
Do I need to get rid of the NUT files before?

I can’t say about removing the NUT files – I’ve never installed it. Good luck

apcupsd addon is Not working for me

** Unable to communicate with the UPS on 127.0.0.1. **

apcupsd.conf

UPSTYPE usb
#DEVICE
UPSNAME Cyberpower
UPSCABLE usb
LOCKFILE /var/lock
UPSCLASS standalone
UPSMODE disable

Is it normal for WUI-Status-Services
to show NUT and APCUPSD to be “STOPPED” ?
If I click the green arrow, to start the service, nothing changes,
both will stay “STOPPED”

I found a typo in the apcupsd.conf
so its running but can’t read any data

/etc/init.d/apcupsd start

Starting apcupsd daemon… [ OK ]

Warning communications lost with UPS Cyberpower

|UPS Name: Cyberpower APCUPSD: Version 3.14.14 Status: COMM LOST|

WUI-IPfire-APC-UPS-status says

Last UPS Self Test: Not found
Last Test Date: Not found
Utility Voltage: Not found VAC
Line Minimum: Not found VAC
Line Maximum: Not found VAC
Output Freq: Not found Hz

Only one of them should be running at a time otherwise you will have two systems both trying to access the UPS at the same time.

If you are trying to evaluate apcupsd then I would uninstall nut. nut does a backup when being installed so if you re-install again leter then your conf file should be restored.

1 Like

Looking in my apcupsd.conf file I have DEVICE uncommented. The conf file says that for usb ups’s a blank DEVICE setting enables autodetection.

The rest of your conf settings look the same as mine (different ups but still usb based) and it is connected without issue.

1 Like

Thank you Adolf, will try that.

I uncommented and left it blank

DEVICE

restarted
/etc/init.d/apcupsd stop
Stopping apcupsd daemon…
/etc/init.d/apcupsd start

Warning communication lost with UPS Cyberpower

still says Communication lost

As a quick check if you run lsusb does the list of usb connections include your Cyberpower UPS? My APC UPS is shown when I do that.

Searching around I found another person having similar trouble as you. In the end he said that it was fixed after he fully switched off the UPS, including disconnecting it from the mains. Then when he started everything back up again his UPS usb connection was working again.

1 Like

Yes, Of course :wink: first thing I tried was
lsusb shows
Cyber Power System, Inc. PR1500LCDRT2U UPS

I will try shutting it off,and disconnecting completely when I get a chance one of the week-ends.

I just added the USB cable from my IPFire device to my existing Cyber Power CP1500PFCLCD. And here are the changes I made to apcupsd.conf:

[root@ipfire ~] # cat /etc/apcupsd/apcupsd.conf
...
UPSNAME Cyberpwr	# <- only 8 character allowed
UPSCABLE usb
UPSTYPE usb
#	leave DEVICE blank
DEVICE
...

These are the only changes I made to the default apcupsd.conf file. And it seems to work OK for me. I have not tested this yet (no test button and no test power down).

EDIT: Here is the screen I see in menu IPFire > APC-UPS status

I changed the apcupsd.conf to match yours and restarted ApcUpsd but it still says “Communications with UPS lost.”

Thank you for trying :slight_smile: