I was excited to receive my UPS cable yesterday, and quickly managed to get the actual apcupsd daemon up and running on my RPi3B. I run Hassbian with HAv0.65.5 and I thought I would be able to quickly integrate the sensor, but i’m running into a wall…
I initially tried to bring up the (non-binary?) apcupsd sensor in HA, but I was getting an error in my logs, nearly identical to the one posted below. I decided to switch to the binary sensor to pair down to the simplest possible config, I literally copy/pasted the two-line example config off the component page, but I’m still getting this error.
Here it is:
2018-03-28 21:49:31 ERROR (MainThread) [homeassistant.setup] Error during setup of component apcupsd
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/setup.py", line 145, in _async_setup_component
component.setup, hass, processed_config)
File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
yield self # This tells Task to wait for completion.
File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
future.result()
File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
raise self._exception
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/apcupsd.py", line 44, in setup
conf = config[DOMAIN]
KeyError: 'apcupsd'
2018-03-28 21:49:32 ERROR (MainThread) [homeassistant.setup] Unable to setup dependencies of binary_sensor.apcupsd. Setup failed for dependencies: apcupsd
2018-03-28 21:49:32 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform binary_sensor.apcupsd: Could not setup all dependencies.
There’s an ancient fix for a similar error back in 0.27 floating around on google, you needed to set the hostname to resolve the issue. Just to be thorough I tried it but came back to the same error.
From my venv I can run:
python /srv/homeassistant/bin/apcaccess
and I see the apcaccess output so at least that part of the component is working, I’m not sure how to go on with further testing and troubleshooting. Any guidance/ideas would be much appreciated, thanks!