Xiaomi Cloud Vacuum Map Extractor

Ah ok cool understood now, in this case what suggestion do you give me to try to correct the issue of updating where the robot is passing with a little less time because it is taking a long time around 25 to 30 seconds to update the location of the robot, i know its not possible to update like in the real app which is almost instantaneous,
but for me 4 to 5 seconds would be perfect, there is a way to try to download the update for that time, even though I have already set the update time and it seems that it does not accept or does not understand that it is to reduce the time to 5 seconds.

I would also like to thank you for having created this solution for the project of being able to visualize the map, you are very good !!

I realized that I am having an error every time I order the robot to clean an ZONE that has already been predetermined and I click on PLAY on right side for it to go clean the place, the robot simply does not walk and does not accept the command, however if I order to clean a specific area that I drawing on the screen it goes without problems, only when I select already pre-created zones it does not go what can it be?

I use the Roborock S5 MAX

I used the automatic code generator

My setup below configuration.yaml :

camera:
  - platform: xiaomi_cloud_map_extractor
    host: !secret xiaomi_vacuum_host
    token: !secret xiaomi_vacuum_token
    username: !secret xiaomi_cloud_username
    password: !secret xiaomi_cloud_password
    draw: ['all']
    attributes:
      - calibration_points
      - rooms

My config inside homeassistant:

type: custom:xiaomi-vacuum-map-card
entity: vacuum.roborock_s5_max
vacuum_platform: default
map_source:
  camera: camera.xiaomi_cloud_map_extractor
calibration_source:
  camera: true
map_locked: false
map_modes:
  - template: vacuum_clean_zone
  - template: vacuum_goto
  - template: vacuum_clean_segment
    predefined_selections:
      - id: '16'
        icon:
          name: mdi:broom
          x: 19575
          'y': 29600
        label:
          text: Room 16
          x: 19575
          'y': 29600
          offset_y: 35
        outline:
          - - 17750
            - 28850
          - - 21400
            - 28850
          - - 21400
            - 30350
          - - 17750
            - 30350
      - id: '18'
        icon:
          name: mdi:broom
          x: 19000
          'y': 27625
        label:
          text: Room 18
          x: 19000
          'y': 27625
          offset_y: 35
        outline:
          - - 17950
            - 26750
          - - 20050
            - 26750
          - - 20050
            - 28500
          - - 17950
            - 28500
      - id: '20'
        icon:
          name: mdi:broom
          x: 24250
          'y': 25025
        label:
          text: Room 20
          x: 24250
          'y': 25025
          offset_y: 35
        outline:
          - - 22500
            - 23400
          - - 26000
            - 23400
          - - 26000
            - 26650
          - - 22500
            - 26650
      - id: '21'
        icon:
          name: mdi:broom
          x: 24250
          'y': 28550
        label:
          text: Room 21
          x: 24250
          'y': 28550
          offset_y: 35
        outline:
          - - 22500
            - 26750
          - - 26000
            - 26750
          - - 26000
            - 30350
          - - 22500
            - 30350
      - id: '22'
        icon:
          name: mdi:broom
          x: 19575
          'y': 25050
        label:
          text: Room 22
          x: 19575
          'y': 25050
          offset_y: 35
        outline:
          - - 17850
            - 23400
          - - 21300
            - 23400
          - - 21300
            - 26700
          - - 17850
            - 26700
      - id: '24'
        icon:
          name: mdi:broom
          x: 21925
          'y': 28025
        label:
          text: Room 24
          x: 21925
          'y': 28025
          offset_y: 35
        outline:
          - - 21300
            - 25600
          - - 22550
            - 25600
          - - 22550
            - 30450
          - - 21300
            - 30450
two_finger_pan: true

It should work without any further changes. If it doesnā€™t work out might mean that some part of a map download process canā€™t keep up. It might be your HA, your vacuum or Xiaomi cloud.

To fix room cleaning you have to remove single quotes from room IDs in cardā€™s config

OMG it was just removing the quotes, I spent all day trying to fix this problem and it was just the single quotes kkkkkk the resolution was so simple, but I did not find this solution anywhere, thank you very much, now I will try to solve the problem of the update in map for shorter time. Thank you again.

Does anyone of you also have the problem that the map from the Roborock is not displayed from time to time? The card is also not displayed in the Xiaomi app. Then I restart the Roborock and the card is there again. Somtimes the map is also there again without me doing anything. I had contact with Xiaomi support and they said without me mentioning it that it could be due to Home Assistant.

Hi, does this integration only work if you use the Mi Home app to control your Roborock? I use the Roborock app. Just wondering if the token extraction part will work for me if I dont have the Robot added to Mi Home?
Also, do you need to use the lovelace card to view the map or can it be viewed outside of Home Assistant? I use Sharptools for my dashboard so would like to get it in there if possible?
thanks

It only works if you use Xiaomi Home. You can use custom Roborock integration. Both integrations create cameras which can be used anywhere in HA

Thanks that looks good. Do you know if it is possible to stream the camera/map outside of HA?

Iā€™m not sure what you want to achieve, but it should be possible.

Iā€™m just wanting ti view a current roborock map I side Sharptools
The Generic Camera integration looks like it might do it

ā€œHome Assistant will serve the images via its server, making it possible to view your IP cameras while outside of your network. The endpoint is /api/camera_proxy/camera.[name].ā€

You donā€™t have to use generic camera, every HA camera has this feature

Hi @3_14 , I also just noticed that my map is stuck on ā€œloading mapā€, in Xiaomi app, using S5ā€¦
I see a few posts back an issue about it, but itā€™s a huge threadā€¦ Can you summary what needs to be done?
I have just disabled your camera integration for now, hoping the map is visible again tomorrow in the app, when the API call expires

The short answer is to use the blueprint thatā€™s linked in the thread. Optimally in ā€œOnly when card visibleā€ mode or ā€œDefault when cleaningā€ if you donā€™t use browser mod.

1 Like

Ok, Iā€™ll have a look laterā€¦ I also read something about scan interval? Doesnā€™t that help setting it to something like 60?

No, 60 definitely wonā€™t be enough

1 Like

Hello, Iā€™ve a roborock S8 and iā€™m using Roborock App on IOS (not xiaomi home app)

I looking for a solution to get cloud map extractor working. Is there any solution ?

Thank you

1 Like

Hey there,

Iā€™m stuck on step 1 of the configuration process Im afraid: Iā€™ve pulled the token of my vacuum and I have my login and password for the Xiaomi Home app ready to go, but setting the basic example of a camera on my configuration.yaml file, if I try to check for the configuration of the yamls (under Developer Tools > Check configuration), then it gets onto a forever spinning wheel and never validates that the configuration file is correctā€¦
Iā€™ve reloaded my HA and of course there is no camera being loaded.

Can I have someoneā€™s hints as on what I may be doing wrong??

Thanks!

There should be something in HA logs