APC UPS ES700 error at startup

Hi,
I’m trying to hook up an APC ES700 ES PSU to hassio 0.87.0 running on a Raspberry 3+ but I get the following error at startup…

Log Details (ERROR)
Thu Feb 14 2019 23:41:26 GMT+0100 (centraleuropeisk normaltid)
Failure while testing APCUPSd status retrieval.
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/apcupsd.py", line 53, in setup
    DATA.update(no_throttle=True)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/util/__init__.py", line 315, in wrapper
    result = method(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/apcupsd.py", line 89, in update
    self._status = self._get_status()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/apcupsd.py", line 84, in _get_status
    return self._parse(self._get(host=self._host, port=self._port))
  File "/usr/local/lib/python3.6/site-packages/apcaccess/status.py", line 37, in get
    sock.connect((host, port))
ConnectionRefusedError: [Errno 111] Connection refused

My configuration.yaml has the following entries…

apcupsd:
  host: 127.0.0.1
  port: 3551

# APC UPS
sensor:
  - platform: apcupsd
  resources:
    - bcharge
    - loadpct
    - status
    - timeleft
    - model

What have I done wrong?

1 Like

Read the note at the bottom of the page:

I did, but I don’t get it. In the apsupsd docs I read

The NIS server is connected to the UPS and should be configured exactly as a standalone configuration, but with NETSERVER on. In all other respects, the server should be configured in standalone mode. You may also set the NIS server specific options NISIP to restrict which IP address of the server which apcupsd listens on. The default, 0.0.0.0, means to list on all of the server host’s IP addresses; NISPORT (default 3551) to set which TCP port the server listens on

Does that mean that I should set 0.0.0.0 as host in my configuration.yaml like…

apcupsd:
  host: 0.0.0.0
  port: 3551

… or what ? I tried it but got the same result as before. I’ve tried all sorts of host addresses but I still get the same error message.

The same happens to me. Not sure how to solve it.

sudo netstat -tulpn | grep LISTEN

shows that the raspberry is listening on 127.0.0.1:3551

Not sure it should be 0.0.0.0 instead or how to change it.

To solve it just edit the configuration file with

sudo nano /etc/apcupsd/apcupsd.conf

And change the NSIP address from 127.0.0.1 to 0.0.0.0.

It works!