I had a power cut last night for approx an hour UPS went into OB mode as expected and ran on batteries for about 40 min, but shutdown command was not issued upon low battery. The reporting graph shows USB charging at 100% before pulling the plug and powering off everything ungracefully.
Power cut began at 01:55 and was fixed 02:53
NUT is configured with TrueNAS as master and OPNsense as guest plus a network switch that connects them all together.
Both TrueNAS and OPNsense PC’s BIOS’s are configured to turn back on upon power loss, but my expectation was both machines would stay off when a shutdown command is issued as its not a power loss event
I changed the shutdown mode to “UPS goes on battery” this morning and ran a test which worked correctly.
Is this a TrueNAS Scale bug, a UPS one, or am I interpreting things incorrectly?
This is probably a NUT configuration issue. By default, NUT sets the “low battery” level at 10%, which you can confirm by running upsc ups battery.charge.low.
root@truenas[~]# upsc ups battery.charge.low
Init SSL without certificate database
10
Is 10% too low?
I don’t understand why the UPS charging graph stays at 100% while draining the battery in OB mode. My expectation would be it would slowly reduce as the battery is drained triggering the shutdown command when it reaches 10%
Isn’t the charging graph where TrueNAS’s NUT service calculates when it reaches 10% or is that done in the UPS?
You have to customize the low level setting for your environment. The graph only reports what the NUT driver reports. This may be a NUT bug, but TrueNAS ships a very old version of NUT.
According to the NUT site, you may be able to switch this UPS to ModBus mode from the front panel and then switch to the apc_modbus driver instead of the usbhid-ups driver, which may give you better reporting. Note, the apc_modbus driver may need an APC network card in the UPS, as ModBus over USB is likely not supported in the version of NUT running on TrueNAS.
I can’t work it out. AI says shutdown is calculated from the UPS voltage yet the NUT graphs show a steady voltage all the time it was on batteries before dropping instantly to 0.
Going to leave it on “UPS goes on battery” since nothing else in my flat will have power for the 40-50min the UPS could have lasted, no Internet etc.
Just want to protect my TrueNAS server from power cuts with a graceful shutdown.
At least I have tested this mode and worked as expected.
Learn a bit more to understand how hard is to assess battery charge from voltage.
It’s very tricky as the battery can go up and down in available voltage and it can drop very quickly.
I would never let any battery go below 30%. Not only it damages certain battery chemistries, but it is to close to complete depletion, which could mean sudden shutoff.