peribeir / homeassistant-rademacher

This custom integration provides access to Rademacher Devices connected to a HomePilot (or Start2Smart) bridge.
GNU General Public License v3.0
59 stars 12 forks source link

Integration fails on bridge with password protection #73

Closed 0anton closed 1 year ago

0anton commented 1 year ago

Running Rademacher Brige on the latest version 5.5.10. I set the password to protect the bridge from the unauthorized access. Integration fails to ask for the password. Once in enter the password, it shows Unknown Exception. Existing configuration fails with Config flow could not be loaded: 500 Internal Server Error Server got itself in trouble

I see from the code, that generally integration supports configuration flow with the password, but for some reason it does not work.

THe Bridge behaves normally - I have to log in using password when I enable it. Once I disable password, integration works again normally, as expected.

I use the latest version of the integration - v1.11.1

Debug logs:

Logger: homeassistant.config_entries
Source: custom_components/rademacher/__init__.py:53
Integration: Rademacher HomePilot ([documentation](https://github.com/peribeir/homeassistant-rademacher), [issues](https://github.com/peribeir/homeassistant-rademacher/issues))
First occurred: 10:41:55 (1 occurrences)
Last logged: 10:41:55

Error setting up entry Host: 192.168.xx.yy for rademacher
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 383, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/rademacher/__init__.py", line 53, in async_setup_entry
    manager = await HomePilotManager.async_build_manager(api)
  File "/usr/local/lib/python3.10/site-packages/homepilot/manager.py", line 34, in async_build_manager
    for id_type in await manager.get_device_ids_types()
  File "/usr/local/lib/python3.10/site-packages/homepilot/manager.py", line 98, in get_device_ids_types
    devices = await self.api.get_devices()
  File "/usr/local/lib/python3.10/site-packages/homepilot/api.py", line 83, in get_devices
    response = await response.json()
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client_reqrep.py", line 1104, in json
    raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html;charset=utf-8', url=URL('http://192.168.xx.yy/devices')
peribeir commented 1 year ago

Should be fixed in v1.12.1. Please validate and reopen if issue still exists.