chandrashekar-nallamilli / HassMeetjestadSensor

Meetjestad temperature sensor for home assistant
GNU General Public License v3.0
2 stars 1 forks source link

Data flow stops after a while, or after connection timeout? #3

Closed cortado closed 1 year ago

cortado commented 3 years ago

It is pretty usual for the sensor to stop responding evry now and then, demanding a restart of HA Core. If I look at the Meetjestad sensor page, I can se that it is live in the same time frame, so that is not the problem.

chandrashekar-nallamilli commented 2 years ago

Need to investigate this

cortado commented 2 years ago

Hi!

Get log full of these:

Logger: homeassistant.components.sensor Source: helpers/entity_platform.py:778 Integration: sensor (documentation, issues) First occurred: 7. august 2022, 23:56:16 (2471 occurrences) Last logged: 20:31:22

Updating meetjestad_sensor sensor took longer than the scheduled update interval 0:00:30


Rune Smistad @.*** +47 90093739 @cortado

  1. des. 2021 kl. 14:07 skrev chandrashekar-nallamilli @.***>:

 Need to investigate this

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

cortado commented 2 years ago

still a problem. Data flow from sensor stops after a pretty short while, and to have to restart HA. Not usable anymore :(

cortado commented 2 years ago

Also get this error message:

Denne feilen stammer fra en tilpasset integrasjon.

Logger: homeassistant.helpers.entity Source: custom_components/meetjestad_sensor/sensor.py:113 Integration: meetjestad_sensor (documentation, issues) First occurred: 10:45:00 (2 occurrences) Last logged: 11:28:06

Update for sensor.meetjestad_temperature fails Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 414, in connect self.sock = ssl_wrapsocket( File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/local/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment raise six.reraise(type(error), error, _stacktrace) File "/usr/local/lib/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 386, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1042, in _validate_conn conn.connect() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 414, in connect self.sock = ssl_wrapsocket( File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socketimpl( File "/usr/local/lib/python3.10/site-packages/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/local/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/usr/local/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/usr/local/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 514, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 717, in async_device_update await task File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, *self.kwargs) File "/config/custom_components/meetjestad_sensor/sensor.py", line 95, in update self.meetjestadData.update() File "/usr/src/homeassistant/homeassistant/util/init.py", line 192, in wrapper result = method(args, kwargs) File "/config/custom_components/meetjestad_sensor/sensor.py", line 113, in update main_rsp = requests.get(self.API_URL_BASE, params=params) File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 73, in get return request("get", url, params=params, 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 587, in request resp = self.send(prep, send_kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 701, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 547, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

cortado commented 2 years ago

After updating to 2022.8.7 sensor has been delivering data to HA for over 24 hours - that's a first in many months! Could be Core script issues? hope it stays this way :)