Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The card makes the whole UI lag and freeze on all devices #704

Open
3 tasks done
InToSSH opened this issue Jan 24, 2024 · 2 comments
Open
3 tasks done

The card makes the whole UI lag and freeze on all devices #704

InToSSH opened this issue Jan 24, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@InToSSH
Copy link

InToSSH commented Jan 24, 2024

Checklist

  • I have updated the card to the latest version available
  • I have cleared the cache of my browser
  • I have checked if the problem is already reported

The problem

Hello,
I have a problem that whenever I leave the dashboard with the card open in browser, after a few minutes it makes the whole UI lag on all devices, not just the one that has the card open and after a while it freezes completely.
I have to quickly open the tab with the card, start the robot and switch to other tab again.

I think the issue is related to the camera stream. I looked at the DevTools and the card makes around 15 calls for the camera image every second and I think this causes the server to lag. The transfer is about 40MB/minute
I am using the Tasshack/dreame-vacuum platform.

2024-01-25_00-15

What version of a card has described problem?

v2.2.2

What was the last working version card?

No response

What vacuum model do you have problems with?

Dreame L20 Ultra

Which integration do you use to control your vacuum (link)?

https://github.com/Tasshack/dreame-vacuum

What browser (browsers/apps) does have this problem?

Chrome/Brave/Fully Kiosk

What version of Home Assistant do you use?

2024.1.2

What type of installation are you running?

Home Assistant Supervised

Card's configuration

type: custom:xiaomi-vacuum-map-card
map_source:
  camera: camera.marvin_map_1
calibration_source:
  camera: true
entity: vacuum.marvin
vacuum_platform: Tasshack/dreame-vacuum
title: ''
additional_presets: []
icons:
  - icon: mdi:play
    conditions:
      - entity: vacuum.marvin
        value_not: cleaning
      - entity: vacuum.marvin
        value_not: error
      - entity: vacuum.marvin
        value_not: returning
    tooltip: Start
    tap_action:
      action: call-service
      service: vacuum.start
      service_data:
        entity_id: vacuum.marvin
  - icon: mdi:pause
    conditions:
      - entity: vacuum.marvin
        value_not: docked
      - entity: vacuum.marvin
        value_not: idle
      - entity: vacuum.marvin
        value_not: error
      - entity: vacuum.marvin
        value_not: paused
    tooltip: Pause
    tap_action:
      action: call-service
      service: vacuum.pause
      service_data:
        entity_id: vacuum.marvin
  - icon: mdi:stop
    conditions:
      - entity: vacuum.marvin
        value_not: docked
      - entity: vacuum.marvin
        value_not: idle
      - entity: vacuum.marvin
        value_not: error
      - entity: vacuum.marvin
        value_not: paused
    tooltip: Stop
    tap_action:
      action: call-service
      service: vacuum.stop
      service_data:
        entity_id: vacuum.marvin
  - icon: mdi:home-map-marker
    conditions:
      - entity: vacuum.marvin
        value_not: docked
      - entity: vacuum.marvin
        value_not: returning
    tooltip: Return to base
    tap_action:
      action: call-service
      service: vacuum.return_to_base
      service_data:
        entity_id: vacuum.marvin
  - icon: mdi:map-marker
    tooltip: Locate
    tap_action:
      action: call-service
      service: vacuum.locate
      service_data:
        entity_id: vacuum.marvin
  - menu_id: fan_speed
    icon: mdi:fan-remove
    label: Silent
    conditions:
      - entity: vacuum.marvin
        attribute: fan_speed
        value: Silent
    tooltip: Change fan speed
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.marvin
        fan_speed: Silent
  - menu_id: fan_speed
    icon: mdi:fan-speed-1
    label: Standard
    conditions:
      - entity: vacuum.marvin
        attribute: fan_speed
        value: Standard
    tooltip: Change fan speed
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.marvin
        fan_speed: Standard
  - menu_id: fan_speed
    icon: mdi:fan-speed-2
    label: Strong
    conditions:
      - entity: vacuum.marvin
        attribute: fan_speed
        value: Strong
    tooltip: Change fan speed
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.marvin
        fan_speed: Strong
  - menu_id: fan_speed
    icon: mdi:fan-speed-3
    label: Turbo
    conditions:
      - entity: vacuum.marvin
        attribute: fan_speed
        value: Turbo
    tooltip: Change fan speed
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.marvin
        fan_speed: Turbo
  - icon: mdi:fan-alert
    conditions:
      - entity: vacuum.marvin
        attribute: fan_speed
        value_not: Silent
      - entity: vacuum.marvin
        attribute: fan_speed
        value_not: Standard
      - entity: vacuum.marvin
        attribute: fan_speed
        value_not: Strong
      - entity: vacuum.marvin
        attribute: fan_speed
        value_not: Turbo
    tooltip: Change fan speed
    tap_action:
      action: call-service
      service: vacuum.set_fan_speed
      service_data:
        entity_id: vacuum.marvin
        fan_speed: Silent
tiles:
  - tile_id: status
    entity: vacuum.marvin
    label: Status
    attribute: status
    icon: mdi:robot-vacuum
    translations:
      starting: Starting
      charger disconnected: Charger disconnected
      idle: Idle
      remote control active: Remote control active
      cleaning: Cleaning
      returning home: Returning home
      manual mode: Manual mode
      charging: Charging
      charging problem: Charging problem
      paused: Paused
      spot cleaning: Spot cleaning
      error: Error
      shutting down: Shutting down
      updating: Updating
      docking: Docking
      going to target: Going to target
      zoned cleaning: Zoned cleaning
      segment cleaning: Segment cleaning
      emptying the bin: Emptying the bin
      charging complete: Charging complete
      device offline: Device offline
  - tile_id: battery_level
    entity: vacuum.marvin
    label: Battery
    attribute: battery_level
    icon_source: vacuum.marvin.attributes.battery_icon
    unit: '%'
  - tile_id: fan_speed
    entity: vacuum.marvin
    label: Fan speed
    attribute: fan_speed
    icon: mdi:fan
    translations:
      silent: Silent
      standard: Standard
      medium: Medium
      turbo: Turbo
      auto: Auto
      gentle: Gentle
  - tile_id: mop_pad_humidity
    attribute: mop_pad_humidity
    label: Mop pad
    icon: mdi:water-percent
    entity: vacuum.marvin
    precision: 0
    translations: {}
  - tile_id: cleaned_area
    attribute: cleaned_area
    label: Cleaned area
    icon: mdi:ruler-square
    unit: 
    entity: vacuum.marvin
    precision: 0
    translations: {}
  - tile_id: cleaning_time
    attribute: cleaning_time
    label: Cleaning time
    icon: mdi:timer-sand
    unit: min
    entity: vacuum.marvin
    precision: 0
    translations: {}
  - tile_id: cleaning_count
    attribute: cleaning_count
    label: Cleaning count
    icon: mdi:counter
    unit: x
    entity: vacuum.marvin
    precision: 0
    translations: {}
  - tile_id: total_cleaned_area
    attribute: total_cleaned_area
    label: Total cleaned area
    icon: mdi:set-square
    unit: 
    entity: vacuum.marvin
    precision: 0
    translations: {}
map_modes:
  - name: Zone cleanup
    icon: mdi:select-drag
    run_immediately: false
    coordinates_rounding: true
    coordinates_to_meters_divider: 1000
    selection_type: MANUAL_RECTANGLE
    max_selections: 20
    repeats_type: EXTERNAL
    max_repeats: 3
    service_call_schema:
      service: dreame_vacuum.vacuum_clean_zone
      service_data:
        zone: '[[selection]]'
        repeats: '[[repeats]]'
        entity_id: '[[entity_id]]'
    predefined_selections: []
    variables: {}
  - name: Clean point
    icon: mdi:map-marker-plus
    run_immediately: false
    coordinates_rounding: true
    coordinates_to_meters_divider: 1000
    selection_type: MANUAL_POINT
    max_selections: 999
    repeats_type: EXTERNAL
    max_repeats: 3
    service_call_schema:
      service: dreame_vacuum.vacuum_clean_spot
      service_data:
        points: '[[selection]]'
        repeats: '[[repeats]]'
        entity_id: '[[entity_id]]'
    predefined_selections: []
    variables: {}
  - template: vacuum_clean_segment
    predefined_selections:
      - id: '1'
        icon:
          name: mdi:chef-hat
          x: 7750
          'y': -1750
        label:
          text: Kitchen
          x: 7750
          'y': -1750
          offset_y: 35
        outline:
          - - 5650
            - -3050
          - - 9750
            - -3050
          - - 9750
            - 1250
          - - 5650
            - 1250
      - id: '2'
        icon:
          name: mdi:home-outline
          x: -100
          'y': -550
        label:
          text: Technical room
          x: -100
          'y': -550
          offset_y: 35
        outline:
          - - -1050
            - -1850
          - - 1250
            - -1850
          - - 1250
            - 700
          - - -1050
            - 700
      - id: '3'
        icon:
          name: mdi:home-outline
          x: 4850
          'y': -450
        label:
          text: Vestibule
          x: 4850
          'y': -450
          offset_y: 35
        outline:
          - - 4100
            - -1950
          - - 5550
            - -1950
          - - 5550
            - 900
          - - 4100
            - 900
      - id: '4'
        icon:
          name: mdi:home-outline
          x: 10950
          'y': 650
        label:
          text: Guest bathroom
          x: 10950
          'y': 650
          offset_y: 35
        outline:
          - - 9950
            - -800
          - - 11950
            - -800
          - - 11950
            - 1900
          - - 9950
            - 1900
      - id: '5'
        icon:
          name: mdi:home-outline
          x: 13450
          'y': 1700
        label:
          text: Small room
          x: 13450
          'y': 1700
          offset_y: 35
        outline:
          - - 12050
            - -2400
          - - 14650
            - -2400
          - - 14650
            - 6050
          - - 12050
            - 6050
      - id: '6'
        icon:
          name: mdi:home-outline
          x: 12300
          'y': -3800
        label:
          text: Large room
          x: 12300
          'y': -3800
          offset_y: 35
        outline:
          - - 9950
            - -4950
          - - 14700
            - -4950
          - - 14700
            - -2050
          - - 9950
            - -2050
      - id: '7'
        icon:
          name: mdi:monitor-shimmer
          x: 3300
          'y': -4800
        label:
          text: Office
          x: 3300
          'y': -4800
          offset_y: 35
        outline:
          - - 2350
            - -6500
          - - 4850
            - -6500
          - - 4850
            - -3100
          - - 2350
            - -3100
      - id: '8'
        icon:
          name: mdi:home-outline
          x: 4000
          'y': -2500
        label:
          text: Front hall
          x: 4000
          'y': -2500
          offset_y: 35
        outline:
          - - 2350
            - -3100
          - - 5650
            - -3100
          - - 5650
            - -1950
          - - 2350
            - -1950
      - id: '9'
        icon:
          name: mdi:sofa-outline
          x: 7800
          'y': -6100
        label:
          text: Living Room
          x: 7800
          'y': -6100
          offset_y: 35
        outline:
          - - 5400
            - -10900
          - - 9750
            - -10900
          - - 9750
            - -3050
          - - 5400
            - -3050
      - id: '10'
        icon:
          name: mdi:toilet
          x: 2350
          'y': -500
        label:
          text: Bathroom
          x: 2350
          'y': -500
          offset_y: 35
        outline:
          - - 1250
            - -2000
          - - 3400
            - -2000
          - - 3400
            - 850
          - - 1250
            - 850
      - id: '11'
        icon:
          name: mdi:home-outline
          x: 10900
          'y': -1300
        label:
          text: Rear hall
          x: 10900
          'y': -1300
          offset_y: 35
        outline:
          - - 9750
            - -2050
          - - 12050
            - -2050
          - - 12050
            - -800
          - - 9750
            - -800
      - id: '13'
        icon:
          name: mdi:bed-king-outline
          x: 1650
          'y': -4200
        label:
          text: Primary Bedroom
          x: 1650
          'y': -4200
          offset_y: 35
        outline:
          - - -1050
            - -6450
          - - 2350
            - -6450
          - - 2350
            - -2000
          - - -1050
            - -2000
map_locked: true

Javascript errors shown in the browser's console (if applicable)

No response

Additional information

No response

@InToSSH InToSSH added the bug Something isn't working label Jan 24, 2024
@joq3
Copy link

joq3 commented Sep 20, 2024

I am experiencing the same issue. Did you find any solution to this?

@InToSSH
Copy link
Author

InToSSH commented Sep 20, 2024

@joq3 unfortunately not, I have it on separate dashboard, use it on my living room tablet. I can use the card for a minute and if I close the dashboard it's fine. The problem is if I leave it open for longer. So I made an automation that if I open the dash with this card and forget it open, it automatically closes it after a minute, so I am not really sure if new updates fixed the issue or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants