mqtt_vacuum_camera: Camera does not Work with Rand256 : ValueError: not enough values to unpack (expected 2, got 0)

Checklist

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

The problem

I have the error ValueError: not enough values to unpack (expected 2, got 0) while loading the camera integration.

What version of an integration has described problem?

2024.07.4

What was the last working version of an integration?

unknown (first Use)

What vacuum model do you have problems with?

Roborock.S5

Please firmware installed on your Vacuum.

Valetudo RE 0.10.10 + 3.5.8_002034

What type of platform you use?

ARM (Raspberry Pi, Odroid, etc.) > 4GB

What version of Home Assistant do you use?

core-2024.7.4

What type of installation are you running?

Home Assistant Supervised

Logs or Errors shown in the HA snapshots (please enable the Debug Mode) text will be auto formatted to code.

2024-08-04 15:36:55.339 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.roger_camera fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1296, in async_device_update
    await self.async_update()
  File "/config/custom_components/mqtt_vacuum_camera/camera.py", line 426, in async_update
    pil_img = await self.hass.async_create_task(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mqtt_vacuum_camera/camera_processing.py", line 193, in run_async_process_valetudo_data
    images = await gather(*tasks)
             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mqtt_vacuum_camera/camera_processing.py", line 167, in process_valetudo_data
    result = loop.run_until_complete(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/config/custom_components/mqtt_vacuum_camera/camera_processing.py", line 125, in async_process_rand256_data
    ) = await self._re_handler.get_rooms_attributes(destinations)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mqtt_vacuum_camera/valetudo/rand256/image_handler.py", line 576, in get_rooms_attributes
    self.room_propriety = self.extract_room_properties(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mqtt_vacuum_camera/valetudo/rand256/image_handler.py", line 190, in extract_room_properties
    dummy_segments, outlines = ImageData.get_rrm_segments(
    ^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 0)


### Function, that in your opinion is creating the issue.

None

### Additional information

<img width="1210" alt="Roborock S5" src="https://github.com/user-attachments/assets/02d14862-10b8-4353-aebc-820fc3182ebe">

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (14 by maintainers)

Most upvoted comments

Ok so I have ask to Valetudo to split the map in segments. I had run my first cleaning, but map was not splitted at the end of the cleaning. Once split is done, the camera works !!

Thanks !!

I have just install the 2024.08.0b3 version, but i still have something similar. How can i help to debug. this ?

2024-08-05 17:34:43.910 WARNING (roborock-s5_camera_0) [custom_components.mqtt_vacuum_camera.valetudo.rand256.image_handler] roborock-s5 : Error in get_image_from_json: not enough values to unpack (expected 2, got 0)
Traceback (most recent call last):
  File "/config/custom_components/mqtt_vacuum_camera/valetudo/rand256/image_handler.py", line 380, in get_image_from_rrm
    self.segment_data, self.outlines = await self.data.async_get_rrm_segments(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 0)

@Minims problem found and fixed, just few adjustments to do and I will release a beta 2024.08.0b3. I will remove the limitation of pillow requirements so that you can run it on the 2024.7.4 of HA and check if all works as expected.

Once again thanks for highlighting this issue.

@Minims Okay finally I got the robot connected with Rand256. It can take a little longer than expected but I think to know where is the problem. Will update as soon 😃

@Minims I’m right now flashing the robot with Rand256 and will start to work in order to fix this as soon the robot is ready to work with it. Thanks for your kind understanding.

I have rollback to 2024.07.2, .1 and .0

the error is now

2024-08-04 16:19:34.198 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.roger_camera fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 944, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1296, in async_device_update
    await self.async_update()
  File "/config/custom_components/mqtt_vacuum_camera/camera.py", line 423, in async_update
    pil_img = await self.hass.async_create_task(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mqtt_vacuum_camera/camera_processing.py", line 192, in run_async_process_valetudo_data
    images = await gather(*tasks)
             ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mqtt_vacuum_camera/camera_processing.py", line 166, in process_valetudo_data
    result = loop.run_until_complete(
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/config/custom_components/mqtt_vacuum_camera/camera_processing.py", line 124, in async_process_rand256_data
    ) = await self._re_handler.get_rooms_attributes(destinations)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mqtt_vacuum_camera/valetudo/rand256/image_handler.py", line 576, in get_rooms_attributes
    self.room_propriety = self.extract_room_properties(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/mqtt_vacuum_camera/valetudo/rand256/image_handler.py", line 190, in extract_room_properties
    dummy_segments, outlines = ImageData.get_rrm_segments(
    ^^^^^^^^^^^^^^^^^^^^^^^^
    ```