dm82m / hass-Deltasol-KM2

Custom component for retrieving sensor information from Resol KM1/KM2, DL2/DL3, VBus/LAN, VBus/USB
MIT License
25 stars 6 forks source link

All deltasol sensors became unavailable #41

Closed freddy357 closed 5 months ago

freddy357 commented 5 months ago

Hi, Everyday i am checking this fantastic data working great loving it. Today all sensors became unavailable that sucks. I am not sure what changed. So here is the log maybe some one can put me in the right direction.

Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:356 integration: Sensor (documentation, issues) First occurred: 09:08:18 (1 occurrences) Last logged: 09:08:18

Error while setting up deltasol platform for sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 356, in _async_setup_platform await asyncio.shield(awaitable) File "/config/custom_components/deltasol/sensor.py", line 98, in async_setup_platform await update_unique_ids(hass, coordinator.data) File "/config/custom_components/deltasol/sensor.py", line 58, in update_unique_ids for unique_id, endpoint in data.items(): ^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'items'

This error originated from a custom integration.

Logger: custom_components.deltasol Source: helpers/update_coordinator.py:315 integration: deltasol (documentation, issues) First occurred: 09:08:18 (1 occurrences) Last logged: 09:08:18

Unexpected error fetching deltasol_sensor data: Error detecting Resol product - HTTPConnectionPool(host='127.0.0.1', port=3333): Max retries exceeded with url: /cgi-bin/get_resol_device_information (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f743a1700>: Failed to establish a new connection: [Errno 111] Connection refused')), please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 95, in create_connection raise err File "/usr/local/lib/python3.12/site-packages/urllib3/util/connection.py", line 85, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 416, in _make_request conn.request(method, url, **httplib_request_kw) File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 244, in request super(HTTPConnection, self).request(method, url, body=body, headers=headers) File "/usr/local/lib/python3.12/http/client.py", line 1331, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1377, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1326, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/local/lib/python3.12/http/client.py", line 1085, in _send_output self.send(msg) File "/usr/local/lib/python3.12/http/client.py", line 1029, in send self.connect() File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 205, in connect conn = self._new_conn() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f743a1700>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1', port=3333): Max retries exceeded with url: /cgi-bin/get_resol_device_information (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f743a1700>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/config/custom_components/deltasol/deltasolapi.py", line 64, in detect_product response = requests.request("GET", url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=3333): Max retries exceeded with url: /cgi-bin/get_resol_device_information (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f743a1700>: Failed to establish a new connection: [Errno 111] Connection refused'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 315, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 271, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/deltasol/sensor.py", line 83, in async_update_data raise error File "/config/custom_components/deltasol/sensor.py", line 79, in async_update_data data = await hass.async_add_executor_job(api.fetch_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/deltasol/deltasolapi.py", line 107, in fetch_data raise error File "/config/custom_components/deltasol/deltasolapi.py", line 92, in fetch_data product = self.detect_product() ^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/deltasol/deltasolapi.py", line 83, in detect_product raise IntegrationError(error) homeassistant.exceptions.IntegrationError: Error detecting Resol product - HTTPConnectionPool(host='127.0.0.1', port=3333): Max retries exceeded with url: /cgi-bin/get_resol_device_information (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f743a1700>: Failed to establish a new connection: [Errno 111] Connection refused')), please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose

This error originated from a custom integration.

Logger: custom_components.deltasol Source: custom_components/deltasol/sensor.py:82 integration: deltasol (documentation, issues) First occurred: 09:08:18 (1 occurrences) Last logged: 09:08:18

Stopping Resol integration due to previous error: Error detecting Resol product - HTTPConnectionPool(host='127.0.0.1', port=3333): Max retries exceeded with url: /cgi-bin/get_resol_device_information (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f743a1700>: Failed to establish a new connection: [Errno 111] Connection refused')), please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose

This error originated from a custom integration.

Logger: custom_components.deltasol Source: custom_components/deltasol/deltasolapi.py:82 integration: deltasol (documentation, issues) First occurred: 09:08:18 (1 occurrences) Last logged: 09:08:18

Error detecting Resol product - HTTPConnectionPool(host='127.0.0.1', port=3333): Max retries exceeded with url: /cgi-bin/get_resol_device_information (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f743a1700>: Failed to establish a new connection: [Errno 111] Connection refused')), please file an issue at: https://github.com/dm82m/hass-Deltasol-KM2/issues/new/choose

dm82m commented 5 months ago

Restart the addon resol-vbus. Restart Home Assistant core. If it’s not working, post logs of resol-vbus addon and debug lots of Home Assistant core coming from deltasol

freddy357 commented 5 months ago

Thanks Dirk, after de reset en reboot it is working again.

Op vr 12 apr. 2024 10:15 schreef Dirk @.***>:

Restart the addon resol-vbus. Restart Home Assistant core. If it’s not working, post logs of resol-vbus addon and debug lots of Home Assistant core coming from deltasol

— Reply to this email directly, view it on GitHub https://github.com/dm82m/hass-Deltasol-KM2/issues/41#issuecomment-2051244840, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEEGW4FWY3N62GB7MEVLSZDY46JYZAVCNFSM6AAAAABGDVUE4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJRGI2DIOBUGA . You are receiving this because you authored the thread.Message ID: @.***>

dm82m commented 5 months ago

Sometimes, especially after a full server restart, the home Assistant core container starts earlier as the resol-vbus container. That leads to the problem that the integration on the core container can’t access the resol-vbus addon.

glad that it is back working.

freddy357 commented 5 months ago

👍

Op vr 12 apr. 2024 12:44 schreef Dirk @.***>:

Sometimes, especially after a full server restart, the home Assistant core container starts earlier as the resol-vbus container. That leads to the problem that the integration on the core container can’t access the resol-vbus addon.

glad that it is back working.

— Reply to this email directly, view it on GitHub https://github.com/dm82m/hass-Deltasol-KM2/issues/41#issuecomment-2051517416, or unsubscribe https://github.com/notifications/unsubscribe-auth/BEEGW4GMY6F42Y6O5Z6HWSTY463J3AVCNFSM6AAAAABGDVUE4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJRGUYTONBRGY . You are receiving this because you authored the thread.Message ID: @.***>