Connecting UPS service on Scale

I am using an APS Backups 650 to power my Truenas Computer.

I would like to use UPS service but can’t find any directions for setting it up.

I have a USB type B port on the UPS. Do I just connect it to a USB port on the computer with a standard USB A to B cable?

How do I enable the service on TN Scale?

You can enable the ups service in the truenas gui under system settings → services.
Connect the ups to your nas via usb, go to the shell and use nut-scanner -U to see which drvier your ups expects. Enable the service as discribed, choose any usb driver that matches the one your ups needs .
The Shutdown Command should be :
/sbin/shutdown -P

Edit: I’ve used this guide to set up my ups: How to Set Up TrueNAS as a NUT Server in 2024 - WunderTech

2 Likes

Hello Lars, all

I too followed your instructions and that guide, and found

root@truenas[~]# nut-scanner -U        
Scanning USB bus.
[nutdev1]
        driver = "usbhid-ups"
        port = "auto"
        vendorid = "051D"
        productid = "0002"
        product = "Back-UPS ES 550G FW:870.O3 .I USB FW:O3"
        serial = "5B1422T09119"
        vendor = "APC"
        bus = "001"

However, once I had configured it, I issue

root@truenas[~]# upsc ups@localhost

but I get told

init SSL without certificate database
Error: Driver not connected

My specific UPS (APC Back-UPS ES550) matches the bus scan above and it uses the usbhid-ups driver which matches half a dozen models listed in the UPS driver, so I am a bit stuck.

I disconnected and reconnected the cable to prove that USB bus scanning and detection is working properly.

I could work through all of the models which match that driver but, as we know, the article says it shouldn’t matter as long as the driver matches.

Do you know what else I can try please?

Which identifier did you give your ups? if it’s not “ups”, then upsc ups@localhost will return the above error. If you’ve given your ups a different identifier the command should be upsc “identifier”@localhost.

I called it “ups” - I checked to see if I had inadvertently entered a whitespace - I hadn’t.

Hang on a minute: I’ve just noticed something … brb

Yes - I just spotted the error as I pasted the screenshot!

Sorry - red herring - it is working:

root@truenas[~]# upsc ups@localhost
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: not set
battery.mfr.date: 2014/05/30
battery.runtime: 3435
battery.runtime.low: 120
battery.type: PbAc
battery.voltage: 13.6
battery.voltage.nominal: 12.0
device.mfr: APC
device.model: Back-UPS ES 550G
device.serial: 5B1422T09119  
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: auto
driver.version: 2.8.0
driver.version.data: APC HID 0.98
driver.version.internal: 0.47
driver.version.usb: libusb-1.0.26 (API: 0x1000109)
input.sensitivity: medium
input.transfer.high: 266
input.transfer.low: 180
input.voltage: 246.0
input.voltage.nominal: 230
ups.beeper.status: enabled
ups.delay.shutdown: 20
ups.firmware: 870.O3 .I
ups.firmware.aux: O3 
ups.load: 1
ups.mfr: APC
ups.mfr.date: 2014/05/30
ups.model: Back-UPS ES 550G
ups.productid: 0002
ups.serial: 5B1422T09119  
ups.status: OL
ups.timer.reboot: 0
ups.timer.shutdown: -1
ups.vendorid: 051d
root@truenas[~]#

All OK now - thanks @LarsR !

From your screenshot it seems that you have the wrong driver selected. You have selected apcsmart not upshid-ups

Hi,
I struggle to receive data from my NUT Server. Unfortunately in the menu I cant see the possibility to select a driver, but this is what Scale is complained about.


From the Shell I am able to connect to the NUT Server.

How can I fix this?

Driver selection is only available when the ups is master afaik, not slave.
And try to change the Identifier to ups, all lower case letters. For me it wasn’t working when the identifier was anything else but “ups” all lower cases.

also with lower case letters the system shows me the same error message when I try to save the config.

EDIT:
I changed the Mode to master, changed the Identifier to ups in lower case letters, selected a driver even if the UPS is not directly connected to the NAS and hit save. The changes have been saved to the config and after that I changed back to slave mode. Now I was able to save the config without a error message.

But still in the report tab for the UPS no values are recorded.