What's new

Help setting up NUT (Network UPS Tools) on a Merlin router

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

grifo

Senior Member
I have an APC Back-UPS connected via USB to my Qnap NAS but I'd like to move it to my RT-AC87U running 384.13_1, which would then notify power events to the NAS, so I can keep monitoring the UPS status from the router after the NAS has shut itself down.

The Qnap uses NUT for this so I've installed it on my router from Entware but I'm having trouble getting it to work. All the configuration examples I could find online are made on fully featured Linux machines which doesn't help.

The simplest guide I've found to get the basics running is this but the first problem is the driver (nut-driver-usbhid-ups from Entware) isn't starting:

Code:
grifo@r1:/tmp/home/root# upsdrvctl start
Network UPS Tools - UPS driver controller merge-with-ng-578-g9160132a
Network UPS Tools - Generic HID driver 0.41 (merge-with-ng-578-g9160132a)
USB communication driver 0.33
user root not found
Driver failed to start (exit status=1)
grifo@r1:/tmp/home/root#upsc apcups
Error: Connection failure: Connection refused
grifo@r1:/tmp/home/root#

Could anyone using this on their router please let me know how you got it working?
 
I got it working, the problem was that the user root doesn't exist on asuswrt, it's either admin (default) or whatever it's been changed to on the system page.

Starting upsdrvctl and upsd with the correct user solved the problem. I added the below to post-mount and it works great now.

Code:
upsdrvctl -u grifo start
upsd -u grifo
 
I got it working, the problem was that the user root doesn't exist on asuswrt, it's either admin (default) or whatever it's been changed to on the system page.

Starting upsdrvctl and upsd with the correct user solved the problem. I added the below to post-mount and it works great now.

Code:
upsdrvctl -u grifo start
upsd -u grifo

Thank you very much indeed for the information shared! I have similar configuration (NAS with UPS attached, which shuts down within 90 seconds after power failure and then router continues to be powered until UPS battery dies). I had the same idea - to move the UPS to router, shutdown the NAS shortly after power failure and then continue to control the ups status through router. So you provided really useful information.
 
Hi, I installed it from Entware, it's compiled for arm.

Code:
grifo@r1:/tmp/home/root# opkg info nut
Package: nut
Version: 2.7.4-19a
Depends: libc, libssp, librt, libpthread
Status: install user installed
Section: net
Architecture: armv7-2.6
Size: 881
Filename: nut_2.7.4-19a_armv7-2.6.ipk
Description: Network UPS Tools (NUT) is a client/server monitoring system that
 allows computers to share uninterruptible power supply (UPS) and
 power distribution unit (PDU) hardware. Clients access the hardware
 through the server, and are notified whenever the power status
 changes.
Installed-Time: 1580594824

grifo@r1:/tmp/home/root#
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top