Network UPS Tools add-on

I just uploaded an Hass.io add-on for networkupstools.org. It is intended to be used with the NUT sensor. If you are interested in testing please have a look at https://github.com/asciinaut/hassio-addons/tree/master/nut

Adding any supported USB UPS should be straight forward. Adding networked or serial connected UPS will need additional changes. Please let me know, if you you have such UPSes and are willing to test.

1 Like

I will try to test this weekend.

1 Like

Just tried to install this and Iā€™m getting this error:

17-10-07 15:52:37 INFO (SyncWorker_8) [hassio.dock.addon] Start build 8798f11b/armhf-addon-nut:0.1
17-10-07 15:52:37 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in start
    resp = yield from self._request_handler(request)
  File "/usr/lib/python3.6/site-packages/aiohttp/web.py", line 306, in _handle
    resp = yield from handler(request)
  File "/usr/lib/python3.6/site-packages/hassio/api/util.py", line 31, in wrap_api
    answer = await method(api, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/hassio/api/addons.py", line 176, in install
    addon.install(version=version), loop=self.loop)
  File "/usr/lib/python3.6/site-packages/hassio/addons/addon.py", line 467, in install
    if not await self.docker.install(version):
  File "/usr/lib/python3.6/site-packages/hassio/dock/util.py", line 18, in wrap_api
    return await method(api, *args, **kwargs)
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/hassio/dock/addon.py", line 198, in _install
    return self._build(tag)
  File "/usr/lib/python3.6/site-packages/hassio/dock/addon.py", line 211, in _build
    image = self.docker.images.build(**build_env.get_docker_args(tag))
  File "/usr/lib/python3.6/site-packages/docker/models/images.py", line 175, in build
    raise BuildError(chunk['error'])
docker.errors.BuildError: invalid reference format: repository name must be lowercase

Any ideas?

Iā€™ve tried on a Raspberry Pi 2 connected to an APC ES 700.
Works well - great work and thank you!
I would recommend this for the official repo.

Thatā€™s because the Dockerfile for the addon needs to be updated to support the current hassio addon build system. You can read about the change at Improved Hass.io build system - Home Assistant.

@ASCIInaut, I just submitted a pull request to your repo with the necessary change to get the addon working again. Thanks for creating this addon. Itā€™s been helpful for me.

1 Like

Trying to install the addon, but when I add it to the list of repoā€™s and hit save it just disappears from the listā€¦

Latest version of hassio with 3 other repoā€™s installed.

Thank you for the the pull reqest @NotoriousBDG :+1: . I merged it and NUT builds on latest stable hassio.

1 Like

Got this setup and working with my APC Back-UPS pro 1500 but i can not get the current wattage to show. I can get the ups.realpower.nominal to show but this is not the current load on the system in watts. Any body got an idea how to get this to show?

1 Like

help pls

starting version 3.2.4
    Network UPS Tools - UPS driver controller 3.6.0-5670-ga94ef24fb3
    Network UPS Tools - PowerCom protocol UPS driver 0.17 (3.6.0-5670-ga94ef24fb3)
    Unable to open auto: No such file or directory
    Things to try:
     - Check 'port=' in ups.conf
     - Check owner/permissions of all parts of path
    Fatal error: unusable configuration
    Driver failed to start (exit status=1)

Hi, Iā€™ve added the repo but iā€™m not able to install the add-on

the ā€œinstallā€ label turns red after a few seconds without install the add-on

any help?

hass.io v 0.69.0

I have the same problem, the build fails in hassio 0.69.0.
I opened an issue in https://github.com/asciinaut/hassio-addons/issues/2 .

Try using this forked repo:
https://github.com/colindunn/hassio-addons

4 Likes

It works all right. Thank you very much!

First of all, great work!
Unfortunately I can not install the add-on. It does not complete the installation process and the ā€˜instalā€™ button turns red.
Am I too incompetent to do it? :wink:
Thank you

Iā€™m having a similar problem. Addon stopped working so I uninstalled and canā€™t reinstall.

Just tried the forked repo and all working now. Thanks Network UPS Tools add-on

Iā€™ve installed the forked repo from colindunn but i have an 2.2kVA APC Smart UPS with serial communication. Iā€™ve connected it with the same serial cable it was working on a windows PC and plugged a usb-serial converter in the raspi 3B+. Hassio reports the following hardware:
Hardware

  • serial:
    • /dev/ttyAMA0
    • /dev/ttyUSB0

so in the add on configuration i just mofified this in the standard configuration:
ā€œupsnameā€: ā€œupsā€,
ā€œdriverā€: ā€œapcsmartā€,
ā€œportā€: ā€œ/dev/ttyUSB0ā€

now when i try to start the service i get the following:

Network UPS Tools - UPS driver controller 3.8.0-3727-geade014bef
Network UPS Tools - APC Smart protocol driver 3.1 (3.8.0-3727-geade014bef)
Fatal error: unusable configuration
APC command table version 3.1
Unable to open /dev/ttyUSB0: No such file or directory
Things to try:

  • Check ā€˜port=ā€™ in ups.conf
  • Check owner/permissions of all parts of path
    Driver failed to start (exit status=1)

@PAVazquez I have the same behaviour .
I have tried ā€œchmod g+rw /dev/ttyUSB0ā€ but it didnā€™t help me.
usermod command is missing in Hass.io.

Did anyone try the NUT addon that @frenck and @dale3h are adding to the community repo?

Its not released into the repo yet, but I expect it would be possible to clone as a local addon or to add it to another repoā€¦

For now I will be using the forked repo linked by @MichaelSchemmer.

Iā€™m unable to get the addon-nut in the Community Has.io repo to work. This is the error in the logs:

[cont-init.d] 90-upsdrvctl: executing... 
INFO: Starting the UPS drivers
Network UPS Tools - UPS driver controller 3.8.0-3727-geade014bef
Network UPS Tools - Generic HID driver 0.41 (3.8.0-3727-geade014bef)
USB communication driver 0.33
No matching HID UPS found
Driver failed to start (exit status=1)
[cont-init.d] 90-upsdrvctl: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.
 
 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Iā€™m able to get NUT setup on a separate RPI without any issues. It looks like the add-on canā€™t find the USB cable attached to the RPi. This is using a CyberPower UPS. I also have a Aeotec Z-Wave USB dongle attached to the same RPi3ā€¦ not sure if that might a factor.

The other repo works fine (for me)