core: Failure getting NUT ups alias, Socket error

After updating to 0.108.4 the NUT all the sensors are unavailable. Removed the intergration. Added the intergration the following error appears :

ERROR (SyncWorker_8) [homeassistant.components.nut] Failure getting NUT ups alias, Socket error.

Works again when reverting back to 0.108.3

Environment

  • Home Assistant Core release with the issue: 0.108.4
  • Last working Home Assistant Core release (if known): 0.108.3
  • Operating environment (Home Assistant/Supervised/Docker/venv): Ubuntu with docker and supervised Home Assistant
  • Integration causing this issue: NUT
  • Link to integration documentation on our website: NUT

Problem-relevant configuration.yaml

None only configurable via intergration

Traceback/Error logs


ERROR (SyncWorker_8) [homeassistant.components.nut] Failure getting NUT ups alias, Socket error.

Additional information

UPS model : Eaton Ellipse Eco 650

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 24 (9 by maintainers)

Most upvoted comments

Hi - I got NUT installed on a Orange Pi 800 and am able to get stats from it by running upsc cyberpower@localhost. When I try to add the ups via the NUT add-in for Home Assistant I keep getting, Failure getting NUT ups alias, Socket error. When run my Ubuntu VM with the UPS connected within it and not on the host HA is able to auto detect it. I am not dealing with separate subnets here. HA, Orange Pi and Ubuntu are all on my 192.168.10.x subnet. When trying to add NUT in HA I have tried with hostname, IP address of the Orange Pi and I even used a0d7b954-nut as the host name. The password to connect to NUT is set correctly in upsmon.conf. I have set upsd.conf to listen using 127.0.0.1 and also tried 0.0.0.0. I am running out of ideas as to what might be going on here. I even setup a new instance of HA on a new VM. On one side note when the Ubuntu VM is connected to the UPS and HA auto detects in I still get, Failure getting NUT ups alias, Socket error. But its further than what I am getting when the UPS is attached to Orange Pi 800. Suggestions and ideas welcomed.

If the NUT server is auto detected, HA takes the ip adress of the machine, lets say 192.168.178.33. But in my case, it is not possible to log into the nut-server with the ip-adress. “telnet 192.168.178.33 3493” does not work. I have to use “telnet 127.0.0.1 3493” or “telnet localhost 3493”

I was having the same error after changing the ups and readd the integration. Solution was to use another username in the addon.

Looks like this is related…sorry for reopening this.

`Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 128, in async_init
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 201, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/config/custom_components/nut/config_flow.py", line 123, in async_step_import
    if self._host_port_alias_already_configured(user_input):
  File "/config/custom_components/nut/config_flow.py", line 189, in _host_port_alias_already_configured
    existing_host_port_aliases = {
  File "/config/custom_components/nut/config_flow.py", line 190, in <setcomp>
    _format_host_port_alias(entry.data)
  File "/config/custom_components/nut/config_flow.py", line 98, in _format_host_port_alias
    host = user_input[CONF_HOST]
KeyError: 'host'`

This is after enabling logging and installing custom component, although it’s the same error I was seeing with the normal integration. Not sure where to go from here, the integration isn’t actually showing up in “Integrations” so there’s nothing to remove and reinstall.

Fixed here https://github.com/home-assistant/core/pull/38372