Edit: the first part is about the inclusion of nut 2.8.0 in the next major release. For the issues I've found and workarounds, you can begin reading at post #4.
----- Original post -----
Currently, the OpenWrt repositories include nut (Network UPS tools) 2.7.4-27. The upstream 2.7.4 dates from march 2016 (around the same time of the last apcupsd, BTW). However, the current nut release is 2.8.0 from april 2022, and it includes several improvements. Therefore I wonder: are there plans to integrate this into OpenWrt upcoming releases?
So what shall I do in order to take advantage of the new nut version? test the daily snapshot?
and forgive me for asking, but why is not already on the "stable releases", if the integration on github was done last september? testers or it's scheduled anyways?
I am not a developer but it has been stated that the stable releases are just a copy of the master branch that is branched off at a point in time and the added updates for stable are mostly just security patches and bug fixes based only on the branched code for that stable branch.
There are some updates to some packages and a few new devices that may be added on point releases.
There may also be a difference in updates for the core package compared to community packages like nut.
22.03 stable was branched off of Master before the new version of nut was added to Master.
The next stable branch would include whatever is in Master at that time, likely including the new nut version.
I think that IF the new nut version worked with the API interfaces of all the other parts of the 22.03.x system it interacts with it might be possible to back-port it to 22.03.x stable but someone would have to compile it, get it tested on a large range of targets and do the work to do a proper PR to get it included.
Totally understood, and thanks to everyone that make this possible (just in case, I didn't mean to be rude). I'm trying to do my part here as well, such as:
I went ahead and installed last snapshot. Indeed nut 2.8.0 is available there.
However, I think something is wrong, maybe the collecd-mod-nut plugin, as after being configured and enabled, the nut rrd's are not being generated, and the corresponding UPS tab is missing on the LuCI statistics graphs.
I first tried with the intended UPS directly connected, then tried with a hub and two different UPS's. upsc works for one or both, but something is wrong with the statistics on the snapshot (was working for the older UPS under 22.03.5).
I have more nut packages installed than you. It seems you're missing nut-upsmon which is an important part of nut. I'd also install luci-app-nut as it makes it easier to look at the whole config, as well as to change it.
I'm using the exact same configuration I used on a different router running 22.03 and it works on both, so if this was working for you on 22.03 it should do now. If you've since made changes you're better off comparing your current config with one of your backups from 22.03 rather than with mine, which could make things more confusing.
root@r1:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 5000M
|__ Port 4: Dev 3, If 0, Class=, Driver=usb-storage, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/2p, 480M
|__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
|__ Port 1: Dev 4, If 0, Class=, Driver=usbfs, 1.5M
root@r1:~# ps |grep ups
855 nut 1788 S /lib/nut/usbhid-ups -D -a myups -u nut
3586 nut 1280 S /usr/sbin/upsd -D -u nut
4632 root 1220 S /usr/sbin/upsmon -D
4668 nutmon 1220 S /usr/sbin/upsmon -D
19154 root 1372 S grep ups
root@r1:~# upsc myups |grep vendorid
True. In fact, I have one router+UPS running 22.03.3 and other router+UPS's running today's snapshot. I've been comparing configurations files and GUIs, and I don't notice any meaningful difference in that regard. The main differences I've noticed are the file size in other directories such as /usr/lib/collectd, usr/lib/nut, etc., but that could make sense.
Yes, I prefer to get the functions working one by one, and I'm looking at the config files because for me the nut GUI configurations perhaps are easy to compare, but not so logical at a glance.
On the other hand, I had to use opkg from SSH, because from the browser I get JSON errors for some packages.
Anyways, because my main issue with 2.7.4 is the lack of support for the Tripp·Lite, my next step it will be to backport the usbhid-ups driver to 22.03.5 to see what it happens.
As a workaround, I "downgraded" to 22.03.5 and integrated the usbhid-usb driver of 2.8.0 with nut 2.7.4. Now it seems to work properly for this new Tripp·Lite USB protocol (except for having to run upsd as root). And the collectd-mod-nut - 5.12.0-33 plugin works correctly with RRDtool:
I'm still on snapshot r22658-2c530fcb97, hopefully I should be able to install tomorrow's snapshot as today there were commits to address the gnutls issue, I'll let you know how it goes.
Edit: tried snapshot r22899-466be0612a (2023-05-16) via the firmware selector and packages samba4-server and msmtp are still failing to build due to the libgnutls issue so I can't install the snapshot, sorry.
No joy here. I installed today's snapshot, with hard factory reset before and after, but the results are the same: upsc works, nut's RRD folder is not being created, nut stats are not being collected, therefore no nut tab under LuCI statistics.
On the other hand, the same UPS+router under 22.03.5 does generate nut stats (or apcupsd stats if configured that way).
I think it's unlikely to be an architecture related problem, maybe nut 2.8 behaves a bit differently to 2.7 (which per your first post is from 2016). I'd try to install nut-upsmon and luci-app-nut and play with the config from there. As the software itself is proven working on my router it may not be a too hard nut to crack
I've tried that, starting by reducing the packages to the bare-miminum for what we want to achieve. Evenmore, I've tried to copy the obvious config files from older and running OpenWrt's into the snapshot, and still can't get collectd to start gathering nut-related data. Or I'm missing something that changed from 2.7.4 to 2.8.0, and/or from release to snapshot, or something from the master branch is getting in the way for my testbed.
Back to the nut 2.8.0 issue, my major achievement have been to back port the usbhid 2.8.0 driver into 2.7.4, and it seems to work fine. For the rest, I've ran out of ideas
I concurr it doesn't look like architecture-related, but it's the only variable I haven't ruled out yet. Unfortunally I don't have other OpenWrt-snapshot-compatible USB routers in my drawer, and I don't want to bring down again my main box (which is running several services for my household).