PiotrMachowski / Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor

This custom integration provides a way to present a live view of a map for Xiaomi (Roborock/Viomi/Roidmi/Dreame) vacuums without a need for rooting.
MIT License
1.14k stars 121 forks source link

The "two_values" blueprint does not change the update interval to 10 seconds when the vacuum is cleaning #547

Open acuszka opened 1 month ago

acuszka commented 1 month ago

Checklist

The problem

I'm using the Xiaomi Cloud Map Extractor together with the Vacuum Map card. Initially, I had issues with getting the map to load, but I managed to fix them by using a blueprint provided in another topic. I'm running the blueprint in two_values mode.

The problem is that when my vacuum starts cleaning and its status changes to "Cleaning," the map is not getting updated every 10 seconds as configured in the automation. Using Home Assistant Developer Tools, I see that the last_updated value of camera.xiaomi_cloud_map_extractor changes when cleaning starts and again when the vacuum returns to the dock and starts charging.

That's it, no map updates when cleaning.

I can manually trigger an update using the Camera: Turn on/off service. When I do this, the vacuum's position gets updated correctly.

Not sure how to troubleshoot it further.

configuration.yaml:

camera:
  - platform: xiaomi_cloud_map_extractor
    auto_update: false
    host: 192.168.0.89
    token: 
    username: 
    password: 
    draw: ['all']
    attributes:
      - calibration_points
      - rooms
      - vacuum_position
    colors:
      color_map_inside: [50, 50, 50]
      color_map_outside: [0, 0, 0, 128]
      color_map_wall: [255,255,255]
    map_transformation:
      trim:
        top: 10
        bottom: 20
        left: 10
        right: 10

card configuration

type: custom:xiaomi-vacuum-map-card
title: ''
preset_name: Live map
entity: vacuum.robot_odkurzajacy
map_source:
  camera: camera.xiaomi_cloud_map_extractor
calibration_source:
  camera: true
map_modes:
  - template: vacuum_clean_segment
    predefined_selections:
      - id: '1'
        icon:
          name: mdi:shower
          x: 18750
          'y': 32600
        label:
          text: Łazienka
          x: 18750
          'y': 33200
          offset_y: 35
        outline:
          - - 17800
            - 28550
          - - 19700
            - 28550
          - - 19700
            - 30650
          - - 17800
            - 30650
      - id: '16'
        icon:
          name: mdi:door
          x: 19225
          'y': 26250
        label:
          text: Przedpokój
          x: 19225
          'y': 26250
          offset_y: 35
        outline:
          - - 15600
            - 27100
          - - 22850
            - 27100
          - - 22850
            - 28400
          - - 17850
            - 28400
          - - 17850
            - 33400
          - - 15600
            - 33400
      - id: '17'
        icon:
          name: mdi:fridge
          x: 25375
          'y': 33000
        label:
          text: Kuchnia
          x: 25375
          'y': 33125
          offset_y: 35
        outline:
          - - 22800
            - 27050
          - - 25500
            - 27050
          - - 25550
            - 30200
          - - 22800
            - 30200
      - id: '18'
        icon:
          name: mdi:sofa
          x: 29800
          'y': 26500
        label:
          text: Salon
          x: 29800
          'y': 27100
          offset_y: 35
        outline:
          - - 23000
            - 25000
          - - 28000
            - 25000
          - - 28000
            - 29600
          - - 26500
            - 29400
          - - 26500
            - 28100
          - - 25500
            - 28100
          - - 22900
            - 28100

vacuum_platform: default
card_mod:
  style: |
    .room-1-wrapper {
      --map-card-internal-room-outline-line-color: blue;
      --map-card-internal-room-outline-fill-color: rgba(255, 100, 0, 0.5);
    }
    ha-card {
    --map-card-room-label-color: white;
    --map-card-room-icon-background-color: white;
    }

automation configuration: image

What version of an integration has described problem?

2.2.1

What was the last working version of an integration?

No response

What vacuum model do you have problems with?

Xiaomi Roborock S50

What version of Home Assistant do you use?

2024.7.2

What type of installation are you running?

Home Assistant OS

Camera's configuration

camera:
  - platform: xiaomi_cloud_map_extractor
    auto_update: false
    host: 192.168.0.89
    token: 
    username: 
    password: 
    draw: ['all']
    attributes:
      - calibration_points
      - rooms
      - vacuum_position
    colors:
      color_map_inside: [50, 50, 50]
      color_map_outside: [0, 0, 0, 128]
      color_map_wall: [255,255,255]
    map_transformation:
      trim:
        top: 10
        bottom: 20
        left: 10
        right: 10

Errors shown in the HA logs (if applicable)

No response

Additional information

No response

therealmadmaxx commented 1 month ago

Same issue here... I think, because all 5 conditions on the second step are false.

2024-07-31 08_03_57-Einstellungen – Home Assistant

acuszka commented 1 month ago

Same issue here... I think, because all 5 conditions on the second step are false.

2024-07-31 08_03_57-Einstellungen – Home Assistant

yes I noticed the same

carfanatic93 commented 1 month ago

Same here :-(