try to install e config NUT (network ups tools) software for managing only two main goals... sending a Telegram message - via api, with curl - in case of power outage and eventually turn off the workstation connected to the ups itself, an apc 650 cs.
OpenWrt is 19.07.08 on an r7800 router.
Now, first step is installation. I did it a couple of day ago, it worked (please note openWrt uses three config file to config NUT files, see wiki... this is a little different with other linux distro) and I can also see cgi page with the detail or reach the ups via the router with WinNUT tool.
I started to config the various file to do what I told, but I make some mistakes so lesson learned and I disinstalled everything to restart with the job (note: if you modify the nut config file by yourself, do not forget to change the symbolic link, as described in the wiki).
Now, after (several) restart of the router, and several plug and unplug of the cable, I always have this error when I try to force the connection:
root@router1:/etc/hotplug.d/usb# upsdrvctl start Network UPS Tools - UPS driver controller 2.7.4 Network UPS Tools - Generic HID driver 0.41 (2.7.4) USB communication driver 0.33 Can't claim USB device [051d:0002]: No such file or directory Driver failed to start (exit status=1)
Please note that
lsusb give me the fact that the ups is connected, and the device is manageable by nut user:
Bus 003 Device 003: ID 051d:0002 American Power Conversion Uninterruptible Power Supply Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@router1:/dev/bus/usb/003# ll drwxr-xr-x 2 root root 80 Jan 30 23:19 ./ drwxr-xr-x 6 root root 120 Jan 1 1970 ../ crw------- 1 root root 189, 256 Jan 1 1970 001 crw-rw---- 1 nut nut 189, 258 Jan 30 23:20 003
I've seen there was a sort of similar problem in an old version but I dont know if it is related to mine and I have not understood the solution
I've found other similar error in very old version of ubuntu, they told to change udev permissions etc, but I dont think this is the case.
ps: hope to solve this and go further to reach the goals, I'll try to update or enrich the wiki, there are very few info just for a base config that seems do nothing (no shutdown or alert on on battery events...)