Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-11-01 Thread Robert Stocker
Okay, good to know. I don't think I need to go "the hard way" on this one.
Thanks so much for all your help. Next I just need to get my *other* RPi
set up as a client so it shuts down, too. But I think I have a leg up on
things now.

On Sat, Oct 31, 2020 at 11:37 AM Charles Lepple  wrote:

> On Oct 31, 2020, at 8:42 AM, Robert Stocker  wrote:
> >
> > I successfully changed my UPS name and after a reboot, things seems to
> be well on their way. Do I need to worry about this line in the upsc
> results:
> >
> > Init SSL without certificate database
>
> https://askubuntu.com/questions/468632/nut-ups-and-ssl-certificates
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-31 Thread Gene Heskett
On Saturday 31 October 2020 11:55:54 Charles Lepple wrote:

> On Oct 30, 2020, at 12:22 AM, Gene Heskett  
wrote:
> > On Thursday 29 October 2020 22:12:00 Charles Lepple wrote:
> >> On Oct 28, 2020, at 9:56 PM, Gene Heskett  
wrote:
> >>> Which looks very incomplete to me.  OTOH, its not a very big UPS
> >>> but neither is the pi.  I have tested that, and it shuts off long
> >>> before it outouts a LB signal.
> >>
> >> Which part looks incomplete, the variables or the commands?
> >
> > Commands Charles.  Since the pi is a very low drain bit of kit, I
> > expected to be able to lengthen the shutdown delay, to at least use
> > 50% of the battery, which should be several hours but its stuck at 2
> > minutes. Unreal, but it is what it is.
>
> This is going to sound a bit picky, but to map what you're describing
> to what is implemented in NUT, "lengthen the shutdown delay" (with a
> driver that works 100% as expected with that UPS) you'd want to change
> a R/W variable, which is separate from the list of instant commands.
>
> (There is another "shutdown delay" - the time between when NUT signals
> the UPS to turn off, and when the relay actually goes "clunk". That
> would be "ups.delay.shutdown", but from the context, it sounds like
> you are concerned about lengthening the time between when the power
> fails and when the UPS says "the battery is low". A USB HID UPS
> typically measures it the other way: the battery is low (LB flag is
> set) when either:
>
> * the charge is below a certain percentage (battery.charge.low)
>
> * or the runtime is below a certain number of seconds
> (battery.runtime.low) - though for a CyberPower UPS, you generally
> have to round up any time-related values to the next larger multiple
> of 60 seconds.
>
> (Of course, those are both estimates, but ideally, after a battery
> test, those estimates are close to reality.)
>
> So if the UPS is setting the "LB" flag too early for your needs, you
> have a few options. As long as the UPS isn't turning off on its own
> (that is, NUT is telling it to turn off), and the reported charge or
> runtime values are reliable, you can tell NUT to use its own
> thresholds for shutdown:
I can't recall if I've ever seen a LB in my playing. I think I'd remember 
it if I did.

> "ignorelb" under UPS Fields:
> https://networkupstools.org/docs/man/ups.conf.html#_ups_fields

I'll chase this down when I get a chance to. Because I have a standby in 
the back yard, outages longer than its start time are no-ops.

> >> Even the larger UPSes tend to return a lot of read-only values, and
> >> only provide a few knobs for shutdown-related settings.
> >
> > So I note running those cmds on this 1500wa APC under this desk.
> > Disappointing...
>
> The APC protocol situation is a different rant entirely...

Which I think has already been discussed as hopeless. It doesn't even 
report the 5 second resets at the substation switch. But it works, I'm 
only aware of those by my big (MFC-J6920DW) brother printer rebooting 
itself if the room lights are off.

> > Take care now.
>
> You, too!

Thanks Charles.  Stay safe.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 

___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-31 Thread Charles Lepple
On Oct 30, 2020, at 12:22 AM, Gene Heskett  wrote:
> 
> On Thursday 29 October 2020 22:12:00 Charles Lepple wrote:
> 
>> On Oct 28, 2020, at 9:56 PM, Gene Heskett  wrote:
>>> Which looks very incomplete to me.  OTOH, its not a very big UPS but
>>> neither is the pi.  I have tested that, and it shuts off long before
>>> it outouts a LB signal.
>> 
>> Which part looks incomplete, the variables or the commands?
> 
> Commands Charles.  Since the pi is a very low drain bit of kit, I 
> expected to be able to lengthen the shutdown delay, to at least use 50% 
> of the battery, which should be several hours but its stuck at 2 
> minutes. Unreal, but it is what it is.

This is going to sound a bit picky, but to map what you're describing to what 
is implemented in NUT, "lengthen the shutdown delay" (with a driver that works 
100% as expected with that UPS) you'd want to change a R/W variable, which is 
separate from the list of instant commands.

(There is another "shutdown delay" - the time between when NUT signals the UPS 
to turn off, and when the relay actually goes "clunk". That would be 
"ups.delay.shutdown", but from the context, it sounds like you are concerned 
about lengthening the time between when the power fails and when the UPS says 
"the battery is low". A USB HID UPS typically measures it the other way: the 
battery is low (LB flag is set) when either:

* the charge is below a certain percentage (battery.charge.low)

* or the runtime is below a certain number of seconds (battery.runtime.low) - 
though for a CyberPower UPS, you generally have to round up any time-related 
values to the next larger multiple of 60 seconds.

(Of course, those are both estimates, but ideally, after a battery test, those 
estimates are close to reality.)

So if the UPS is setting the "LB" flag too early for your needs, you have a few 
options. As long as the UPS isn't turning off on its own (that is, NUT is 
telling it to turn off), and the reported charge or runtime values are 
reliable, you can tell NUT to use its own thresholds for shutdown:

"ignorelb" under UPS Fields: 
https://networkupstools.org/docs/man/ups.conf.html#_ups_fields

> 
>> Even the larger UPSes tend to return a lot of read-only values, and
>> only provide a few knobs for shutdown-related settings.
> 
> So I note running those cmds on this 1500wa APC under this desk. 
> Disappointing...

The APC protocol situation is a different rant entirely...

> Take care now.

You, too!

> Cheers, Gene Heskett
> -- 
> "There are four boxes to be used in defense of liberty:
> soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> If we desire respect for the law, we must first make the law respectable.
> - Louis D. Brandeis
> Genes Web page 
> 
> ___
> Nut-upsuser mailing list
> Nut-upsuser@alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser


___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-31 Thread Charles Lepple
On Oct 31, 2020, at 8:42 AM, Robert Stocker  wrote:
> 
> I successfully changed my UPS name and after a reboot, things seems to be 
> well on their way. Do I need to worry about this line in the upsc results:
> 
> Init SSL without certificate database

https://askubuntu.com/questions/468632/nut-ups-and-ssl-certificates
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-31 Thread Robert Stocker
I successfully changed my UPS name and after a reboot, things seems to be
well on their way. Do I need to worry about this line in the upsc results:

Init SSL without certificate database

On Thu, Oct 29, 2020, 10:15 PM Charles Lepple  wrote:

> On Oct 29, 2020, at 2:44 PM, Robert Stocker  wrote:
> >
> > Sorry for the delay. Here are my outputs, but first a quick question: am
> I right in thinking I can change the name of my ups simply by editing
> ups.conf? That script I ran from the Pi forum used that name, and I don't
> care for it. Thanks again for your help.
> >
> Yes, ups.conf, plus the other locations that refer to it (upsmon.conf, and
> any scripts). You'll want to restart the systemd services, too.
>
> Thanks for posting the variables and commands.
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-29 Thread Gene Heskett
On Thursday 29 October 2020 22:12:00 Charles Lepple wrote:

> On Oct 28, 2020, at 9:56 PM, Gene Heskett  wrote:
> > Which looks very incomplete to me.  OTOH, its not a very big UPS but
> > neither is the pi.  I have tested that, and it shuts off long before
> > it outouts a LB signal.
>
> Which part looks incomplete, the variables or the commands?

Commands Charles.  Since the pi is a very low drain bit of kit, I 
expected to be able to lengthen the shutdown delay, to at least use 50% 
of the battery, which should be several hours but its stuck at 2 
minutes. Unreal, but it is what it is.

> Even the larger UPSes tend to return a lot of read-only values, and
> only provide a few knobs for shutdown-related settings.

So I note running those cmds on this 1500wa APC under this desk. 
Disappointing...

Take care now.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 

___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-29 Thread Charles Lepple
On Oct 29, 2020, at 2:44 PM, Robert Stocker  wrote:
> 
> Sorry for the delay. Here are my outputs, but first a quick question: am I 
> right in thinking I can change the name of my ups simply by editing ups.conf? 
> That script I ran from the Pi forum used that name, and I don't care for it. 
> Thanks again for your help.
> 
Yes, ups.conf, plus the other locations that refer to it (upsmon.conf, and any 
scripts). You'll want to restart the systemd services, too.

Thanks for posting the variables and commands.
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-29 Thread Charles Lepple
On Oct 28, 2020, at 9:56 PM, Gene Heskett  wrote:
> 
> Which looks very incomplete to me.  OTOH, its not a very big UPS but 
> neither is the pi.  I have tested that, and it shuts off long before it 
> outouts a LB signal.

Which part looks incomplete, the variables or the commands?

Even the larger UPSes tend to return a lot of read-only values, and only 
provide a few knobs for shutdown-related settings.
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-29 Thread Robert Stocker
Sorry for the delay. Here are my outputs, but first a quick question: am I
right in thinking I can change the name of my ups simply by editing
ups.conf? That script I ran from the Pi forum used that name, and I don't
care for it. Thanks again for your help.

$ upsrw pbx

[battery.charge.low]
Remaining battery level when UPS switches to LB (percent)
Type: STRING
Maximum length: 10
Value: 10

[battery.runtime.low]
Remaining battery runtime when UPS switches to LB (seconds)
Type: STRING
Maximum length: 10
Value: 300

[ups.delay.shutdown]
Interval to wait after shutdown with delay command (seconds)
Type: STRING
Maximum length: 10
Value: 20

[ups.delay.start]
Interval to wait before (re)starting the load (seconds)
Type: STRING
Maximum length: 10
Value: 30

$ upscmd -l pbx

Instant commands supported on UPS [pbx]:

beeper.disable - Disable the UPS beeper
beeper.enable - Enable the UPS beeper
beeper.mute - Temporarily mute the UPS beeper
beeper.off - Obsolete (use beeper.disable or beeper.mute)
beeper.on - Obsolete (use beeper.enable)
load.off - Turn off the load immediately
load.off.delay - Turn off the load with a delay (seconds)
load.on - Turn on the load immediately
load.on.delay - Turn on the load with a delay (seconds)
shutdown.return - Turn off the load and return when power is back
shutdown.stayoff - Turn off the load and remain off
shutdown.stop - Stop a shutdown in progress
test.battery.start.deep - Start a deep battery test
test.battery.start.quick - Start a quick battery test
test.battery.stop - Stop the battery test

On Wed, Oct 28, 2020 at 9:40 PM Charles Lepple  wrote:

> On Oct 27, 2020, at 2:45 PM, Robert Stocker  wrote:
> >
> > Thanks so much for all the help! It looks like at present I've at least
> got a working configuration that I need to test and fine-tune, am I
> interpreting this correctly?
>
> Yes. If you're good with the default NUT behavior of shutting down when
> the UPS signals LB (low battery; per upsc, seems to be at 10% charge or 300
> seconds left, whichever comes first), it's just a matter of testing the
> shutdown command, and any power sequencing (including any auto power-on
> settings on the motherboard) issues on the way back up.
>
> If not, there are ways to either adjust the UPS low power thresholds, or
> ignore them completely. Roger Price has a good enumeration of alternate
> shutdown strategies in his Configuration Examples document linked here:
> http://rogerprice.org/NUT/
>
> As I just mentioned in my reply to Gene, it would be handy to have the
> output of "upsrw" and "upscmd -l" for your UPS. Those commands show the
> read/write variables and instant commands that the NUT driver detects,
> respectively.
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-28 Thread Gene Heskett
On Wednesday 28 October 2020 21:32:02 Charles Lepple wrote:

> On Oct 26, 2020, at 9:38 AM, Gene Heskett  wrote:
> >>> battery.voltage: 24.0
> >>> battery.voltage.nominal: 24
> >>
> >> I don't have the citation handy, but I think another user reported
> >> that the battery.voltage returned by the UPS is a constant 24.0 V,
> >> regardless of the actual battery voltage.
>
> [...]
>
> > I think it may be dependent on thhe ups. I have a 625 WA cyberpower
> > on an rpi4, and I believe its more truthfull. Is this helpfull?
>
> You're right, the lack of a battery voltage sensor isn't true for all
> CPS hardware.
>
> I was trying to make the point that the 24.0 V reading is suspect,
> while covering the cases where broken scaling means that NUT displays
> it as 16.0 V.
>
> However, back in January, we discussed the input.transfer.high/.low
> issue:
> https://alioth-lists.debian.net/pipermail/nut-upsuser/2020-January/011
>668.html
>
> The root cause of that is closer to some of the other CPS issues, like
> the "output.voltage: 137.0" that Robert posted.
>
> That upsc dump is useful. For completeness, could you (and Robert)
> please post the output of "upsrw myups"

pi@rpi4:/media/pi/workspace $ upsrw myups
[battery.charge.low]
Remaining battery level when UPS switches to LB (percent)
Type: STRING
Maximum length: 10
Value: 10

[battery.runtime.low]
Remaining battery runtime when UPS switches to LB (seconds)
Type: STRING
Maximum length: 10
Value: 300

[input.transfer.high]
High voltage transfer point (V)
Type: STRING
Maximum length: 10
Value: 0

[input.transfer.low]
Low voltage transfer point (V)
Type: STRING
Maximum length: 10
Value: 0

[ups.delay.shutdown]
Interval to wait after shutdown with delay command (seconds)
Type: STRING
Maximum length: 10
Value: 120

[ups.delay.start]
Interval to wait before (re)starting the load (seconds)
Type: STRING
Maximum length: 10
Value: 0

> and "upscmd -l myups"? 

pi@rpi4:/media/pi/workspace $ upscmd -l myups
Instant commands supported on UPS [myups]:

beeper.disable - Disable the UPS beeper
beeper.enable - Enable the UPS beeper
beeper.mute - Temporarily mute the UPS beeper
beeper.off - Obsolete (use beeper.disable or beeper.mute)
beeper.on - Obsolete (use beeper.enable)
load.off - Turn off the load immediately
load.off.delay - Turn off the load with a delay (seconds)
load.on - Turn on the load immediately
load.on.delay - Turn on the load with a delay (seconds)
shutdown.return - Turn off the load and return when power is back
shutdown.stayoff - Turn off the load and remain off
shutdown.stop - Stop a shutdown in progress
test.battery.start.deep - Start a deep battery test
test.battery.start.quick - Start a quick battery test
test.battery.stop - Stop the battery test

Which looks very incomplete to me.  OTOH, its not a very big UPS but 
neither is the pi.  I have tested that, and it shuts off long before it 
outouts a LB signal.

But as the old saw says, its not my job to blow the whistle. I'm just 
happy that it protects the pi while the Generac is being started.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 

___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-28 Thread Charles Lepple
On Oct 27, 2020, at 2:45 PM, Robert Stocker  wrote:
> 
> Thanks so much for all the help! It looks like at present I've at least got a 
> working configuration that I need to test and fine-tune, am I interpreting 
> this correctly?

Yes. If you're good with the default NUT behavior of shutting down when the UPS 
signals LB (low battery; per upsc, seems to be at 10% charge or 300 seconds 
left, whichever comes first), it's just a matter of testing the shutdown 
command, and any power sequencing (including any auto power-on settings on the 
motherboard) issues on the way back up.

If not, there are ways to either adjust the UPS low power thresholds, or ignore 
them completely. Roger Price has a good enumeration of alternate shutdown 
strategies in his Configuration Examples document linked here: 
http://rogerprice.org/NUT/

As I just mentioned in my reply to Gene, it would be handy to have the output 
of "upsrw" and "upscmd -l" for your UPS. Those commands show the read/write 
variables and instant commands that the NUT driver detects, respectively.
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-28 Thread Charles Lepple
On Oct 26, 2020, at 9:38 AM, Gene Heskett  wrote:
> 
>>> battery.voltage: 24.0
>>> battery.voltage.nominal: 24
>> 
>> I don't have the citation handy, but I think another user reported
>> that the battery.voltage returned by the UPS is a constant 24.0 V,
>> regardless of the actual battery voltage.
[...]
> I think it may be dependent on thhe ups. I have a 625 WA cyberpower on an 
> rpi4, and I believe its more truthfull. Is this helpfull?
> 
You're right, the lack of a battery voltage sensor isn't true for all CPS 
hardware.

I was trying to make the point that the 24.0 V reading is suspect, while 
covering the cases where broken scaling means that NUT displays it as 16.0 V.

However, back in January, we discussed the input.transfer.high/.low issue: 
https://alioth-lists.debian.net/pipermail/nut-upsuser/2020-January/011668.html

The root cause of that is closer to some of the other CPS issues, like the 
"output.voltage: 137.0" that Robert posted.

That upsc dump is useful. For completeness, could you (and Robert) please post 
the output of "upsrw myups" and "upscmd -l myups"?

I manually grep through upsc output to find these sorts of things, but some 
day, I'd like the DDL[*] to be able to show a table of UPS models and their 
supported NUT variables. (Something like a hardware comparison on a vendor 
website, but from the perspective of what NUT can read.)

[*] e.g. https://networkupstools.org/ddl/Cyber_Power_Systems/
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-27 Thread Robert Stocker
Thanks so much for all the help! It looks like at present I've at least got
a working configuration that I need to test and fine-tune, am I
interpreting this correctly?

On Mon, Oct 26, 2020 at 9:47 AM Charles Lepple  wrote:

> On Oct 26, 2020, at 9:01 AM, I wrote:
> >
> >> battery.voltage.nominal: 24
> >
> > I don't have the citation handy, but I think another user reported that
> the battery.voltage returned by the UPS is a constant 24.0 V, regardless of
> the actual battery voltage.
>
> Here's what I was thinking of:
>
>
> https://github.com/networkupstools/nut-ddl/blob/8995562a0253e980d36f6bdddfe09c9f2c866657/Cyber_Power_Systems/Cyber_Power_Systems__CP1500PFCLCD__usbhid-ups__2.7.1__01.dev#L11-L13
>
> "CyberPower states that battery voltage is not supported in this model of
> UPS. [CP1500PFCLCD; circa 2014]
> It's not even shown in their 'PowerPanel' software."
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-26 Thread Gene Heskett
On Monday 26 October 2020 09:01:31 Charles Lepple wrote:

> On Oct 25, 2020, at 11:52 AM, Robert Stocker  
wrote:
> > Init SSL without certificate database
> > battery.charge: 100
> > battery.charge.low: 10
> > battery.charge.warning: 20
> > battery.mfr.date: CPS
> > battery.runtime: 15690
> > battery.runtime.low: 300
> > battery.type: PbAcid
> > battery.voltage: 24.0
> > battery.voltage.nominal: 24
>
> I don't have the citation handy, but I think another user reported
> that the battery.voltage returned by the UPS is a constant 24.0 V,
> regardless of the actual battery voltage.
>
> > device.mfr: CPS
> > device.model: CST135XLU
> > device.serial: CR7EO2003120
> > device.type: ups
> > driver.name: usbhid-ups
> > driver.parameter.pollfreq: 30
> > driver.parameter.pollinterval: 5
> > driver.parameter.port: auto
> > driver.parameter.synchronous: no
> > driver.version: 2.7.4
> > driver.version.data: CyberPower HID 0.4
> > driver.version.internal: 0.41
> > input.voltage: 121.0
> > input.voltage.nominal: 120
> > output.voltage: 137.0
>
> Given the description on the product page you sent earlier, the UPS is
> likely not providing 137.0 V, but is bypassing the transformer since
> the power is good.
>
> https://www.cyberpowersystems.com/product/ups/battery-backup/cst135xlu
>/
>
> This is another known CyberPower issue, and fixing it properly
> requires making some changes deep in the core USB HID code (that would
> require a lot of testing on other vendors' equipment) for what is
> basically a cosmetic issue:
>
> https://github.com/networkupstools/nut/issues/439
>
> > ups.beeper.status: disabled
> > ups.delay.shutdown: 20
> > ups.delay.start: 30
>
> For these delays, note there seems to be an issue with
> ondelay/ups.delay.start:
>
> https://github.com/networkupstools/nut/issues/625
>
> and rounding of the timers down to the next lower minute:
>
> https://github.com/networkupstools/nut/blob/f3a40e4595c1f18368f89b9af3
>38bfe52dd06846/docs/man/usbhid-ups.txt#L53-L78
>
> so basically I'd recommend testing shutdown extensively.
>
> > ups.load: 4
> > ups.mfr: CPS
> > ups.model: CST135XLU
> > ups.productid: 0501
> > ups.realpower.nominal: 810
> > ups.serial: CR7EO2003120
> > ups.status: OL
> > ups.test.result: No test initiated
> > ups.timer.shutdown: -60
> > ups.timer.start: -60
> > ups.vendorid: 0764
> >
> > If you run systemctl, you should see something like this:
> >
> > And here's what I got from that:
> >
> >  nut-driver.service   loaded active running   Network UPS Tools
> > - power device driver controller nut-monitor.service   loaded
> > active running   Network UPS Tools - power device monitor and
> > shutdown controller nut-server.service   loaded active running  
> > Network UPS Tools - power devices information server
>
I think it may be dependent on thhe ups. I have a 625 WA cyberpower on an 
rpi4, and I believe its more truthfull. Is this helpfull?

pi@rpi4:/media/pi/workspace $ upsc myups
Init SSL without certificate database
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 20
battery.mfr.date: CPS
battery.runtime: 4410
battery.runtime.low: 300
battery.type: PbAcid
battery.voltage: 14.5
battery.voltage.nominal: 12
device.mfr: CPS
device.model: CP625HGa
device.type: ups
driver.name: usbhid-ups
driver.parameter.offdelay: 120
driver.parameter.ondelay: 0
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: CyberPower HID 0.4
driver.version.internal: 0.41
input.transfer.high: 0
input.transfer.low: 0
input.voltage: 124.0
input.voltage.nominal: 120
output.voltage: 124.0
ups.beeper.status: enabled
ups.delay.shutdown: 120
ups.delay.start: 0
ups.load: 8
ups.mfr: CPS
ups.model: CP625HGa
ups.productid: 0501
ups.realpower.nominal: 375
ups.status: OL
ups.test.result: No test initiated
ups.timer.shutdown: -60
ups.timer.start: 0
ups.vendorid: 0764

It has to hold up the pi, but only long enough for the 20kw nat gas fired 
generac outside the back garage door to start, nominally 5 seconds 
according to its -wall broadcasts. It shuts down if unplugged in only a 
couple minutes, but will not accept a longer timeout. It does do the job 
I bought it to do. The pi's draw and the interface card is about 13 or 
14 WA.
> ___
> Nut-upsuser mailing list
> Nut-upsuser@alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis
Genes Web page 

___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-26 Thread Charles Lepple
On Oct 26, 2020, at 9:01 AM, I wrote:
> 
>> battery.voltage.nominal: 24
> 
> I don't have the citation handy, but I think another user reported that the 
> battery.voltage returned by the UPS is a constant 24.0 V, regardless of the 
> actual battery voltage.

Here's what I was thinking of:

https://github.com/networkupstools/nut-ddl/blob/8995562a0253e980d36f6bdddfe09c9f2c866657/Cyber_Power_Systems/Cyber_Power_Systems__CP1500PFCLCD__usbhid-ups__2.7.1__01.dev#L11-L13

"CyberPower states that battery voltage is not supported in this model of UPS. 
[CP1500PFCLCD; circa 2014]
It's not even shown in their 'PowerPanel' software."
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-26 Thread Charles Lepple
On Oct 26, 2020, at 9:01 AM, I wrote:
> 
>> battery.voltage: 24.0
>> battery.voltage.nominal: 24
> 
> I don't have the citation handy, but I think another user reported that the 
> battery.voltage returned by the UPS is a constant 24.0 V

*another user reported that CyberPower support said the voltage returned is a 
constant 24.0 V.
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-26 Thread Charles Lepple
On Oct 25, 2020, at 11:52 AM, Robert Stocker  wrote:
> 
> Init SSL without certificate database
> battery.charge: 100
> battery.charge.low: 10
> battery.charge.warning: 20
> battery.mfr.date: CPS
> battery.runtime: 15690
> battery.runtime.low: 300
> battery.type: PbAcid
> battery.voltage: 24.0
> battery.voltage.nominal: 24

I don't have the citation handy, but I think another user reported that the 
battery.voltage returned by the UPS is a constant 24.0 V, regardless of the 
actual battery voltage.

> device.mfr: CPS
> device.model: CST135XLU
> device.serial: CR7EO2003120
> device.type: ups
> driver.name: usbhid-ups
> driver.parameter.pollfreq: 30
> driver.parameter.pollinterval: 5
> driver.parameter.port: auto
> driver.parameter.synchronous: no
> driver.version: 2.7.4
> driver.version.data: CyberPower HID 0.4
> driver.version.internal: 0.41
> input.voltage: 121.0
> input.voltage.nominal: 120
> output.voltage: 137.0

Given the description on the product page you sent earlier, the UPS is likely 
not providing 137.0 V, but is bypassing the transformer since the power is good.

https://www.cyberpowersystems.com/product/ups/battery-backup/cst135xlu/

This is another known CyberPower issue, and fixing it properly requires making 
some changes deep in the core USB HID code (that would require a lot of testing 
on other vendors' equipment) for what is basically a cosmetic issue:

https://github.com/networkupstools/nut/issues/439

> ups.beeper.status: disabled
> ups.delay.shutdown: 20
> ups.delay.start: 30

For these delays, note there seems to be an issue with ondelay/ups.delay.start:

https://github.com/networkupstools/nut/issues/625

and rounding of the timers down to the next lower minute:

https://github.com/networkupstools/nut/blob/f3a40e4595c1f18368f89b9af338bfe52dd06846/docs/man/usbhid-ups.txt#L53-L78

so basically I'd recommend testing shutdown extensively.

> ups.load: 4
> ups.mfr: CPS
> ups.model: CST135XLU
> ups.productid: 0501
> ups.realpower.nominal: 810
> ups.serial: CR7EO2003120
> ups.status: OL
> ups.test.result: No test initiated
> ups.timer.shutdown: -60
> ups.timer.start: -60
> ups.vendorid: 0764
>  
> If you run systemctl, you should see something like this:
> 
> And here's what I got from that:
> 
>  nut-driver.service   loaded active running   Network UPS Tools - power 
> device driver controller   
>  nut-monitor.service   loaded active running   Network UPS Tools - power 
> device monitor and shutdown controller 
>  nut-server.service   loaded active running   Network UPS Tools - power 
> devices information server 
> 


___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-25 Thread Robert Stocker
This was very helpful for me, thank you!

On Sat, Oct 24, 2020 at 9:06 AM Charles Lepple  wrote:

> The easiest way to tell if upsd is working is to run "upsc -l" on the same
> system, which will list the NUT UPS names, and then run e.g. "upsc mge"
> (replacing "mge" with the name returned by "upsc -l")
>
Here was the output I got from the second command:

Init SSL without certificate database
battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 20
battery.mfr.date: CPS
battery.runtime: 15690
battery.runtime.low: 300
battery.type: PbAcid
battery.voltage: 24.0
battery.voltage.nominal: 24
device.mfr: CPS
device.model: CST135XLU
device.serial: CR7EO2003120
device.type: ups
driver.name: usbhid-ups
driver.parameter.pollfreq: 30
driver.parameter.pollinterval: 5
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.data: CyberPower HID 0.4
driver.version.internal: 0.41
input.voltage: 121.0
input.voltage.nominal: 120
output.voltage: 137.0
ups.beeper.status: disabled
ups.delay.shutdown: 20
ups.delay.start: 30
ups.load: 4
ups.mfr: CPS
ups.model: CST135XLU
ups.productid: 0501
ups.realpower.nominal: 810
ups.serial: CR7EO2003120
ups.status: OL
ups.test.result: No test initiated
ups.timer.shutdown: -60
ups.timer.start: -60
ups.vendorid: 0764


> If you run systemctl, you should see something like this:
>

And here's what I got from that:

 nut-driver.service   loaded active running   Network UPS Tools - power
device driver controller
 nut-monitor.service   loaded active running   Network UPS Tools -
power device monitor and shutdown controller
 nut-server.service   loaded active running   Network UPS Tools - power
devices information server
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-24 Thread Charles Lepple
On Oct 23, 2020, at 11:06 AM, Robert Stocker  wrote:
> 
> Thanks again for your patience. I'm still learning how to deal with systemctl 
> myself (and starting from, I'm sure, a much lower level of understanding), so 
> if I've neglected to restart or start something, please let me know.
> 
> I made the change to /etc/nut/upsd.conf.
> I restarted upsdrvctl, which reported back:
> Network UPS Tools - UPS driver controller 2.7.4
> Network UPS Tools - Generic HID driver 0.41 (2.7.4)
> USB communication driver 0.33
> Using subdriver: CyberPower HID 0.4
> 
> /root/ups-info still returns
> Unable to retrieve UPS information

I can't speak to the ups-info script (I might have missed where that came from 
- wasn't in the zip file from the RPi forum thread), but there are three basic 
components needed for NUT monitoring and shutdown:

* the driver (which it looks like upsdrvctl is starting)
* the network server (upsd; probably not running?)
* the monitoring and shutdown client (upsmon)

The easiest way to tell if upsd is working is to run "upsc -l" on the same 
system, which will list the NUT UPS names, and then run e.g. "upsc mge" 
(replacing "mge" with the name returned by "upsc -l").

If you run systemctl, you should see something like this:

$ systemctl |grep nut-
nut-driver.service  loaded active running   Network UPS Tools - power 
device driver controller
nut-monitor.service loaded active running   Network UPS Tools - power 
device monitor and shutdown controller
nut-server.service  loaded active running   Network UPS Tools - power 
devices information server

For each service that isn't running, try e.g. "systemctl start nut-server" and 
if that is not successful, you should be able to get more information from 
"systemctl status nut-server".
> 
> Here's the updated (and again truncated) output of sudo /lib/nut/usbhid-ups 
> -DD -a 

^ This debug output is from the driver talking to the hardware. We won't need 
to look at that again unless there is an issue at that layer. If there is, and 
we need to revisit that layer, please gzip and attach the output.


> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Nut-upsuser digest..."

^ Please note. Also, the mailing list has a limit of 40kB/message, otherwise 
messages need to be manually approved. If you don't need HTML formatting, that 
will help cut down on message size.
___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Can't get CyberPower UPS to work with Raspberry Pi 4

2020-10-21 Thread Charles Lepple
On Oct 21, 2020, at 3:27 PM, Robert Stocker  wrote:
> 
> Operating System:  Raspbian GNU/Linux 10 (buster)
> Kernel name & release: Linux 5.4.51-v7l+
> Kernel version:#1333 SMP Mon Aug 10 16:51:40 BST 2020
> 
> exact NUT version:
> Network UPS Tools 2.7.3, according to the last line of man ups

Hmm, either that's a typo, or something didn't get rebuilt correctly. The debug 
output shows that the package is based on NUT 2.7.4.

For Raspbian (Debian) packages, the canonical version number (that also 
specifies how many patch releases have been built by the packagers) is shown by 
e.g. "dpkg -l nut-server"

That said, I don't think this is version-specific (but we do appreciate the 
info). See below.
> 
> NUT installation method: from source tarball, package or Subversion,
> installed from package with apt-get install, using a scripted install from 
> the Raspberry Pi forums (found here: 
> https://www.raspberrypi.org/forums/viewtopic.php?t=240651=1508882#p1508882 
> )
> 
> exact device name and related information (manufacturing date, web pointers, 
> …)
> lsusb reports: ID 0764:0501 Cyber Power System, Inc. CP1500 AVR UPS
> Actual model number is CST135LXU according to the device's labeling. Here's 
> the web page: 
> https://www.cyberpowersystems.com/product/ups/battery-backup/cst135xlu/ 
> 
> 
> complete problem description, with any relevant traces, like system log 
> excerpts, and driver debug output. You can obtain the latter using the 
> following command, as root and after having stopped NUT:
> /path/to/driver -DD -a 
> 
> After installing and rebooting, running ups-info returns:
> Unable to retrieve UPS information
> 
> All attempts to use commands like upsc, upscmd, upsrw result in:
> Error: Connection failure: Connection refused
> 
Parallel init systems like systemd have broken a lot of the assumptions about 
what is running at any given time, and we're always playing catch-up. 
Distributions should be starting NUT after the network interfaces are fully up. 
However, that doesn't always seem to be the case, and that script includes the 
following:

  cat <> /etc/nut/upsd.conf

LISTEN 127.0.0.1 3493
LISTEN ${IPADDR} 3493
EOF


Unless you have multiple network interfaces, both the LISTEN addresses should 
be replaced with a single "LISTEN 0.0.0.0 3493". Even if you have multiple 
network interfaces, firewall rules are probably a better place to exclude one 
or more of the interfaces.

Note also that the CyberPower UPSes have a number of mostly cosmetic errors in 
the output: 
https://github.com/networkupstools/nut/issues?q=is%3Aissue+is%3Aopen+label%3A%22CyberPower+%28CPS%29%22
 


___
Nut-upsuser mailing list
Nut-upsuser@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser