MTrab/landroid_cloud

Another uncaught thread exception - something new

GSzabados opened this issue · 5 comments

Describe the issue

During the night the temperature dropped below zero. I completely forgot about the mower. I received a notification from the Landroid app in the morning that the temperature of the battery was out of limits. In HA the Landroid report last time around 10PM in the previous evening. Indeed the mower was shut down when I checked it. When looked at the logs, found the following error.

What version of Home Assistant Core has the issue?

Core-2024.4.3

What was the last working version of Home Assistant Core?

No response

What version of the Landroid Cloud integration do you have installed

Latest

What type of installation are you running?

Home Assistant OS

Which make and model is the mower used for this integration?

Worx Landroid M500

Diagnostics information (NOT log entries!)

Nope

Relevant log entries

2024-04-21 22:09:06.756 ERROR (Thread-3 (_thread_main)) [root] Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
    rc = self._loop(timeout)
         ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 1164, in _loop
    rc = self.loop_read()
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 1558, in loop_read
    return self._loop_rc_handle(rc)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 2350, in _loop_rc_handle
    self._do_on_disconnect(rc, properties)
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 3475, in _do_on_disconnect
    on_disconnect(self, self._userdata, rc)
  File "/usr/local/lib/python3.12/site-packages/pyworxcloud/utils/mqtt.py", line 209, in _on_disconnect
    self.connect()
  File "/usr/local/lib/python3.12/site-packages/pyworxcloud/utils/mqtt.py", line 159, in connect
    self.client.connect(self._endpoint, 443, 45)
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 914, in connect
    return self.reconnect()
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 1044, in reconnect
    sock = self._create_socket_connection()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/paho/mqtt/client.py", line 3685, in _create_socket_connection
    return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/socket.py", line 828, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/socket.py", line 963, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Additional information

No response

Sure there's no more errors related?

From the attached there's not much I can do, as it doesn't indicate where the integration crashes

I will have another look once I get back to my computer. That was the only with worx, I believe.

I missed the last line:

socket.gaierror: [Errno -3] Try again

Still doesn't reveal where in either landroid_cloud or pyworxcloud it happens, as none of them are included in the given logs

No, nothing else landroid or pyworxcloud (or just any worx). So is it rather a paho client failure? Or a general HA issue with the threading?

I have looked into my setup, and the main cause was an internet outage at the time. My router did a failover switch from Fiber to 4G because the monitor IP had high latency.

I will close for now this issue then.