<div dir="auto">Hello,<div dir="auto"><br></div><div dir="auto">On one hand, sorry to hear that higher polling frequency in upsmon did not help. On another, question is if the driver gets the info (online state and its changes) from device quickly enough.</div><div dir="auto"><br></div><div dir="auto">Initially I meant for you to also try if the "pollonly" flag (in each device section of ups.conf for usbhid-ups instances) would make a difference?.. I'd expect data-transfer interrupts to be less laggy - but that's as long as they work reliably or at all, which may rely on whole chain from vendor firmware implem to chips, hubs, OS drivers, powersaving and whatnot. And everyone cuts corners.</div><div dir="auto"><br></div><div dir="auto">Running the drivers in debug mode can expose the events and state changes: stop their services, run `usbhid-ups -a vdn-ups01 -DDDDDD`, watch console as you pull the plug and put it back.</div><div dir="auto"><br></div><div dir="auto">Also current NUT (master certainly, 2.8.0 release maybe) should try harder to reconnect upon problems. Possibly an upgrade would address your ling-term stability issues.</div><div dir="auto"><br></div><div dir="auto">Jim</div><div dir="auto"><br></div><div dir="auto">PS: returning discussion to mailing list :)</div><div dir="auto"><br></div><br><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Tue, Jan 31, 2023, 16:07 jack Bamford <<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">
  
    
  
  <div>
    <p>Hi,</p>
    <p>I am still having problems with NUT, it stops communication
      completely after a few days of uptime, however I have messed with
      Polfreg and Polintervals but none makes no difference, if i
      restart nut-server it shows it looses communication between the
      UPS then connects again however pulling the plug it does not
      detect that the UPS is on battery, I have tried on multiple
      systems, pfSense, Debian on a Raspberry Pi and on a old Laptop and
      same problem occurs.</p>
    <p>Any ideas?</p>
    <p>Regards</p>
    <p>Jack<br>
    </p>
    <div>On 08/01/2023 01:33, Jim Klimov wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="auto">
        <div>Given this mentioned APC, I assume usbhid-ups. It should
          support those options via ups.conf sections.</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Also, `upsmon` client may be strobed by POLLFREQ
          setting to talk to upsd more pr less intensively, but by
          default it is 5s (check if distro did differently?)</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Are you using distro-packaged NUT (likely old
          2.7.4 then), or 2.8.0+ - maybe custom build from github?</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Jim Klimov<br>
          <br>
          <div class="gmail_quote" dir="auto">
            <div dir="ltr" class="gmail_attr">On Sat, Jan 7, 2023, 23:38
              jack Bamford <<a href="mailto:jack@violetdragonsnetwork.co.uk" target="_blank" rel="noreferrer">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">
              <div>
                <p>Hi,</p>
                <p>Thanks for your reply,</p>
                <p>On Server side i don't have have pollonly or
                  interrupts. What you recommend to try?</p>
                <p>Regards</p>
                <p>Jack<br>
                </p>
                <div>On 07/01/2023 22:33, Jim Klimov wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="auto">I would guess configuration of
                    `pollonly` vs. interrupts (lack of pollonly) can
                    play a difference - at least worth trying. Different
                    HW (mis-)behaves differently with these option, no
                    "one to rule them all".
                    <div dir="auto"><br>
                    </div>
                    <div dir="auto">Jim</div>
                    <div dir="auto"><br>
                    </div>
                  </div>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr" class="gmail_attr">On Sat, Jan 7,
                      2023, 20:44 jack Bamford via Nut-upsuser <<a href="mailto:nut-upsuser@alioth-lists.debian.net" rel="noreferrer noreferrer" target="_blank">nut-upsuser@alioth-lists.debian.net</a>>
                      wrote:<br>
                    </div>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Good
                      evening folks,<br>
                      <br>
                      So I configured NUT on a Raspberry Pi 4 both UPS
                      are connected over USB <br>
                      however the switch from AC Power to Battery seems
                      to be delayed on the <br>
                      NUT communication would anyone have any ideas? The
                      Pi Reports that the <br>
                      UPS is on battery around 30 seconds later I think
                      this delay is long. I <br>
                      have tested it on a physical computer and the
                      detection is around 5 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" rel="noreferrer noreferrer noreferrer" target="_blank">jack@violetdragonsnetwork.co.uk</a><br>
                      Website: <a href="http://www.violetdragonsnetwork.co.uk" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">www.violetdragonsnetwork.co.uk</a><br>
                      <br>
                      <br>
                      _______________________________________________<br>
                      Nut-upsuser mailing list<br>
                      <a href="mailto:Nut-upsuser@alioth-lists.debian.net" rel="noreferrer noreferrer noreferrer" target="_blank">Nut-upsuser@alioth-lists.debian.net</a><br>
                      <a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
                    </blockquote>
                  </div>
                </blockquote>
                <pre cols="72">-- 
VioletDragons Network
VioletDragons Projects
Violets Data Center
Malvern
United Kingdom
Phone:  +44(0)7413 601663        
Email: <a href="mailto:jack@violetdragonsnetwork.co.uk" rel="noreferrer noreferrer" target="_blank">jack@violetdragonsnetwork.co.uk</a>
Website: <a href="http://www.violetdragonsnetwork.co.uk" rel="noreferrer noreferrer" target="_blank">www.violetdragonsnetwork.co.uk</a></pre>
              </div>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <pre cols="72">-- 
VioletDragons Network
VioletDragons Projects
Violets Data Center
Malvern
United Kingdom
Phone:  +44(0)7413 601663        
Email: <a href="mailto:jack@violetdragonsnetwork.co.uk" target="_blank" rel="noreferrer">jack@violetdragonsnetwork.co.uk</a>
Website: <a href="http://www.violetdragonsnetwork.co.uk" target="_blank" rel="noreferrer">www.violetdragonsnetwork.co.uk<br></a></pre>
  </div>

</blockquote></div></div>