If you add it using UI you have to remove a first line and use vacuum_send_command_multiple_zones
as entity id
HI. Thank you for this integration. No issues loaded through HACS, current HA: 2020.12.7. Able to load correct map through camera integration however will not accept commands from card interface.
Error:
2020-12-18 20:02:21 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140591194076688] not a valid value for dictionary value @ data['entity_id']
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 135, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1399, in async_call
processed_data = handler.schema(service_data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 218, in __call__
return self._exec((Schema(val) for val in self.validators), v)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 340, in _exec
raise e if self.msg is None else AllInvalid(self.msg, path=path)
File "/usr/local/lib/python3.8/site-packages/voluptuous/validators.py", line 336, in _exec
v = func(v)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 817, in validate_callable
return schema(data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File "/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py", line 432, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: not a valid value for dictionary value @ data['entity_id']
Can you show your config?
Is there any reason for the scan_interval
being 5 seconds in the cloud map extractor? Could I set it to 1 second without hitting any API limit?
There is no official API, this integration pretends to be a Xiaomi Home app, so limits are unknown. You probably can set it to 1 second, but it takes some time for this map to update, as it requires a command to be sent to a vacuum, vacuum has to upload a map to the cloud and then integration downloads it from a cloud.
From Lovelace Card:
type: 'custom:xiaomi-vacuum-map-card'
entity: vacuum.xiaomi_vacuum_cleaner"
map_camera: camera.xiaomi_cloud_map_extractor
camera_calibration: true
You have to remove "
from entity id
Of course, so simpleā¦the yaml typos get me all the time. Thanks. Works like a charm!
I have been using this and live add-on and everything works great for my 2 roborock s50 & s55.
Now I have a firmware update to 3.5.8.002034.
Is it safe to do it? Will it break anything?
Thanks!
Donāt have it here, what are the improvements?
Can you share how exactly did you do the calibration? I am having problems with it.
hi there. first of all a big thanks to @3_14 for this great card!
I am trying to make this card work (in combination with another vacuum card) on my 3d floorplan; by aligning it with the calibrated map which i then make transparent. This seems to work but i canāt find a way to position the āSTARTā button since it is glued to the bottom of the card.
( I made card visible for this example but the idea is to have it completely transparent)
as you can see my is solution is far from ideal, also because there is a lot of stuff happening in the background that I donāt need. Is there maybe a way to apply the script of the action of the āstart-buttonā to a custom button? Or does anyone maybe have another suggestion? Thanks!
can samelone share syntax of cleaning script using zones parameters instead of rooms number?
EDIT: found here: Xiaomi Vacuum cleaner Card
First of all, thanks for the fantastic work, iām not so much of a programmer, so I could not do without all the great work you did.
However I have an issue with my vacuum interactive map and I cannot find what Iām doing wrong.
My configuration in as follows:
vacuum:
- platform: xiaomi_miio
host: 192.168.1.210
token: !secret vacuum_token
Name: Fred
camera:
- platform: xiaomi_cloud_map_extractor
name: "Fred vacuum camera"
host: 192.168.1.210
token: !secret vacuum_token
username: !secret vacuum_username
password: !secret vacuum_password
draw: ['all']
attributes:
- calibration_points
colors:
color_map_inside: [32, 115, 185]
color_map_outside: [255, 255, 255]
color_map_wall: [96, 96, 96]
color_map_wall_v2: [93, 109, 126]
color_grey_wall: [93, 109, 126]
color_path: [224, 224, 224]
# color_path: [147, 194, 238]
color_goto_path: [0, 255, 0]
color_predicted_path: [255, 255, 0, 0]
color_zones: [0xAD, 0xD8, 0xFF, 0x8F]
color_zones_outline: [0xAD, 0xD8, 0xFF]
color_virtual_walls: [255, 0, 0]
color_no_go_zones: [255, 33, 55, 127]
color_no_go_zones_outline: [255, 0, 0]
color_no_mop_zones: [163, 130, 211, 127]
color_no_mop_zones_outline: [163, 130, 211]
color_charger: [0x66, 0xfe, 0xda, 0x7f]
color_robo: [75, 235, 149]
color_unknown: [0, 0, 0]
color_scan: [0xDF, 0xDF, 0xDF]
room_colors:
1: [255, 204, 204]
2: [51, 205, 153]
3: [117, 136, 128]
4: [52, 152, 219]
5: [205, 97, 85]
6: [243, 156, 18]
7: [88, 214, 141]
8: [245, 176, 65]
9: [252, 212, 81]
10: [72, 201, 176]
11: [84, 153, 199]
12: [133, 193, 233]
13: [245, 176, 65]
14: [82, 190, 128]
15: [72, 201, 176]
16: [165, 105, 18]
# texts:
# - text: "Room 1"
# x: 25
# y: 25
# color: [125, 20, 213]
map_transformation:
# scale: 2
# rotate: 180
trim:
top: 20
bottom: 20
left: 10
right: 15
When I configure the map like this it works fine:
calibration_points:
- map:
x: 190
'y': 340
vacuum:
x: 25500
'y': 25500
- map:
x: 790
'y': 340
vacuum:
x: 33500
'y': 25500
- map:
x: 190
'y': 1080
vacuum:
x: 25500
'y': 16000
default_mode: zoned_cleanup
entity: vacuum.xiaomi_vacuum_cleaner
language: nl
map_image: /local/img/woonkamer.png
type: 'custom:xiaomi-vacuum-map-card'
zones: null
However when I use the camera map like this:
type: 'custom:xiaomi-vacuum-map-card'
entity: vacuum.xiaomi_vacuum_cleaner
camera_calibration: true
map_camera: camera.Fred_vacuum_camera
camera_refresh_interval: 5
language: nl
calibration_points: []
default_mode: zoned_cleanup
zones: null
the zoned cleanup does not work, the map however is fine. I must have set something wrong but do not know what. I receive an error in the log:
Logger: frontend.js.latest.202012291
Source: components/system_log/init.py:193
First occurred: 20:41:43 (3 occurrences)
Last logged: 20:41:43
http://192.168.1.10:8123/hacsfiles/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.js:627:50 Uncaught TypeError: Cannot read property āconvertABā of undefined
Hello all,
Iāve been trying to install ācustom: xiaomi-vacuum-map-cardā for a while. I think Iām doing everything right! (pic 2 and pic 3) however keep getting the following error! What am I doing wrong? (pic. 1)
Can someone tell me what Iām doing wrong?
Thank you for your response.
You have to add this card to resources
Hi and thank you very much for the effort. This looks awesome and i am trying to use it in my Home Assistant.
Unfortunately i am pretty new to HA and i am struggling to get this to work.
I have installed the Lovelace Xiaomi Vacuum Map Card with HACS and under the āresourcesā tab i can see the ā/hacsfiles/lovelace-xiaomi-vacuum-map-card/xiaomi-vacuum-map-card.jsā so i think i got that part.
I also installed the Xiaomi Cloud Map Extractor and i am able to get a map from my Vacuum from the camera entity.
I dont understand what i have to do from here to get the card set up on my dashboard and how to calibrate my map.
I guess there are several steps i am missing to get this to work.
Are there any step by step guides i can follow or anyone who can give me any tips?
@3_14 is there a way for the image/Map to scale?
I want it a bit bigger,
i use
- type: 'custom:xiaomi-vacuum-map-card'
entity: vacuum.roborock_vacuum_s5
map_camera: camera.xiaomi_cloud_map_extractor
camera_calibration: true
And for the cloud_map_extractor i use
map_transformation:
rotate: 90
scale: 2
trim:
top: 20
bottom: 12
left: 0
right: 12
This works for your other addon, but not for this one
Heres an image when im using the other integration, works fine, heres my code, with the above from map_transformation, if i remove map_transformation it gets even smaller. so dunno whats happening, tried 2 scale, 90 scale etc
with this code
- type: custom:dwains-flexbox-card
items_classes: ācol-xs-12 col-sm-6 col-sm-6ā
cards:
{% if (data | fromjson)[āmapā] %}- type: custom:dwains-flexbox-card
padding: true
cards:- type: custom:dwains-heading-card
item_classes: ācol-xs-12 col-sm-12 col-md-12 col-lg-12ā
title: Map - type: ācustom:xiaomi-vacuum-map-cardā
items_classes: ācol-sm-12ā
entity: vacuum.roborock_vacuum_s5
map_camera: camera.xiaomi_cloud_map_extractor
camera_calibration: true
- type: custom:dwains-heading-card
- type: custom:dwains-flexbox-card