Thank you. Seems there are some gems in that post. I will start experimenting.
Something I have identified as an issue is that the two maps I want to use have different perspectives. I have rotated one of the maps in the Xiaomi app so that both are now horizontal, but unfortunately this is not reflected in the card. Is there some trick to it?
3_14
(Piotr Machowski)
February 14, 2023, 1:23pm
1433
Unfortunately at this moment it’s not possible to apply different transformations for different maps on the same camera.
KLU
February 15, 2023, 1:22pm
1434
Thanks Piotr! I copied all coordinates that I made earlier and decided to rebuild everything from scratch.
I followed your instructions and now everything works as expected!
Awesome work, I’d love to see the vacuum and routes in higher resolution, though… as in the Xiaomi Home app Thanks a lot again!
3_14
(Piotr Machowski)
February 15, 2023, 1:38pm
1435
add following lines to config of Map Extractor camera:
map_transformation:
scale: 2
1 Like
Hi, Piotr
Is there any chance that Tuya devices will get support for your Map extractor?
There is Tuya integration but without Map and path.
Thank you, Mitcho
3_14
(Piotr Machowski)
February 15, 2023, 2:44pm
1437
I don’t think so, this integration is made specifically for Xiaomi vacuums
Jaack
February 15, 2023, 10:08pm
1438
Hi Piotr,
I dont know of i am at the right Spot because i am pretty new to Home assistant but I am having trouble getting my Vacuum to clean something different than “everything”.
The Vacuum (Xiaomi Mi Robot Vacuum Mop Pro) ist integrated via al-one/hass-xiaomi-miot. The Map ist generated correctly via xiaomi_cloud_map_extractor,
I can start and Stop it, but IT will clean the complete house or return to Station.
When i Order it to clean a specific room or zone, i get an Error Message:
required key not provided @data [‘aiid’]
Something ist wrong when calling any service other than “clean the complete house” or setting the fan speed. Go to, Zone cleaning, room cleaning… I am Desperate
My Card config:
type: custom:xiaomi-vacuum-map-card
map_source:
camera: camera.xiaomi_cloud_map_extractor
crop:
top: 350
right: 200
left: 500
bottom: 150
calibration_source:
camera: true
entity: vacuum.viomi_v8_6035_robot_cleaner
vacuum_platform: al-one/hass-xiaomi-miot
map_modes:
- name: Rooms
icon: mdi:floor-plan
run_immediately: false
coordinates_rounding: true
selection_type: ROOM
max_selections: 1
repeats_type: EXTERNAL
max_repeats: 3
service_call_schema:
service: xiaomi_miot.call_action
predefined_selections:
- id: '10'
icon:
name: mdi:broom
x: 1.7
'y': -9.95
label:
text: Schlafzimmer
x: 1.7
'y': -9.95
offset_y: 35
outline:
- - -0.45
- -11.7
- - 3.85
- -11.7
- - 3.85
- -8.2
- - -0.45
- -8.2
- id: '11'
icon:
name: mdi:broom
x: 1.15
'y': -6.525
label:
text: Bad
x: 1.15
'y': -6.525
offset_y: 35
outline:
- - -0.35
- -7.8
- - 2.65
- -7.8
- - 2.65
- -5.25
- - -0.35
- -5.25
- id: '12'
icon:
name: mdi:broom
x: 0.7499999999999999
'y': -3.6500000000000004
label:
text: Eingang
x: 0.7499999999999999
'y': -3.6500000000000004
offset_y: 35
outline:
- - -0.55
- -4.7
- - 2.05
- -4.7
- - 2.05
- -2.6
- - -0.55
- -2.6
- id: '13'
icon:
name: mdi:broom
x: 3.075
'y': -5.15
label:
text: Flur
x: 3.075
'y': -5.15
offset_y: 35
outline:
- - 2.1
- -9.25
- - 4.05
- -9.25
- - 4.05
- -1.05
- - 2.1
- -1.05
- id: '14'
icon:
name: mdi:broom
x: 0.9999999999999999
'y': -1.775
label:
text: Gäste WC
x: 0.9999999999999999
'y': -1.775
offset_y: 35
outline:
- - -0.05
- -2.4
- - 2.05
- -2.4
- - 2.05
- -1.15
- - -0.05
- -1.15
- id: '15'
icon:
name: mdi:broom
x: 1.525
'y': 0.475
label:
text: HWR
x: 1.525
'y': 0.475
offset_y: 35
outline:
- - -0.2
- -1
- - 3.25
- -1
- - 3.25
- 1.95
- - -0.2
- 1.95
- id: '16'
icon:
name: mdi:broom
x: 5
'y': -0.35
label:
text: Küche
x: 5
'y': -0.35
offset_y: 35
outline:
- - 4.1
- -1.8
- - 5.9
- -1.8
- - 5.9
- 1.1
- - 4.1
- 1.1
- id: '18'
icon:
name: mdi:broom
x: 9.175
'y': -1.3000000000000003
label:
text: Wohnzimmer
x: 9.175
'y': -1.3000000000000003
offset_y: 35
outline:
- - 6.9
- -4.15
- - 11.45
- -4.15
- - 11.45
- 1.55
- - 6.9
- 1.55
- id: '19'
icon:
name: mdi:broom
x: 6.125
'y': -3.2249999999999996
label:
text: Esszimmer
x: 6.125
'y': -3.2249999999999996
offset_y: 35
outline:
- - 4.1
- -5.1
- - 8.15
- -5.1
- - 8.15
- -1.35
- - 4.1
- -1.35
- id: '20'
icon:
name: mdi:broom
x: 6.1
'y': -6.9
label:
text: Gästezimmer
x: 6.1
'y': -6.9
offset_y: 35
outline:
- - 4.05
- -8.6
- - 8.15
- -8.6
- - 8.15
- -5.2
- - 4.05
- -5.2
- id: '22'
icon:
name: mdi:broom
x: 6
'y': -10
label:
text: Büro
x: 6
'y': -10
offset_y: 35
outline:
- - 4
- -11.85
- - 8
- -11.85
- - 8
- -8.3
- - 4
- -8.3
variables: {}
tiles:
- tile_id: battery_level
entity: vacuum.viomi_v8_6035_robot_cleaner
label: Battery
attribute: battery_level
icon: mdi:battery-charging-100
unit: '%'
- tile_id: fan_speed
entity: vacuum.viomi_v8_6035_robot_cleaner
label: Fan speed
attribute: fan_speed
icon: mdi:fan
translations:
silent: Silent
standard: Standard
medium: Medium
turbo: Turbo
auto: Auto
gentle: Gentle
- tile_id: status
attribute: vacuum.status_desc
label: Status
icon: mdi:robot-vacuum
entity: vacuum.viomi_v8_6035_robot_cleaner
precision: 0
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
icons:
- icon: mdi:play
conditions:
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: cleaning
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: error
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: returning
tooltip: Start
tap_action:
action: call-service
service: vacuum.start
service_data:
entity_id: vacuum.viomi_v8_6035_robot_cleaner
- icon: mdi:pause
conditions:
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: docked
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: idle
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: error
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: paused
tooltip: Pause
tap_action:
action: call-service
service: vacuum.pause
service_data:
entity_id: vacuum.viomi_v8_6035_robot_cleaner
- icon: mdi:stop
conditions:
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: docked
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: idle
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: error
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: paused
tooltip: Stop
tap_action:
action: call-service
service: vacuum.stop
service_data:
entity_id: vacuum.viomi_v8_6035_robot_cleaner
- icon: mdi:home-map-marker
conditions:
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: docked
- entity: vacuum.viomi_v8_6035_robot_cleaner
value_not: returning
tooltip: Return to base
tap_action:
action: call-service
service: vacuum.return_to_base
service_data:
entity_id: vacuum.viomi_v8_6035_robot_cleaner
- icon: mdi:map-marker
tooltip: Locate
tap_action:
action: call-service
service: vacuum.locate
service_data:
entity_id: vacuum.viomi_v8_6035_robot_cleaner
- icon: mdi:fan-remove
conditions:
- entity: vacuum.viomi_v8_6035_robot_cleaner
attribute: fan_speed
value: Silent
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.viomi_v8_6035_robot_cleaner
fan_speed: Basic
- icon: mdi:fan-speed-1
conditions:
- entity: vacuum.viomi_v8_6035_robot_cleaner
attribute: fan_speed
value: Basic
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.viomi_v8_6035_robot_cleaner
fan_speed: Medium
- icon: mdi:fan-speed-2
conditions:
- entity: vacuum.viomi_v8_6035_robot_cleaner
attribute: fan_speed
value: Medium
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.viomi_v8_6035_robot_cleaner
fan_speed: Strong
- icon: mdi:fan-speed-2
conditions:
- entity: vacuum.viomi_v8_6035_robot_cleaner
attribute: fan_speed
value: Strong
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.viomi_v8_6035_robot_cleaner
fan_speed: Silent
- icon: mdi:fan-alert
conditions:
- entity: vacuum.viomi_v8_6035_robot_cleaner
attribute: fan_speed
value_not: Silent
- entity: vacuum.viomi_v8_6035_robot_cleaner
attribute: fan_speed
value_not: Basic
- entity: vacuum.viomi_v8_6035_robot_cleaner
attribute: fan_speed
value_not: Medium
- entity: vacuum.viomi_v8_6035_robot_cleaner
attribute: fan_speed
value_not: Strong
tooltip: Change fan speed
tap_action:
action: call-service
service: vacuum.set_fan_speed
service_data:
entity_id: vacuum.viomi_v8_6035_robot_cleaner
fan_speed: Silent
map_locked: true
two_finger_pan: false
3_14
(Piotr Machowski)
February 15, 2023, 10:37pm
1439
I suggest to migrate form Miot integration to this one and use its dedicated platform.
After migration you have to recreate the map card (and do not click Generate static config
button)
Jaack
February 16, 2023, 8:28am
1440
You sir, are a true Hero.
It works as it should. Thank you so much
How simple was this, i tried a few Vacuum Integrations, but not this one…
eboline
(eboline)
February 20, 2023, 4:05am
1441
I’m having issues with the “repeats” and I’m sure it’s user error, but looking for some guidance.
I typically manually start my Roborock S7 on one of my floorplans. Depending on the day, I don’t always want to clean all of the segments on that floor so I manually select multiple segements on the map, hit “Play” and the S7 cleans all of the selected segements. However, sometimes I want it to clean the selected segments 2 so before pressing “Play” I change the “repeats” to “x2.” However, it never cleans those segments more than once.
Everything else works perfectly!
3_14
(Piotr Machowski)
February 20, 2023, 3:41pm
1442
@eboline this is a problem in HA core. More info here:
opened 08:33PM - 04 Nov 21 UTC
integration: xiaomi_miio
### The problem
When setting an automation to clean twice the same segment as… said in the documentation it does not work.
even when putting twice the same number for the segment it only vacuums it once (tested with a Roborock S6)
https://www.home-assistant.io/integrations/xiaomi_miio/#xiaomi-mi-robot-vacuum
![image](https://user-images.githubusercontent.com/57101460/140415114-a9ae1419-3215-4ced-805e-278e4a7249d7.png)
I tested with below automation action.
```
- service: xiaomi_miio.vacuum_clean_segment
target:
entity_id: vacuum.roborock_s6
data:
segments:
- 16
- 16
```
I also tested with brackets
`segments: [16, 16]`
but it still does not work and only vacuum once
### What version of Home Assistant Core has the issue?
core-2021.10.7
### What was the last working version of Home Assistant Core?
_No response_
### What type of installation are you running?
Home Assistant Supervised
### Integration causing the issue
xiaomi_miio
### Link to integration documentation on our website
https://www.home-assistant.io/integrations/xiaomi_miio/
### Example YAML snippet
_No response_
### Anything in the logs that might be useful for us?
_No response_
### Additional information
_No response_
Fifthy
(P.Hill)
February 20, 2023, 5:40pm
1443
Great card, very nice to have this in the dashboard. However since i migrated from the xiaomi integration to the newer roborock integration it calls the wrong services.
For example, when i trigger the goto template it wants to trigger “xiaomi_miio/vacuum_goto” but it’s actually called “roborock.vacuum_goto”.
I read about calling custom services on the readme page however i don’t understand how to implement that in the code, i would appreciate some help here.
This is part of my code:
entity: vacuum.roborock_s7_maxv
vacuum_platform: default
map_modes:
- template: vacuum_clean_zone
- template: vacuum_goto
- template: vacuum_clean_segment
predefined_selections:
- id: '16'
icon:
name: mdi:broom
x: 25975
'y': 19375
3_14
(Piotr Machowski)
February 20, 2023, 6:28pm
1444
entity: vacuum.roborock_s7_maxv
vacuum_platform: default
map_modes:
- template: vacuum_clean_zone
service_call_schema:
service: roborock.vacuum_clean_zone
service_data:
zone: '[[selection]]'
repeats: '[[repeats]]'
entity_id: '[[entity_id]]'
- template: vacuum_goto
service_call_schema:
service: roborock.vacuum_goto
service_data:
x_coord: '[[point_x]]'
y_coord: '[[point_y]]'
entity_id: '[[entity_id]]'
- template: vacuum_clean_segment
service_call_schema:
service: roborock.vacuum_clean_segment
service_data:
segments: '[[selection]]'
entity_id: '[[entity_id]]'
predefined_selections:
- id: '16'
icon:
name: mdi:broom
x: 25975
'y': 19375
1 Like
f0xm
February 20, 2023, 6:58pm
1446
Hi there,
worked always fine but now I have problems with my two Roborocks. The map card shows:
I didn’t change anything and also restored backup before the lastest HA Feb. updates just to make sure. But cannot figure out whats the problem.
Thanks and BR
f0xm
February 20, 2023, 7:34pm
1448
Thank you Piotr. What do you mean with “restart” just by manually pressing the button on the robot?
3_14
(Piotr Machowski)
February 20, 2023, 7:44pm
1449
Yes, pressing until it reboots itself.
f0xm
February 21, 2023, 5:23pm
1450
Thanks for your help. The problem was that the internal IPs for the two devices changed…
Fifthy
(P.Hill)
February 22, 2023, 3:04pm
1451
Trying to make tile that makes the vacuum return to dock.
What service do i use? I can’t find any relating service.
tiles:
- entity: vacuum.roborock_s7_maxv
label: Return to Dock
icon: mdi:home
tap_action:
service: roborock.vacuum_xxxxx?