APC Back-UPS ES 700G (and BE 650G2) with OpenWrt
I own two of those ES 700 UPS since several years now. Initially, I operated them on my Synology NAS. Now I figured, I can also connect them to my OpenWrt routers with an USB port. The “G” at the end seems to be important, as this should indicate it is a UPS with USB connection. Lately I bought a BE 650 UPS, which I could run exactly the same way.
The advantage of this is, that the router requires much less power on the UPS, so it can serve better and longer the UPS status than my NAS. The NAS I usually want to immediately set it to standby (well, after a minute or so), as soon as the grid power is lost. This avoids surprises that the battery may break down in such a situation faster than anticipated (or indicated by the UPS status).
I found several posts on that, but some did not speak of this kind of UPS or installed much more stuff than actually was needed. I found a solution I can live with it, which I explain here.
First, the USB HID kernel driver module is needed as well as the APC UPS daemon:
# opkg install kmod-usb-hid apcupsd
We can check if the UPS is detected in the kernel messages (we see more than that, but this three lines are most interesting):
# dmesg | grep -i usb [ 292.104391] hid-generic 0003:051D:0002.0001: hiddev96,hidraw0: USB HID v1.10 Device [APC Back-UPS ES 700G FW:871.O4 .I USB FW:O4 ] on usb-11200000.usb-1/input0 [ 292.118794] usbcore: registered new interface driver usbhid [ 292.124384] usbhid: USB HID core driver
My latest UPS shows a similar picture, I just show the kernel message here, everything else I omit, as it is quite similar as well.
[ 141.492715] hid-generic 0003:051D:0002.0002: hiddev96,hidraw0: USB HID v1.10 Device [American Power Conversion Back-UPS BE650G2 FW:497200G -497300G ] on usb-11200000.usb-2/input0
Next, we need to configure the apcupsd:
# vi /etc/apcupsd/apcupsd.conf
Look for following lines:
<.....> UPSCABLE smart <.....> UPSTYPE apcsmart DEVICE /dev/ttyS0 <.....>
Comment them out and add instead:
<.....> #UPSCABLE smart UPSCABLE usb <.....> #UPSTYPE apcsmart #DEVICE /dev/ttyS0 UPSTYPE usb <.....>
Now start the daemon and check the UPS status (just some important lines shown):
# service apcupsd start # apcaccess APC : 001,034,0821 DATE : 2025-12-22 22:18:21 +0100 <.....> UPSNAME : ups1 CABLE : USB Cable DRIVER : USB UPS Driver UPSMODE : Stand Alone STARTTIME: 2025-12-22 19:57:00 +0100 MODEL : Back-UPS ES 700G <.....> BATTDATE : 2019-12-11 NOMINV : 230 Volts NOMBATTV : 12.0 Volts FIRMWARE : 871.O4 .I USB FW:O4 END APC : 2025-12-22 22:34:44 +0100
And my other UPS shows for the model:
MODEL : Back-UPS BE650G2
For debugging purposes, you may want to check the log file:
# cat /var/log/apcupsd.events
If we want to log UPS data, we might want to install the collectd module for the APC UPS (which also installs the collect daemon, if not yet existing). Furthermore, we can add the statistics app for LuCI, so we can check the history via the OpenWrt web page of the router:
# opkg install collectd-mod-apcups # opkg install luci-app-statistics
Finally, it is required to enable the module in LuCI (in Statistics→Setup→General plugins) - don't forget “Save & Apply”:
Voilá - we can see the statistics of our UPS. Of course, we can also access it from other devices now, but this is a different topic to cover somewhere else…
During my new setup, I also replaced the battery of the UPS, which can be seen in the status above (it had to be charged first). Any reasonable AGM battery with the specification 12V, 7.2Ah, F2, 6.3mm connector should be ok (the size is around 150mm x 65mm x 100mm - length x width x height).
This change should be kept on the UPS, so you know how “old” your battery is. This can be done with the apctest tool. For that, one needs to stop the daemon first. And of course, do not forget to start it again afterwards! The whole process is shown here, including a status check, that the new date is stored correctly:
# service apcupsd stop # apctest 2025-12-22 23:08:30 apctest 3.14.14 (31 May 2016) unknown Checking configuration ... sharenet.type = Network & ShareUPS Disabled cable.type = USB Cable mode.type = USB UPS Driver Setting up the port ... Doing prep_device() ... You are using a USB cable type, so I'm entering USB test mode Hello, this is the apcupsd Cable Test program. This part of apctest is for testing USB UPSes. Getting UPS capabilities...SUCCESS Please select the function you want to perform. 1) Test kill UPS power 2) Perform self-test 3) Read last self-test result 4) View/Change battery date 5) View manufacturing date 6) View/Change alarm behavior 7) View/Change sensitivity 8) View/Change low transfer voltage 9) View/Change high transfer voltage 10) Perform battery calibration 11) Test alarm 12) View/Change self-test interval Q) Quit Select function number: 4 Current battery date: 12/11/2019 Enter new battery date (MM/DD/YYYY), blank to quit: 12/22/2025 Writing new date...SUCCESS Waiting for change to take effect...SUCCESS Current battery date: 12/22/2025 1) Test kill UPS power 2) Perform self-test 3) Read last self-test result 4) View/Change battery date 5) View manufacturing date 6) View/Change alarm behavior 7) View/Change sensitivity 8) View/Change low transfer voltage 9) View/Change high transfer voltage 10) Perform battery calibration 11) Test alarm 12) View/Change self-test interval Q) Quit Select function number: q 2025-12-22 23:09:27 End apctest. # service apcupsd start # apcaccess APC : 001,034,0821 DATE : 2025-12-22 23:09:35 +0100 <.....> BATTDATE : 2025-12-22 <.....> END APC : 2025-12-22 23:09:37 +0100


