Open ITPotatoo opened 1 year ago
For upsrw
you need to pass the user name and password, as defined in your upsd.conf
(see docs/examples if nothing is defined yet; check OS permissions on the file as insecure ones ought to be ignored) as an account with a SET
permission.
Generally, though, you might have to set such value in ups.conf
as an override.battery.charge.low
And note there is currently an open discussion whether this works as it should (at least as far as propagating the value into the device, for UPSes that do not remember settings after power cycling) => #1993
Here my configuration of upsd
upsd.conf
LISTEN 0.0.0.0 3493
upsd.users
[admin]
password = secret
instcmds = all
actions = SET
when i use the command : upsrw -s battery.charge.low=40 Legrand@192.168.1.10
Username (root) : admin Password : secret Unexpected response from upsd: ERR VAR-NOT-SUPPORTED is there anything wrong ?
Unexpected response from upsd: ERR VAR-NOT-SUPPORTED
Seems right regarding credentials (and since it no longer complains about access denied - OS permissions on the file are also ok)
So the remaining bit is that this var for this subdriver is not defined, possibly the device does not handle it, or the driver authors were not aware of protocol bits to request/query the value (if they exist).
At least it is not in the mapping https://github.com/networkupstools/nut/blob/v2.8.0/drivers/nutdrv_qx_megatec.c
A few subdrivers do have this mapping, and it is very different among them.
I think there were some discussions over time, recently too, that an "LB" state could be raised by the drivers generally (or by upsmon
configured per host in other proposals) - based on available battery.charge
or battery.runtime
readings and respective (override.|default.)*.low
settings. But I do not quickly see anything in current codebase to that effect, so probably a PR is welcome.
Alternatives per discussion could be to take a look at upssched
and handling scripts you write that it would call, if it can do something in this regard (especially to ensure different charges/runtimes remaining to shut down different hosts based on their priority to you).
I didnt get it, what i can try or configure to solve it ? im sorry, im new to this NUT solution :)
As a quick approach, I'd suggest investigating (googling) if upssched
makes something like this possible, to work around UPSes/drivers that do not have a built-in way to report a low-power situation by customized settings.
I am a bit surprised to not see a built-in solution based on those measurements after the decades that NUT is out there, so maybe I'm missing or forgetting something (and/or spoiled by experience with more capable devices/drivers which did not need workarounds), but it seems that currently it is not there, or too well hidden :)
I'll ask if the mailing list users have fresher experience with that.
Hello i want to know how i can change the shutdown battery charge level, so my nut client linux host shutdown when for exemple the battery level fall to 40% i tried with upsrw command in a client nut server :
i got this error message
here the information of my UPS :
Please can you help, i don't find the solution in the internet
MAINTAINER NOTE: Slightly edited with markdown for readability