planbnet/livisi_unofficial

Cant login in Livisiunofficial

Closed this issue · 13 comments

System Health details

is this needed?

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

Have follow all steps

when i put IP and Password, i get "unknown error occured"

Reproduction steps

  1. delete official Livisiintegration in Devices and reboot
  2. Add this Repo in HACS and install unofficial Livisi Integration
  3. reboot
  4. Add livisi unofficial in Devices and Integration
  5. add IP and correct Password
    Error unknown error occured

Dont know whats wrong

Debug logs

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: aiohttp.server
Source: custom_components/livisi/aiolivisi/aiolivisi.py:127
Integration: LIVISI Smart Home (documentation, issues)
First occurred: 07:17:18 (7 occurrences)
Last logged: 07:20:10

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 94, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 181, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 296, in async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 392, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/livisi/config_flow.py", line 55, in async_step_user
    controller_info = await self.aio_livisi.async_get_controller()
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/livisi/aiolivisi/aiolivisi.py", line 140, in async_get_controller
    return await self.async_get_controller_status()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/livisi/aiolivisi/aiolivisi.py", line 144, in async_get_controller_status
    shc_info = await self.async_send_authorized_request("get", url="status")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/livisi/aiolivisi/aiolivisi.py", line 80, in async_send_authorized_request
    return await self.async_send_request(method, path, payload, self._auth_headers)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/livisi/aiolivisi/aiolivisi.py", line 113, in async_send_request
    response = await self.__async_send_request(method, url, payload, headers)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/livisi/aiolivisi/aiolivisi.py", line 127, in __async_send_request
    async with self._web_session.request(
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
    await resp.start(conn)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 899, in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
    await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected

Diagnostics dump

No response

if i just add livisiunofficial without delete official livisi, i get a "migrate error"

debuglog:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.config_entries
Source: custom_components/livisi/aiolivisi/aiolivisi.py:127
Integration: Livisi Unofficial (documentation, issues)
First occurred: 07:29:48 (1 occurrences)
Last logged: 07:29:48

Error migrating entry SHC Classic for livisi
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 633, in async_migrate
result = await component.async_migrate_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/init.py", line 82, in async_migrate_entry
await coordinator.async_setup()
File "/config/custom_components/livisi/coordinator.py", line 92, in async_setup
controller_data = await self.aiolivisi.async_get_controller()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/aiolivisi/aiolivisi.py", line 140, in async_get_controller
return await self.async_get_controller_status()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/aiolivisi/aiolivisi.py", line 144, in async_get_controller_status
shc_info = await self.async_send_authorized_request("get", url="status")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/aiolivisi/aiolivisi.py", line 80, in async_send_authorized_request
return await self.async_send_request(method, path, payload, self._auth_headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/aiolivisi/aiolivisi.py", line 113, in async_send_request
response = await self.__async_send_request(method, url, payload, headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/aiolivisi/aiolivisi.py", line 127, in __async_send_request
async with self._web_session.request(
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
await resp.start(conn)
File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 899, in start
message, payload = await protocol.read() # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected

This looks like a network error in both cases. Please double check the network connection. There's nothing I can do about this - I cannot support individual errors, sorry.

if i use the orginal Livisiintegration, this work fine. So the Networkconnection work from HA to SHC1.

This integration is based on the official one and the connection code wasn't changed. "Connection refused" is quite specific about what's wrong...

its a crazy error and i wondering whats happend. I dont find the issue. official Integration work, but yours not... i had look in Fritzbox-Settings, found nothing what is wrong, cable are orginal and new. Hope any find a solution

How many instances are you running? Maybe the livisi hub is quite restrictive with the number of open connections? Though for me, running my productive system and a dev setup at once is not a problem

only to one HA (Raspi4)and nothing more.

without livisi unofficial, connection work fine, see PSS and other devices, its only whe when i install unofficial.
in a empty testsystem(Linux at VM) i get same error

You were right. Seems like this is a bug in V1 SHCs for which I removed the workaround when fixing another bug... See #19

not helped, same unknown error between migration error😥

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: aiohttp.server
Source: custom_components/livisi/aiolivisi.py:131
Integration: Livisi Unofficial (documentation, issues)
First occurred: 23:51:39 (1 occurrences)
Last logged: 23:51:39

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 94, in forwarded_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
result = await handler(request, **request.match_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 181, in post
return await super().post(request, flow_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 296, in async_configure
result = await self._async_handle_step(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 392, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/config_flow.py", line 59, in async_step_user
controller_info = await self.aio_livisi.async_get_controller()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/aiolivisi.py", line 144, in async_get_controller
return await self.async_get_controller_status()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/aiolivisi.py", line 148, in async_get_controller_status
shc_info = await self.async_send_authorized_request("get", path="status")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/aiolivisi.py", line 84, in async_send_authorized_request
return await self.async_send_request(method, url, payload, self._auth_headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/aiolivisi.py", line 117, in async_send_request
response = await self.__async_send_request(method, url, payload, headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/aiolivisi.py", line 131, in __async_send_request
async with self._web_session.request(
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 560, in _request
await resp.start(conn)
File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 899, in start
message, payload = await protocol.read() # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiohttp/streams.py", line 616, in read
await self._waiter
aiohttp.client_exceptions.ServerDisconnectedError: Server disconnected

Probably the same bug as in #19 - maybe we can fix this with the same workaround

File "/config/custom_components/livisi/aiolivisi.py", line 131, in __async_send_request <-- you are not using the latest updates wit the merged PR from @DanielHabenicht - that should fix your problem.

lol. i add Livisi unofficial only with HACS, does not work.
I have download the new git,,, overwrote this... now its run.

Please make a new version (1.31) and its download correctly

in German... "was für ne schwere Geburt!"

I'll release a new version soon. I just need to test my other changes for stability first so if new problems arise I don't have to guess which change caused it.