unl0ck / homeassistant-addon-viessmann-gridbox

Fetching Viessmann Data over Gridbox Send via MQTT
Apache License 2.0
7 stars 2 forks source link

Addon stops to work "MaxRetryError" #29

Closed Bollgarbop closed 5 months ago

Bollgarbop commented 6 months ago

Describe the bug what do have

since some weeks the addon stops to work after a while. manual restarts helps. sometimes for 6 hours an more. watchdog is enabled but seems not to help. configuration "wait" was 60 and 300.

Log details

2024-05-18 14:15:46,651 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/SelfSupply/state
2024-05-18 14:15:46,651 __init__.py:671 DEBUG - Creating mqtt client (None) for core-mosquitto:1883
2024-05-18 14:15:46,651 __init__.py:711 DEBUG - Connecting to core-mosquitto:1883 without SSL
2024-05-18 14:15:46,651 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/SelfConsumptionRate/config
2024-05-18 14:15:46,651 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/SelfConsumptionRate/state
2024-05-18 14:15:46,651 __init__.py:671 DEBUG - Creating mqtt client (None) for core-mosquitto:1883
2024-05-18 14:15:46,651 __init__.py:711 DEBUG - Connecting to core-mosquitto:1883 without SSL
2024-05-18 14:15:46,652 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/SelfSufficiencyRate/config
2024-05-18 14:15:46,652 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/SelfSufficiencyRate/state
2024-05-18 14:15:46,652 __init__.py:671 DEBUG - Creating mqtt client (None) for core-mosquitto:1883
2024-05-18 14:15:46,652 __init__.py:711 DEBUG - Connecting to core-mosquitto:1883 without SSL
2024-05-18 14:15:46,653 connectionpool.py:1055 DEBUG - Starting new HTTPS connection (1): gridx.eu.auth0.com:443
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 198, in _new_conn
    sock = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
OSError: [Errno 113] Host is unreachable

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
    response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request
    raise new_e
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1099, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 616, in connect
    self.sock = sock = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 213, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f57c6257b80>: Failed to establish a new connection: [Errno 113] Host is unreachable

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='gridx.eu.auth0.com', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f57c6257b80>: Failed to establish a new connection: [Errno 113] Host is unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/build/GridboxConnector/__main__.py", line 42, in <module>
    gridboxConnector = GridboxConnector(data)
  File "/usr/local/lib/python3.10/site-packages/gridbox_connector/GridboxConnector.py", line 11, in __init__
    self.init_auth()
  File "/usr/local/lib/python3.10/site-packages/gridbox_connector/GridboxConnector.py", line 14, in init_auth
    self.get_token()
  File "/usr/local/lib/python3.10/site-packages/gridbox_connector/GridboxConnector.py", line 19, in get_token
    response = requests.post(self.login_url, self.login_body)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='gridx.eu.auth0.com', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f57c6257b80>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-18 14:15:46,690 __init__.py:853 DEBUG - Shutting down MQTT client
[14:15:46] INFO: Service gridboxconnector exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service gridboxconnector: stopping
s6-rc: info: service gridboxconnector successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
------------------

----------
2024-05-20 10:21:08,248 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/SelfSupply/state
2024-05-20 10:21:08,248 __init__.py:671 DEBUG - Creating mqtt client (None) for core-mosquitto:1883
2024-05-20 10:21:08,248 __init__.py:711 DEBUG - Connecting to core-mosquitto:1883 without SSL
2024-05-20 10:21:08,248 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/SelfConsumptionRate/config
2024-05-20 10:21:08,249 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/SelfConsumptionRate/state
2024-05-20 10:21:08,249 __init__.py:671 DEBUG - Creating mqtt client (None) for core-mosquitto:1883
2024-05-20 10:21:08,249 __init__.py:711 DEBUG - Connecting to core-mosquitto:1883 without SSL
2024-05-20 10:21:08,249 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/SelfSufficiencyRate/config
2024-05-20 10:21:08,249 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/SelfSufficiencyRate/state
2024-05-20 10:21:08,249 __init__.py:671 DEBUG - Creating mqtt client (None) for core-mosquitto:1883
2024-05-20 10:21:08,249 __init__.py:711 DEBUG - Connecting to core-mosquitto:1883 without SSL
2024-05-20 10:21:08,251 connectionpool.py:1055 DEBUG - Starting new HTTPS connection (1): gridx.eu.auth0.com:443
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 198, in _new_conn
    sock = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
OSError: [Errno 113] Host is unreachable

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
    response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request
    raise new_e
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1099, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 616, in connect
    self.sock = sock = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 213, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f354c34fb80>: Failed to establish a new connection: [Errno 113] Host is unreachable

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='gridx.eu.auth0.com', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f354c34fb80>: Failed to establish a new connection: [Errno 113] Host is unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/build/GridboxConnector/__main__.py", line 42, in <module>
    gridboxConnector = GridboxConnector(data)
  File "/usr/local/lib/python3.10/site-packages/gridbox_connector/GridboxConnector.py", line 11, in __init__
    self.init_auth()
  File "/usr/local/lib/python3.10/site-packages/gridbox_connector/GridboxConnector.py", line 14, in init_auth
    self.get_token()
  File "/usr/local/lib/python3.10/site-packages/gridbox_connector/GridboxConnector.py", line 19, in get_token
    response = requests.post(self.login_url, self.login_body)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='gridx.eu.auth0.com', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f354c34fb80>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
2024-05-20 10:21:08,286 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
2024-05-20 10:21:08,287 __init__.py:853 DEBUG - Shutting down MQTT client
[10:21:08] INFO: Service gridboxconnector exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service gridboxconnector: stopping
s6-rc: info: service gridboxconnector successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

------v2.3.0
2024-05-23 19:08:18,921 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Photovoltaic/state
2024-05-23 19:08:18,922 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/Battery-sum-Level/config
2024-05-23 19:08:18,922 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Battery-sum-Level/state
2024-05-23 19:08:18,923 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/Battery-sum-Capacity/config
2024-05-23 19:08:18,924 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Battery-sum-Capacity/state
2024-05-23 19:08:18,925 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/Battery-sum-Power/config
2024-05-23 19:08:18,925 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Battery-sum-Power/state
2024-05-23 19:08:18,926 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/Battery-sum-Remaining-Charge/config
2024-05-23 19:08:18,926 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Battery-sum-Remaining-Charge/state
2024-05-23 19:08:18,927 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/Consumption/config
2024-05-23 19:08:18,927 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Consumption/state
2024-05-23 19:08:18,928 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/Total-Consumption/config
2024-05-23 19:08:18,928 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Total-Consumption/state
2024-05-23 19:08:18,928 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/DirectConsumptionHousehold/config
2024-05-23 19:08:18,929 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/DirectConsumptionHousehold/state
2024-05-23 19:08:18,929 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/DirectConsumptionHeatPump/config
2024-05-23 19:08:18,929 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/DirectConsumptionHeatPump/state
2024-05-23 19:08:18,930 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/DirectConsumptionEV/config
2024-05-23 19:08:18,930 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/DirectConsumptionEV/state
2024-05-23 19:08:18,931 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/DirectConsumptionRate/config
2024-05-23 19:08:18,931 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/DirectConsumptionRate/state
2024-05-23 19:08:18,932 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/SelfSupply/config
2024-05-23 19:08:18,932 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/SelfSupply/state
2024-05-23 19:08:18,932 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/SelfConsumptionRate/config
2024-05-23 19:08:18,932 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/SelfConsumptionRate/state
2024-05-23 19:08:18,933 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/SelfSufficiencyRate/config
2024-05-23 19:08:18,933 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/SelfSufficiencyRate/state
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 198, in _new_conn
    sock = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
OSError: [Errno 113] Host is unreachable

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
    response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request
    raise new_e
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1099, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 616, in connect
    self.sock = sock = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 213, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f616dbfbfd0>: Failed to establish a new connection: [Errno 113] Host is unreachable

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='gridx.eu.auth0.com', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f616dbfbfd0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/build/GridboxConnector/__main__.py", line 42, in <module>
    gridboxConnector = GridboxConnector(data)
  File "/usr/local/lib/python3.10/site-packages/gridbox_connector/GridboxConnector.py", line 11, in __init__
    self.init_auth()
  File "/usr/local/lib/python3.10/site-packages/gridbox_connector/GridboxConnector.py", line 14, in init_auth
    self.get_token()
  File "/usr/local/lib/python3.10/site-packages/gridbox_connector/GridboxConnector.py", line 19, in get_token
    response = requests.post(self.login_url, self.login_body)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='gridx.eu.auth0.com', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f616dbfbfd0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
[19:08:19] INFO: Service gridboxconnector exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service gridboxconnector: stopping
s6-rc: info: service gridboxconnector successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
------
2024-05-24 11:45:51,642 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Photovoltaic/state
2024-05-24 11:45:51,643 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/Battery-sum-Level/config
2024-05-24 11:45:51,643 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Battery-sum-Level/state
2024-05-24 11:45:51,643 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/Battery-sum-Capacity/config
2024-05-24 11:45:51,643 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Battery-sum-Capacity/state
2024-05-24 11:45:51,644 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/Battery-sum-Power/config
2024-05-24 11:45:51,644 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Battery-sum-Power/state
2024-05-24 11:45:51,644 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/Battery-sum-Remaining-Charge/config
2024-05-24 11:45:51,644 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Battery-sum-Remaining-Charge/state
2024-05-24 11:45:51,645 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/Consumption/config
2024-05-24 11:45:51,645 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Consumption/state
2024-05-24 11:45:51,645 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/Total-Consumption/config
2024-05-24 11:45:51,645 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/Total-Consumption/state
2024-05-24 11:45:51,645 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/DirectConsumptionHousehold/config
2024-05-24 11:45:51,645 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/DirectConsumptionHousehold/state
2024-05-24 11:45:51,646 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/DirectConsumptionHeatPump/config
2024-05-24 11:45:51,646 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/DirectConsumptionHeatPump/state
2024-05-24 11:45:51,646 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/DirectConsumptionEV/config
2024-05-24 11:45:51,646 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/DirectConsumptionEV/state
2024-05-24 11:45:51,646 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/DirectConsumptionRate/config
2024-05-24 11:45:51,646 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/DirectConsumptionRate/state
2024-05-24 11:45:51,647 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/SelfSupply/config
2024-05-24 11:45:51,647 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/SelfSupply/state
2024-05-24 11:45:51,647 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/SelfConsumptionRate/config
2024-05-24 11:45:51,647 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/SelfConsumptionRate/state
2024-05-24 11:45:51,647 __init__.py:639 INFO - config_topic: homeassistant/sensor/Viessmann-Gridbox/SelfSufficiencyRate/config
2024-05-24 11:45:51,647 __init__.py:640 INFO - state_topic: hmd/sensor/Viessmann-Gridbox/SelfSufficiencyRate/state
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 198, in _new_conn
    sock = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
    raise err
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
    sock.connect(sa)
OSError: [Errno 113] Host is unreachable

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
    response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request
    raise new_e
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1099, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 616, in connect
    self.sock = sock = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 213, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f186e947fd0>: Failed to establish a new connection: [Errno 113] Host is unreachable

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

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 847, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='gridx.eu.auth0.com', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f186e947fd0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/build/GridboxConnector/__main__.py", line 42, in <module>
    gridboxConnector = GridboxConnector(data)
  File "/usr/local/lib/python3.10/site-packages/gridbox_connector/GridboxConnector.py", line 11, in __init__
    self.init_auth()
  File "/usr/local/lib/python3.10/site-packages/gridbox_connector/GridboxConnector.py", line 14, in init_auth
    self.get_token()
  File "/usr/local/lib/python3.10/site-packages/gridbox_connector/GridboxConnector.py", line 19, in get_token
    response = requests.post(self.login_url, self.login_body)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 115, in post
    return request("post", url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='gridx.eu.auth0.com', port=443): Max retries exceeded with url: /oauth/token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f186e947fd0>: Failed to establish a new connection: [Errno 113] Host is unreachable'))
[11:45:51] INFO: Service gridboxconnector exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service gridboxconnector: stopping
s6-rc: info: service gridboxconnector successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Version

2.3.0

unl0ck commented 6 months ago

It's look like the address isn't reachable don't understand why, I haven't this problem but maybe I can add a function to catch them

unl0ck commented 6 months ago

@Bollgarbop can you tell me more information? its look like on your side the address is not reachable

Bollgarbop commented 6 months ago

the address should be continuously accessible. gridbox and Vitocharge 2.0 are connected to the same switch. mygridbox.viessmann.com shows all data, no signs of disconnections. no one else calls the mygridbox page while the problem is occurring. HAOS runs on a Mini NUC PC NUC 12, Intel Core, i5-12450H, 16GB DDR4 512GB M.2 SSD, connected via LAN

I have set the waiting time to 400, there have been no errors since then. ~2d now

What further information would be helpful?

unl0ck commented 6 months ago

Are you using any network traffic analyzer to check your network ?

Maybe the repeat time was to often.

I am using 60seconds and it still working without any issues,

Bollgarbop commented 5 months ago

so far no traffic analyzer check done. it seems to be stable with 180sec

unl0ck commented 5 months ago

Will fix it later this day sorry it worked correctly by me, did you set an log level?

unl0ck commented 5 months ago

image

Bollgarbop commented 5 months ago

oh. i used "Viessmann Gridbox Connector" and there is no option to set the loglevel. with edge it seems to work and there is also the options for the loglevel. it was not clear to me what version to use

unl0ck commented 5 months ago

@Bollgarbop fixed now

unl0ck commented 5 months ago

oh. i used "Viessmann Gridbox Connector" and there is no option to set the loglevel. with edge it seems to work and there is also the options for the loglevel. it was not clear to me what version to use

you can set info