Core: IHC is failing after upgrade from 0.83 to 0.85.0

Created on 12 Jan 2019  Â·  11Comments  Â·  Source: home-assistant/core

IHC is failing after upgrade from to 0.85.0

2019-01-12 13:13:08 ERROR (MainThread) [homeassistant.setup] Error during setup of component ihc
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/ihc/__init__.py", line 151, in setup
    if not ihc_setup(hass, config, controller_conf, index):
  File "/usr/src/app/homeassistant/components/ihc/__init__.py", line 172, in ihc_setup
    hass, config, ihc_controller, controller_id)):
  File "/usr/src/app/homeassistant/components/ihc/__init__.py", line 241, in autosetup_ihc_products
    component_setup, groups, controller_id)
  File "/usr/src/app/homeassistant/components/ihc/__init__.py", line 269, in get_discovery_info
    'position': product.attrib['position']},
KeyError: 'position'

Last working Home Assistant release (if known):
0.83

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

ihc:
  - url: http://r.r.r.r
    username: admin
    password: rrrrrrrrrr
    auto_setup: True
    info: True
ihc

Most helpful comment

The 0.85 update doesn't work for me either (0.84.x did).
My error log is almost similar to @djeclemen
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py", line 172, in ihc_setup hass, config, ihc_controller, controller_id)): File "/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py", line 241, in autosetup_ihc_products component_setup, groups, controller_id) File "/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py", line 268, in get_discovery_info 'note': product.attrib['note'], KeyError: 'note'

The error must be in 0.85. I have downloaded the lastest and are trying to pinpoint the bug.

All 11 comments

I have same error. Please post if you find a fix. Thanks!

Also same error here. No configuration changes since 0.84 where my ihc setup was working fine.

CC @mopolus

@Deez73 did it work in 0.84.4 for you? This will hint at what change broke it.

Not sure if I was running 0.84.4 or later but my IHC was working. Is there a way to see my upgrade log (system log is only 50 entries)? Didn't make a snapshot just before upgrading to 0.85 unfortunately. Latest snapshot is 0.84.1 where IHC was working fine.

Mine was also working in 0.84.6 but stopped after the upgrade to 0.85...no snapshot either unf….

If it was working in 0.84.6, then I'm guessing it's the change of xml library in 0.85 that has caused it.

https://github.com/home-assistant/home-assistant/pull/19640

The other change was a clean up, but I can't find anything wrong in that:
https://github.com/home-assistant/home-assistant/pull/19449

Just downgraded to 0.84.6 (hassio ha update --version=0.84.6) and now it works. So it is a 0.85 issue.

Pretty sure I was on 0.84.5 or .6 (where IHC was working fine), so I would also expect the problem to be caused with the change of xml library from 0.84.6 -> 0.85

The 0.85 update doesn't work for me either (0.84.x did).
My error log is almost similar to @djeclemen
File "/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py", line 172, in ihc_setup hass, config, ihc_controller, controller_id)): File "/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py", line 241, in autosetup_ihc_products component_setup, groups, controller_id) File "/usr/local/lib/python3.6/site-packages/homeassistant/components/ihc/__init__.py", line 268, in get_discovery_info 'note': product.attrib['note'], KeyError: 'note'

The error must be in 0.85. I have downloaded the lastest and are trying to pinpoint the bug.

Errors found and fixed (#20091).
The errors was triggered by changes to the defusedxml library and caused by attributes missing (i.e. no 'notes' or 'location' in the IHC description -> throwing an exception). The old lib seems to be more forgiving about that.

I noticed another semi breaking change as the character interpretation has changed in the latest release. This impact IHC entities including Nordic character like the Danish æøå. So you might have to update the naming for these entities in your customization and groups

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sogeniusio picture sogeniusio  Â·  3Comments

arangates picture arangates  Â·  3Comments

Elmardus picture Elmardus  Â·  3Comments

kirichkov picture kirichkov  Â·  3Comments

piitaya picture piitaya  Â·  3Comments