sca075/mqtt_vacuum_camera

Exception in async_message_received

Closed this issue ยท 5 comments

Checklist

  • I have updated the integration to the latest version available
  • I have checked if the problem is already reported

The problem

I am receiving the following error when the vacuum (Roborock S50) is running the 2024.5.b3 beta version of Home Assistant:

Logger: homeassistant.util.logging
Source: util/logging.py:98
First occurred: 10:00:07 (177 occurrences)
Last logged: 14:33:21

Exception in async_message_received when handling msg on 'valetudo/roborock_downstairs/BatteryStateAttribute/level': '96' Traceback (most recent call last): File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 322, in async_message_received await self.hypfer_handle_battery_level(msg) File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 208, in hypfer_handle_battery_level self._mqtt_vac_battery_level = int(bytes.decode(self._payload, "utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: descriptor 'decode' for 'bytes' objects doesn't apply to a 'str' object
Exception in async_message_received when handling msg on 'valetudo/roborock_downstairs/BatteryStateAttribute/level': '97' Traceback (most recent call last): File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 322, in async_message_received await self.hypfer_handle_battery_level(msg) File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 208, in hypfer_handle_battery_level self._mqtt_vac_battery_level = int(bytes.decode(self._payload, "utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: descriptor 'decode' for 'bytes' objects doesn't apply to a 'str' object
Exception in async_message_received when handling msg on 'valetudo/roborock_downstairs/BatteryStateAttribute/level': '98' Traceback (most recent call last): File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 322, in async_message_received await self.hypfer_handle_battery_level(msg) File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 208, in hypfer_handle_battery_level self._mqtt_vac_battery_level = int(bytes.decode(self._payload, "utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: descriptor 'decode' for 'bytes' objects doesn't apply to a 'str' object
Exception in async_message_received when handling msg on 'valetudo/roborock_downstairs/BatteryStateAttribute/level': '99' Traceback (most recent call last): File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 322, in async_message_received await self.hypfer_handle_battery_level(msg) File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 208, in hypfer_handle_battery_level self._mqtt_vac_battery_level = int(bytes.decode(self._payload, "utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: descriptor 'decode' for 'bytes' objects doesn't apply to a 'str' object
Exception in async_message_received when handling msg on 'valetudo/roborock_downstairs/BatteryStateAttribute/level': '100' Traceback (most recent call last): File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 322, in async_message_received await self.hypfer_handle_battery_level(msg) File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 208, in hypfer_handle_battery_level self._mqtt_vac_battery_level = int(bytes.decode(self._payload, "utf-8")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: descriptor 'decode' for 'bytes' objects doesn't apply to a 'str' object

What version of an integration has described problem?

2024.04.5

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Roborock S50

Please firmware installed on your Vacuum.

2024.02.0

What type of platform you use?

Intel NUC (or generic x86_64)

What version of Home Assistant do you use?

core-2024.5.0b3

What type of installation are you running?

Home Assistant OS

Camera's settings.

No response

Logs or Errors shown in the HA snapshots (please enable the Debug Mode)

No response

Additional information

No response

@tomlut I will check it as soon the b03 is completely installed, I did upload yesterday a new version of the connector.py and opened also an issue on the core for HA. It is a know issue, in any cases good that you opened it because it will help to trace the fix. P.s. Will release as later tomorrow or today the 2024.05.0 that fix this issue.

Excellent. Do you need any more diagnostic info?

Excellent. Do you need any more diagnostic info?

Well I did raised the issue on core because I catch it while testing the 2024.05.0 (camera wise).. I just confirmed that all works fine with the fix on the next version. Will update the camera later today (the pull request is open right now you can have a look on the connector.py) ;)

17 files in the PR. You have been busy!

@tomlut released 2024.05.0 with the fix for this issue #128 hope this will work also for you ;)