OPNsense Forum

English Forums => General Discussion => Topic started by: Inxsible on September 26, 2021, 09:40:59 pm

Title: USB UPS help with OPNsense
Post by: Inxsible on September 26, 2021, 09:40:59 pm
I am trying to size a UPS for a friend to use with the following devices in the network cabinet:


I was thinking of suggesting a 600VA APC :  https://www.amazon.com/APC-Battery-Protector-Back-UPS-BE600M1/dp/B01FWAZEIU

The reason I was thinking of a Standby/Offline UPS is because given that his switch has a 1000W PSU, it's unlikely that we will find any UPS that can support the switch and the computer together. Even if I did find it, it would likely be cost prohibitive. So if we just need to protect the computer and modem the smallest UPS are usually Standby/Offline topology. I use a Line-interactive UPS in my server rack.


Title: Re: Offline or Standby UPS with OPNsense
Post by: muchacha_grande on September 27, 2021, 06:22:54 pm
For the box and the modem, it will work fine, but I don't think it's okay to use the surge protected outlet to plug in the POE switch. The surge protection circuit of the UPS has its tolerance in relation to the power specifications of the UPS, so you could be overloading it.
Generally, those outlets are used to protect the load from voltage fluctuations without using the backup battery, so in the event of a power outage, the battery is used to power only essential loads.
Title: Re: Offline or Standby UPS with OPNsense
Post by: Inxsible on September 28, 2021, 06:01:36 pm
Muchas gracias !

I suspected the same, but thought I'd confirm. Will the new APC model BE600M1 work with the usbhid driver?

I am buying it today and will try it out. Hopefully will know more tomorrow.
Title: Re: Offline or Standby UPS with OPNsense
Post by: muchacha_grande on September 28, 2021, 07:04:33 pm
Will the new APC model BE600M1 work with the usbhid driver?

I can't say it for sure, but may be someone tested it already.
My guess is that it will work with driver=usbhid and port=auto.

I have an APC Back-UPS RS 900G with USB port and use the above config.
Usually they use the same communication protocol for different models with USB.

Cheers...
Title: Re: USB UPS help with OPNsense
Post by: Inxsible on September 30, 2021, 05:52:54 pm
I found a Line-Interactive UPS from Tripp Lite and I bought that instead of the APC standby UPS.

I have the Tripp Lite AVR700U. When I connect it to the USB, I can see it being recognized correctly in the System --> Log files --> General.

Here's when I changed the USB port that it was connected to :
Code: [Select]
2021-09-30T10:48:16 kernel uhid0: <Tripp Lite AVR700U, class 0/0, rev 2.00/0.02, addr 3> on usbus2
2021-09-30T10:48:16 kernel ugen2.3: <Tripp Lite AVR700U> at usbus2
2021-09-30T10:29:26 kernel uhid0: <Tripp Lite AVR700U, class 0/0, rev 2.00/0.02, addr 3> on usbus2
2021-09-30T10:29:26 kernel ugen2.3: <Tripp Lite AVR700U> at usbus2
2021-09-30T10:29:16 kernel ugen1.3: <Tripp Lite AVR700U> at usbus1 (disconnected)
2021-09-30T10:25:38 upsmon[31747] Communications with UPS tripplite lost
2021-09-30T10:25:38 upsmon[31747] UPS [tripplite]: connect failed: Connection failure: Operation already in progress
2021-09-30T10:03:02 kernel uhid0: <Tripp Lite AVR700U, class 0/0, rev 2.00/0.02, addr 3> on usbus1
2021-09-30T10:03:02 kernel ugen1.3: <Tripp Lite AVR700U> at usbus1

However, whenever I enable NUT and the USBHID driver, it cannot communicate with the UPS at all. I am using the basic configuration of enabling the usbhid driver which by default has the port=auto in it. I have double and triple checked that all the other drivers are disabled and only USBHID is enabled. EVen the ups.conf file only has 1 entry for avr700. I get the following Operation timed out error as below.

Code: [Select]
2021-09-30T10:43:26 upsmon[49146] UPS avr700 is unavailable
2021-09-30T10:43:26 upsmon[49146] UPS [avr700]: connect failed: Connection failure: Operation timed out
2021-09-30T10:42:06 upsmon[49146] UPS [avr700]: connect failed: Connection failure: Operation timed out
2021-09-30T10:40:46 upsmon[49146] UPS [avr700]: connect failed: Connection failure: Operation timed out
2021-09-30T10:39:26 upsmon[49146] UPS [avr700]: connect failed: Connection failure: Operation timed out
2021-09-30T10:38:06 upsmon[49146] UPS avr700 is unavailable
2021-09-30T10:38:06 upsmon[49146] UPS [avr700]: connect failed: Connection failure: Operation timed out
2021-09-30T10:36:46 upsmon[49146] UPS [avr700]: connect failed: Connection failure: Operation timed out
2021-09-30T10:35:26 upsmon[49146] UPS [avr700]: connect failed: Connection failure: Operation timed out
2021-09-30T10:34:06 upsmon[49146] UPS [avr700]: connect failed: Connection failure: Operation timed out
2021-09-30T10:32:46 upsmon[49146] UPS avr700 is unavailable
2021-09-30T10:32:46 upsmon[49146] UPS [avr700]: connect failed: Connection failure: Operation timed out
2021-09-30T10:31:26 upsmon[49146] Communications with UPS avr700 lost
2021-09-30T10:31:26 upsmon[49146] UPS [avr700]: connect failed: Connection failure: Operation timed out
2021-09-30T10:30:20 opnsense[7893] plugins_configure dns (execute task : unbound_configure_do())
2021-09-30T10:30:20 opnsense[7893] plugins_configure dns (execute task : dnsmasq_configure_do())



I have tried rebooting while the UPS is connected but it's still the same. I have also tried multiple USB ports behind the router but no luck. I checked the https://networkupstools.org/stable-hcl.html and AVR700U is listed as working with the usbhid-ups driver.

So is something broken with the os-nut plugin? or do I have to do something different?
Title: Re: USB UPS help with OPNsense
Post by: Inxsible on October 02, 2021, 03:50:35 am
I have tried the following with no luck:
I noticed that the UPS was connected to ugen1.3, so I tried
Code: [Select]
port=ugen1.3and also
Code: [Select]
port=/dev/ugen1.3
I didn't think USB UPS would be this difficult to configure. Can somebody please tell me if I am doing something wrong? I really need the Opnsense machine to gracefully shutdown when the battery power is down to 10%