@wojcior1 @ddppddpp …and I’m also experiencing the stability issues you’re describing, and I’ve indeed mapped them back to the hassOS 8.1 update. See the history below: the red circle indicates the moment I updated to hassOS 8.1. Prior to that, the sensor is fully stable. After the update, you can see small grey ‘unavailable’ moments, which indicate the instability.
I’ve looked at the add-on logs, and they show some “operation timeout” errors:
Exception in thread Thread-1:
Traceback (most recent call last):
File “/usr/lib/python3.8/site-packages/urllib3/connection.py”, line 156, in _new_conn
conn = connection.create_connection(
File “/usr/lib/python3.8/site-packages/urllib3/util/connection.py”, line 84, in create_connection
raise err
File “/usr/lib/python3.8/site-packages/urllib3/util/connection.py”, line 74, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.8/site-packages/urllib3/connectionpool.py”, line 665, in urlopen
httplib_response = self._make_request(
File “/usr/lib/python3.8/site-packages/urllib3/connectionpool.py”, line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File “/usr/lib/python3.8/http/client.py”, line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/usr/lib/python3.8/http/client.py”, line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/usr/lib/python3.8/http/client.py”, line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/usr/lib/python3.8/http/client.py”, line 1010, in _send_output
self.send(msg)
File “/usr/lib/python3.8/http/client.py”, line 950, in send
self.connect()
File “/usr/lib/python3.8/site-packages/urllib3/connection.py”, line 184, in connect
conn = self._new_conn()
File “/usr/lib/python3.8/site-packages/urllib3/connection.py”, line 168, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7fb5f6b50940>: Failed to establish a new connection: [Errno 110] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.8/site-packages/requests/adapters.py”, line 439, in send
resp = conn.urlopen(
File “/usr/lib/python3.8/site-packages/urllib3/connectionpool.py”, line 719, in urlopen
retries = retries.increment(
File “/usr/lib/python3.8/site-packages/urllib3/util/retry.py”, line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host=‘10.0.100.20’, port=80): Max retries exceeded with url: /keep_alive.html?msgid=1 (Caused by NewConnectionError(‘<urllib3.connection.HTTPConnection object at 0x7fb5f6b50940>: Failed to establish a new connection: [Errno 110] Operation timed out’))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.8/threading.py”, line 932, in _bootstrap_inner
self.run()
File “/ip150.py”, line 29, in run
self._one_keepalive()
File “/ip150.py”, line 24, in _one_keepalive
requests.get(‘{}/keep_alive.html’.format(
File “/usr/lib/python3.8/site-packages/requests/api.py”, line 75, in get
return request(‘get’, url, params=params, **kwargs)
File “/usr/lib/python3.8/site-packages/requests/api.py”, line 60, in request
return session.request(method=method, url=url, **kwargs)
File “/usr/lib/python3.8/site-packages/requests/sessions.py”, line 533, in request
resp = self.send(prep, **send_kwargs)
I tried to reinstall both the add-on, and the MQTT broker (and MQTT integration), to no avail.
I currently have little idea why the OS update would make HTTP connections timeout. I’m sure that if some rate-limit was introduced, this would 1) have been advertised in the changelog and 2) it would be creating way more issues than for just this add-on. Also, it’s strange the “unavailability” moments seem to not have a pattern, and rather being random.
If anyone has ideas to test or to get to the culprit of the issues, I’m happy to hear.