<div dir="auto"><div>Hello,</div><div dir="auto"><br></div><div dir="auto">Yes, "pollonly" is a driver option for certain devices (and relevant to just some drivers).<div dir="auto"><br></div><div dir="auto">Disconnects are probably relevant, at least to loss of connection (and staying that way, with less agressive retries in NUT v2.7.4 and before). There is a logged issue that "pollonly" mode might have trouble detecting a disconnection/staleness, I'm not sure there's merit to it in practice though. </div><div dir="auto"><br></div><div dir="auto">However if the device (or USB hub) goes to some power-saving mode due to lack of recent comms, the regular polling from driver might in fact avoid this cause.</div><div dir="auto"><br></div><div dir="auto">Jim</div><div dir="auto"><br></div><div dir="auto">PS: Please do "Reply All", in particular to get more ideas from more people on the list. And to keep hints in archive for later searches.</div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Tue, Jan 31, 2023, 17:26 Jack <<a href="mailto:jack@violetdragonsnetwork.co.uk">jack@violetdragonsnetwork.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2023-01-31 16:07, Jim Klimov wrote:<br>
> Hello,<br>
> <br>
> On one hand, sorry to hear that higher polling frequency in upsmon did<br>
> not help. On another, question is if the driver gets the info (online<br>
> state and its changes) from device quickly enough.<br>
> <br>
> Initially I meant for you to also try if the "pollonly" flag (in each<br>
> device section of ups.conf for usbhid-ups instances) would make a<br>
> difference?.. I'd expect data-transfer interrupts to be less laggy -<br>
> but that's as long as they work reliably or at all, which may rely on<br>
> whole chain from vendor firmware implem to chips, hubs, OS drivers,<br>
> powersaving and whatnot. And everyone cuts corners.<br>
> <br>
> Running the drivers in debug mode can expose the events and state<br>
> changes: stop their services, run `usbhid-ups -a vdn-ups01 -DDDDDD`,<br>
> watch console as you pull the plug and put it back.<br>
> <br>
> Also current NUT (master certainly, 2.8.0 release maybe) should try<br>
> harder to reconnect upon problems. Possibly an upgrade would address<br>
> your ling-term stability issues.<br>
> <br>
> Jim<br>
> <br>
> PS: returning discussion to mailing list :)<br>
> <br>
> On Tue, Jan 31, 2023, 16:07 jack Bamford<br>
> <<a href="mailto:jack@violetdragonsnetwork.co.uk" target="_blank" rel="noreferrer">jack@violetdragonsnetwork.co.uk</a>> wrote:<br>
> <br>
>> Hi,<br>
>> <br>
>> I am still having problems with NUT, it stops communication<br>
>> completely after a few days of uptime, however I have messed with<br>
>> Polfreg and Polintervals but none makes no difference, if i restart<br>
>> nut-server it shows it looses communication between the UPS then<br>
>> connects again however pulling the plug it does not detect that the<br>
>> UPS is on battery, I have tried on multiple systems, pfSense, Debian<br>
>> on a Raspberry Pi and on a old Laptop and same problem occurs.<br>
>> <br>
>> Any ideas?<br>
>> <br>
>> Regards<br>
>> <br>
>> Jack<br>
>> On 08/01/2023 01:33, Jim Klimov wrote:<br>
>> <br>
>> Given this mentioned APC, I assume usbhid-ups. It should support<br>
>> those options via ups.conf sections.<br>
>> <br>
>> Also, `upsmon` client may be strobed by POLLFREQ setting to talk to<br>
>> upsd more pr less intensively, but by default it is 5s (check if<br>
>> distro did differently?)<br>
>> <br>
>> Are you using distro-packaged NUT (likely old 2.7.4 then), or 2.8.0+<br>
>> - maybe custom build from github?<br>
>> <br>
>> Jim Klimov<br>
>> <br>
>> On Sat, Jan 7, 2023, 23:38 jack Bamford<br>
>> <<a href="mailto:jack@violetdragonsnetwork.co.uk" target="_blank" rel="noreferrer">jack@violetdragonsnetwork.co.uk</a>> wrote:<br>
>> <br>
>> Hi,<br>
>> <br>
>> Thanks for your reply,<br>
>> <br>
>> On Server side i don't have have pollonly or interrupts. What you<br>
>> recommend to try?<br>
>> <br>
>> Regards<br>
>> <br>
>> Jack<br>
>> On 07/01/2023 22:33, Jim Klimov wrote:<br>
>> <br>
>> I would guess configuration of `pollonly` vs. interrupts (lack of<br>
>> pollonly) can play a difference - at least worth trying. Different<br>
>> HW (mis-)behaves differently with these option, no "one to rule them<br>
>> all".<br>
>> <br>
>> Jim<br>
>> <br>
>> On Sat, Jan 7, 2023, 20:44 jack Bamford via Nut-upsuser<br>
>> <<a href="mailto:nut-upsuser@alioth-lists.debian.net" target="_blank" rel="noreferrer">nut-upsuser@alioth-lists.debian.net</a>> wrote:<br>
>> Good evening folks,<br>
>> <br>
>> So I configured NUT on a Raspberry Pi 4 both UPS are connected over<br>
>> USB<br>
>> however the switch from AC Power to Battery seems to be delayed on<br>
>> the<br>
>> NUT communication would anyone have any ideas? The Pi Reports that<br>
>> the<br>
>> UPS is on battery around 30 seconds later I think this delay is<br>
>> long. I<br>
>> have tested it on a physical computer and the detection is around 5<br>
>> to 6<br>
>> seconds with the communication from the UPS to the machine. I have<br>
>> tested both USB 2 and 3 Ports but same problem<br>
>> <br>
>> Specs of Pi<br>
>> <br>
>> Raspberry Pi4<br>
>> <br>
>> Debian Raspbian<br>
>> <br>
>> 32GB Sandisk SSD<br>
>> <br>
>> POE Hat<br>
>> <br>
>> Both UPS's are APC Smart 1000 non Display<br>
>> <br>
>> Regards<br>
>> <br>
>> Jack<br>
>> <br>
>> --<br>
>> VioletDragons Network<br>
>> VioletDragons Projects<br>
>> Violets Data Center<br>
>> Malvern<br>
>> United Kingdom<br>
>> Phone:  +44(0)7413 601663<br>
>> Email: <a href="mailto:jack@violetdragonsnetwork.co.uk" target="_blank" rel="noreferrer">jack@violetdragonsnetwork.co.uk</a><br>
>> Website: <a href="http://www.violetdragonsnetwork.co.uk" rel="noreferrer noreferrer" target="_blank">www.violetdragonsnetwork.co.uk</a> [1]<br>
>> <br>
>> _______________________________________________<br>
>> Nut-upsuser mailing list<br>
>> <a href="mailto:Nut-upsuser@alioth-lists.debian.net" target="_blank" rel="noreferrer">Nut-upsuser@alioth-lists.debian.net</a><br>
>> <a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
> <br>
> --<br>
> VioletDragons Network<br>
> VioletDragons Projects<br>
> Violets Data Center<br>
> Malvern<br>
> United Kingdom<br>
> Phone:  +44(0)7413 601663<br>
> Email: <a href="mailto:jack@violetdragonsnetwork.co.uk" target="_blank" rel="noreferrer">jack@violetdragonsnetwork.co.uk</a><br>
> Website: <a href="http://www.violetdragonsnetwork.co.uk" rel="noreferrer noreferrer" target="_blank">www.violetdragonsnetwork.co.uk</a> [1]<br>
> <br>
> --<br>
> VioletDragons Network<br>
> VioletDragons Projects<br>
> Violets Data Center<br>
> Malvern<br>
> United Kingdom<br>
> Phone:  +44(0)7413 601663<br>
> Email: <a href="mailto:jack@violetdragonsnetwork.co.uk" target="_blank" rel="noreferrer">jack@violetdragonsnetwork.co.uk</a><br>
> Website: <a href="http://www.violetdragonsnetwork.co.uk" rel="noreferrer noreferrer" target="_blank">www.violetdragonsnetwork.co.uk</a><br>
>  [1]<br>
> <br>
> <br>
> Links:<br>
> ------<br>
> [1] <a href="http://www.violetdragonsnetwork.co.uk" rel="noreferrer noreferrer" target="_blank">http://www.violetdragonsnetwork.co.uk</a><br>
<br>
Hi Jim,<br>
<br>
Thanks for your reply, oh so I add pollonly per UPS in ups.conf ? I was <br>
adding it at the top of the config my bad. One thing I have noticed <br>
under dmesg is a few disconnects regard USB so not sure if that is <br>
related or not.<br>
<br>
This is what I have in ups.conf<br>
<br>
pollinterval = 1<br>
maxretry = 3<br>
<br>
[vdn-ups01]<br>
     driver = usbhid-ups<br>
     port = auto<br>
     desc = "VDN-UPS01 APC Smart-UPS 1000VA RM"<br>
     vendorid = 051d<br>
     productid = 0002<br>
     serial = AS061<br>
<br>
[vdn-ups02]<br>
     driver = usbhid-ups<br>
     port = auto<br>
     desc = "VDN-UPS02 APC Smart-UPS 1000VA RM"<br>
     vendorid = 051d<br>
     productid = 0002<br>
     serial = AS06<br>
<br>
Regards<br>
<br>
Jack<br>
<br>
-- <br>
VioletDragons Network<br>
VioletDragons Projects<br>
Violets Data Center<br>
Malvern<br>
United Kingdom<br>
Phone:  +44(0)7413 601663<br>
Email: <a href="mailto:jack@violetdragonsnetwork.co.uk" target="_blank" rel="noreferrer">jack@violetdragonsnetwork.co.uk</a><br>
Website: <a href="http://www.violetdragonsnetwork.co.uk" rel="noreferrer noreferrer" target="_blank">www.violetdragonsnetwork.co.uk</a><br>
</blockquote></div></div></div>