Closed nijel closed 1 month ago
Thanks for the report, there is something weird/wrong with the protobuf for getting the area names for some devices, haven't worked out what the problem is exactly.
Can you retry this please?
It crashed the same with 0.1.24:
2024-09-12 14:00:48.426 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/mammotion_cloud.py", line 110, in _on_mqtt_message
await self._handle_mqtt_message(topic, payload)
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/mammotion_cloud.py", line 130, in _handle_mqtt_message
await self._parse_mqtt_response(topic=topic, payload=payload)
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/mammotion_cloud.py", line 124, in _parse_mqtt_response
await self.mqtt_message_event.data_event(event)
File "/usr/local/lib/python3.12/site-packages/pymammotion/event/event.py", line 61, in data_event
await self.on_data_event(data)
File "/usr/local/lib/python3.12/site-packages/pymammotion/event/event.py", line 18, in __call__
await asyncio.gather(*[handler(*args, **kwargs) for handler in self.__eventhandlers])
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/mammotion_cloud.py", line 226, in _parse_message_for_device
self._update_raw_data(binary_data)
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/base.py", line 89, in _update_raw_data
tmp_msg = LubaMsg().parse(data)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 759, in parse
value = self._postprocess_single(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 718, in _postprocess_single
value = cls().parse(value)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 759, in parse
value = self._postprocess_single(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 718, in _postprocess_single
value = cls().parse(value)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 759, in parse
value = self._postprocess_single(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 718, in _postprocess_single
value = cls().parse(value)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 759, in parse
value = self._postprocess_single(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 701, in _postprocess_single
fmt = _pack_fmt(meta.proto_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 281, in _pack_fmt
return {
^
KeyError: 'string'
0.1.28 crashes for me during setup, see https://github.com/mikey0000/Mammotion-HA/issues/122
The crash looks still the same on 0.1.28:
2024-09-13 07:54:58.047 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/mammotion_cloud.py", line 111, in _on_mqtt_message
await self._handle_mqtt_message(topic, payload)
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/mammotion_cloud.py", line 131, in _handle_mqtt_message
await self._parse_mqtt_response(topic=topic, payload=payload)
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/mammotion_cloud.py", line 125, in _parse_mqtt_response
await self.mqtt_message_event.data_event(event)
File "/usr/local/lib/python3.12/site-packages/pymammotion/event/event.py", line 61, in data_event
await self.on_data_event(data)
File "/usr/local/lib/python3.12/site-packages/pymammotion/event/event.py", line 18, in __call__
await asyncio.gather(*[handler(*args, **kwargs) for handler in self.__eventhandlers])
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/mammotion_cloud.py", line 227, in _parse_message_for_device
self._update_raw_data(binary_data)
File "/usr/local/lib/python3.12/site-packages/pymammotion/mammotion/devices/base.py", line 92, in _update_raw_data
tmp_msg = LubaMsg().parse(data)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 759, in parse
value = self._postprocess_single(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 718, in _postprocess_single
value = cls().parse(value)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 759, in parse
value = self._postprocess_single(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 718, in _postprocess_single
value = cls().parse(value)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 759, in parse
value = self._postprocess_single(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 718, in _postprocess_single
value = cls().parse(value)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 759, in parse
value = self._postprocess_single(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 701, in _postprocess_single
fmt = _pack_fmt(meta.proto_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/betterproto/__init__.py", line 281, in _pack_fmt
return {
^
KeyError: 'string'
2024-09-13 07:56:37.408 ERROR (SyncWorker_53) [pymammotion.aliyun.cloud_gateway] Error in sending cloud command: 500 - None
fixed in 0.1.32
0.1.34 installed. Unfortunately the error is back during mowing. 4 hours after starting the job for today.
2024-09-16 12:25:18.845 ERROR (SyncWorker_49) [pymammotion.aliyun.cloud_gateway] Error in sending cloud command: 500 - None
Please don't post in closed issues. A 500 error is a problem with aliyun servers and there is little I can do about it.
The problem
I think this has happened after pressing map synchronization:
What Mammotion mower are you using?
Luba 2
What version of the Mammotion intergration are you using?
0.1.11
What version of Home Assistant Core are you running?
core-2024.8.3