[Nut-upsuser] UPS shuts down after restart
Manuel Wolfshant
wolfy at nobugconsulting.ro
Tue Feb 18 08:26:51 GMT 2020
On 2/18/20 9:34 AM, Stefan Schulze wrote:
> Hi Roger, Hi all,
>
>> Does upsmon.conf specify a shutdown on LB?
> I think so. You mean SHUTDOWNCMD?
> The relevant parts of my upsmon.conf (notifications removed):
>
> MONITOR ups at localhost 1 upsmaster secret master
> MINSUPPLIES 1
> SHUTDOWNCMD "/sbin/shutdown -h +0"
> POLLFREQ 5
> POLLFREQALERT 2
> HOSTSYNC 15
> DEADTIME 40
> POWERDOWNFLAG /etc/killpower
> RBWARNTIME 43200
> NOCOMMWARNTIME 1800
> FINALDELAY 1
>
>> What happens if you let the battery power the system until LB is reached?
> It's the same :-(
>
>> How old is this battery?
> About half a year. But I already went into this issue some months before with the 2.7.4 Raspbian package but havn't found the time to fix it.
>
>>> 8. Seconds later the UPS reboots, killing the RasPi
>>> 9. UPS and RasPi are up and running again - "OL CHRG"
>>>
>>> The UPS is set to "offdelay=5" and no ondelay
>> What happens if you use the default values of offdelay=20 and ondelay=30
>> seconds, or longer?
> With defaults its the same.
>
>
> But I noticed two other details:
> 1. I was a bit wrong with step 7 and 8 - Looks like the UPS is "OL CHRG" (according to display) at first but goes to battery ("OL DISCHRG" according to nut) right when the RasPi (and nut) is booting.
> 2. When I pull the plug of the RasPi after UPS went down before main power comes back (so between step 5 and 6), the UPS comes up in state "OL CHRG" and is stable.
>
> Maybe nut is sending `upsdrvctl shutdown` right after boot again but without shutting down the system or sending an notification? Is there a way to check this reliably?
indeed if the battery is discharged and in the same time nut sees "OL
DISCHRG", nut might trigger a shutdown ( although, as far as I know,
this should happen only for "OB DISCHRG"). I'd like to understand _why_
does the DISCHRG flag appear when the UPS is actually online and
charging. this could be a firmware error ( the UPS sends incorrect data
) or nut incorrectly reading ( or interpreting ) the data it receives.
More information about the Nut-upsuser
mailing list