Integration stops updating after RuntimeError
Describe the issue
Here's another case where updates stop after an exception in MQTT-related code called from get_mowers(). Seems these problems can still happen even with AWSIoT.
What version of Home Assistant Core has the issue?
core-2025.9.3
What was the last working version of Home Assistant Core?
No response
What version of the Landroid Cloud integration do you have installed
6.0.0
What type of installation are you running?
Home Assistant Container
Which make and model is the mower used for this integration?
Worx WR167E
Diagnostics information (NOT log entries!)
not applicable
Relevant log entries
Traceback (most recent call last):
File "/usr/local/lib/python3.13/threading.py", line 1043, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "/usr/local/lib/python3.13/threading.py", line 1344, in run
self.function(*self.args, **self.kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyworxcloud/__init__.py", line 375, in _fetch
self._mowers = self._api.get_mowers()
~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/pyworxcloud/api.py", line 121, in get_mowers
self.check_token()
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/pyworxcloud/api.py", line 113, in check_token
self._callback()
~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/pyworxcloud/__init__.py", line 299, in _token_updated
self.mqtt.update_token()
~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/site-packages/pyworxcloud/utils/mqtt.py", line 257, in update_token
self.disconnect(keep_topic=True)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/pyworxcloud/utils/mqtt.py", line 278, in disconnect
disconnect_future.result()
~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.13/site-packages/awscrt/mqtt.py", line 573, in disconnect
_awscrt.mqtt_client_connection_disconnect(self._binding, on_disconnect)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: 5131 (AWS_ERROR_MQTT_NOT_CONNECTED): The requested operation is invalid as the connection is not open.
Additional information
No response
I'm also on the newest Version 6.0.0 and getting those Errors in the Home Assistant Logs:
Logger: pyworxcloud.MQTT Quelle: /usr/local/lib/python3.13/site-packages/pyworxcloud/utils/mqtt.py:248 Erstmals aufgetreten: 18:26:14 (10 Vorkommnisse) Zuletzt protokolliert: 19:52:30
Failed to connect to MQTT: AWS_ERROR_MQTT_UNEXPECTED_HANGUP: The connection was closed unexpectedly.
AND
Logger: homeassistant.config_entries Quelle: config_entries.py:751 Erstmals aufgetreten: 18:26:46 (6 Vorkommnisse) Zuletzt protokolliert: 19:52:30
Error setting up entry Worx - [email protected] for landroid_cloud Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/pyworxcloud/utils/mqtt.py", line 230, in connect connect_result = self._connection_future.result() File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 456, in result return self.__get_result() ~~~~~~~~~~~~~~~~~^^ File "/usr/local/lib/python3.13/concurrent/futures/_base.py", line 401, in __get_result raise self._exception awscrt.exceptions.AwsCrtError: AWS_ERROR_MQTT_UNEXPECTED_HANGUP: The connection was closed unexpectedly.
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 751, in __async_setup_with_context result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/landroid_cloud/init.py", line 40, in async_setup_entry result = await _async_setup(hass, entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/landroid_cloud/init.py", line 135, in _async_setup await hass.async_add_executor_job(cloud.connect) File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.13/site-packages/pyworxcloud/init.py", line 282, in connect self.mqtt.connect() ~~~~~~~~~~~~~~~~~^^ File "/usr/local/lib/python3.13/site-packages/pyworxcloud/utils/mqtt.py", line 249, in connect raise NoConnectionError() from exc pyworxcloud.exceptions.NoConnectionError
@BetaHydri your logs look like: https://github.com/MTrab/landroid_cloud/issues/985