planbnet/livisi_unofficial

Failed to connect to SHC

Closed this issue · 5 comments

System Health details

System Information

version core-2024.4.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 6.6.25-haos
arch x86_64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.34.0
Stage running
Available Repositories 1399
Downloaded Repositories 27
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 12.2
update_channel stable
supervisor_version supervisor-2024.04.0
agent_version 1.6.0
docker_version 25.0.5
disk_total 115.4 GB
disk_used 10.7 GB
healthy true
supported true
board generic-x86-64
supervisor_api ok
version_api ok
installed_addons Advanced SSH & Web Terminal (17.2.0), File editor (5.8.0), Home Assistant Google Drive Backup (0.112.1), Samba Backup (5.2.0), Samba share (12.3.1), motionEye (0.20.0)
Dashboards
dashboards 6
resources 20
views 31
mode storage
Recorder
oldest_recorder_run 11. April 2024 um 16:00
current_recorder_run 20. April 2024 um 22:57
estimated_db_size 141.31 MiB
database_engine sqlite
database_version 3.44.2

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

Hi, now a scenario has occurred with the following error message, which I don't need at all. At some point, the central center said goodbye and with it, of course, my heating. Recently, errors such as Error 2007 or that any tokens have expired have been accumulating. Since I always have to have such things translated, it's really very tedious. That's why I don't report all error messages.

It looks a bit like it's a chain of circumstances that leads to.

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.livisi
Quelle: custom_components/livisi/init.py:41
Integration: Livisi Unofficial (Dokumentation, Probleme)
Erstmals aufgetreten: 20. April 2024 um 22:57:25 (400 Vorkommnisse)
Zuletzt protokolliert: 07:42:02

Failed to connect to shc
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1025, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1120, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1102, in create_connection
sock = await self._connect_sock(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 1005, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 641, in sock_connect
return await fut
^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/selector_events.py", line 681, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('192.168.178.57', 8080)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/config/custom_components/livisi/livisi_connector.py", line 188, in _async_send_request
async with self._web_session.request(
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1194, in aenter
self._resp = await self._coro
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 578, in _request
conn = await self._connector.connect(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 544, in connect
proto = await self._create_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 944, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1257, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1226, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1033, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.178.57:8080 ssl:False [Connect call failed ('192.168.178.57', 8080)]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/config/custom_components/livisi/init.py", line 41, in async_setup_entry
await coordinator.async_setup()
File "/config/custom_components/livisi/coordinator.py", line 61, in async_setup
self.aiolivisi = await livisi_connect(
^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/livisi_connector.py", line 43, in connect
await connection.connect(host, password)
File "/config/custom_components/livisi/livisi_connector.py", line 71, in connect
await self._async_retrieve_token()
File "/config/custom_components/livisi/livisi_connector.py", line 140, in _async_retrieve_token
access_data = await self._async_send_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/livisi/livisi_connector.py", line 205, in _async_send_request
raise ShcUnreachableException("Failed to connect to shc") from exc
custom_components.livisi.livisi_errors.ShcUnreachableException: Failed to connect to shc

Reproduction steps

...

Debug logs

.

Diagnostics dump

.

Ich antworte mal auf Deutsch...
Das ist kein Problem der Integration - irgendwas in Deinem Netzwerk oder (wahrscheinlicher) deinem SHC ist kaputt... "Cannot connect to host 192.168.178.57:8080 ssl:False [Connect call failed ('192.168.178.57', 8080)]" - die Verbindung wird abgelehnt, da kann die Integration nichts dran ändern... Die Frage ist also eher die - wenn die Basisstation dann wieder da ist (nach einem, Reboot z.B.) - läuft dann alles weiter oder bleiben die Devices im "unbekannt" Zustand? Das sollte nämlich in den neuen Versionen nicht mehr so sein...

Hi,

Deutsch ist auch für mich leichter. Danke.

Sobald ich die SHC reboote läuft alles, bis auf die Fenstersensoren, deren Zustand steht auf „nicht Verfügbar“ . Wenn ich die Fenster einmal öffne und schließe, sind auch die wieder da.

Leider sagt mir meine SHC nicht was los ist, dann könnte ich da schauen. Auch die Fritzbox meldet kein Vorkommnis.

Ich habe eine weitere Meldung hier eingestellt, diese Fehlermeldung hatte ich gestern auch begleitet von Error 2007 und irgendwas mit Token abgelaufen danach macht dann die SHC Probleme, exat wie beim letzten mal. Also irgendwie ein Schema. Mit der Version 1.8.x hatte ich das Problem nicht. Ich glaube das kam mit 1.9.x. Bin mir aber nicht mehr sicher.

An meinem Netzwerk habe ich nichts geändert, die SHC hängt direkt an der Fritzbox das war schon immer so und es lief ja auch alles Problemlos.

Was ich nie gemacht habe ist, dass ich die Integration mal komplett runtergebomnen habe um Deine, frei von Altlasten, zu installieren. Vielleicht ist das ja noch wichtig zu wissen.

Achso, ich muss tatsächlich einen Reboot machen weil ich auch nicht mehr in die Weboberdläche der SHC komme. Die Kiste hängt sich auf.

Ich warte jetzt mal die nöchsten Fehler ab und werde die hier einstellen. Natürlich kann es sein, das meine SHC nicht meht ganz richtig läuft. Aber daran glaube ich nicht wirklich, denn sie müsste ja öfter mal dieses Problem haben und sich aufhängen. Ich finde es schon seltsam, dass die Meldungen im Protokoll auftauchen und sich die SHC danach verabschiedet.

Ich glaub du verstehst das Problem falsch. Dein SHC hat ein Problem und deshalb kann die Integration nicht mehr damit verbinden und meldet dann natürlich einen Fehler. Wie kommst du darauf, dass das ein Problem der Integration ist? Dass ein Reboot des SHC nötig ist sollte doch zeigen, dass dort das Problem liegt...?

Guten Morgen,

naja, dass die SHC hängen bleibt, ist mit schon bewusst. Die Frage wäre nur, ist die SHC platt, oder ist es eine Verkettung verschiedener Umstände die dazu führt.

Für mich sieht es so aus, als würden verschiedene Meldungen zu diesem Umstand fühten. Aber ich will nicht ausschliessen, dasss meine SHC fertig ist. Da ich der Einzige mit diesem Problem bin, kann es an der Integration nicht liegen.

Ich habe noch eine zweite SHC liegen. Sollte das wieder auftreten, dann probiere ich einfach mal die andere aus.

Insgesamt läuft es und damit bin ich auch mehr als zufrieden.

Fehler kam nicht mehr