David Butler
2020-Oct-31 21:40 UTC
[Nut-upsuser] APC Back-UPS 1500 RS - looking for help with strange behaviour
Hi All, hoping someone might have some insights to what is going wrong with my NUT setup and my APC Back - UPS RS 1500 (specifically a BR1500GI) using the usbhid driver. https://download.schneider-electric.com/files?p_File_Name=AHUG-9JU4RH_R0_EN.pdf&p_Doc_Ref=SPD_AHUG-9JU4RH_EN&p_enDocType=User%20guide Main issue: NUT successfully shuts down my server when it goes on battery but when I restore power, as soon as my master computer comes up the UPS goes back on battery. It stays like this until it fully discharges whereby everything loses power, everything restarts and again, as soon as the master computer comes online then the UPS goes back on battery... this whole cycle keeps repeating until I switch off the UPS from the front power button. To keep things short I've tried this on pfSense, FreeNAS and Ubuntu, each independently configured as a solo master and for pfSense and FreeNAS the only settings I change is to select the driver as usbhid, port auto and name ups. Curiously I tried the apcupsd package of pfSense and it seemed to work as expected. Happy to send any logs or info that might be relevant (probably best to set up ubuntu again since it's easier to control the config files). I first asked about this in the Netgate (pfSense) forum so the last entries under uk_dave is me with some info on upsc and upsrw. https://forum.netgate.com/topic/102959/nut-package/728 Thanks for anyone who can give me some pointers, Cheers, Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20201031/f0c65754/attachment.html>
Charles Lepple
2020-Nov-08 03:34 UTC
[Nut-upsuser] APC Back-UPS 1500 RS - looking for help with strange behaviour
On Oct 31, 2020, at 5:40 PM, David Butler <mrdjbutler at googlemail.com> wrote:> > Hi All, > > hoping someone might have some insights to what is going wrong with my NUT setup and my APC Back - UPS RS 1500 (specifically a BR1500GI) using the usbhid driver. > > https://download.schneider-electric.com/files?p_File_Name=AHUG-9JU4RH_R0_EN.pdf&p_Doc_Ref=SPD_AHUG-9JU4RH_EN&p_enDocType=User%20guide > > Main issue: > > NUT successfully shuts down my server when it goes on battery but when I restore power, as soon as my master computer comes up the UPS goes back on battery. It stays like this until it fully discharges whereby everything loses power, everything restarts and again, as soon as the master computer comes online then the UPS goes back on battery... this whole cycle keeps repeating until I switch off the UPS from the front power button.It seems like this has come up before for this model, but with no resolution: https://alioth-lists.debian.net/pipermail/nut-upsuser/2018-September/011228.html> > To keep things short I've tried this on pfSense, FreeNAS and Ubuntu, each independently configured as a solo master and for pfSense and FreeNAS the only settings I change is to select the driver as usbhid, port auto and name ups. > > Curiously I tried the apcupsd package of pfSense and it seemed to work as expected.Alternatively, if you want to run apcupsd for direct UPS control, there is an apcupsd-ups driver in NUT that translates apcupsd network status to NUT protocol - useful for a NAS.> > Happy to send any logs or info that might be relevant (probably best to set up ubuntu again since it's easier to control the config files). I first asked about this in the Netgate (pfSense) forum so the last entries under uk_dave is me with some info on upsc and upsrw. https://forum.netgate.com/topic/102959/nut-package/728 >If I read everything correctly, my best guess here is that NUT is sending a different shutdown command than apcupsd. (Other than this model, I haven't heard of an UPS staying on battery once the power has returned.) I'd agree that testing in Ubuntu is probably the easiest to control. If you can capture the USB traffic when apcupsd tells the UPS to shutdown, we can compare that to what usbhid-ups does. https://wiki.wireshark.org/CaptureSetup/USB I'm not sure of the debugging support in apcupsd, but if it is doing things correctly, maybe we can just compare PCAPs, and reference the NUT logs? For the NUT shutdown test, I think we might need at least a debug level of 3. You might also want to power the machine running NUT from another outlet temporarily, since we need to run the driver in debug mode without the help of upsd/upsmon to shut down the system properly. Stop the services (nut-server and nut-client), then run 'sudo /lib/nut/usbhid-ups -DDD -k -a name-of-ups | tee -a /tmp/usbhid-ups.BR1500GI.log'. The '-k' flag tells the UPS to shut down, so you might need the UPS to be on battery power at that time.> _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at alioth-lists.debian.net > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser