APC UPS new plugin

Started by Droid999, February 13, 2021, 05:04:01 AM

Previous topic - Next topic
What is the reason again why you dont pull against plugins? Any Help needed?

Quote from: mimugmail on February 01, 2022, 05:20:22 PM
What is the reason again why you dont pull against plugins? Any Help needed?

Thanks for the offer! I'm almost ready for the pull request just trying to find some time, I think later this evening.

Cheers


Where can i download "os-apcupsd-1.2.2.txz"?

Like to test the new plugin.

Quote from: hloiter on February 07, 2022, 10:21:48 AM
Where can i download "os-apcupsd-1.2.2.txz"?

Like to test the new plugin.

https://github.com/xbb/apcupsd/releases, click on assets

Don't forget to uninstall any previous version first via the web UI or

pkg remove os-apcupsd

February 22, 2022, 08:49:32 PM #35 Last Edit: February 22, 2022, 08:54:04 PM by hloiter
Hi,

installed the package on OPNsense 21.7.8 ...

Installation without any error.

When i try to open the configuration i get the error

/usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ApiMutableModelControllerBase.php:174: Class \OPNsense\Apcupsd\apcupsd does not exist

Any ideas?

EDIT: After a reboot the problem is gone   :D

Best

hloiter



Thank you for making this package!

How do I install it?  When I try to download it with


curl 'https://github.com/xbb/apcupsd/releases/download/1.2/os-apcupsd-1.2.txz' --output os-apcupsd-1.2.txz


I'm getting a file that's 0 bytes.

Hello,

i think it is os-apcupsd-1.2.2.txz ....

But have a look at the page, there is a new Version devel-0.1 from this year ...


Quote from: defaultuserfoo on May 31, 2022, 03:00:12 PM
Thank you for making this package!

How do I install it?  When I try to download it with


curl 'https://github.com/xbb/apcupsd/releases/download/1.2/os-apcupsd-1.2.txz' --output os-apcupsd-1.2.txz


I'm getting a file that's 0 bytes.

GitHub release assets links are redirected to another URL.

With curl you need to specify -L (--location) otherwise it won't follow HTTP redirects.

Also yes as hloiter said 0.1 is the newest version

Should I use the release 0.1 from April?  Maybe scp will work ...

Quote from: defaultuserfoo on May 31, 2022, 09:24:34 PM
Should I use the release 0.1 from April?  Maybe scp will work ...

Yes

With curl:

curl --remote-name --location https://github.com/xbb/apcupsd/releases/download/0.1/os-apcupsd-devel-0.1.txz

June 01, 2022, 10:07:10 AM #41 Last Edit: June 01, 2022, 10:32:14 AM by defaultuserfoo
Thank you!

It looks good, but I think the executables, like apcupsd and apcaccess are missing.  The Status info says "Action not found".

It seems the config file is created ok, so I guess if the executables weren't missing, it would probably work :)


PS:  When I re-install the nut plugin, the Status page for Apcupsd says "Error: empty output from apcaccess".

But neither apcupsd, nor nut are working.  Monitoring that UPS over the network does work:  It's connected to Centos 7 machine via USB, and another Centos 7 server is also monitoring it over the network.

With nut enabled, I'm getting


root@gw0:/ # ps aux | grep nut
uucp  85440    0.0  0.0   12896    2660  -  Ss   10:19       0:00.00 /usr/local/libexec/nut/apcupsd-ups -a bigups-vm2


When I disable nut, there are no apcupsd processes.  When I enable Apcupsd, there aren't any, either.

But it does make a difference weather nut is installed or not because when nut is installed it says "empty output" rather than "action not found" on the Apcupsd status page.

Once the plugin is integrated (it was merged to development a couple of minutes ago) the underlying service package will be installed automatically.


Cheers,
Franco

Does that mean that we need to remove the files from the package we downloaded?  Can I install the required service package now so I can get it to work while I'm still at the site?

Not so fast... 22.1.9 will ship os-apcupsd-devel plugin (likely next week) and then another 22.1.x will enable the release plugin. I'm not sure anything changes for manual installs at the moment, but on the other hand manual installs just continue to work fine.

If you need apcupsd binaries just install it :)

# pkg install apcupsd


Cheers,
Franco