On 4/16/21 3:47 PM, Carlos E. R. wrote:
On Friday, 2021-04-16 at 22:22 +0200, Roger Price wrote:
On Fri, 16 Apr 2021, Carlos E. R. wrote:
El 2021-04-16 a las 21:29 +0200, Roger Price escribió:
On Fri, 16 Apr 2021, Carlos E. R. wrote:
Isengard:~ # upsc Salicru battery.charge: 100 battery.voltage: 13.60 battery.voltage.high: 13.00 battery.voltage.low: 10.40 battery.voltage.nominal: 12.0 ...
I don't see variable battery.charge.low which specifies the charge below which the LB (Low Battery) status is raised, signalling that the time has come to shutdown.
Does the command "upsrw Salicru" list the variable battery.charge.low ?
Isengard:~ # upsrw Salicru Isengard:~ # Nope...
If you are using the blazer_usb driver there is a workaround using extra arguments to the driver:
* default.battery.voltage.high = value
Maximum battery voltage that is reached after about 12 to 24 hours charging. If you want the driver to report a guesstimated battery.charge, you need to specify this (see BATTERY CHARGE).
Well, that voltage is the same for every battery of the same chemicals :-)
* default.battery.voltage.low = value
Minimum battery voltage just before the UPS automatically shuts down. If you want the driver to report a guesstimated battery.charge, you need to specify this (see BATTERY CHARGE).
I don't like the idea of stressing the battery to exhaustion in order to find out that value. Doesn't the hardware communicate the battery percent itself? It has an LCD display with a graph display of charge.
I have this:
Isengard:~ # upsc Salicru battery.charge: 100 battery.voltage: 13.60 battery.voltage.high: 13.00 battery.voltage.low: 10.40 battery.voltage.nominal: 12.0
Aren't those the values told by the UPS itself? It prints battery charge.
See man blazer_usb
"Salicru" is not even listed at https://networkupstools.org/stable-hcl.html
There is only a user report for the "SPS One 700VA":
https://networkupstools.org/ddl/Salicru/index.html
Anyway...
I changed the configuration a bit:
[salicru] driver = blazer_usb #port = /dev/usb/hiddev0 port = auto desc = "Salicru SPS SOHO+ 800VA" default.battery.voltage.high = 13.60 default.battery.voltage.low = 10.40
The utility reports the same values as before:
Isengard:/etc/ups # upsc Salicru battery.charge: 100 battery.voltage: 13.60 battery.voltage.high: 13.00 battery.voltage.low: 10.40 battery.voltage.nominal: 12.0 device.type: ups driver.name: blazer_usb
I switched off the mains for a few seconds:
sengard:/etc/ups # upsc Salicru battery.charge: 92 <============= battery.voltage: 12.80 battery.voltage.high: 13.00 battery.voltage.low: 10.40 battery.voltage.nominal: 12.0 device.type: ups driver.name: blazer_usb driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.parameter.synchronous: no driver.version: 2.7.4 driver.version.internal: 0.12 input.current.nominal: 3.0 input.frequency: 50.0 input.frequency.nominal: 50 input.voltage: 3.9 <=========== input.voltage.fault: 3.9 input.voltage.nominal: 230 output.voltage: 227.7 ups.beeper.status: enabled ups.delay.shutdown: 30 ups.delay.start: 180 ups.load: 6 ups.productid: 5161 ups.status: OB ups.temperature: 25.0 ups.type: offline / line interactive ups.vendorid: 0665 Isengard:/etc/ups #
And with mains back on:
Isengard:/etc/ups # upsc Salicru battery.charge: 100 battery.voltage: 13.60 battery.voltage.high: 13.00 battery.voltage.low: 10.40 battery.voltage.nominal: 12.0 device.type: ups driver.name: blazer_usb driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.parameter.synchronous: no driver.version: 2.7.4 driver.version.internal: 0.12 input.current.nominal: 3.0 input.frequency: 50.0 input.frequency.nominal: 50 input.voltage: 228.9 input.voltage.fault: 228.9 input.voltage.nominal: 230 output.voltage: 228.9 ups.beeper.status: enabled ups.delay.shutdown: 30 ups.delay.start: 180 ups.load: 7 ups.productid: 5161 ups.status: OL ups.temperature: 25.0 ups.type: offline / line interactive ups.vendorid: 0665 Isengard:/etc/ups #
-- Cheers, Carlos E. R. (from openSUSE 15.2 x86_64 at Telcontar)
The battery.charge.low is just the percentage of battery you want remaining when the shutdown is initiated. Usually it defaults to 10 (10% remaining). You do want to ensure you have it set, either by hook, crook or hack, e.g. # upsc phoinix_ups battery.charge: 100 battery.charge.low: 10 battery.charge.warning: 20 battery.mfr.date: CPS battery.runtime: 1710 battery.runtime.low: 300 battery.type: PbAcid battery.voltage: 24.0 battery.voltage.nominal: 24 device.mfr: CPS device.model: CP1350PFCLCD device.serial: 000000000000 device.type: ups driver.name: usbhid-ups driver.parameter.pollfreq: 30 driver.parameter.pollinterval: 2 driver.parameter.port: /dev/hiddev0 driver.parameter.synchronous: no driver.version: 2.7.4 driver.version.data: CyberPower HID 0.4 driver.version.internal: 0.41 input.transfer.high: 139 input.transfer.low: 88 input.voltage: 125.0 input.voltage.nominal: 120 output.voltage: 141.0 ups.beeper.status: enabled ups.delay.shutdown: 20 ups.delay.start: 30 ups.load: 22 ups.mfr: CPS ups.model: CP1350PFCLCD ups.productid: 0501 ups.realpower.nominal: 810 ups.serial: 000000000000 ups.status: OL ups.test.result: No test initiated ups.timer.shutdown: -60 ups.timer.start: -60 ups.vendorid: 0764 Nut never got around to dividing the battery.voltage by 2 for this 2-12V battery UPS. -- David C. Rankin, J.D.,P.E.