hassio-addons / addon-nut

Network UPS Tools - Home Assistant Community Add-ons
https://addons.community
MIT License
188 stars 36 forks source link

apc_modbus over TCP not supported #375

Closed HarrisonWilson closed 2 months ago

HarrisonWilson commented 2 months ago

Problem/Motivation

Appears that due to the version being pinned to NUT 2.8.0-7 if I am reading correctly. Wanted to take advantage of apc_modbus over TCP as I have a UPS that only supports one specific management card and I don't have a way to add direct connections like RS232, USB, etc. The SNMP drivers in NUT also for whatever reason don't seem to fully understand that this is a split-phase (2 phase) UPS (model SURTD5000RMXLP3U) which is very uncommon and thus not all statistics are being reported correctly, which in turn shows incorrect information.

When I go to configure apc_modbus as driver with porttype:tcp and port:[hostname] the add-on crashes with "Can't start /lib/nut/apc_modbus: No such file or directory"

Expected behavior

Newer version and support for apc_modbus

Actual behavior

Add-on crashes following NUT documentation for apc_modbus with "Can't start /lib/nut/apc_modbus: No such file or directory"

Steps to reproduce

Use configuration settings as follows:

- name: test
  driver: apc_modbus
  porttype: tcp
  port: 192.168.1.1:502 
  config: [] 

error is shown in logs:

Network UPS Tools - UPS driver controller 2.8.0
Can't start /lib/nut/apc_modbus: No such file or directory
cont-init: info: /etc/cont-init.d/nut.sh exited 1

Proposed changes

Update version. Ensure support for apc_modbus

Was specifically pointed to this PR.

sinclairpaul commented 2 months ago

As discussed on previous issues, the version installed is the one available on the Debian Stable repos.

If you need this functionality, I would suggest the addon is not for you.

HarrisonWilson commented 2 months ago

That is fair, but with that said - before I open another issue, can the documentation be updated to reflect that it tracks the Debian stable version, thus actual features/function may be behind the NUT developers as their stable version is showing as 2.8.2?

sinclairpaul commented 2 months ago

The majority of users would not understand what that meant, so I doubt there is much value. For more technical users you can look at the Dockerfile to see the sources.