Giter VIP home page Giter VIP logo

dreame-vacuum's Introduction

version GitHub all releases HACS Community Forum Ko-Fi PayPal.Me

Logo

Dreame vacuum integration for Home Assistant

Complete app replacement with Home Assistant for Dreame robot vacuums.

Features

Supported Devices

  • Dreame
    • dreame.vacuum.p2008 (F9)
    • dreame.vacuum.p2009 (D9)
    • dreame.vacuum.p2259 (D9 Max)
    • dreame.vacuum.p2187 (D9 Pro)
    • dreame.vacuum.r2205 (D10 Plus)
    • dreame.vacuum.p2029 (L10 Pro)
    • dreame.vacuum.p2028a (L10 Plus)
    • dreame.vacuum.r2228o (L10s Ultra)
    • dreame.vacuum.r2215o (L10s Pro)
    • dreame.vacuum.r2216o (L10s Pro)
    • dreame.vacuum.p2028 (Z10 Pro)
    • dreame.vacuum.p2027 (W10)
    • dreame.vacuum.r2104 (W10 Pro)
    • dreame.vacuum.r2251o (W10s)
    • dreame.vacuum.r2232a (W10s Pro)
    • dreame.vacuum.r2228 (S10)
    • dreame.vacuum.r2211o (S10+)
    • dreame.vacuum.r2233 (S10 Pro)
    • dreame.vacuum.r2247 (S10 Pro Plus)
    • dreame.vacuum.r2246 (S10 Plus)
    • dreame.vacuum.r2215 (X10)
    • dreame.vacuum.r2235 (X10 Ultra)
  • Mijia
    • dreame.vacuum.p2036 (Trouver LDS Finder)
    • dreame.vacuum.p2150o (Vacuum-Mop)
    • dreame.vacuum.p2150a (Vacuum-Mop 2 Ultra)
    • dreame.vacuum.p2150b (Vacuum-Mop 2 Ultra Set)
    • dreame.vacuum.p2114o (Self-Cleaning Robot Vacuum-Mop)
    • dreame.vacuum.p2149o (Self-Cleaning Robot Vacuum-Mop Pro)
    • dreame.vacuum.r2254 (1S)
    • dreame.vacuum.r2209 (X10)
    • dreame.vacuum.p2114a (X10+)
    • dreame.vacuum.p2041 (1T)
    • dreame.vacuum.p2140a (2C)
    • dreame.vacuum.p2140 (2C)
    • dreame.vacuum.p2140q (Mi Robot Vacuum-Mop 2)
    • dreame.vacuum.p2140p (Mi Robot Vacuum-Mop 2)
    • dreame.vacuum.p2140o (Mi Robot Vacuum-Mop 2)
    • dreame.vacuum.p2148o (Mi Robot Vacuum Mop Ultra Slim)
    • dreame.vacuum.p2041o (Mi Robot Vacuum-Mop 2 Pro+)
  • MOVA
    • dreame.vacuum.p2157 (L600)
    • dreame.vacuum.p2156o (MOVA Z500)

Installation

Manually

wget -O - https://raw.githubusercontent.com/Tasshack/dreame-vacuum/master/install | bash -

Via HACS

Open your Home Assistant instance and open a repository inside the Home Assistant Community Store.

Configuration

Open your Home Assistant instance and start setting up a new integration.

How to Use

Integration is compatible with all available Lovelace vacuum cards but if you want to use zone cleaning feature you can prefer the Xiaomi Vacuum Card.

type: custom:xiaomi-vacuum-map-card
entity: # Your vacuum entity
map_source:
  camera: # Map Entity
calibration_source:
  camera: true
vacuum_platform: Tasshack/dreame-vacuum

Open card editor, click "Generate rooms config" button, check (adjust if needed) your config using yaml editor and save changes.

type: custom:vacuum-card
entity: # Your vacuum entity
map: # Map Entity
map_refresh: 1
stats:
  default:
    - attribute: filter_left
      unit: '%'
      subtitle: Filter
    - attribute: side_brush_left
      unit: '%'
      subtitle: Side brush
    - attribute: main_brush_left
      unit: '%'
      subtitle: Main brush
    - attribute: sensor_dirty_left
      unit: '%'
      subtitle: Sensors
  cleaning:
    - attribute: cleaned_area
      unit: 
      subtitle: Cleaned area
    - attribute: cleaning_time
      unit: min
      subtitle: Cleaning time
shortcuts:
  - name: Clean Room 1
    service: dreame_vacuum.vacuum_clean_segment
    service_data:
      entity_id: # Your vacuum entity
      segments: 1
    icon: mdi:sofa
  - name: Clean Room 2
    service: dreame_vacuum.vacuum_clean_segment
    service_data:
      entity_id: # Your vacuum entity
      segments: 2
    icon: mdi:bed-empty
  - name: Clean Room 3
    service: dreame_vacuum.vacuum_clean_segment
    service_data:
      entity_id: # Your vacuum entity
      segments: 3
    icon: mdi:silverware-fork-knife

Enable Map Data camera entity. Open your Home Assistant instance and show your entities.

type: custom:valetudo-map-card
vacuum: # Your vacuum name not the entity id
rotate: 0 # Map rotation entity does not work on valetudo map card
dock_icon: mdi:lightning-bolt-circle
dock_color: rgb(105 178 141)
vacuum_color: rgb(110, 110, 110)
wall_color: rgb(159, 159, 159)
floor_color: rgb(221, 221, 221)
no_go_area_color: rgb(177, 0, 0)
no_mop_area_color: rgb(170, 47, 255)
virtual_wall_color: rgb(199, 0, 0)
virtual_wall_width: 1.5
currently_cleaned_zone_color: rgb(221, 221, 221)
path_color: rgb(255, 255, 255)
path_width: 1.5
segment_opacity: 1
segment_colors:
  - rgb(171, 199, 248)
  - rgb(249, 224, 125)
  - rgb(184, 227, 255)
  - rgb(184, 217, 141)

With Xiaomi Vacuum Card and Picture Entity Card

type: picture-entity
entity: # Your vacuum entity
camera_image: # Your camera entity
show_state: false
show_name: false
camera_view: live
tap_action:
  action: none
hold_action:
  action: none
type: custom:xiaomi-vacuum-card
entity: # Your vacuum entity
vendor: xiaomi
attributes:
  main_brush_life:
    label: 'Main Brush: '
    key: main_brush_left
    unit: '%'
    icon: mdi:car-turbocharger
  side_brush_life:
    label: 'Side Brush: '
    key: side_brush_left
    unit: '%'
    icon: mdi:pinwheel-outline
  filter_life:
    label: 'Filter: '
    key: filter_left
    unit: '%'
    icon: mdi:air-filter
  sensor_life:
    label: 'Sensor: '
    key: sensor_dirty_left
    unit: '%'
    icon: mdi:radar
  main_brush: false
  side_brush: false
  filter: false
  sensor: false

With Dreame Vacuum Card

Coming Soon

To Do

  • Cleaning history map support
  • Map recovery support
  • Schedule editing
  • AI Obstacle image support
  • Custom lovelace card for map editing

Contributing

Integrations is currently only available on English language and if want you use it on our language it would be very helpful to you to translate files on translations folder and share with us.

To submit your changes please fork this repository and open a pull request.

Thanks To

Buy Me a Coffee at ko-fi.com PayPal Logo

dreame-vacuum's People

Contributors

artcore7 avatar aviadlevy avatar basbruss avatar christophcaina avatar cniry avatar enkama avatar macieq1989 avatar quent1-fr avatar sanddeath avatar tasshack avatar thomisus avatar xm4rcell0x avatar

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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dreame-vacuum's Issues

What does the multi-floor map control do?

Firstly, as someone who ran into issues using Valetudo, this integration is amazing!
It's let me setup my vacuum completely offline, yet still control it from home assistant. Thank you!

I was wondering what the multi-floor map button does?
image

Thanks

Dreame Bot W10 no vacuum entity

Hi there and thanks for the great work!

I have tried to add my Dreame Bot W10 using your integration.
The Setup process works as excepted and I'm presented with a lot of useful entities.
The only thing missing is an entity of the type vacuum. This is need to setup the vacuum card as you describe in your readme.
Any idea what the issue might be or am I missing something?

Thanks in advance and keep up the good work,
Tim

Loading config flow

Hi,

Love your development for the dreame vacuums!

When I add your integration to my setup (fresh install) it will not be able to load the config flow.
image

It returns this error in the logs:

Logger: homeassistant.config_entries
Source: config_entries.py:809
First occurred: 10:34:45 (2 occurrences)
Last logged: 11:10:58

Error occurred loading configuration flow for integration dreame_vacuum: Error relocating /usr/local/lib/python3.10/site-packages/cv2/cv2.abi3.so: cblas_dgemm: symbol not found

dreame.vacuum.p2009(D9)

Support for the Dreame D9 would be great (got two of those and a Z10 Plus).

I saw it was already in the list of supported devices, but the line was commented out, so i changed that to test ist.
Setup worked, fine, robot is available, map works and using the Xiaomi Vacuum Map als works :)

Anything I should test? Any information that's usefull for you?

An error occurs every few seconds

Too many errors occur continuously.
Is this all right?

2022-11-13 17:31:01.161 INFO (SyncWorker_7) [custom_components.dreame_vacuum.dreame.protocol] Logging in...
2022-11-13 17:31:05.524 WARNING (SyncWorker_7) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:31:07.347 INFO (Thread-4) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-11-13 17:31:07.442 INFO (Thread-4) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/0,WFiux5joQQzJHOvC'}, {'piid': 5, 'value': 1668328267225}]
2022-11-13 17:31:10.197 ERROR (MainThread) [custom_components.dreame_vacuum] Update failed: Traceback (most recent call last):
  File "/config/custom_components/dreame_vacuum/coordinator.py", line 314, in _async_update_data
    await self.hass.async_add_executor_job(self.device.update)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 951, in update
    self.connect_cloud()
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 712, in connect_cloud
    self.token, self.host = self._protocol.cloud.get_info(
  File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 271, in get_info
    devices = self.get_devices()
  File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 246, in get_devices
    response = self._get_device_string(country)
  File "/usr/local/lib/python3.10/site-packages/micloud/micloud.py", line 267, in _get_device_string
    if len(resp) > 2:
TypeError: object of type 'NoneType' has no len()

2022-11-13 17:31:10.201 WARNING (MainThread) [homeassistant.config_entries] Config entry 'robo' for dreame_vacuum integration not ready yet: object of type 'NoneType' has no len(); Retrying in background
2022-11-13 17:31:14.789 INFO (SyncWorker_0) [custom_components.dreame_vacuum.dreame.protocol] Logging in...
2022-11-13 17:31:14.831 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'finish bike Charger' trigger: In 'numeric_state' condition: unknown entity sensor.power_bike
2022-11-13 17:31:18.765 INFO (Thread-5) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-11-13 17:31:19.267 WARNING (SyncWorker_0) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:31:19.269 INFO (Thread-5) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/0,WFiux5joQQzJHOvC'}, {'piid': 5, 'value': 1668328278619}]
2022-11-13 17:31:20.944 INFO (Thread-12) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-11-13 17:31:21.034 INFO (Thread-12) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/0,WFiux5joQQzJHOvC'}, {'piid': 5, 'value': 1668328280811}]
2022-11-13 17:31:23.817 ERROR (MainThread) [custom_components.dreame_vacuum] Update failed: Traceback (most recent call last):
  File "/config/custom_components/dreame_vacuum/coordinator.py", line 314, in _async_update_data
    await self.hass.async_add_executor_job(self.device.update)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 951, in update
    self.connect_cloud()
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 712, in connect_cloud
    self.token, self.host = self._protocol.cloud.get_info(
  File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 271, in get_info
    devices = self.get_devices()
  File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 246, in get_devices
    response = self._get_device_string(country)
  File "/usr/local/lib/python3.10/site-packages/micloud/micloud.py", line 267, in _get_device_string
    if len(resp) > 2:
TypeError: object of type 'NoneType' has no len()

2022-11-13 17:31:24.216 WARNING (Thread-12) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:31:30.150 INFO (Thread-13) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-11-13 17:31:30.181 INFO (Thread-13) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/0,WFiux5joQQzJHOvC'}, {'piid': 5, 'value': 1668328289990}]
2022-11-13 17:31:33.824 INFO (SyncWorker_5) [custom_components.dreame_vacuum.dreame.protocol] Logging in...
2022-11-13 17:31:34.226 INFO (Thread-14) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-11-13 17:31:34.256 INFO (Thread-14) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/0,WFiux5joQQzJHOvC'}, {'piid': 5, 'value': 1668328294069}]
2022-11-13 17:31:35.165 INFO (SyncWorker_5) [custom_components.dreame_vacuum.dreame.device] Connecting to device
2022-11-13 17:31:35.244 INFO (SyncWorker_5) [custom_components.dreame_vacuum.dreame.device] Connected to device
2022-11-13 17:31:35.445 INFO (SyncWorker_5) [custom_components.dreame_vacuum.dreame.map] Get Map List: 1653707108/1034063228/9
2022-11-13 17:31:38.563 WARNING (SyncWorker_5) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:31:38.565 INFO (SyncWorker_5) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-11-13 17:31:38.606 INFO (SyncWorker_5) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/0,WFiux5joQQzJHOvC'}, {'piid': 5, 'value': 1668328298419}]
2022-11-13 17:31:40.810 INFO (Thread-15) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-11-13 17:31:40.879 INFO (Thread-15) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/0,WFiux5joQQzJHOvC'}, {'piid': 5, 'value': 1668328300692}]
2022-11-13 17:31:41.725 WARNING (SyncWorker_5) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:31:42.189 INFO (Thread-15) [custom_components.dreame_vacuum.dreame.map] Add saved map from new map 10
2022-11-13 17:31:42.189 INFO (Thread-15) [custom_components.dreame_vacuum.dreame.map] Decode I map 4 1325
2022-11-13 17:31:44.936 WARNING (SyncWorker_5) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:31:45.170 INFO (Thread-17) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-11-13 17:31:45.202 INFO (Thread-17) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/0,WFiux5joQQzJHOvC'}, {'piid': 5, 'value': 1668328305014}]
2022-11-13 17:31:46.773 INFO (Thread-20) [custom_components.dreame_vacuum.dreame.map] Get Map List: 1653707108/1034063228/9
2022-11-13 17:31:46.814 INFO (Thread-17) [custom_components.dreame_vacuum.dreame.map] Add saved map from new map 10
2022-11-13 17:31:46.815 INFO (Thread-17) [custom_components.dreame_vacuum.dreame.map] Decode I map 4 1325
2022-11-13 17:31:49.910 WARNING (Thread-20) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:31:49.913 INFO (Thread-20) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-11-13 17:31:49.939 INFO (Thread-20) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/0,WFiux5joQQzJHOvC'}, {'piid': 5, 'value': 1668328309750}]
2022-11-13 17:31:52.487 WARNING (Thread-21) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:31:53.054 WARNING (Thread-20) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:31:53.068 WARNING (Thread-21) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:31:58.057 INFO (Thread-25) [custom_components.dreame_vacuum.dreame.map] Get Map List: 1653707108/1034063228/9
2022-11-13 17:31:59.932 WARNING (Thread-23) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:31:59.934 WARNING (Thread-23) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:32:00.249 WARNING (Thread-23) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:32:01.176 WARNING (Thread-25) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:32:01.179 INFO (Thread-25) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-11-13 17:32:01.204 INFO (Thread-25) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/0,WFiux5joQQzJHOvC'}, {'piid': 5, 'value': 1668328321015}]
2022-11-13 17:32:06.195 WARNING (Thread-26) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:32:06.197 WARNING (Thread-26) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:32:09.316 INFO (Thread-30) [custom_components.dreame_vacuum.dreame.map] Get Map List: 1653707108/1034063228/9
2022-11-13 17:32:09.327 WARNING (Thread-26) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:32:09.329 WARNING (Thread-26) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:32:10.399 INFO (Thread-30) [custom_components.dreame_vacuum.dreame.map] Add saved map: 10
2022-11-13 17:32:10.400 INFO (Thread-30) [custom_components.dreame_vacuum.dreame.map] Request map from device [{'piid': 2, 'value': '{"req_type":1,"frame_type":"I","force_type":1}'}]
2022-11-13 17:32:10.424 INFO (Thread-30) [custom_components.dreame_vacuum.dreame.map] Response from device [{'piid': 1, 'value': ''}, {'piid': 3, 'value': '1653707108/1034063228/0,WFiux5joQQzJHOvC'}, {'piid': 5, 'value': 1668328330237}]
2022-11-13 17:32:12.106 INFO (Thread-30) [custom_components.dreame_vacuum.dreame.map] Decode I map 4 1325
2022-11-13 17:32:13.451 WARNING (Thread-29) [custom_components.dreame_vacuum.dreame.protocol] Error while executing request: HTTPSConnectionPool(host='api.io.mi.com', port=443): Read timed out. (read timeout=3)
2022-11-13 17:32:13.484 WARNING (Thread-29) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:32:14.035 WARNING (Thread-29) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:32:16.153 INFO (MainThread) [custom_components.dreame_vacuum.dreame.map] Render frame: 10:0 took: 3.00
2022-11-13 17:32:19.870 WARNING (Thread-32) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:32:20.160 WARNING (Thread-32) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:32:20.506 INFO (MainThread) [custom_components.dreame_vacuum.dreame.map] Render frame: 4:1325 took: 4.08
2022-11-13 17:32:24.463 WARNING (Thread-35) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:32:24.748 WARNING (Thread-35) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:32:30.466 WARNING (Thread-38) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:32:30.753 WARNING (Thread-38) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:32:35.301 WARNING (Thread-40) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:32:35.676 WARNING (Thread-40) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:32:41.047 WARNING (Thread-43) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:32:41.338 WARNING (Thread-43) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:32:45.971 WARNING (Thread-46) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:32:46.265 WARNING (Thread-46) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:32:51.632 WARNING (Thread-50) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:32:51.918 WARNING (Thread-50) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:32:56.679 WARNING (Thread-53) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:32:56.981 WARNING (Thread-53) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:33:02.222 WARNING (Thread-56) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:33:02.517 WARNING (Thread-56) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:33:07.347 WARNING (Thread-59) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:33:07.997 WARNING (Thread-59) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:33:12.822 WARNING (Thread-62) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:33:13.395 WARNING (Thread-62) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:33:18.293 WARNING (Thread-65) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:33:18.588 WARNING (Thread-65) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:33:23.701 WARNING (Thread-68) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:33:23.994 WARNING (Thread-68) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:33:28.912 WARNING (Thread-71) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:33:29.199 WARNING (Thread-71) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:33:34.378 WARNING (Thread-74) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:33:34.671 WARNING (Thread-74) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed
2022-11-13 17:33:39.491 WARNING (Thread-76) [custom_components.dreame_vacuum.dreame.map] Getting map_data from cloud failed
2022-11-13 17:33:39.780 WARNING (Thread-76) [custom_components.dreame_vacuum.dreame.map] Getting object_name from cloud failed

Dreame Home support

I've big troubles with Xiaomi servers because it don't create a good path of cleaning and it isn't smart enought to understand that a door before closed that later can be open, so I come back to Dreamehome and the path is great and the AI it's enough smart to understand when a door is open or closed.

Will you add Dreame Home support?

Unknown error on setup

After installing Integration through HACS (and the mandatory restart) I do get an error when trying to setup my Dreame D9. Here´s what I did:

  1. install Integration via HACS
  2. restart HA
  3. go to SETTINGS > INTEGRATIONS
  4. add new integration
  5. search for Dreame and install
  6. choose "With map"

Bildschirmfoto 2022-11-28 um 14 04 57

  1. leave everythings as is in the next step

Bildschirmfoto 2022-11-28 um 14 05 58

  1. error (HA seems to do a restart while popup is open)

Bildschirmfoto 2022-11-28 um 14 06 31

HA is running on a Raspi 3b.

Map data decryption failed - Dreame L10s Pro

Describe the bug
Map is not available

Additional Information (please complete the following information)

  • Model Name [e.g. dreame.vacuum.p2028]: dreame.vacuum.r2216o
  • Firmware Version: 4.3.3_1045
  • Home Assistant Version: 2022.11.4
  • Configuration Type [With or without map support]: with map
  • Errors or warnings shown in the HA logs (if applicable):
home-assistant  | --- Logging error ---
home-assistant  | Traceback (most recent call last):
home-assistant  |   File "/config/custom_components/dreame_vacuum/dreame/map.py", line 1980, in decode_map_partial
home-assistant  |     cipher = Cipher(algorithms.AES(key), modes.CBC(
home-assistant  |   File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/primitives/ciphers/base.py", line 92, in __init__
home-assistant  |     mode.validate_for_algorithm(algorithm)
home-assistant  |   File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/primitives/ciphers/modes.py", line 106, in _check_iv_and_key_length
home-assistant  |     _check_iv_length(self, algorithm)
home-assistant  |   File "/usr/local/lib/python3.10/site-packages/cryptography/hazmat/primitives/ciphers/modes.py", line 76, in _check_iv_length
home-assistant  |     raise ValueError(
home-assistant  | ValueError: Invalid IV size (0) for CBC.
home-assistant  |
home-assistant  | During handling of the above exception, another exception occurred:
home-assistant  |
home-assistant  | Traceback (most recent call last):
home-assistant  |   File "/usr/local/lib/python3.10/logging/handlers.py", line 1475, in emit
home-assistant  |     self.enqueue(self.prepare(record))
home-assistant  |   File "/usr/src/homeassistant/homeassistant/util/logging.py", line 43, in prepare
home-assistant  |     record = super().prepare(record)
home-assistant  |   File "/usr/local/lib/python3.10/logging/handlers.py", line 1457, in prepare
home-assistant  |     msg = self.format(record)
home-assistant  |   File "/usr/local/lib/python3.10/logging/__init__.py", line 943, in format
home-assistant  |     return fmt.format(record)
home-assistant  |   File "/usr/local/lib/python3.10/logging/__init__.py", line 678, in format
home-assistant  |     record.message = record.getMessage()
home-assistant  |   File "/usr/local/lib/python3.10/logging/__init__.py", line 368, in getMessage
home-assistant  |     msg = msg % self.args
home-assistant  | TypeError: not enough arguments for format string
home-assistant  | Call stack:
home-assistant  |   File "/usr/local/lib/python3.10/threading.py", line 973, in _bootstrap
home-assistant  |     self._bootstrap_inner()
home-assistant  |   File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
home-assistant  |     self.run()
home-assistant  |   File "/usr/local/lib/python3.10/threading.py", line 1378, in run
home-assistant  |     self.function(*self.args, **self.kwargs)
home-assistant  |   File "/config/custom_components/dreame_vacuum/dreame/map.py", line 464, in _update_task
home-assistant  |     self.update()
home-assistant  |   File "/config/custom_components/dreame_vacuum/dreame/map.py", line 986, in update
home-assistant  |     self._request_current_map()
home-assistant  |   File "/config/custom_components/dreame_vacuum/dreame/map.py", line 449, in _request_current_map
home-assistant  |     return self._request_i_map(map_request_time)
home-assistant  |   File "/config/custom_components/dreame_vacuum/dreame/map.py", line 362, in _request_i_map
home-assistant  |     self._add_map_data_file(object_name, self._last_robot_time)
home-assistant  |   File "/config/custom_components/dreame_vacuum/dreame/map.py", line 624, in _add_map_data_file
home-assistant  |     self._add_raw_map_data(response.decode(), timestamp, key)
home-assistant  |   File "/config/custom_components/dreame_vacuum/dreame/map.py", line 627, in _add_raw_map_data
home-assistant  |     return self._add_map_data(self._decode_map_partial(raw_map, timestamp, key))
home-assistant  |   File "/config/custom_components/dreame_vacuum/dreame/map.py", line 601, in _decode_map_partial
home-assistant  |     partial_map = DreameVacuumMapDecoder.decode_map_partial(raw_map, key)
home-assistant  |   File "/config/custom_components/dreame_vacuum/dreame/map.py", line 1985, in decode_map_partial
home-assistant  |     _LOGGER.error("Map data decryption failed: %s. Private key might be missing, please report this issue with your device model https://github.com/Tasshack/dreame-vacuum/issues/new?assignees=Tasshack&labels=bug&template=bug_report.md&title=Map%20data%20decryption%20failed", ex)
home-assistant  |   File "/usr/local/lib/python3.10/logging/__init__.py", line 1506, in error
home-assistant  |     self._log(ERROR, msg, args, **kwargs)
home-assistant  |   File "/usr/local/lib/python3.10/logging/__init__.py", line 1624, in _log
home-assistant  |     self.handle(record)
home-assistant  |   File "/usr/local/lib/python3.10/logging/__init__.py", line 1634, in handle
home-assistant  |     self.callHandlers(record)
home-assistant  |   File "/usr/local/lib/python3.10/logging/__init__.py", line 1696, in callHandlers
home-assistant  |     hdlr.handle(record)
home-assistant  |   File "/usr/src/homeassistant/homeassistant/util/logging.py", line 62, in handle
home-assistant  |     self.emit(record)
home-assistant  | Message: 'Map data decryption failed: %s. Private key might be missing, please report this issue with your device model https://github.com/Tasshack/dreame-vacuum/issues/new?assignees=Tasshack&labels=bug&template=bug_report.md&title=Map%20data%20decryption%20failed'
home-assistant  | Arguments: (ValueError('Invalid IV size (0) for CBC.'),)

Service calls are not consitent

Describe the bug
I've noticed two UI issues with the Service Calls for the Dreame Integration.

  1. vacuum_Clean_spot & vacuum_clean_segment
    For both Services you can set the Humidity Level of the Pads, as well as the level of the vacuum cleaner itself.
    In both cases, this option is a number select, and it would probably be better (and more user friendly, if these were Select options that refer to the Settings of the Integration.
    Also the naming of the Options COULD be changed to match the entity names

grafik
grafik

Select moisture:
grafik

Select vacuum level:
grafik

  1. The service call: vacuum_clean_zone does not even provide the options from the other two services:
    grafik

To Reproduce
Steps to reproduce the behavior.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional Information (please complete the following information)

  • Model Name [e.g. dreame.vacuum.p2028]:
  • Firmware Version [e.g. 1156]:
  • Home Assistant Version:
  • Configuration Type [With or without map support]:
  • Errors or warnings shown in the HA logs (if applicable):

p2028 rn plugin

before bundle/minify with comments. may be useful ;)

expired

Sweep/Mop Mode in Customized Cleaning

I have the DreameBot L10s Ultra and I am really enjoying this integration. However, I don't find a way to set the sweep/mop mode with the vacuum_set_custom_cleaning service. I can only control the suction, water, and repeat. Am I missing something?

Support Dreame Login

It would be nice if we could use the dreame home credentials and service to retrieve the data, it seems to be identical to the Xiaomi Home App.
Im requesting this because the Dreame L10s Ultra has a Remote Camera which can only be used via the dreame app.

Template Xiaomi Vacuum Map Card not working

Hello,

I followed all the instructions and configured my Z10 Pro in HA. I've also installed the Xiaomi Vacuum Map Card addon to use the lovelace card.
I copied the template code and set my variables but I'm unable to add the card to the view.
Here's my code:

{# ----------------- PROVIDE YOUR OWN ENTITY IDS HERE ----------------- #}
{% set camera_entity = "camera.xiaomi_cloud_map_extractor" %}
{% set vacuum_entity = "vacuum.dreame_bot_z10_pro" %}
{# ------------------- DO NOT CHANGE ANYTHING BELOW ------------------- #}
{% set attributes = states[camera_entity].attributes %}

type: custom:xiaomi-vacuum-map-card
vacuum_platform: default
entity: {{ vacuum_entity }}
map_source:
  camera: {{ camera_entity }}
calibration_source:
  camera: true
map_modes:
  - template: vacuum_clean_zone
    max_selections: 10
    repeats_type: EXTERNAL
    max_repeats: 3
    service_call_schema:
      service: dreame_vacuum.vacuum_clean_zone
      service_data:
        entity_id: '[[entity_id]]'
        zone: '[[selection]]'
        repeats: '[[repeats]]'
  - template: vacuum_clean_segment
    repeats_type: EXTERNAL
    max_repeats: 3
    service_call_schema:
      service: dreame_vacuum.vacuum_clean_segment
      service_data:
        entity_id: '[[entity_id]]'
        segments: '[[selection]]'
        repeats: '[[repeats]]'
    predefined_selections:
{%- for room_id in attributes.rooms | default([]) %}
{%- set room = attributes.rooms[room_id] %}
      - id: {{room_id}}
        outline:
          - - {{room["x0"]}}
            - {{room["y0"]}}
          - - {{room["x0"]}}
            - {{room["y1"]}}
          - - {{room["x1"]}}
            - {{room["y1"]}}
          - - {{room["x1"]}}
            - {{room["y0"]}}
{%- endfor %}
  - name: Clean Spot
    icon: mdi:map-marker-plus
    max_repeats: 3
    selection_type: MANUAL_POINT
    repeats_type: EXTERNAL
    service_call_schema:
      service: dreame_vacuum.vacuum_clean_spot
      service_data:
        entity_id: '[[entity_id]]'
        points: '[[selection]]'
        repeats: '[[repeats]]'

If I try to insert the card, I have a loading loop and I'm unable to save it.
image

Instead, if I edit the lovelace dashboard and save, I have the following error:

image

YAMLException: missed comma between flow collection entries (8:2) 5 | badges: [] 6 | cards: 7 | {# ----------------- PROVIDE YOUR ... 8 | {% set camera_entity = "camera.xi ... ------^ 9 | {% set vacuum_entity = "vacuum.dr ... 10 | {# ------------------- DO NOT CHA ...

I tried verified the entity IDs and they are correct. Also tried to use a different map, including the ones generated by dreame-vacuum component but I'm unable to add the card.

  • Model Name dreame.vacuum.p2028
  • Firmware Version 1156 (rooted, no Valetudo)
  • Home Assistant Version: 2022.12.5
  • Configuration Type Automatic map support (cloud)
  • Errors or warnings shown in the HA logs (if applicable): /

Thank you!

Wrong picture on notify

Describe the bug
I got wronge picture on low leve water for my Dreame W10 Pro, I got the reset picture

To Reproduce
Just when the clean water finish

Expected behavior
Just it show the wronge picture, if there aren't a correct picture for the empty tank, just don't show a picture :)

Screenshots
If applicable, add screenshots to help explain your problem.

immagine

Additional Information (please complete the following information)

  • Model Name [e.g. dreame.vacuum.p2028]: Dreame W10 Pro
  • Firmware Version 4.3.3_1127
  • Home Assistant Version: 2022.10.0
  • Configuration Type [With or without map support]: With map support
  • Errors or warnings shown in the HA logs (if applicable):

Map data decryption failed - Dreame bot x10 - dreame.vacuum.r2235

Screenshot_2022-12-13-21-03-51-573_io homeassistant companion android
Describe the bug
Map is not available

Additional Information (please complete the following information)

  • Model Name: dreame.vacuum.r2235
  • Firmware Version: 4.3.3_1076
  • Home Assistant Version: 2022.12.4
  • Configuration Type: with map
  • Errors or warnings shown in the HA logs (if applicable):
    Log Details (ERROR)
    This error originated from a custom integration.
    Logger: custom_components.dreame_vacuum.dreame.map
    Source: custom_components/dreame_vacuum/dreame/map.py:464
    Integration: dreame_vacuum (documentation, issues)
    First occurred: 8:52:15 PM (125 occurrences)
    Last logged: 9:13:17 PM

Map data decryption failed: Invalid IV size (0) for CBC.. Private key might be missing, please report this issue with your device model https://github.com/Tasshack/dreame-vacuum/issues/new?assignees=Tasshack&labels=bug&template=bug_report.md&title=Map%20data%20decryption%20failed
Request map data from cloud failed https://cnbj2.fds.api.xiaomi.com/dreame.vacuum.mc1808.info/181653949/638834352/1?Expires=1670941329000&GalaxyAccessKeyId=EAK2SDFZGTODL&Signature=nUJ+hZW8Z+wemjkx51O8QafApO8=&current=1670940055

Log Details (ERROR)
This error originated from a custom integration.
Logger: custom_components.dreame_vacuum.dreame.map
Source: custom_components/dreame_vacuum/dreame/map.py:986
Integration: dreame_vacuum (documentation, issues)
First occurred: 8:52:09 PM (1 occurrences)
Last logged: 8:52:09 PM

Map data decryption failed: Invalid IV size (0) for CBC.. Private key might be missing, please report this issue with your device model https://github.com/Tasshack/dreame-vacuum/issues/new?assignees=Tasshack&labels=bug&template=bug_report.md&title=Map%20data%20decryption%20failed

Please fix it. Thank you

Integration of dreame.vacuum.mc1808

first of all, congratulations for your work.

is it possible to add the dreame.vacuum.mc1808 to the list of compatible terminals, because my w10 pro is supported but not my second.

Support dreame.vacuum.p2036 (Trouver LDS Finder)

Hi! Could you please add support for dreame vacuum cleaner.vacuum.p2036 (Trouver LES Finder)?
At the moment I have added this model to the file config_flow.py and configured the component.
Cleaning of the zones goes without problems. The map is being drawn. Changing the number of cleaning times works correctly.
But there are problems with the definition of rooms. The screenshot shows that the rooms are added to the control objects, but they cannot be controlled (gray buttons).
image
When configuring Xiaomi Vacuum Map Card, errors occur with the definition of rooms:

{%- for room_id in attributes.rooms | default([]) %}
{%- set room = attributes.rooms[room_id] %}
      - id: {{room_id}}
        outline:
          - - {{room["x0"]}}
            - {{room["y0"]}}
          - - {{room["x0"]}}
            - {{room["y1"]}}
          - - {{room["x1"]}}
            - {{room["y1"]}}
          - - {{room["x1"]}}
            - {{room["y0"]}}
{%- endfor %}

attributes.rooms is a empty.
image
image

Also, an error occurs when sending to point x,y. But this is not the primary task.
Is it possible to make an automatic addition of rooms to the map for p2026? I can help with testing.

Detailed inputs:
https://www.openhab.org/addons/bindings/miio/#dreame-vacuum-p2036
Entity:
Dreame-vacuum-p2036

Thanks.

Service not found

From @rvalentinis
Hi. I own a P2029 and use Piotr's vacuum card (Xiaomi Vacuum Map Card). When I send him the command to clean single room or pin&go it tells me "Service not found". Also in the platform selection I can't find the one you mentioned (so I guess that's why the service is not found because it's named otherwise). Can I get some tips?

Integration does not work after inital successful configuration

Describe the bug
I configured a new Dreame L10 pro with the xiaomi home app, then used the Xiaomi Cloud Tokens Extractor to retrieve my token. Then I added the robot to the dreame integration using the local (no maps) option via IP + Token. This worked, and created a new entity etc.

Now when I try to have HA do anything with the vacuum, I get logs similar to the following:

Traceback (most recent call last):
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 610, in _update_task
self.update()
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 973, in update
self.connect_device()
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 648, in connect_device
self.info = DreameVacuumDeviceInfo(self._protocol.connect())
File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 482, in connect
response = self.send("miIO.info", retry_count=retry_count)
File "/config/custom_components/dreame_vacuum/dreame/protocol.py", line 514, in send
return self.device.send(method, parameters=parameters, retry_count=retry_count)
File "/usr/local/lib/python3.9/site-packages/miio/miioprotocol.py", line 161, in send
self.send_handshake()
File "/usr/local/lib/python3.9/site-packages/miio/miioprotocol.py", line 74, in send_handshake
raise DeviceException("Unable to discover the device %s" % self.ip)
miio.exceptions.DeviceException: Unable to discover the device 192.168.2.125
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.9/threading.py", line 1299, in run
self.function(*self.args, **self.kwargs)
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 621, in _update_task
self._update_failed(ex)
File "/config/custom_components/dreame_vacuum/dreame/device.py", line 603, in _update_failed
self._error_callback(ex)
File "/config/custom_components/dreame_vacuum/coordinator.py", line 355, in async_set_update_error
super().async_set_update_error(ex)
AttributeError: 'super' object has no attribute 'async_set_update_error'

Dreame L10 Pro Cleaning mode

Hi. In cleaning mode list i see only "sweeping"

Screenshots
image

  • Model Name: dreame.vacuum.p2029
  • Firmware Version: 4.1.8_1138
  • Home Assistant Version: 2022.10.4
  • Configuration Type: With map support

Map cannot be updated live

Describe the bug
Hi I can still not get my map live updated. The camera entity is updated every 3 seconds, but the map will only get updated after a long delay (several minutes). It doesn't help to restart HA or reset the device.

Screenshots
These 2 screenshots are taken nerely at the same time:

  • Map from dreame-vacuum:
    Map from dreame-vacuum
  • Map from Xiaomi-Cloud-Map-Extractor:
    Map from dreame-vacuum
    This map is updated with the following script every 5 seconds:
    service: xiaomi_miot.call_action
    data:
      entity_id: vacuum.dreame_p2027_27d7_robot_cleaner
      siid: 6
      aiid: 1
      params:
        - piid: 2
          value: "{\"req_type\":1,\"frame_type\":\"I\",\"force_type\":1}"
      throw: true
    

Additional Information (please complete the following information)

  • Model Name: dreame.vacuum.p2027
  • Firmware Version: 4.1.8_1092
  • Home Assistant Version: 20221010.0 - latest
  • Errors or warnings shown in the HA logs:
Logger: custom_components.dreame_vacuum.dreame.map
Source: custom_components/dreame_vacuum/dreame/map.py:435
Integration: Dreame Vacuum (documentation, issues)
First occurred: 16:55:51 (442 occurrences)
Last logged: 18:16:15

Map update Failed: get_device_property failed
Map update Failed: 'DreameVacuumDeviceStatus' object has no attribute 'silver_ion'
Send request map failed: No response from the device
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:515
First occurred: 16:54:47 (36 occurrences)
Last logged: 18:06:22

Update of camera.w10 is taking over 10 seconds
Update of sensor.cleargrass_dk1_bcd0_temperature_humidity_sensor is taking over 10 seconds
Update of sensor.lumi_v1_2624_temperature_humidity_sensor is taking over 10 seconds
Update of vacuum.dreame_p2027_27d7_robot_cleaner is taking over 10 seconds
Logger: custom_components.dreame_vacuum.dreame.protocol
Source: custom_components/dreame_vacuum/dreame/protocol.py:379
Integration: Dreame Vacuum (documentation, issues)
First occurred: 17:43:14 (2 occurrences)
Last logged: 17:43:27

Got error when receiving: timed out
Logger: root
Source: custom_components/dreame_vacuum/dreame/types.py:587
Integration: Dreame Vacuum ([documentation](https://github.com/Tasshack/dreame-vacuum), [issues](https://github.com/Tasshack/dreame-vacuum/issues))
First occurred: 16:55:12 (1 occurrences)
Last logged: 16:55:12

Uncaught thread exception
Traceback (most recent call last):
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 564, in _update_task
    self.update()
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 939, in update
    raise DeviceUpdateFailedException(ex) from None
custom_components.dreame_vacuum.dreame.exceptions.DeviceUpdateFailedException: 'DreameVacuumDeviceStatus' object has no attribute 'silver_ion'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/threading.py", line 1378, in run
    self.function(*self.args, **self.kwargs)
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 570, in _update_task
    self._update_failed(ex)
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 557, in _update_failed
    self._error_callback(ex)
  File "/config/custom_components/dreame_vacuum/coordinator.py", line 255, in async_set_update_error
    super().async_set_update_error(ex)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 292, in async_set_update_error
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 110, in async_update_listeners
    update_callback()
  File "/config/custom_components/dreame_vacuum/entity.py", line 112, in _handle_coordinator_update
    super()._handle_coordinator_update()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 348, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 570, in _async_write_ha_state
    available = self.available  # only call self.available once per update cycle
  File "/config/custom_components/dreame_vacuum/entity.py", line 147, in available
    return self.entity_description.available_fn(self.device)
  File "/config/custom_components/dreame_vacuum/dreame/types.py", line 587, in <lambda>
    DreameVacuumAction.RESET_SILVER_ION: lambda device: bool(device.status.silver_ion < 100),
AttributeError: 'DreameVacuumDeviceStatus' object has no attribute 'silver_ion'
Logger: custom_components.dreame_vacuum
Source: helpers/update_coordinator.py:290
Integration: Dreame Vacuum ([documentation](https://github.com/Tasshack/dreame-vacuum), [issues](https://github.com/Tasshack/dreame-vacuum/issues))
First occurred: 16:55:12 (1 occurrences)
Last logged: 16:55:12

Error requesting dreame_vacuum data: 'DreameVacuumDeviceStatus' object has no attribute 'silver_ion'
Logger: custom_components.dreame_vacuum.dreame.device
Source: custom_components/dreame_vacuum/dreame/device.py:567
Integration: Dreame Vacuum ([documentation](https://github.com/Tasshack/dreame-vacuum), [issues](https://github.com/Tasshack/dreame-vacuum/issues))
First occurred: 16:55:12 (1 occurrences)
Last logged: 16:55:12

Update Failed: 'DreameVacuumDeviceStatus' object has no attribute 'silver_ion'

Problem with L10S with water tank state

@argonaute199 Said:
I tried the integration with my Dream L10S. Everything works excepted the sweeping. I can only use the mopping and when I try to change, I get a service call failure "water tank not installed".
The water tank entity has been created, but its state is always "unknown". So the issue is there.

Of course, I check the vacuum and the water tank is correctly installed. I can activate the sweeping mode with the xiaomi app. And I cannot enymore if I remove the water tank : the Xiaomi app detects correctly the water tank.

What can I do ? Thank you.

Dreame D9 no room and zone cleaning possible

Describe the bug
A clear and concise description of what the bug is.

Hello,

I have a problem with my Dreame D9.

Unfortunately, I can't start zone cleaning and room cleaning with the Xiaomi Vacuum Map Card, because then it always wants to access the Xiomi Miio integration. But I installed my vacuum through the tasshack/dreame-vacuum. There is also no entity with "vacuum_clean_zone".

I also saw that you put a code in How to Use for the Xiaomi Vacuum Map Card, but I don't know where to paste it.

Sorry, but I'm not very familiar with HA yet. Haven't been using it for long.

Regards

To Reproduce
Steps to reproduce the behavior.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot of the error message: https://ibb.co/9YCvw0c

Additional Information (please complete the following information)

  • Model Name: dreame.vacuum.p2009
  • Firmware Version: 4.1.8_1132
  • Home Assistant Version: latest
  • Configuration Type [With or without map support]:
  • Errors or warnings shown in the HA logs (if applicable):

L10s Utra Issue

L10s Utra cannot be added to the HASS with the following error.

Logger: homeassistant.config_entries
Source: config_entries.py:395
First occurred: 11:44:43 (1 occurrences)
Last logged: 11:44:43

Config entry ‘Robbi’ for dreame_vacuum integration not ready yet: the JSON object must be str, bytes or bytearray, not int; Retrying in background

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.dreame_vacuum
Source: custom_components/dreame_vacuum/coordinator.py:229
Integration: Dreame Vacuum (documentation, issues)
First occurred: 11:44:43 (8 occurrences)
Last logged: 11:50:06

Update failed: the JSON object must be str, bytes or bytearray, not int

After Adding integration HASS restarts and integration is not in integrations list

After installing, adding and configuring the integration, HASS restarts automatically. The integration is visible in the integrations list before HASS starts new. After the restart, the integration is not shown anymore.
2022-11-23_08h38_03

First time I tried to install this integration, HASS got stuck in a bootloop. I deinstalled the integration and the bootloop was gone. After a fresh install of the integration, the a.m. happens.

p2114o issues

Thank you for developing the dream vacuum

bug
1.Cleaning mode does not have sweep mode.
2.Request map data from cloud failed

Screenshots
1.image

2.image

Additional Information (please complete the following information)

  • Model Name dreame.vacuum.p2114o
  • Firmware Version [e.g. 1156]: 4.3.3_1104
  • Home Assistant Version: Home Assistant 2022.10.4
  • Configuration Type [With or without map support]: with map
  • Errors or warnings shown in the HA logs (if applicable):

home assiatnt rebooting after configure with map ( dreame z10 pro)

Describe the bug
Hello, i have the dreame Z10 pro and i cant install this, after login with option map , the home assistant spot working and it is always rebooting

To Reproduce
Steps to reproduce the behavior.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional Information (please complete the following information)

  • Model Name [e.g. dreame.vacuum.p2028]:
  • Firmware Version [e.g. 1156]:
  • Home Assistant Version:
  • Configuration Type [With or without map support]:
  • Errors or warnings shown in the HA logs (if applicable):

dreame.vacuum.r2228o: Can't set Customized Cleaning anymore

Describe the bug
Can't set Customized Cleaning anymore via datapoint switch.dreamebot_l10s_ultra_customized_cleaning. If I switch it in, it switches itself off. If I switch it on in the Mi Home app, Home Assistant doesn't seem to recognize it.

To Reproduce
Try to swith the entity switch.dreamebot_l10s_ultra_customized_cleaning

Expected behavior
The switch should stay swiched on

Additional Information (please complete the following information)

  • Model Name: dreame.vacuum.r2228o
  • Firmware Version: 4.3.3_1121
  • Home Assistant Version: 2022.10.5
  • Configuration Type [With or without map support]: with map support
  • Errors or warnings shown in the HA logs (if applicable): -

dreame.vacuum.p2148o

If it is possible to add XIAOMI MI Robot Vacuum Mop Ultra Slim “dreame.vacuum.p2148o” in the future? 🥺

Can't switch fan speed from `Turbo` back to `Silent`

Describe the bug
Can't switch fan speed from Turbo back to Silent

To Reproduce
On xiaomi-vacuum-map-card try to switch from Turbo to Silent

Expected behavior
Fan speed should switch as expected

Screenshots
image

device class duration sensors are using wrong unit_of_measurement

Describe the bug
The integration does provide sensors for some "utilities" like the main brush, side brush, filters, and so on and how long they can be used.
These sensors are device_class: duration
grafik

Based on the developer tools, the unit_of_measurement is "hr" - for hours...
But according to the developers information from HomeAssistant, the unit_of_measurement should be "h"
grafik

To Reproduce
Steps to reproduce the behavior.

Expected behavior
duration sensors should use the correct unit_of_measurement according to the specs from HomeAssistant

Screenshots
If applicable, add screenshots to help explain your problem.

Additional Information (please complete the following information)
https://developers.home-assistant.io/docs/core/entity/sensor/

Dreame Z10 Pro Failed to connect

I want to add the Z10 pro to HA but it is stuck at the integration. I connect to the cloud with my email and passowrd and it finds the correct vacuum on the ip address and the token. But on that screen it just states "Failed to connect"

If I use the Miot integration the device is working.Also when I manually use the ip with the token it fails to connect

after update minus 30 entities and no map

Hello
sorry for my english ;-(
My Device is an "Dreame L10s_Ultra" ModelID: dreame.vacuum.r2228o
Codename: p2228
today i have updated and now i have no map anymore on all card´s after a little check and reinstallation... now i have minus ca. 30 entities (only 82). 17 entities not available, 24 de-activated

"camera.dreamebot_l10s_ultra_map" not available
"camera.dreamebot_l10s_ultra_map_data" not available
"camera.dreamebot_l10s_ultra_map_data_1" completly gone

and now is the name of my device "dreame.vacuum.r2228o"
before was the name of my device "dreame.vacuum.r2228" i think ? maybe

HA is up to date.
HACS is up to date.

any ideas ? wat i can do?
cu eumel7

Drying time - settings are showing minutes instead of hours

Describe the bug
You can select the drying time within the Integration, but the value selector ist showing the Options as minutes
Screenshot_20221211-170044

The App is showing this in hours:
Screenshot_20221211-170310

To Reproduce

Expected behavior
Selector should Show hours (2 hr, 4hr or 120min, 240min)

Screenshots
See above

Additional Information (please complete the following information)

  • Model Name: L10s Ultra
  • Firmware Version [e.g. 1156]:
  • Home Assistant Version:
  • Configuration Type [With or without map support]:
  • Errors or warnings shown in the HA logs (if applicable):

Not correct map path

Describe the bug
As you can see in following immage, the robot path is strange and confusing, not always allineated to the map and it's note the same of the Xiaomi Home software, and looks like that everytime it update the path it change position and draw on the map

To Reproduce
Just run a clean, it's happen every time

Expected behavior
Just clean 2 rooms everyday

Screenshots
If applicable, add screenshots to help explain your problem.
immagine

Additional Information (please complete the following information)

  • Dreame W10 Pro Model Name [e.g. dreame.vacuum.p2028]:
  • Firmware Version 4.3.3_1127
  • Home Assistant Version: 2022.10.0
  • Configuration Type [With or without map support]: With map support
  • Errors or warnings shown in the HA logs (if applicable): # grep -r dream home-assistant.log | grep -i dream
    2022-11-03 01:05:13.328 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration dreame_vacuum which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
    2022-11-03 01:06:32.368 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: dreame_vacuum
    2022-11-03 03:27:48.917 WARNING (Thread-1186) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 1: Unable to discover the device 10.0.0.159
    2022-11-03 10:39:28.346 WARNING (Thread-4773) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 1: Unable to discover the device 10.0.0.159
    2022-11-03 10:39:38.350 WARNING (Thread-4774) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 2: Unable to discover the device 10.0.0.159
    2022-11-03 10:39:47.438 WARNING (Thread-4776) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 3: No response from the device
    2022-11-03 12:07:43.491 WARNING (SyncWorker_6) [homeassistant.loader] We found a custom integration dreame_vacuum which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

Regular connected to the WiFi

Clean Segment - Error calling service with different repeats by segment

Describe the bug
When calling the service vacuum_clean_segment with 2 segments and different repeats the call service fails with error: expected int for dictionary value @ data['repeats']

To Reproduce
Call service with the example Clean room 2 two times and 5 one time provided in the file services

Expected behavior
Clean 2 segments with different repeats.

Screenshots
image

Additional Information (please complete the following information)

  • Model Name : Dreame D9
  • Firmware Version [ 4.1.8_1132 ]:
  • Home Assistant Version: 2022.11.2
  • Configuration Type [With map support]:
  • Errors or warnings shown in the HA logs (if applicable): [281471818706048] Error handling message: expected int for dictionary value @ data['repeats']. Got None (invalid_format) from XXX.XXX.XXX.XXX (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 OPR/93.0.0.0)

Sensor "Cleaning_history" should get the device_class timestamp

Is your feature request related to a problem? Please describe.
no

Describe the solution you'd like
It would be great, if the sensor "cleaning_history" would get the device_class: timestamp since it does provide a timestamp.
HA could then show the sensor like: "x minutes ago" - or "y days ago" ...

Describe alternatives you've considered
alternative solution would be, to create a template sensor and write the current value of cleaning history into the template.

Additional context
grafik

Here's an example where I've used the template sensor to get the format:
grafik

Template:

  - sensor:
    - name: 'C-Q21 cleaning history timestamp'
      unique_id: 'c_q21_cleaning_history_timestamp'
      state: "{{ as_timestamp(states('sensor.c_q21_cleaning_history')) | timestamp_local }}"
      device_class: timestamp

Support for VSLAM robots

Does this component rely on capabilities of lidar devices?
I have a dreame F9 which has no lidar tower but a camera for navigation. Would it be supported by this component?
F9 can do all the things a lidar device can do, too: map support, section and room cleaning.

Thanks for your help.

sensor detergent left - reporting wrong percentage

Describe the bug
the sensor detergent left is providing a wrong percentage value to HomeAssistant.

In my case, it is showing 13% left, with a time left of round about 70 days.
grafik

Within the App, it is showing about 70% left

All other sensors are showing the correct value :)

To Reproduce
Steps to reproduce the behavior.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional Information (please complete the following information)

  • Model Name [e.g. dreame.vacuum.p2028]:
  • Firmware Version [e.g. 1156]:
  • Home Assistant Version:
  • Configuration Type [With or without map support]:
  • Errors or warnings shown in the HA logs (if applicable):

Dreame Z10 Pro lowest fan speed

Hi,
Everytime after update I need to change FAN_SPEED_SILENT
to
FAN_SPEED_QUIET
in const.py and vacuum.py
Always when I try change speed I getting error

Failed to call service vacuum / set_fan_speed. ('Fan speed not recognized. Valid options:% s', ['Silent', 'Standard', 'Strong', 'Turbo'])

I don't think is it normal. Is a easier way to make this usable?

Thanks

  • Model Name dreame.vacuum.p2028
  • Firmware Version 4.1.8_1156
  • Home Assistant Version 2022.11
  • xiaomi vacuum map card

dreame.vacuum.mb1808 support

Is your feature request related to a problem? Please describe.

Looking for support for dreame.vacuum.mb1808

Describe the solution you'd like

dreame.vacuum.mb1808 as an option for tool.

Describe alternatives you've considered
N/A

Additional context

dreame.vacuum.mb1808 is not listed as supported.

Device Controls Fail to Call Service

Describe the bug
When changing a setting in the controls section of the device, there is an error message that states “ Failed to call service select/select_option. must contain at least one of entity_id, device_id, area_id.”

To Reproduce
On the Devices screen change one of the drop downs to a different value.

Expected behavior
It seems as if there is no entity or device being included in the service call as would be expected.

Screenshots
158BBCCD-3EBA-43AD-B8E8-3923DC881AD3

Additional Information (please complete the following information)

  • Model Name: dreame.vacuum.r22280
  • Firmware Version: 4.3.3_1125
  • Home Assistant Version: 2022.11.5
  • Configuration Type :With map
  • Errors or warnings shown in the HA logs (if applicable): n/a

Incorrect entity names

Describe the bug
Some entity names are not consistent with what are shown on the app interface

Expected behavior

  • Fan Speed (Silent, Standard, Strong, Turbo) -> Suction Settings (Quiet, Standard, Strong, Turbo)
  • Repeats (x1, x2, x3) -> Cleaning Times (x1, x2, x3)
  • Water Level (Low, Medium, High) -> Humidity of Mop Pad (Slightly dry, Moist, Wet)
  • Wash Station -> Self-Wash Base

Screenshots



Additional Information (please complete the following information)

  • Model Name: dreame.vacuum.p2027
  • Firmware Version: 4.1.8_1092
  • Home Assistant Version: 20221010.0 - latest

RAM consumption of camera entity

Describe the bug

I tried to start to use this integration on a RPI3.
I can't due to RAM consumption.

To Reproduce

Start this integration on a raspberry on a docker.
Using docker I can see that:

  • start the integration without camera ==> 250Mo used
  • start the integration with camera entity ==> 620Mo used

Expected behavior

The camera entity should not take more that 300Mo to work

After some code analysis I can see that this RAM consumption come from call to self._renderer.render_map(map_data, robot_status) performed on 'camera.py' file at line 301.

Additional Information (please complete the following information)

  • Model Name [e.g. dreame.vacuum.p2028]: dreame.vacuum L10+
  • Firmware Version [e.g. 1156]:
  • Home Assistant Version: latest
  • Configuration Type [With or without map support]: with map
  • Errors or warnings shown in the HA logs (if applicable): no-error

linked with #48 and #38

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.