Git Product home page Git Product logo

valetudo_vacuum_camera's Introduction

Valetudo Vacuum's Camera

logo_new

Current Release: GitHub Latest Release

Screenshot 2023-12-27 at 13 37 57

Valetudo Vacuums maps in Home Assistant was never so easy.

About: Extract the maps for rooted Vacuum Cleaners with Valetudo Hypfer or RE(rand256) Firmware connected to Home Assistant via MQTT, easy setup thanks to HACS and guided Home Assistant GUI configuration.

What it is: This custom component anyhow is simple to install and setup, decode and render the vacuum maps to Home Assistant in few clicks. When you want also to control your vacuum you will need to also install the: lovelace-xiaomi-vacuum-map-card (recommended) from HACS as well.

Limitations and Compatibility:

Please read the limitations and compatibility before to install the camera.

I kindly ask for your understanding regarding any limitations you may encounter with this custom component. While it's been extensively tested on a PI4 8GB and now also on ProxMox VE, hardware below PI4 8GB may face issues. Your feedback on such platforms is invaluable; please report any problems you encounter. As a team of one, I'm diligently working to address compatibility across all environments, but this process takes time. In the interim, you can utilize ValetudoPNG as an alternative on unsupported platforms. Your support in making this component compatible with all environments is greatly appreciated. If you'd like to contribute, whether through code or time, please consider joining our efforts. For further details on how the camera operates and how you can contribute, refer to the Wiki section of this project. Your patience and assistance are crucial as we strive toward our goal of universal compatibility.

  • PI3 4GB: The camera is working on PI3 4GB, anyhow no chance there to run two vacuums cameras at the same time.
  • PI4 4GB: The camera is working on PI4 4GB, anyhow run two vacuums cameras at the same time isn't advised.

Known Supported Vacuums:

We here list, thanks to our users and tests done, the known working vacuums.
  • Dreame D9
  • Dreame Z10 Pro
  • Dreame L10s Ultra
  • Mi Robot Vacuum-Mop P
  • Roborock.S5 / S50 / S55 (Gen.2)
  • Roborock.S6
  • Roborock.S7
  • Roborock.S8
  • Roborock.V1 (Gen.1)
  • Xiaomi C1
  • In general, it works with all flashed Valetudo Hypfer or RE(rand256) vacuums.

Screenshot 2023-09-12 at 22 53 29

How to install:

Via HACS please follow. The instructions in here show detailed steps and will help to set up the camera also without HACS (manual setup). Our setup guide also includes important informations on how to setup the lovelace-xiaomi-vacuum-map-card (recommended).

Features:

We here List what this camera offers as futures.
  1. All Valetudo vacuums are supported.
  2. Automatically Generate the calibration points for the lovelace-xiaomi-vacuum-map-card to ensure full compatibility to this user-friendly card.
  3. Automatically Generate rooms based configuration when vacuum support this functionality, this will allow you to configure the rooms quickly on the lovelace-xiaomi-vacuum-map-card.
  4. The camera take automatically snapshots (when the vacuum idle/ error / docked). It is also possible to save a snapshot using a service call from Home Assistant with the file name and location you want to use. By the default the snapshot is saved in the www folder of Home Assistant. If the snapshot is disabled from Image Options the png will be deleted automatically.
    service: camera.snapshot
    target:
      entity_id: camera.valetudo_your_vacuum_camera
    data:
      filename: /config/www/REPLACE_ME.png
    
  5. Change the image options directly form the Home Assistant integration UI with a simple click on the integration configuration.
    • Image Rotation: 0, 90, 180, 270 (default is 0).
    • Trim automatically the images. The standard Valetudo images size 5210x5210 or more, are resized automatically (At boot the camera trims and reduces the images sizes). Default margins are 150 pixels, you can customize this value from the image options.
    • Base colors are the colors for robot, charger, walls, background, zones etc.
    • Rooms colors, Room 1 is actually also the Floor color (for vacuum that do not support rooms).
    • Transparency level for all elements and rooms colours can be also customize.
    • It is possible to display on the image the vacuum status, this option add a vacuum status text at the top left of the image. Status and room where the vacuum is will be display on the text filed.
  6. This integration make possible to render multiple vacuums as per each camera will be named with the vacuum name (example: vacuum.robot1 = camera.robot1_camera.. vacuum.robotx = camera.robotx_camera)
  7. The camera as all cameras in HA supports the ON/OFF service, it is possible to suspend and resume the camera streem as desired.
  8. In the attributes is possible to get on what room the vacuum is.
  9. No Go, Virtual Walls, Zone Clean, Active Segments and Obstacles are draw on the map when available.
  10. Auto Zooming the room (segment) when the vacuum is cleaning it.

Notes:

  • This integration is developed and tested using a PI4 with Home Assistant OS fully updated to the last version, this allows us to confirm that the component is working properly with Home Assistant. Tested also on ProxMox and Docker Supervised "production" enviroment (fully setup home installation).

Tanks to:

  • @PiotrMachowski inspiring this integration and his amazing work.
  • @Hypfer for freeing the vacuums from the clouds and continuously improve our vacuums :)
  • @billyourself for providing us the data and motivation to evolve this project.
  • @Skeletorjus that using this integration gave us several ideas to improve it.
  • @rohankapoorcom autor of the v1.4.0 that make really easy to set up this integration.
  • @gunjambi that found a solution to re-draw the robot and also implemented the snapshots png to be enabled or disabled from the options.
  • @T0ytoy for the amazing cooperation in testing our Camera that improved using the threading.
  • And to all of you using this integration and reporting any issues, improvements and vacuums used with it.

valetudo_vacuum_camera's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

valetudo_vacuum_camera's Issues

IndexError: list index out of range

Checklist

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

The problem

Every now and then, without any action from the user, there are WARNINGs reporting errors in the log:

2024-03-18 09:17:36.089 WARNING (dreame1_camera_0) [custom_components.valetudo_vacuum_camera.valetudo.hypfer.image_handler] dreame1 : Error in get_image_from_json: list index out of range
Traceback (most recent call last):
  File "/config/custom_components/valetudo_vacuum_camera/valetudo/hypfer/image_handler.py", line 384, in async_get_image_from_json
    self.robot_pos = await self.async_get_robot_in_room(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/valetudo_vacuum_camera/valetudo/hypfer/image_handler.py", line 741, in async_get_robot_in_room
    self.zooming = bool(self.active_zones[self.robot_in_room["id"] + 1])
                        ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range

Full debug log below.

What version of an integration has described problem?

v1.5.9

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Dreame L10 Pro

Please firmware installed on your Vacuum.

Valetudo 2023.05.0

What type of platform you use?

VEMLinux (Virtual Machine) such as Proxmox, VMWare, etc.

What version of Home Assistant do you use?

core-2024.3.1

What type of installation are you running?

Home Assistant Supervised

Camera's settings.

No response

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

2024-03-18 09:17:33.956 INFO (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.MQTT.connector] Received dreame1 image data from MQTT
2024-03-18 09:17:36.083 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.MQTT.connector] dreame1: Processing Hypfer data from MQTT.
2024-03-18 09:17:36.084 INFO (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.MQTT.connector] dreame1: Extraction of Hypfer JSON Complete.
2024-03-18 09:17:36.085 INFO (dreame1_camera_0) [custom_components.valetudo_vacuum_camera.valetudo.hypfer.image_handler] dreame1: Composing the image for the camera.
2024-03-18 09:17:36.085 INFO (dreame1_camera_0) [custom_components.valetudo_vacuum_camera.valetudo.hypfer.image_handler] dreame1: Supporting Rooms Cleaning!
2024-03-18 09:17:36.085 INFO (dreame1_camera_0) [custom_components.valetudo_vacuum_camera.valetudo.hypfer.image_handler] Vacuum JSon ID: c2f13bac-5cad-42ff-ad94-8987072ac2e2 at Frame 0.
2024-03-18 09:17:36.087 DEBUG (dreame1_camera_0) [custom_components.valetudo_vacuum_camera.valetudo.hypfer.image_handler] dreame1: Got zones: {}
2024-03-18 09:17:36.088 DEBUG (dreame1_camera_0) [custom_components.valetudo_vacuum_camera.valetudo.hypfer.image_handler] dreame1: Got virtual walls: []
2024-03-18 09:17:36.089 DEBUG (dreame1_camera_0) [custom_components.valetudo_vacuum_camera.valetudo.hypfer.image_handler] dreame1: Got the points in the json: {'robot_position': [{'__class': 'PointMapEntity', 'metaData': {'angle': 97}, 'points': [3300, 3250], 'type': 'robot_position'}], 'charger_location': [{'__class': 'PointMapEntity', 'metaData': {'angle': 278}, 'points': [3300, 3250], 'type': 'charger_location'}]}
2024-03-18 09:17:36.089 WARNING (dreame1_camera_0) [custom_components.valetudo_vacuum_camera.valetudo.hypfer.image_handler] dreame1 : Error in get_image_from_json: list index out of range
Traceback (most recent call last):
  File "/config/custom_components/valetudo_vacuum_camera/valetudo/hypfer/image_handler.py", line 384, in async_get_image_from_json
    self.robot_pos = await self.async_get_robot_in_room(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/valetudo_vacuum_camera/valetudo/hypfer/image_handler.py", line 741, in async_get_robot_in_room
    self.zooming = bool(self.active_zones[self.robot_in_room["id"] + 1])
                        ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range
2024-03-18 09:17:36.094 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera_processing] dreame1: Camera frame processed.
2024-03-18 09:17:36.094 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] dreame1: Output Gray Image.
2024-03-18 09:17:36.094 INFO (MainThread) [custom_components.valetudo_vacuum_camera.camera] Searching for /config/.storage/dreame1.png.
2024-03-18 09:17:36.096 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] dreame1: Returning Snapshot image.
2024-03-18 09:17:36.198 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] dreame1: Image update complete
2024-03-18 09:17:36.198 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] Adjusted dreame1: Frame interval: 0.117
2024-03-18 09:17:36.201 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] dreame1 System CPU usage stat: 4.7%
2024-03-18 09:17:36.201 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] dreame1 Camera Memory usage in GB: 1.07, 18.38% of Total.

Additional information

No response

Proxmox VE: The map fails to update after an unpredictable time interval.

Checklist

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

The problem

In a fresh installation of version 1.5.7.1 with the Viomi V7, also known as Mi Robot Vacuum-Mop P, I'm utilizing both 'Hypfer/lovelace-valetudo-map-card' and 'Valetudo Vacuum's Camera' in conjunction with 'lovelace-xiaomi-vacuum-map-card.' However, I've noticed that the map image stops updating pretty randonly(usually within 10 min it stops) when using 'Valetudo Vacuum's Camera,' while the maps from 'Hypfer/lovelace-valetudo-map-card' and the Web GUI of Valetudo are functioning as expected.

Toggling any option that restarts the addon in the 'Configure - Valetudo Camera Options' workflow gets it working again for a brief period. However, it eventually stops again.

image

What version of an integration has described problem?

1.5.7.1

What was the last working version of an integration?

1.5.7.1

What vacuum model do you have problems with?

Mi Robot Vacuum-Mop P (Viomi v7)

Please firmware installed on your Vacuum.

0047 - Valetudo 2023.12.0

What version of Home Assistant do you use?

2024.1.6

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)

Updating valetudo_vacuum_camera camera took longer than the scheduled update interval 0:00:03

Additional information

No response

Configurable aspect ratio for the camera image

Description

Hi, first of all, thanks for the absolutely amazing addon that you provided here. It replaced a bunchof manual work I needed to do to enable using my Valetudo Vacuum with the lovelace-xiaomi-vacuum-map-card!

I have the card set up on my dashboard together with a few buttons and stats cards to display things like RSSI, consumables, etc. Unfortunately, on one of my wallmounted tablets, this causes the resulting card to exceed the available vertical screen space. I have since used card-mod to tweak the aspect ratio of the map image, but I'd prefer to be able to use the configuration of this integration to set an aspect ratio for the camera image (e.g. 2:1) or explicit width and height (e.g. 400x200).

Thank you for considering this feature request.

Florian

Solution

Integration allows to set aspect ratio of the camera image, resulting image provided to home assistant is padded to achieve desired aspect ratio

Alternatives

Integration allows to set explicit width and height of the camera image

Context

No response

Two vacuums on PI4 4Gb cause Home Assistant to reboots

Discussed in #73

Originally posted by tlpbu January 27, 2024

Checklist

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

The problem

After fresh installation of Valetudo Vacuum Camera and restart on HA on RPi4 constant Home Assistant reboots start as soon as Vacuum device id is set in integration setup form. This unfortunatelly makes Valetudo Vacuum Camera unusable.

Luckily there is ~15 sec timeslot when HA has loaded enough to be able to access /config/integrations/dashboard and delete Valetudo Vacuum Camera integration. Then reboots stop immediately.

Nothing specific can be observed in HA logs execpt most likely unrelated:

2024-01-27 11:05:19.667 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /store request
2024-01-27 11:05:19.670 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /store - 
2024-01-27 11:05:19.671 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /host/info request
2024-01-27 11:05:19.672 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /host/info - 
2024-01-27 11:05:19.674 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /supervisor/info request
2024-01-27 11:05:19.674 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /supervisor/info - 
2024-01-27 11:05:19.675 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /info request
2024-01-27 11:05:19.676 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /info - 
2024-01-27 11:05:19.676 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /core/info request
2024-01-27 11:05:19.677 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /core/info - 
2024-01-27 11:05:19.677 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /network/info request
2024-01-27 11:05:19.678 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /network/info - 
2024-01-27 11:05:19.678 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /resolution/info request
2024-01-27 11:05:19.679 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /resolution/info - 
2024-01-27 11:05:19.680 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /os/info request
2024-01-27 11:05:19.680 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /os/info - 
2024-01-27 11:05:19.681 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /addons request
2024-01-27 11:05:19.682 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /addons - 
2024-01-27 11:05:19.682 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /store request
2024-01-27 11:05:19.683 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /store - 
2024-01-27 11:05:19.684 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /resolution/info request
2024-01-27 11:05:19.687 ERROR (MainThread) [homeassistant.components.hassio.issues] Failed to update supervisor issues: HassioAPIError()

What version of an integration has described problem?

v.1.5.7

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Dreame D9 Pro

Please firmware installed on your Vacuum.

2023.12.0

What version of Home Assistant do you use?

2024.1.5

What type of installation are you running?

Home Assistant Supervised

Camera's settings.

No response

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

No response

Additional information

No response

Migration error on boot upgrading to v1.5.7

Checklist

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

The problem

After upgrading via HACS the plugin stopped working. I get an error in the log on startup.

I can click the 'configure' button, however all of my settings show up as defaults.

I have extensive, painstakingly tuned settings that would take a few hours to put back from scratch, and would really really appreciate not having to do that again 🙂

What version of an integration has described problem?

v1.5.7

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

N/A

Please firmware installed on your Vacuum.

N/A

What version of Home Assistant do you use?

2023.11.3

What type of installation are you running?

Home Assistant Container

Camera's settings.

I can't get them :(

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

Logger: homeassistant.config_entries
Source: config_entries.py:650
First occurred: 01:04:43 (3 occurrences)
Last logged: 01:04:43

Error migrating entry Valetudo Camera for valetudo_vacuum_camera
Error migrating entry Roboterstaubsauger Camera for valetudo_vacuum_camera
Error migrating entry Hygieia Camera for valetudo_vacuum_camera
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 650, in async_migrate
    result = await component.async_migrate_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/valetudo_vacuum_camera/__init__.py", line 172, in async_migrate_entry
    new_options = await update_options(old_options, tmp_option)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/valetudo_vacuum_camera/common.py", line 151, in update_options
    updated_options[key] = bk_options[key]
                           ~~~~~~~~~~^^^^^
KeyError: 'get_svg_file'

Additional information

No response

Configuring an alerady exisiting entry yields empty fields

Checklist

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

The problem

All the fields are empty if I try to (re)configure an entry after the initial configuration, making it impossible to tune the settings.

image

What version of an integration has described problem?

v1.1.9

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Roborock.S5

Please firmware installed on your Vacuum.

2023.02.0

What version of Home Assistant do you use?

core-2023.8.1

What type of installation are you running?

Home Assistant Container

Camera's configuration

N/A

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

No response

Additional information

No response

Update for camera.valetudo_vacuum_camera fails

Checklist

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

The problem

Update for camera.valetudo_vacuum_camera fails.

The entity does not show an image, nor does it with with the Xiaomi Lovelace Vacuum Card.

Configuration has been set up as per instructions and confirmed working with I Can't Believe It's Not Valetudo.

Logs from HA:

2023-07-07 20:21:29.631 DEBUG (Thread-6 (_thread_main)) [custom_components.valetudo_vacuum_camera.valetudo.connector] Connected to MQTT broker. 2023-07-07 20:21:29.632 DEBUG (Thread-6 (_thread_main)) [custom_components.valetudo_vacuum_camera.valetudo.connector] Received data from MQTT 2023-07-07 20:21:34.624 INFO (SyncWorker_4) [custom_components.valetudo_vacuum_camera.camera] camera image update process: True 2023-07-07 20:21:34.624 DEBUG (SyncWorker_4) [custom_components.valetudo_vacuum_camera.valetudo.connector] Processing data from MQTT 2023-07-07 20:21:34.624 DEBUG (SyncWorker_4) [custom_components.valetudo_vacuum_camera.utils.valetudo_jdata] Decoding PNG to JSON 2023-07-07 20:21:34.624 DEBUG (SyncWorker_4) [custom_components.valetudo_vacuum_camera.utils.valetudo_jdata] data grabbed 2023-07-07 20:21:34.624 DEBUG (SyncWorker_4) [custom_components.valetudo_vacuum_camera.utils.valetudo_jdata] Extracting JSON 2023-07-07 20:21:34.903 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.valetudo_vacuum_camera fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 695, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 942, in async_device_update await hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/valetudo_vacuum_camera/camera.py", line 184, in update pil_img = self._map_handler.get_image_from_json(parsed_json) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/valetudo_vacuum_camera/valetudo/image_handler.py", line 344, in get_image_from_json img_np_array = self.draw_zone_clean( ^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/valetudo_vacuum_camera/valetudo/image_handler.py", line 229, in draw_zone_clean tot_zones = len(coordinates) - 1 ^^^^^^^^^^^^^^^^ TypeError: object of type 'NoneType' has no len()

What version of an integration has described problem?

1.1.4

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Dreame D9, Valetudo Flashed

Please firmware installed on your Vacuum.

Dreame FW: 1132, Valetudo: DreameD9ValetudoRobot 2023.05.0

What version of Home Assistant do you use?

2023.7.1

What type of installation are you running?

Home Assistant OS

Camera's configuration

I have anonymised my configuration, but you should get the idea.

camera:
    - platform: valetudo_vacuum_camera
        vacuum_entity: "vacuum.VACUUM_NAME"
        vacuum_map: "valetudo/VACUUM_NAME_TOPIC"
        borker_User: "MQTT USER"
        broker_Password: "MQTT PASSWORD"
        scan_interval:
            seconds: 5

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

2023-07-07 20:21:29.631 DEBUG (Thread-6 (_thread_main)) [custom_components.valetudo_vacuum_camera.valetudo.connector] Connected to MQTT broker. 2023-07-07 20:21:29.632 DEBUG (Thread-6 (_thread_main)) [custom_components.valetudo_vacuum_camera.valetudo.connector] Received data from MQTT 2023-07-07 20:21:34.624 INFO (SyncWorker_4) [custom_components.valetudo_vacuum_camera.camera] camera image update process: True 2023-07-07 20:21:34.624 DEBUG (SyncWorker_4) [custom_components.valetudo_vacuum_camera.valetudo.connector] Processing data from MQTT 2023-07-07 20:21:34.624 DEBUG (SyncWorker_4) [custom_components.valetudo_vacuum_camera.utils.valetudo_jdata] Decoding PNG to JSON 2023-07-07 20:21:34.624 DEBUG (SyncWorker_4) [custom_components.valetudo_vacuum_camera.utils.valetudo_jdata] data grabbed 2023-07-07 20:21:34.624 DEBUG (SyncWorker_4) [custom_components.valetudo_vacuum_camera.utils.valetudo_jdata] Extracting JSON 2023-07-07 20:21:34.903 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.valetudo_vacuum_camera fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 695, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 942, in async_device_update await hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/valetudo_vacuum_camera/camera.py", line 184, in update pil_img = self._map_handler.get_image_from_json(parsed_json) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/valetudo_vacuum_camera/valetudo/image_handler.py", line 344, in get_image_from_json img_np_array = self.draw_zone_clean( ^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/valetudo_vacuum_camera/valetudo/image_handler.py", line 229, in draw_zone_clean tot_zones = len(coordinates) - 1 ^^^^^^^^^^^^^^^^ TypeError: object of type 'NoneType' has no len()

Additional information

No response

Problem rendering Japanese/Chinese characters in status text.

Checklist

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

The problem

Japanese and Chinese characters are displayed incorrectly when the room is named in these languages.

image

I attempted to resolve the issue using 'Pillow' with the specified Noto-CJK font from 'https://github.com/notofonts/noto-cjk/'. While this approach worked, it resulted in the loss of the charging indicator letter (lightning). Additionally, adding an extra font file, which is approximately 60MB, it does present another challenge imho.

Is there any other approach that could effectively address this issue?

image
This image shows the results using 'Pillow' with font Noto-CJK.

What version of an integration has described problem?

1.5.8

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Mi Robot Vacuum-Mop P (Viomi v7)

Please firmware installed on your Vacuum.

0047 - Valetudo 2023.12.0

What type of platform you use?

VEMLinux (Virtual Machine) such as Proxmox, VMWare, etc.

What version of Home Assistant do you use?

2024.2.4

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

Rand256: Auto Zoom and Active Zones

Description

During the test done was acknowledged that Rand256 isn't providing the "Active Segments" information's that we use to define if the room where the vacuum is will be cleaned. This is creating an issue with the Auto Zoom that will not work as per it can't be establish when the zoom should kick in.

Solution

Rand256 firmware looks to be at a Dead End, for instance it looks that the current mqtt.. anyhow will try to generate the required informations.
Will need to grab the custom_command "segmented_cleanup":

 { "command": "segmented_cleanup", "segment_ids": [2], "repeats": 1, "afterCleaning": "Base" }

in order to generate the current active_segments.

Alternatives

As it is now.. the aspect ratio is working.

Context

No response

Incompatible with HA 2024.4.4

Checklist

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

The problem

Logger: homeassistant.setup
Source: setup.py:273
First occurred: 22:47:37 (1 occurrences)
Last logged: 22:47:37

Setup failed for custom integration 'valetudo_vacuum_camera': Requirements for valetudo_vacuum_camera not found: ['pillow==10.2.0'].

What version of an integration has described problem?

2024.04.3

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

N/a

Please firmware installed on your Vacuum.

N/a

What type of platform you use?

Intel NUC (or generic x86_64)

What version of Home Assistant do you use?

2024.4.4

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

Missing map-data topic of the vacuum cause constant Home Assistant reboots

Checklist

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

The problem

After fresh installation of Valetudo Vacuum Camera and restart on HA on RPi4 constant Home Assistant reboots start as soon as Vacuum device id is set in integration setup form. This unfortunatelly makes Valetudo Vacuum Camera unusable.

Luckily there is ~15 sec timeslot when HA has loaded enough to be able to access /config/integrations/dashboard and delete Valetudo Vacuum Camera integration. Then reboots stop immediately.

Nothing specific can be observed in HA logs execpt most likely unrelated:

2024-01-27 11:05:19.667 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /store request
2024-01-27 11:05:19.670 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /store - 
2024-01-27 11:05:19.671 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /host/info request
2024-01-27 11:05:19.672 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /host/info - 
2024-01-27 11:05:19.674 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /supervisor/info request
2024-01-27 11:05:19.674 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /supervisor/info - 
2024-01-27 11:05:19.675 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /info request
2024-01-27 11:05:19.676 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /info - 
2024-01-27 11:05:19.676 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /core/info request
2024-01-27 11:05:19.677 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /core/info - 
2024-01-27 11:05:19.677 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /network/info request
2024-01-27 11:05:19.678 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /network/info - 
2024-01-27 11:05:19.678 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /resolution/info request
2024-01-27 11:05:19.679 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /resolution/info - 
2024-01-27 11:05:19.680 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /os/info request
2024-01-27 11:05:19.680 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /os/info - 
2024-01-27 11:05:19.681 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /addons request
2024-01-27 11:05:19.682 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /addons - 
2024-01-27 11:05:19.682 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /store request
2024-01-27 11:05:19.683 ERROR (MainThread) [homeassistant.components.hassio] Failed to to call /store - 
2024-01-27 11:05:19.684 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /resolution/info request
2024-01-27 11:05:19.687 ERROR (MainThread) [homeassistant.components.hassio.issues] Failed to update supervisor issues: HassioAPIError()

What version of an integration has described problem?

v.1.5.7

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Dreame D9 Pro

Please firmware installed on your Vacuum.

2023.12.0

What version of Home Assistant do you use?

2024.1.5

What type of installation are you running?

Home Assistant Supervised

Camera's settings.

No response

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

No response

Additional information

No response

Update for camera fails: Auto Trim fails to detect the image

Checklist

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

The problem

Let me preface this with I'm just blindly following the install guide here.

When I get to the point of adding the Xiaomi map, it says "Invalid calibration, please check your configuration" and doesn't show a map.

From what I can tell, even if the calibration is wrong, it should show the map?

2023-12-11-21:38:27

What version of an integration has described problem?

v1.5.0

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

RoborockS5

Please firmware installed on your Vacuum.

2023.10.0 - 002034

What version of Home Assistant do you use?

2023.10.5

What type of installation are you running?

Home Assistant Container

Camera's settings.

I'm not exactly sure how to get this, I checked around but could only find Image options, which are all default.

Camera Attributes (removed the massive amounts of rooms)

access_token: [redacted]
friendly_name: Ricky Camera
vacuum_status: docked
vacuum_topic: valetudo/ricky
vacuum_json_id: null
json_data: null
vacuum_position: null
calibration_points: null
snapshot: true
snapshot_path: /local/snapshot_ricky.png
rooms: [redacted for space]
entity_picture: /api/camera_proxy/camera.ricky_camera?token=[redacted]
supported_features: 1

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

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:732
First occurred: 8:48:19 PM (2 occurrences)
Last logged: 9:26:41 PM
Update for camera.ricky_camera fails

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/PIL/ImageFile.py", line 515, in _save
    fh = fp.fileno()
         ^^^^^^^^^
AttributeError: '_idat' object has no attribute 'fileno'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 732, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 991, in async_device_update
    await self.async_update()
  File "/config/custom_components/valetudo_vacuum_camera/camera.py", line 534, in async_update
    await self.take_snapshot(parsed_json, pil_img)
  File "/config/custom_components/valetudo_vacuum_camera/camera.py", line 398, in take_snapshot
    image_data.save(self.snapshot_img)
  File "/usr/local/lib/python3.11/site-packages/PIL/Image.py", line 2413, in save
    save_handler(self, fp, filename)
  File "/usr/local/lib/python3.11/site-packages/PIL/PngImagePlugin.py", line 1398, in _save
    ImageFile._save(im, _idat(fp, chunk), [("zip", (0, 0) + im.size, 0, rawmode)])
  File "/usr/local/lib/python3.11/site-packages/PIL/ImageFile.py", line 519, in _save
    _encode_tile(im, fp, tile, bufsize, None, exc)
  File "/usr/local/lib/python3.11/site-packages/PIL/ImageFile.py", line 530, in _encode_tile
    encoder.setimage(im.im, b)
SystemError: tile cannot extend outside image

Additional information

I'm using an external MQTT server, running on a separate device. This MQTT works for other integrations (frigate). It has a custom username and password.

When opening
https://[homeassistantbaseurlhere]/api/camera_proxy/camera.ricky_camera?token=[redacted]
I get a 500: Internal Server Error.
However I'm not smart enough to know if that's the correct url.

Now this could all be a skill issue and I'm not configurating the right stuff, but the error from the log says this might not be on me 🙃

Missing Zone Clean and No Go Area

Checklist

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

The problem

The zones are not draw after 1.2.0 update. The issue will be fixed on the next release 1.3.0. The issue was discovered by testing the new release.

What version of an integration has described problem?

v1.2.0

What was the last working version of an integration?

v1.9.x

What vacuum model do you have problems with?

Roborock.V1

Please firmware installed on your Vacuum.

2023.05.0

What version of Home Assistant do you use?

2023.08.2

What type of installation are you running?

Home Assistant OS

Camera's configuration

N/A

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

No response

Additional information

No response

Mapper connects the different paths of a Dreame Z10

Checklist

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

The problem

When creating the image from my Dreame Z10, the mapper connects all different paths present in the mapping data. (I.e. it draws a line from the last point of the first path to the first point of the second path and so on).
These paths are supposed to be drawn independently, otherwise it results in some weird zig zack lines all across the map.

What version of an integration has described problem?

1.4.4

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Dreame Z10

Please firmware installed on your Vacuum.

2023.03.0

What version of Home Assistant do you use?

2023.10.1

What type of installation are you running?

Home Assistant Supervised

Camera's settings.

No response

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

No response

Additional information

No response

Valetudo RE offer Pre-Defined zones.

Description

Would be nice to know the label and area so that could be passed to the card configuration, the card support pre-defined zones.

Solution

Found where the vacuum store those data, if in the map data decode them, if internal variable this function will not be implemented.

Alternatives

Add the pre-defined zones to be configured via the camera option.

Context

This option would a nice to have for both firmwares.

PROXMOX: Memory shortage error -> Rendered image froze

Checklist

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

The problem

I think the memory margin is miscalculated. I don't get any rendered picture, but the following Error:

What version of an integration has described problem?

1.5.7.4

What was the last working version of an integration?

1.5.7

What vacuum model do you have problems with?

Roborock.S5

Please firmware installed on your Vacuum.

Valetudo 2023.12.0

What version of Home Assistant do you use?

core-2024.2.0

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)

2024-02-09 09:47:05.343 ERROR (rocky_camera_0) [custom_components.valetudo_vacuum_camera.valetudo.hypfer.image_handler] Memory shortage error: Not enough memory available (Margin: 1200.0 MiB)

Additional information

No response

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

github-actions
.github/workflows/hacs.yaml
.github/workflows/hassfest.yaml
  • actions/checkout v4
.github/workflows/pythonpackage.yaml
  • actions/checkout v4
  • actions/setup-python v5

  • Check this box to trigger a request for Renovate to run again on this repository

On a Roborock S5 the calibration is wrong

Checklist

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

The problem

On a Roborock S5 the calibration is wrong. When I send the vacuum to a location it goes somewhere outside of the map.

In the attributes of the camera I don't see the rooms.

access_token: bd7ae322e101c8e8711eab9a19de411f0b5901b2674066948beb86da0aab8c9e
vacuum_entity: null
vacuum_status: docked
listen_to: valetudo/ROBOROCK-VACUUM
snapshot: /local/snapshot_roborock-vacuum.png
json_data: Success
vacuum_json_id: 2993cedc-b5d4-459b-bed9-ff8dca968abf
vacuum_position:
  x: 2550
  'y': 2534
  angle: 272
calibration_points:
  - vacuum:
      x: 1741
      'y': 1741
    map:
      x: 0
      'y': 0
  - vacuum:
      x: 3379
      'y': 1741
    map:
      x: 1638
      'y': 0
  - vacuum:
      x: 3379
      'y': 3379
    map:
      x: 1638
      'y': 1638
  - vacuum:
      x: 1741
      'y': 3379
    map:
      x: 0
      'y': 1638
entity_picture: >-
  /api/camera_proxy/camera.roborock_vacuum_camera?token=bd7ae322e101c8e8711eab9a19de411f0b5901b2674066948beb86da0aab8c9e
friendly_name: ROBOROCK-VACUUM Camera
supported_features: 1

What version of an integration has described problem?

v1.3.4

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Roborock S5

Please firmware installed on your Vacuum.

2023.8.0

What version of Home Assistant do you use?

2023.8.4

What type of installation are you running?

Home Assistant OS

Camera's configuration

I didn't set it up with yaml.
I used the GUI.

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

Here's the debug log.
error_log-2.txt

Additional information

Screenshot_2023-08-23-23-19-32-35_c3a231c25ed346e59462e84656a70e50

Rand256 - Problems with Zone and Spot empty coordinates.

Checklist

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

The problem

The integration is apparently not able to parse the map data sent out over MQTT. In the logs I find this:

roborock_1 : Error in get_image_from_json: list index out of range
Traceback (most recent call last):
  File "/config/custom_components/valetudo_vacuum_camera/valetudo/rand256/image_handler.py", line 431, in get_image_from_rrm
    self.room_propriety = await self.get_rooms_attributes(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/valetudo_vacuum_camera/valetudo/rand256/image_handler.py", line 586, in get_rooms_attributes
    self.room_propriety = self.extract_room_properties(
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/valetudo_vacuum_camera/valetudo/rand256/image_handler.py", line 261, in extract_room_properties
    coordinates[0].pop()
    ~~~~~~~~~~~^^^
IndexError: list index out of range

There is mapdata coming in over MQTT at topic valetudo/roborock_1/map_data, but it does not seem to be JSON:

������`�e���Pڂ��?����>�@@A�q�WTPd���K.7���w�+�*�*��?��(6���(��ʒ![PQ��  �\8���_r�MҴM��ӷI�\r����>︋(�1t~�����׭����<������`^#C������`���)Zy]+P��IDM���ANNn�����o}���ZCXKn^N^��X���T;�5��F�⻫������j���V����]^�T+(���4�n|�_�SM�f�'�'�T^�.�O��HO9�H������/試���y�%zAAyAG�O�T+��{Z���!���������}��)�G��.��r�rr�S��''7�J@<�^B���R� xJ�����S�QT*��S$�]DR�M�E��������*��~O����<�P>5U�)4���b����u��S�������S`Z1�{R��e�4G	���{��M,�^ɫ}����q��k��7���ݫQj�'C�nl<��b�dDj��G<��ݫIj��x=�ȀI����M�w�&�U��3M�e�G�x��xʍ��W�z��]1WUU8�<U0���S����)�]1QU7`����$�l�^y��y�(�����P�ϓ~���)��ݼ�Be���Q��.�ȤF�x�躂�h��%͘��x
Nm��h�}�|�������~O�c��O�J�/������8�){r�Ӻ/����;����@��=�����ֈ
�RNSG�~y
�J��z*H_<�}?�5�� =��)4.�����I��!�'���O)W|iݓҫ`�S��@�QP���s��)1�`KU#��g��&'xNu�L��Ԧ������� ���=���m/r#Nn�=���~M���Xr������m'���o�#m�Q�1�����#�9r���H�~�E�1�CC|�r�vO��F�� ��^���
<���z�OA�;L��)}��iy�����A%<�o'�k(Kͩ�� ���p���<���j��Hճ�����Լ�\�UܢF��+%��!u����L��3�1�G�)�w�Sy���z����)���8
�S���4�S��B��C��ZP��/A�'����}MD�������p�O��r��������<7p�^��Co�*6���~nt��;��� N�N�(;�Џ�����E�S};��R����_�[C�
5��������� ��]9�O�E��)�(cG�/+����0}�i���g}&�d,*��,��<���<�e��P5��J�Fq��P�E>V:� ����SD�%��M�3��Sa��D����Gz=i��w�}�������N�=��y�-%�W#��֑fO������|�vO�P��������B��x���O���w�h�3�����*��_�yj�������nP�	�2<�]�x2T*��S5�~Oi�<�*�I_�����,�SUP�O1_2T�;�OUA�R��2�[�����<��{J��-�~OEU�LŰR�O
񔺧*	��B��4�{UT��WP��Q�y��)pNNUy�K��o�K�Gr���D����)ɪ��E��_*.��'ry_�7j���S}��Z�����R��tz*./�,�oh��������^�m����j�T����������pGx���V����������)�w���H+��k����W��d��1p��0<��>w����<U���ܝ(UH�fU�����T�O�qD�;O������tz
������Y
�SyO(�RO�4"��`���p<��K��-*�+��(t/�O
�}
�~_җz<��nJ���<�D5 O�7�^�.��I�xJ2���S=�U��)t]�����sb#2���|C�T�y8/��Ut�?�<%����2���x�^��T�x�%E�SZ=�τO�}�yj��/���U�f*\��1��T>OeL����y
��/nb��)��9�,5XO�^�9�*����M�xW/��L�����5��Wi�=�'�R��Y���SY�^�S����ry�o����}����{Jn)ηo�T�%J���t��U�=�/��=��q���tV9O�����O�8��_t����!�`D0����ڝz������TX��D�KO>�s���UH��	y
�r�������y2���'���;�R��q=��S�~������S�OM�)0T��qhx�2����)�S��QՅ<��^�2��Rh�ꯧ����o������{i�T�z�^.�3����~��+�)��T��$}���`��S��
�S�;����麖��y�I>8q���T��)�S�����m�c:E��cO��Z�ޒ���O�ON�P�����z�)�/��f��x<��y�G�uO��}�d��yJ������4�[����Їb���x����דדt��&C�YHi�!?�Qt�"^
O�=��iu�G�C����_��g������tx��<�'�LF�Q1���邧x��T�4/������,�ј�a����h������S}�23|~��	�K�4O�ͳ��`p�H�T-�w]#��2DUȓ��3����a�����R�	�1���)K����L}��ZU��Y�I�$���-PBOY>OZ%h0&�8 �'�c�A�F���O���{�7\~O���@���S8���O�ՕZ4Aŗ�D���*�'}���$�Í������RO�aR���QꞒt�����,FU��SI����/UO`!m$����W��Q���R�H�$����QJ��@S�I�ɫG���F)����,�I�O��*�;cX�'H��MRO��M����jF2O��W���y*��B�0��	���S��8�}z�5��Q��
H^�y˚ٍ��E��MTZI�G����E�'�`k�Q"��TēoD�?����!�!�������7�D/�������2"&�`�5�oe���6	���{2�}��ȫ���.Sz�dġO�M\M�����OU��i��r���	j��T�S�M��)�<%"m�*[�����P�ty
�T�O�O�!����<�rX�T����A�<y�SU�6O�D"������������<�.���{��G�\�J<��x
T|�)���`H�S��<x*(x��ʜ�+Mܗz��"���ܲ&�S�[��	<�A�<��$���<�+�AP[<e�����O��I�\Yv�5��t�-��hz<�/���*�ψ~f��G/	�|y=��%�x�"��m��P�~n�D��4a,cĵ��ri*	_�
<U��ʫ%�(}aX�=H�Su��ZJ�2�%�x�"ڿ�RWͫ���q���"OF���R��!����c�[��uрZ�)���"ݘ�*�	���O7�ʲjEU�S��Ǟ�NT�xҿ@$�[��S�+&��O��Z�=����T^O����Rn��S`�IՈJ|U˴x�o�]�<���!]�18�Z�<��m@�U�٭�O!=��=U&���J
Ó�GV�DUx�6
�j��t����S%�I����j<P5L]���ĆQ煩RMU�)\a6,S��,uē1�ak@�\�x�'�:�*�T�d"f��c��)�r���d�ݤax�5%�S}��S��Z�X
Q��m@K�u���%�ʘ����x�Z�Z
�_�UaW��:͒ࢿ�x*����w��	��[�l/r������S�H��Mq^X�-����@��	�����i�dH�Z�U
S1Q^Ol�ybEy�|`E2rc�:��ȇ��8�4�K���]���}<��a���@
a0�Y���<y"k��=�1��O�$��V
KS��r����xx�s0����z�|`"O��*_�����<J5OD<�'��������B��z�|`�<�tS
Z��B7���.��s*A货�;��8��Vp�6"�h������{˳�/��T��<C���SLr�߭�U��W[�ζ)}�M"qq������&+�����4elh��S���R�{���)	�R�Oj�_���}���1e�S����3����<"&N�T���Q�
/b	S�x
��)�2d����x240Q�uaz�'*�K�)2��������τ�{*��%?!M?������;O��꽯��������s-�R���9�o��D�^�J(R��"+�{l�����"��SxKWs1yyH�'2����ƸI_J�t�Q�����E��-ƅ~����'"��7���f���7�{2$�Ӧz�##'܆�o]?�wQ���>o�N��j����+���S��]C"�SxL��G9�CQ��'CXU(M�����&�#�7������)�����9K��T�����"�����EWi�`���)6���*���y
�V��\�N�&��T���c艸'*7��������OD�҃.�x���������֊h�t���ދ"x"hL���*y��7������,�~Ox��)ppC��2�3��:�&N7�A�'��Т/�Sd����!��VH������K4��u\+q���%}�lD����xJ�=�;J�G��_�s
�������y#����W�S��x����5���5�'������y��(]SM�)�C h<�����DM��P��=ɨ���@�,���g��tj��<�
�S�<�Pq �������x���'*$�u��T7OT�H$���n����	�
��D�<�
��@}�2���x���'�z�$|u���@-�h�4��ݾ������������(��"����Ɔ6�Y�
��g�g��=�m��b������������q�)�
��F�Oa����?𫱋�OM��kM��v�[�h�!�5=m�L���3��������e�I&?2���LWZW���-�m�u���ݦ�ԥ�S�U�^���Aj�����$��L��զ���M󘹦/�٦���ӓ���k짦L��t������ɴ�}h��m7��&���2L�8ϸc\����q�����p���|�q����Z
�Ƶ����.������%����>�����T,|:�	�MC��M���������^���������v~���?D�6���N��>����qR���,��
����b6�Ѷ��m_b�m�����x�m�.�Z�W���{�~�,q���W��he��>�p��P�dn%�7w�v��	M,��s-݅��n�C䕂��@�O� ��^'���
���˵��Z���R���Z1Qw���[�.�����^a.�G���[�Ƽ),gz�������'q?�؈5ن���fv��av�}�;߾��c��J쏡q�|t�݋�e� �V�����/����"˽'z�%��C�^��o����H��g���sť�[�"��q�0L�+<����s��3h�0
=#B������F#���X��t������C7���>���N�*�J�Y~��6�=?�������^��s#�G��9+�E�G��uF���¹��
\�T�.@8j��BW�wخ�f�
��\�^dڡ{�Nh�}�R�S��M�Aj�����>K�;Lei�
����N�:��Rװ{���!�]�a�Ƭ%{0��{�m�������������XO�^���A�D~`���k9I�6�k-1ﳮ5��N���V�������Qc��У���q�=�}���3�.z%�!Mi��w����axk��l;���J��6P[�שM�L}�u�6c��۱~�mإ֯��ȍ���X�/K�v����ei��j�b{�7�o�����=���L|
����������l������w������y�w��0v����oƺ����Z|O�J���wb��v�7l�f��c]�)�������؃���D�Z���z�6ˍ�E��^�ވ�����������F��-����QF�Nm5��6�FS�L6j�ɫ��
ZlK�f�>z�����ɬ45e�h���fL��s�V`���5�&q�c7�7b$��3�}�����~��[����^�<��l8=��M�����b���c��A�%�/����+��6pYZ���p'L-��&�O`O��c���&�ƞDy�p6�����F�S�'�iأ�iصd>���<v�x��I�iu�F����_J���������֎8A]�w�;�=����������x'���A������Sm��Tk���ߢ��OSg�����=g��$ʈ;�S��������ԗ��j�����I�����a��N�C��ݟ��J����iT�����,*�[I���M�h�|�������Tl��@��4�[J=�m�^��Q���Z9��7��X{�jl��n�	�|l�u�f�~���t��X��K���;�{����<�� ��g���_Aޏ��>��g��/�ދ����Oዬ���zϵ�%~����(�x����L}��H���S?����8g݃��n��&����M���
x��&|;�����KL n#�k���6�7ٟ�C�J\c�B<f}W++���
b�e��y�����6�����K\I�m��hl�Ԓi�Ff����ͫ���w��D�������x�;I|��D��_'>�F�����/�0b�3�x��K���#M���D����M����h��r������2��Vz���/3�亙�E���3���ӗ�'Q���Z��{�]�M-]�{�.�>Z���������ͣ���Ϛ�k^d���k�Es�j��/�6����9�m^���c���$?ռ�_m�򙖎|s�_���6���%��E��Z�Q�-m�-,�[ZX֘[Xr����oi9��oY�Q�o�Y�����
1��/�l� r�E�ζ�S�,��W-�3ŖK��r����/����Y��g,#��$�]D�F�ȳ؋�]t�r�u99�z	9�����҅�l�B�ƻ����ɯ���?1���Id�1��n~���e2y�u29��LN��"�3O�_���6��dW~�i�'�����*�O�Y��������a�E�(9���jgYk����9��Z^�N�U���K�!�W���i�s�	�htܺ��ƚ˶�^g�S=���0�^
��>�GR����w�����������A?R�Q?:������I�L�����V���I���FoG���:����|����������~a7�Ş�Z�G��lg����גm��/���C#�-HeWr��q>��P�ٷE;���U�,�f��}'�����d�ʎ�?b��>a��'l3�c�]�
;�uFOi�f��"�������F�����=���N+-�a��}%NC�X��
��;?����\T���a�
5�:r��O���?����+�ij���0�jQ��	
w���狹������o���o���7��8�������1����?ŷ����'��_-�ŷ�{
������0�W�;xY+�������/����\�a%2�S�S�X�g~}��B���&���Y��Y���`���jb��C������$�ı��֘���1~��S�
�s�����(��s��|�8��[�������D��!����Cx3�/�����@��4ډ�f��?b	"�m%��qb?z����"f�C���/F�>�����8�����4�_��#.�� �pW��q��|n,ޕ��D#����c��ٳ�V�Y���F�K��t�1>����Fy�d��Q��_���G�`n��ێ�c��c�g�+l!:�Y�����	>�e�=�2��Z��A[�����
�6�1Ka�ػ�=L���9�o�����Tv(�����l3�)[��e~��3���i���=�����Ϙ�������2�_�����^H�������L	N1��ә�X1�c*��N-���Ydr1o��j9�Vf��sf�i({��	����}n��nӧ�'Sw�OS7�i7���~�����7e�$Zҙ�����ݭ��&��)Z��7Y�$��_�,q�T�d+�4��?h���^"h��h�b�X]��?����ވ���Eu���n��:�9�9�\�Zs���|�jl>����Ļ�|����މ��ϸ��I+<�o����@��������Z�i�Ђ,"�Zg����ȓ���z:�|��&;�3���G��+�|.���ϣ���a�
?3?�7�s�!�#���߶����,o��]c'�b�H��}"r�'#��7"�<k��c�����h���q�gnw�f:;��/s�Eww�@uv��N�G�������Z+j-��VHwS�|7��wQ�<��P�O�Q���+K���
��k���VP3]�?\%Tou�eR�R-��P�j����T��ۨ��{�]ǫt�����Ʒd�oż�ݾ<��f������	���ۘ.��1����i2~)3#�Y���~���I5���u��*v����@]�ݟ�~��h�������V�=v�����rv�:�]�2��؅�M����Q�b����WՍ�r�׮�L�׭�Z�a�)�)Pp�7�V����)�C�c�dwI����L��i�v[Ⱦ#���)岬t#����ڜ�b�9&�����/���㮢I��H�wA��F�R��v��9���L���<�XO?���Z�XDe:��⼓n���tt�g,�,�U�v���=���������`.�J*�n��-�ۙV�Ĝ/M`�^��R	c��b��̑�03���L�m��)�j'?����6�>��܏9_���n[j���&�K��Ve��-�@/������e.���E�ר��FU���������������*��qz�z��:���;��o����;���}3�2���$;�^�=�~'��zf���1u��Y�������<H��������Rz��ʼ���9�!�V�|��v'�A\��������G���I���W�#������������U���bk۷��[���>޶���m��F�*� �"�-��������ٟv\a����~����%��~�y��{�4��go�1�d�7΋�����1�s�Q�0���E���7]�:���:W��K�\�i�����]Z�N*r)�t׫ғ�%ZyG���J�*�H����0�\i��)͐�H�e$�/�&�rO��{ȸ|�<L~^~H~Q�.����ur����C�G~C"�M�,崴U9#mS���+�j�q�Ve�c������}�2ԶAyV|_Y#�U���Wf����t�+n����)/p;��ۦH�vE�+���S�p����1y$�(�Za�Q�q4H���:�������|�-rF����-�Qh��>4�v��/�F/��Pg���'<���F"A����Ǹ)Bw�����XxOxExZ���������bGq��E�]4���~��-����~���N
o��b�ֺgqO���	�]����8A�.�!>'����O�ۅ���?)�܏���_��t�m6���!ʶ��l���0��O�lω�ly⇶��G�����'�n[3n��:m{��i�������v�
�6�-���b�}��F+��=�uv������h��޷��N��B}�s�
����������
�9���:ܶ��Ŷa�����َ��k�s�9\��1��:��f:�E��%����t�s��/�|[g7�����\��v�s���<j{ʹ���s�8����tZ�ǝ�q����d�kh��;�J��5���ϓ.�[JCm�����R[G{���2	�zI�[�M�`i�4Vj/a�ώ1�A�hi�m�d�GK��QR�?J�ɍ��py�gh���},�r�J����/�6��m�t�}�$9�Io8�J9ڻ�+����@�<��y�4R~�9T~�1L�c�X��6\�GxX�����rCe/�����!o�>�G�����]�<�C�+��9ӱM���,��6����Y�nV�����1TYm��L�=����V���+���+Wh��?B��?�����4~��˿�L�n_��\��MX��"�W���({l�����ѱD�͹T9OZ��ke��H�+-T�H��}R�2W�*c�����[\�K�\M��=�,q�q��B�F�cN�Z��@�޹U=�ܢ����M�C���Q��tX-v�Q�8�R/s|�����.��S;�~V���R���W;�V�=m��_�U.B���XX�r�MՉ�du�pF="���H�.�
aZ�������[٪P�}�0/�(�I�F�p�3����u�-���-�����.�^ǝVGrkԶ�n�S�������Շ�tU�Iu����A����C� ��u�zÅP��37�%p�)S���\n��.��V�)�
�X�l�`n�+�;Gm��P����'�����w�6�(K���"~��V���oR~ю{��XyC\��mT�:6*g�����c�K�Y��R+�YR[���6����\��Z���-]˄�.Ah�BBsW#�FWk�3.��q��Ow����]+���\]�������������n�B[k�Z[�+O��u�x��@X�G�[�(�S�
We����g�7e{�����������E�J��F�$�V������#�i~�z�����#U#G�;�#�"�M]�z��P/�%�S-<�6���/����ċ\=l���l�\K��F9��uΏ��΋e������W��+���N�ZK�Iro)W�W{�����xy�����Y�M�u�J����m�`��|�|@�V�L�Z�-_.�+7�w�m�W�c�+�.)rOi��^,��I�䳤�ZY(w��ȍ%�|�4JۃG�ҋr��BkKVj�R��R�Pn��/�T��V���*��q�m�te��T�i�&���<�d���<��2[�BY �T��c�U�4e�<E�@~Z�,?�,�	�|��O�[�VnRnV:k��+HY-��,�]�v�ye�<O)��+�r�rD~I�D.P��/*'�B�����y��+V�i��Ӷ�)��m���B�ey�R$oW8y�2J>�<(�Q�9�?���T��B�m��s�����N���~�}�葆�2
m�ǻ�w��
�˺4��ܬ�k��N�_���p��4��

What version of an integration has described problem?

v1.6.0

What was the last working version of an integration?

--

What vacuum model do you have problems with?

Roborock.V2 (S5)

Please firmware installed on your Vacuum.

002034 (MiIO) / v0.10.10 (valetudo RE)

What type of platform you use?

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

What version of Home Assistant do you use?

2024.3.3

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

Deprecated alias Home Assistant 2024.5

Checklist

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

The problem

Logger: homeassistant.helpers.typing
Source: helpers/deprecation.py:206
First occurred: 22:13:04 (3 occurrences)
Last logged: 22:15:47

HomeAssistantType was used from valetudo_vacuum_camera, this is a deprecated alias which will be removed in HA Core 2025.5. Use homeassistant.core.HomeAssistant instead, please report it to the author of the 'valetudo_vacuum_camera' custom integration

What version of an integration has described problem?

2024.04.4

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

n/a

Please firmware installed on your Vacuum.

n/a

What type of platform you use?

Intel NUC (or generic x86_64)

What version of Home Assistant do you use?

core-2024.5.0b0

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

rand256 Vacuums Status Text.

Description

It was confirmed during the tests of the release fixing #99 (v1.6.0) the status text isn't updated while in idle or docked.

Solution

There is also here to change the MQTT connector logic. I suppose that with #104 and this enhancement the connector need a general refactoring, this why it wasn't implemented earlier.
As well some vacuum with rand256 actually include the vacuum bin status that could be display in the status text.

Alternatives

No response

Context

No response

Home Assistant UI hangs / stop responding while the vacuum is running (Rpi 3B+)

Checklist

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

The problem

When the vacuum is running, even if not displaying the xiaomii-vacuum-card, my Hass instance almost completely hangs: navigating the app is slow, even switch on / off a light with a smart button IRL can take > 20 seconds. If watching the vacuum card, the vacuum position updates but pretty slowly (a few times each minute).

CPU usage is ~30% (one core seem to be maxed out, the 3 others are doing nothing), top indicates that 'python3' process is using 100% CPU.

As soon as the vacuum stops its cycle, everything go back to normal.
I am aware that the Rpi 3B+ is slower than the Rpi4 you are using to test releases, so maybe it is just not enough powerful. That being said it is still weird it maxes out one core and leave nothing to Home Assistant process.

Would it be possible to execute valetudo vacuum camera computations on another thread?

I am available to help test things out as much as needed, thank you very much for your hard work!

What version of an integration has described problem?

v1.5.5

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Dreame L10s Ultra

Please firmware installed on your Vacuum.

3018 with Valetudo 2023.12.0

What version of Home Assistant do you use?

2024.1.0

What type of installation are you running?

Home Assistant Container

Camera's settings.

type: custom:xiaomi-vacuum-map-card
entity: vacuum.valetudo_l10su
vacuum_platform: Hypfer/Valetudo
map_source:
  camera: camera.l10s_ultra_camera
calibration_source:
  camera: true
internal_variables:
  topic: valetudo/L10SU
map_modes:
  - template: vacuum_goto
  - template: vacuum_clean_zone
  - template: vacuum_clean_segment
    max_selections: 9
    repeats_type: 3
    selection_type: ROOM
    predefined_selections:
      - id: 2
        label:
          text: Bureau
          x: 3340
          'y': 3200
          offset_y: 15
        icon:
          icon: null
          name: mdi:desk
          x: 3340
          'y': 3200
        outline:
          - - 3197
            - 3037
          - - 3467
            - 3037
          - - 3464
            - 3410
          - - 3196
            - 3410
      - id: 10
        label:
          text: Cuisine
          x: 3640
          'y': 3200
          offset_y: 15
        icon:
          icon: null
          name: mdi:silverware-fork
          x: 3640
          'y': 3200
        outline:
          - - 3467
            - 3041
          - - 3467
            - 3400
          - - 3866
            - 3400
          - - 3870
            - 3041
      - id: 6
        label:
          text: Salon
          x: 4050
          'y': 3150
          offset_y: 15
        icon:
          icon: null
          name: mdi:television-shimmer
          x: 4050
          'y': 3150
        outline:
          - - 3870
            - 3041
          - - 3873
            - 3201
          - - 3848
            - 3201
          - - 3848
            - 3261
          - - 3866
            - 3265
          - - 3866
            - 3400
          - - 4215
            - 3400
          - - 4215
            - 3041
      - id: 1
        label:
          text: Salle d'eau
          x: 3320
          'y': 3480
          offset_y: 15
        icon:
          icon: null
          name: mdi:shower-head
          x: 3320
          'y': 3480
        outline:
          - - 3197
            - 3405
          - - 3467
            - 3407
          - - 3464
            - 3582
          - - 3197
            - 3582
      - id: 12
        label:
          text: Couloir
          x: 3550
          'y': 3690
          offset_y: 15
        icon:
          icon: null
          name: mdi:door
          x: 3550
          'y': 3690
        outline:
          - - 3467
            - 3393
          - - 3467
            - 3767
          - - 3951
            - 3767
          - - 3955
            - 3642
          - - 3571
            - 3642
          - - 3571
            - 3393
      - id: 7
        label:
          text: SdB
          x: 3775
          'y': 3550
          offset_y: 15
        icon:
          icon: null
          name: mdi:shower
          x: 3775
          'y': 3550
        outline:
          - - 3668
            - 3400
          - - 3668
            - 3641
          - - 3853
            - 3641
          - - 3853
            - 3400
      - id: 3
        label:
          text: Chambre
          x: 4000
          'y': 3900
          offset_y: 15
        icon:
          icon: null
          name: mdi:bed
          x: 4000
          'y': 3900
        outline:
          - - 3804
            - 3770
          - - 3804
            - 4072
          - - 4216
            - 4072
          - - 4216
            - 3770
      - id: 8
        label:
          text: ' '
          x: 3905
          'y': 3560
          offset_y: 15
        icon:
          icon: null
          name: mdi:toilet
          x: 3905
          'y': 3560
        outline:
          - - 3860
            - 3495
          - - 3860
            - 3641
          - - 3945
            - 3641
          - - 3945
            - 3495
      - id: 11
        label:
          text: Rangement
          x: 4075
          'y': 3550
          offset_y: 15
        icon:
          icon: null
          name: mdi:bed-empty
          x: 4075
          'y': 3550
        outline:
          - - 3955
            - 3407
          - - 3955
            - 3766
          - - 4216
            - 3766
          - - 4216
            - 3407
    variables:
      topic: valetudo/robot
append_icons: true
icons:
  - type: menu
    menu_id: water_box_mode
    icon_id: water_box_mode
    entity: select.valetudo_l10su_water
    available_values_attribute: options
    icon: mdi:water
    icon_mapping:
      low: mdi:water-minus
      medium: mdi:water
      high: mdi:water-plus
      custom: mdi:water-sync
    tap_action:
      action: call-service
      service: select.select_option
      service_data:
        option: '[[value]]'
        entity_id: '[[entity_id]]'
  - type: menu
    menu_id: cleaning_mode
    icon_id: cleaning_mode
    entity: select.valetudo_l10su_mode
    available_values_attribute: options
    icon: mdi:developer-board
    icon_mapping:
      vacuum: mdi:fan
      mop: mdi:water
      vacuum_and_mop: mdi:water-sync
      custom: mdi:water-sync
    tap_action:
      action: call-service
      service: select.select_option
      service_data:
        option: '[[value]]'
        entity_id: '[[entity_id]]'
card_mod:
  style: |
    ha-card {
      --map-card-room-outline-fill-color-selected: rgba(130, 130, 130, 0.95);
      --map-card-room-outline-fill-color: rgba(130, 130, 130, 0.6);
      --map-card-room-icon-wrapper-size: 20px;
      --map-card-room-icon-size : 15px;
    }

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

No response

Additional information

No response

camera entity does not show image and it seems it does not pick up the mqtt message when mqtt connection is used with user homeassistant

Checklist

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

The problem

I tried to get the valetudo map displayed in the Xiaomi add-on from Piotr. I followed the instructions and installed both add-ons. I configured the camera with my MQTT provider, but it seems not to create an image at all.

I enabled debug logging and see the addon connecting to MQTT and subscribe to the correct topic:
2023-08-25 22:20:55.594 DEBUG (Thread-107 (_thread_main)) [custom_components.valetudo_vacuum_camera.valetudo.connector] Subscribed to MQTT broker with topic: valetudo/Robi

but when the image comes:
image

2023-08-25 22:20:58.709 DEBUG (MainThread) [homeassistant.components.mqtt.client] Received message on valetudo/Robi/MapData/map-data-hass (qos=0): b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x02\xd0\x00\x00\x01\xe0\x08\x02\x00\x00\x00\x03\xa7\xcd\xfb\x00\x00\\6IDATx\xda\xed\xbd\xd9o\x1dU\xda\xb7\xdd\xff@\x9fr\xc4\x11\x07}\xc0\x01\x07HHH-\xa4\x16R\x0b!\x84\x10\x1fM?

[...]

cc$)\xcf\x99\x06\x851\x1c\xae@7\xd9p9\xeb\x89\x08\xf2\xba\xf94J\xb0\xf0\xff\xbb.\xec\xecN9l\xc2\xee\x04\xf6z\x9d\xb87\xec\x15\xa5\xcd\xf4\xc1\x86\x08\xdf\xfc?\x9b"\xf4\xa0\xf8\xe9\xf2\x8d\xc4J\xf3/_c8\x8a\x88;\xad\xbemqs\xaa\x9dk\x1e\xbe\xd9\xe9\xdd\xdd\xadge~\xbb\\\x8f\x94\x9b\rY\xe5\x8c\xea!5\xb7\xd8\x17\xf17\xbf\xed\xd2a\xb5\xa6,\xd7=\rf\x9c\x83\xa6\x96\x07\t\x08\x7f\xa4\x19\xb9R~\xe3\xaew\xce\xfa\xfd\x1e\xbf\x1ds\x90>\x9b\xdbq\xd5p]]zr\xc0\x87\xd3=\xc2Htu\xeb\xb5\x0f\xbfl\xd4\xdf9o\x93^\xf0y\xadN\x0f\x8f\xba\x16R\x9a\xcb\x8f\xef\xdc\xd5W\x9f\xb4L-\xde\xaa\xeb63\x98\xbad\x88\xf9\xcd'

it does not seem to get further processed by the component, at least I am missing _LOGGER.debug("Received " + self._mqtt_topic + " image data from MQTT") which I found in the connector. Also the snapshot directory in the customer_component folder is empty.

In custom:valetudo-map-card the image works fine, which is also saved from the mqtt message.

Can I somehow increase the logging even more? Any idea how to troubleshoot that? Is it because it's an S5 Max? But shouldn't Valetudo provide the map in valetudo form/as PNG?

What version of an integration has described problem?

1.3.4

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Roborock.S5Max

Please firmware installed on your Vacuum.

2023.08.0

What version of Home Assistant do you use?

2023.8.4

What type of installation are you running?

Home Assistant OS

Camera's configuration

N/A

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

see above

Additional information

I noticed the component re-registers sporadically several times within a minute a couple of times quickly after each other (~5 - 20 seconds) I get [custom_components.valetudo_vacuum_camera.valetudo.connector] Subscribed to MQTT broker with topic: valetudo/Robi but there is no connection closure _LOGGER.debug(self._mqtt_topic + ": Stopped and disconnected from MQTT broker.") before, as when I disable the configured camera and re-enable it.

ModuleNotFoundError: No module named 'zlib_ng'

What version of an integration has described problem?
2024.04.4

What was the last working version of an integration?
n/a

What version of Home Assistant do you use?
core-2024.5.0b0

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py:14
integration: Valetudo Vacuum Camera (documentation, issues)
First occurred: April 24, 2024 at 23:04:40 (1 occurrences)
Last logged: April 24, 2024 at 23:04:40

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1952, in async_forward_entry_setup
    return await self._async_forward_entry_setup(entry, domain, True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1975, in _async_forward_entry_setup
    await integration.async_get_platform(domain)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1069, in async_get_platform
    platforms = await self.async_get_platforms((platform_name,))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1146, in async_get_platforms
    import_future.result()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1116, in async_get_platforms
    await self.hass.async_add_import_executor_job(
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1059, in _load_platforms
    platform_name: self._load_platform(platform_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1233, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1265, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 144, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/valetudo_vacuum_camera/camera.py", line 114, in <module>
    from .valetudo.MQTT.connector import ValetudoConnector
  File "/config/custom_components/valetudo_vacuum_camera/valetudo/MQTT/connector.py", line 14, in <module>
    from zlib_ng import gzip_ng as gzip
ModuleNotFoundError: No module named 'zlib_ng'

Originally posted by @tjorim in #124 (comment)

Created new issue as it's different from the deprecated alias.

The rooms are shown but can't get the room configured in the card.

Checklist

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

The problem

Rooms data not provided to the card.

What version of an integration has described problem?

v1.4.8

What was the last working version of an integration?

none before.

What vacuum model do you have problems with?

Roborock.S5

Please firmware installed on your Vacuum.

v0.10.10

What version of Home Assistant do you use?

2023.11.0

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

This function is still under development, RE firmware provide the RAW data of the Vacuum, we already extract the rooms, the camera can draw them. The issue is that the other information as size of the room, label are not yet calculated or as in the case of the label parsed (documentation is in progress). We count to get it done on the next version 1.4.9.

Rooms Attribute isn't show on Xaiomi C1

Hi,

Firstly thanks for creating this Camera for HA.

I currently have a Xiaomi 1C robot vacuum running Hyperfer\Valetudo and have setup your camera as per the instructions and it is giving me the map data, which each room coloured appropriately. I have the areas named in the Valetudo software. I am using the lovelace-xiaomi-vacuum-map-card configured with your camera and it is displaying the map fine, however I can't figure out how to get Rooms working. When I go into the card the link for 'GENERATE ROOMS CONFIG' is greyed out and I can't click on it to auto generate the code for the rooms.

What am I missing ?

Originally posted by @duffmiester in #11 (comment)

Warning happening on HA Supervised Installations

Checklist

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

The problem

Warning in Home Assistant for detected blocking point..

What version of an integration has described problem?

v1.5.0

What was the last working version of an integration?

v1.4.9

What vacuum model do you have problems with?

Roborock.V1

Please firmware installed on your Vacuum.

2023.10.0

What version of Home Assistant do you use?

2023.12.1

What type of installation are you running?

Home Assistant Supervised

Camera's settings.

Default settings 180 rotation and 50% crop.

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

2023-12-11 08:03:51.808 INFO (MainThread) [custom_components.valetudo_vacuum_camera.utils.draweble] Drawing silenttepidstinkbug Robot With Angle: 165
2023-12-11 08:03:51.809 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] silenttepidstinkbug Image Cropping:25 Image Rotate:180
2023-12-11 08:03:51.809 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] Image original size: 5120, 5120
2023-12-11 08:03:51.809 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] Image size after first crop: 2560, 2560
2023-12-11 08:03:51.809 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] Auto Crop and Trim Box data: (1896, 2006, 3250, 2935)
2023-12-11 08:03:51.810 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] Auto Crop and Trim image size: (1354, 929)
2023-12-11 08:03:51.883 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] Applied silenttepidstinkbug image rotation: 180
2023-12-11 08:03:51.931 INFO (MainThread) [custom_components.valetudo_vacuum_camera.camera] silenttepidstinkbug: Image update complete
2023-12-11 08:03:51.931 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] Adjusted silenttepidstinkbug: Frame interval: 0.43572
2023-12-11 08:03:51.935 WARNING (MainThread) [homeassistant.util.async_] Detected blocking call to sleep inside the event loop by custom integration 'valetudo_vacuum_camera' at custom_components/valetudo_vacuum_camera/camera.py, line 597: f"{proc_insp.PsutilWrapper().psutil.cpu_percent(interval=self.frame_interval)}"), please create a bug report at https://github.com/sca075/valetudo_vacuum_camera/issues
2023-12-11 08:03:52.936 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] silenttepidstinkbug Camera CPU usage %: 0.2
2023-12-11 08:03:52.937 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.camera] silenttepidstinkbug Camera Virtual Memory usage %: 25.0
2023-12-11 08:03:52.949 INFO (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.MQTT.connector] Received valetudo/SilentTepidStinkbug image data from MQTT

Additional information

the interesting thing is.. well CPU is stable at 3% while processing the image.. so there is an improvement for sure but we need to understand why on Home Assistant OS this not happening?

Support multiple floors

Description

I use https://github.com/pkoehlers/maploader to switch floor and maps. Map switcher works great. When I change the floor then the this map gets weird since the original segment lines stay but map has changed underneath it.

Solution

Allow switching the map. Or if possible get the segments from the vacuum.

Alternatives

No response

Context

No response

Can't change Room color

Checklist

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

The problem

I tried to change the room color from room 1-8. Sadly I get an error when I try to save the changes. It doesn't matter which color I pick.
In the UI I get the error: Unknown error occurred

In general I think the default colors are to close to each other and it's hard to see the differences between the rooms and the robot path.

What version of an integration has described problem?

v1.5.8

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Roborock S5 Max

Please firmware installed on your Vacuum.

Valetudo 2023.12.0

What type of platform you use?

VEMLinux (Virtual Machine) such as Proxmox, VMWare, etc.

What version of Home Assistant do you use?

core-2024.2.1

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)

2024-02-19 15:46:44.286 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.config_flow] Options edit in progress.. options before edit: {'rotate_image': '0', 'crop_image': '50', 'margins': '150', 'trim_top': '0', 'trim_bottom': '0', 'trim_left': '0', 'trim_right': '0', 'show_vac_status': False, 'enable_www_snapshots': False, 'color_charger': [255, 128, 0], 'color_move': [238, 247, 255], 'color_wall': [255, 255, 0], 'color_robot': [255, 255, 204], 'color_go_to': [0, 255, 0], 'color_no_go': [255, 0, 0], 'color_zone_clean': [255, 255, 255], 'color_background': [0, 125, 255], 'color_text': [255, 255, 255], 'alpha_charger': 255.0, 'alpha_move': 255.0, 'alpha_wall': 255.0, 'alpha_robot': 255.0, 'alpha_go_to': 255.0, 'alpha_no_go': 125.0, 'alpha_zone_clean': 125.0, 'alpha_background': 255.0, 'alpha_text': 255.0, 'color_room_0': [135, 206, 250], 'color_room_1': [176, 226, 255], 'color_room_2': [165, 105, 18], 'color_room_3': [164, 211, 238], 'color_room_4': [141, 182, 205], 'color_room_5': [96, 123, 139], 'color_room_6': [224, 255, 255], 'color_room_7': [209, 238, 238], 'color_room_8': [180, 205, 205], 'color_room_9': [122, 139, 139], 'color_room_10': [175, 238, 238], 'color_room_11': [84, 153, 199], 'color_room_12': [133, 193, 233], 'color_room_13': [245, 176, 65], 'color_room_14': [82, 190, 128], 'color_room_15': [72, 201, 176], 'alpha_room_0': 255.0, 'alpha_room_1': 255.0, 'alpha_room_2': 255.0, 'alpha_room_3': 255.0, 'alpha_room_4': 255.0, 'alpha_room_5': 255.0, 'alpha_room_6': 255.0, 'alpha_room_7': 255.0, 'alpha_room_8': 255.0, 'alpha_room_9': 255.0, 'alpha_room_10': 255.0, 'alpha_room_11': 255.0, 'alpha_room_12': 255.0, 'alpha_room_13': 255.0, 'alpha_room_14': 255.0, 'alpha_room_15': 255.0}
2024-02-19 15:46:44.293 INFO (MainThread) [custom_components.valetudo_vacuum_camera.config_flow] staubi_camera: Options Configuration Started.
2024-02-19 15:46:46.432 INFO (MainThread) [custom_components.valetudo_vacuum_camera.config_flow] staubi_camera: Options Configuration Started.
2024-02-19 15:46:46.433 INFO (MainThread) [custom_components.valetudo_vacuum_camera.config_flow] Rooms 1 to 8 Colours Configuration Started.
2024-02-19 15:46:51.784 INFO (MainThread) [custom_components.valetudo_vacuum_camera.config_flow] Rooms 1 to 8 Colours Configuration Started.
2024-02-19 15:46:51.785 INFO (MainThread) [custom_components.valetudo_vacuum_camera.config_flow] Storing Updated Camera (staubi_camera) Options.
2024-02-19 15:46:51.785 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 91, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 227, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware
    response = await handler(request)
               ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 149, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/decorators.py", line 72, in with_admin
    return await func(self, request, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 244, in post
    return await super().post(request, flow_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
    result = await method(view, request, data, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 358, in async_configure
    result = await self._async_configure(flow_id, user_input)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 404, in _async_configure
    result = await self._async_handle_step(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 501, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/valetudo_vacuum_camera/config_flow.py", line 630, in async_step_rooms_colours_1
    return await self.async_step_opt_save()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/valetudo_vacuum_camera/config_flow.py", line 751, in async_step_opt_save
    opt_update = await update_options(self.bk_options, self.options)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/valetudo_vacuum_camera/common.py", line 151, in update_options
    updated_options[key] = bk_options[key]
                           ~~~~~~~~~~^^^^^
KeyError: 'get_svg_file'

Additional information

No response

Missing Snapshots for Valetudo RE vacuums.

Checklist

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

The problem

The vacuum went in Idle or Docked and no snapshot was saved

What version of an integration has described problem?

v1.4.8

What was the last working version of an integration?

none before.

What vacuum model do you have problems with?

Roborock.S5

Please firmware installed on your Vacuum.

v0.10.10

What version of Home Assistant do you use?

2023.11.0

What type of installation are you running?

Home Assistant OS

Camera's settings.

Default

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

No response

Additional information

Issue was found in the frame counts on the image_handler and it was also necessary to change in camera the snapsht condition. The next release will fix the issue.

HA 2024.1.0 deprecations

Checklist

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

The problem

Updated to HA version 2024.1.0b0 and saw the following warning:

Logger: homeassistant.components.camera
Source: helpers/deprecation.py:204
Integration: Camera (documentation, issues)
First occurred: 16:22:46 (6 occurrences)
Last logged: 16:22:48

SUPPORT_ON_OFF was used from valetudo_vacuum_camera, this is a deprecated constant which will be removed in HA Core 2025.1. Use CameraEntityFeature.ON_OFF instead, please create a bug report at https://github.com/sca075/valetudo_vacuum_camera/issues

Also, the following two errors:

Logger: homeassistant.components.camera
Source: helpers/entity_platform.py:507
Integration: Camera (documentation, issues)
First occurred: 16:22:47 (2 occurrences)
Last logged: 16:22:48

Error adding entities for domain camera with platform valetudo_vacuum_camera
Error adding entities for domain camera with platform tapo_control
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1273, in add_to_platform_finish
    await self.async_internal_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 744, in async_internal_added_to_hass
    self._rtsp_to_webrtc = await self._async_use_rtsp_to_webrtc()
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 761, in _async_use_rtsp_to_webrtc
    if CameraEntityFeature.STREAM not in self.supported_features:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'int' is not iterable

and

Logger: homeassistant.components.camera
Source: helpers/entity_platform.py:368
Integration: Camera (documentation, issues)
First occurred: 16:22:47 (2 occurrences)
Last logged: 16:22:48

Error while setting up valetudo_vacuum_camera platform for camera
Error while setting up tapo_control platform for camera
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 368, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 507, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 752, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1273, in add_to_platform_finish
    await self.async_internal_added_to_hass()
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 744, in async_internal_added_to_hass
    self._rtsp_to_webrtc = await self._async_use_rtsp_to_webrtc()
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/camera/__init__.py", line 761, in _async_use_rtsp_to_webrtc
    if CameraEntityFeature.STREAM not in self.supported_features:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'int' is not iterable

What version of an integration has described problem?

v1.5.2-alpha

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

n/a

Please firmware installed on your Vacuum.

n/a

What version of Home Assistant do you use?

core-2024.1.0b0

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

migration broken since last release

Checklist

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

The problem

Since updating to the lastest version homeassistant shows a migration error.

here is the relevant log:

Traceback (most recent call last):
  File "/nix/store/7z97x7nvmr0kpssp9xa3j058x4nmgx3f-homeassistant-2024.3.3/lib/python3.12/site-packages/homeassistant/config_entries.py", line 770, in async_migrate
    result = await component.async_migrate_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/hass/custom_components/valetudo_vacuum_camera/__init__.py", line 211, in async_migrate_entry
    await move_data_to_valetudo_camera()
  File "/var/lib/hass/custom_components/valetudo_vacuum_camera/__init__.py", line 305, in move_data_to_valetudo_camera
    os.makedirs(valetudo_camera_folder)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
OSError: [Errno 30] Read-only file system: '/.storage'

it seems that it tries to write to /.storage (which doesn't exist)
my homeassistant storage dir lives in /var/lib/hass/.storage
all the other plugins and homeassistant itself uses the correct storage dir.

What version of an integration has described problem?

2024.04.1

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

two dreames

Please firmware installed on your Vacuum.

valtudo

What type of platform you use?

Intel NUC (or generic x86_64)

What version of Home Assistant do you use?

2024.4.0

What type of installation are you running?

Home Assistant Core

Camera's settings.

No response

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

No response

Additional information

No response

Warning issues on v1.4.1 during migration.

Checklist

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

The problem

Some issue occurred during the migration due to typo and improper settings.

What version of an integration has described problem?

v.1.4.1

What was the last working version of an integration?

v1.4.0

What vacuum model do you have problems with?

Roborock.V1

Please firmware installed on your Vacuum.

2023.08.0

What version of Home Assistant do you use?

2023.09.3

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)

This error originated from a custom integration.

Logger: homeassistant.config_entries
Source: custom_components/valetudo_vacuum_camera/__init__.py:115
Integration: Valetudo Vacuum Camera (documentation, issues)
First occurred: 7:16:13 PM (2 occurrences)
Last logged: 7:16:13 PM

Error migrating entry upstairs-dreame Camera for valetudo_vacuum_camera
Error migrating entry downstairs-roborock Camera for valetudo_vacuum_camera
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.11/site-packages/homeassistant/config_entries.py", line 635, in async_migrate
    result = await component.async_migrate_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/etc/homeassistant/custom_components/valetudo_vacuum_camera/__init__.py", line 115, in async_migrate_entry
    _LOGGER("config update for v1.4.1 in progress...")
TypeError: 'HassLogger' object is not callable

Additional information

We do have already a fix for it, we will test it and release it later today.

GC logging causing extreme performance hit for HA

Checklist

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

The problem

https://github.com/sca075/valetudo_vacuum_camera/blame/959eb5aa126a05808330b4cae555caf98f8fa0c9/custom_components/valetudo_vacuum_camera/camera.py#L277

The debug line set above is causing all gc events in HA to be logged. Unfortunately this is causing an extremely massive slowdown. I'm running on a server with Ryzen 5600x and 32GB of RAM and simply turning a light on takes 5-10 seconds. Loading HA can take 2-3 minutes.

Pulling the Docker logs will show that it is logging anywhere from 5-500+ times per second.

What version of an integration has described problem?

v1.5.7.2

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

N/A

Please firmware installed on your Vacuum.

N/A

What version of Home Assistant do you use?

2024.1.6

What type of installation are you running?

Home Assistant Container

Camera's settings.

No response

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

gc: collecting generation 1...
gc: objects in each generation: 879 7690 1407440
gc: objects in permanent generation: 0
gc: done, 0 unreachable, 0 uncollectable, 0.0001s elapsed

Additional information

No response

Camera isn't working after updating to v1.5.2-alpha

Checklist

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

The problem

I'm using Valetudo Vacuum Camera with Xiaomi Lovelace Vacuum Map card.
After updating the integration to v1.5.2-alpha the camera stopped to update: it just shows stale image all the time.

What version of an integration has described problem?

v1.5.2-alpha

What was the last working version of an integration?

v1.5.1

What vacuum model do you have problems with?

Roborock S7

Please firmware installed on your Vacuum.

2023.10.0

What version of Home Assistant do you use?

core-2023.12.3

What type of installation are you running?

Home Assistant Supervised

Camera's settings.

idk where to get it from...

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

2023-12-18 11:49:54.763 WARNING (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] rosha: Error in get_image_from_json: 'NoneType' object has no attribute 'items'

Additional information

No response

rand256 V1 images are not showing floor and walls.

Checklist

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

The problem

The current rand256 implementation offers images for S5x vacuums but wasn't test yet on the V1 vacuum I own. I did run a test on stored data I had and it looks that images are not completely rendered. I will need to double check with a real installation of RE firmware on the V1, anyway I opened also this issue just in case.

What version of an integration has described problem?

v1.4.9

What was the last working version of an integration?

none

What vacuum model do you have problems with?

Roborock.V1

Please firmware installed on your Vacuum.

v0.10.10

What version of Home Assistant do you use?

2023.11.1

What type of installation are you running?

Home Assistant OS

Camera's settings.

Found the issue on the test env. I setup for testing the code. This is issue is just to keep trace of the progress.

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

None.

Additional information

No response

Trimming Positions not matching to final image.

Checklist

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

The problem

Reported in discussions for the cropping(#15) function. The Trimming values changes with the produced image as per the image will be rotated after trimming, so if we apply trim to the top and then rotate the image 90 deg. the trim will be shown on the right side of the image.

What version of an integration has described problem?

v1.3.2

What was the last working version of an integration?

none before.

What vacuum model do you have problems with?

Roborock.V1

Please firmware installed on your Vacuum.

2023.05.0

What version of Home Assistant do you use?

2023.08.3

What type of installation are you running?

Home Assistant OS

Camera's configuration

None -> will update this later too :)

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

No response

Additional information

Screenshot 2023-08-18 at 13 28 32

From 180 deg to 90 deg. Top side trim 350 pixels.

Battery level in the "Vacuum Status" text

Description

As per the title, it would be awesome to have the battery level displayed along with the "Vacuum Status" text.

Solution

for example:
valetudo: docked (100%)

Alternatives

No response

Context

No response

Invalid Calibration Error with any version above 1.5.7.1

Checklist

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

The problem

Every time I update to any version beyond 1.5.7.1 I get the error 'Invalid calibration, please check your configuration' on the camera card and no map is displayed. This happens on 1.5.7.2 - 1.5.7.5.

I tried reinstalling multiple times.

What version of an integration has described problem?

1.5.7.5

What was the last working version of an integration?

1.5.7.1

What vacuum model do you have problems with?

Xiaomi 1C

Please firmware installed on your Vacuum.

2023.12.0

What version of Home Assistant do you use?

core-2024.2.1

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)

2024-02-10 17:31:59.879 WARNING (jimmy_camera_0) [custom_components.valetudo_vacuum_camera.valetudo.hypfer.image_handler] Memory shortage error: Not enough memory available (Margin: 1310.9 MiB)

Additional information

No response

.storage folder valetudo_camera to store the data.

Description

As it is now the camera store data such logs, mqtt raw data, json and png on the .storage folder.

Solution

Will create a folder ".storage/valetudo_camera" where those data are stored in a more cleaner way.

Alternatives

No response

Context

No response

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: Invalid JSON (parsing failed)
Message: Syntax error: expecting end of expression or separator near ]
"majo

Translate the vacuum text to the current UI language setting.

Description

We did add some new future on the status text such as select the fonts.
The status text of the vacuum can be actually translated as per UI language settings.

Solution

Implement translations routines for the status text according to the UI user language settings.

Alternatives

No response

Context

No response

Home Assistant Core / Supervised non Docker installation support

Checklist

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

The problem

User reported that the attribute rooms is not display and data can`t be saved on snapshots because of the hard coded path "conf" used on docker.

What version of an integration has described problem?

v1.3.3

What was the last working version of an integration?

not specified

What vacuum model do you have problems with?

S50

Please firmware installed on your Vacuum.

2023.05.0

What version of Home Assistant do you use?

2023.08.3

What type of installation are you running?

Home Assistant Supervised

Camera's configuration

installed in etc and running but screenshot data (image is on www saved) are not available

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

No response

Additional information

No response

Unknown Error at color change

Checklist

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

The problem

when i change the colors and press save an error message appears

Screenshot 2023-12-16 225207

What version of an integration has described problem?

1.5.1

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Dreame D9

Please firmware installed on your Vacuum.

2023.10.0

What version of Home Assistant do you use?

2023.12.3

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

Rand256 Vacuums not rendered.

Checklist

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

The problem

While testing the v1.6.0 with Rand256 installed on my S5 I could found out that there is an issue in rendering the images from those vacuums.
Working on it.

What version of an integration has described problem?

v1.6.0-b1

What was the last working version of an integration?

not specified

What vacuum model do you have problems with?

S50

Please firmware installed on your Vacuum.

v0.10.10

What type of platform you use?

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

What version of Home Assistant do you use?

2024.3.1

What type of installation are you running?

Home Assistant OS

Camera's settings.

Default

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

2024-03-17 21:33:31.730 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.MQTT.connector] rockrobo: Processing Rand256 data from MQTT.
2024-03-17 21:33:34.730 INFO (MainThread) [custom_components.valetudo_vacuum_camera.camera] rockrobo: Camera image data update available: True
2024-03-17 21:33:34.730 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.MQTT.connector] rockrobo: Processing Rand256 data from MQTT.
2024-03-17 21:33:37.733 INFO (MainThread) [custom_components.valetudo_vacuum_camera.camera] rockrobo: Camera image data update available: True
2024-03-17 21:33:37.733 DEBUG (MainThread) [custom_components.valetudo_vacuum_camera.valetudo.MQTT.connector] rockrobo: Processing Rand256 data from MQTT.
2024-03-17 21:33:40.733 INFO (MainThread) [custom_components.valetudo_vacuum_camera.camera] rockrobo: Camera image data update available: True

Additional information

Will inform as soon the issue is fixed. Apparently no user impacted yet.

Empty map data crash the camera.

Checklist

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

The problem

As reported in Discussions (#12) by @Skeletorjus the issue happens when the vacuum for any reason will start from scratch to draw the map. Issue is related to Error raised at the debug level (that since HA 2023.08 cause the integration to halt). A quick fix is planned to be release soon enough.

What version of an integration has described problem?

v1.3.0

What was the last working version of an integration?

not specified

What vacuum model do you have problems with?

S50

Please firmware installed on your Vacuum.

2023.05.0

What version of Home Assistant do you use?

2023.08.2

What type of installation are you running?

Home Assistant Supervised

Camera's configuration

None

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

2023-08-15 10:06:25.910 INFO (SyncWorker_7) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] s50:Composing the image for the camera.
2023-08-15 10:06:25.911 INFO (SyncWorker_7) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] Vacuum JSon ID: c015cec2-bc7f-43f4-bdb3-e88932bcec34
2023-08-15 10:06:25.916 INFO (SyncWorker_7) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] s50: Empty image with background color
2023-08-15 10:06:26.015 INFO (SyncWorker_7) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] s50: Overlapping Layers
2023-08-15 10:06:26.036 INFO (SyncWorker_7) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] s50: Completed base Layers
2023-08-15 10:06:26.036 ERROR (SyncWorker_7) [custom_components.valetudo_vacuum_camera.valetudo.image_handler] s50: Error in get_image_from_json: 'NoneType' object is not subscriptable

Additional information

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.