Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor
Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor copied to clipboard
Cannot get the map from roborock.vacuum.a01
In mi home I see the map, but Cloud-Map-Extractor cant retrieve it. Is it because the is no roborock.vacuum.a01 in the support list?
Could you share your config?
I set such interval because dont want to receive multiple warnings in HA log
What warnings do you get in HA log?
Standard :)
Logger: homeassistant.helpers.entity Source: helpers/entity.py:561 First occurred: 14 июля 2021 г., 23:23:34 (6 occurrences) Last logged: 10:27:40
Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds Update of vacuum.roborock_vacuum_a01 is taking over 10 seconds
What image does camera show?

It's possible that this model uses a different API, can you try using this config?
camera:
- platform: xiaomi_cloud_map_extractor
host: !secret xiaomi_vacuum_host
token: !secret xiaomi_vacuum_token
username: !secret xiaomi_cloud_username
password: !secret xiaomi_cloud_password
draw: ['all']
force_api: viomi
attributes:
- calibration_points
Эта ошибка возникла в кастомной интеграции.
Logger: custom_components.xiaomi_cloud_map_extractor.camera Source: custom_components/xiaomi_cloud_map_extractor/camera.py:333 Integration: xiaomi_cloud_map_extractor (documentation, issues) First occurred: 13:18:47 (1 occurrences) Last logged: 13:18:47
Unable to retrieve map data
Can you enable debugging and paste logs here (try first with your original config, then with force_api)?
logger:
default: info
logs:
custom_components.xiaomi_cloud_map_extractor: debug
Should I add this section to config?
Yup, in configuration.yaml (documentation)
2021-07-15 22:26:09 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2021-07-15 22:26:13 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2021-07-15 22:26:18 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2021-07-15 22:26:22 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2021-07-15 22:26:26 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2021-07-15 22:26:30 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2021-07-15 22:26:35 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2021-07-15 22:26:39 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - True, map name - retry, device retrieved - True
2021-07-15 22:26:56 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2021-07-15 22:27:01 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2021-07-15 22:27:05 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2021-07-15 22:27:06 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
in a case of viomi:
2021-07-15 22:34:32 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Logging in...
2021-07-15 22:34:34 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Logged in
2021-07-15 22:34:34 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map from Xiaomi cloud
2021-07-15 22:34:35 WARNING (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map data
2021-07-15 22:35:32 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Logging in...
2021-07-15 22:35:34 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Logged in
2021-07-15 22:35:34 DEBUG (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map from Xiaomi cloud
2021-07-15 22:35:34 WARNING (SyncWorker_3) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map data
Do any other errors appear in logs?
Can you also try force_api: roidmi?
2021-07-15 22:51:45 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Logging in...
2021-07-15 22:51:46 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Logged in
2021-07-15 22:51:46 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map from Xiaomi cloud
2021-07-15 22:51:47 WARNING (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map data
2021-07-15 22:52:45 DEBUG (SyncWorker_5) [custom_components.xiaomi_cloud_map_extractor.camera] Logging in...
nah, no errors of type xiaomi_cloud_map_extractor
map in mihome app.

There is also such warning in the log
Logger: custom_components.xiaomi_cloud_map_extractor.camera
Source: custom_components/xiaomi_cloud_map_extractor/camera.py:305
Integration: xiaomi_cloud_map_extractor (documentation, issues)
First occurred: 07:20:37 (1 occurrences)
Last logged: 07:20:37
Got exception while fetching the state: {'code': -9999, 'message': 'user ack timeout'}
Same problem is for mijia.vacuum.v2.
Tried to force api roidmi and voimi, exactly same errors. Logs to cloud correctly, retrieves device data correctly and then fails to download map (undefined command)
Seems like the same problem with Dreame Z10 Pro {'code': -9999, 'message': 'user ack timeout'} In tcpdump i can see communication on udp 54321 going on fine, but sometimes when Vaccum tries to respond back to HA , then HA just responds with icmp port unreachable (like the app is not listening anymore on that udp port from which the traffic to Vacuum was initiated xiaomi-haas.log3.txt xiaomi-haas.tcpdump.txt
One specialty in my setup is that HAAS and vacuum are on other subnets, therefore I do NAT on the router in between them - so that HAAS will have apparent IP from the same subnet as vacuum - when tried without the NAT the vacuum was not responding.
UPDATE: i was able to move a bit forward by changing my username from tel.number to UID i saw in the cloud extractor. However now it just says the vacuum is not supported :/
@maniac0r here is an issue for you: #126
@komOrmand does the latest version work?
I have a a01 and the latest version does not work. I've tried all of the API options but still "Unable to retrieve map data".
I have exactly this problem with my roborock.vacuum.a01 (Roborock E5):
May 11 22:09:30 rasp hass[321669]: 2022-05-11 22:09:30 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
May 11 22:09:39 rasp hass[321669]: 2022-05-11 22:09:39 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
May 11 22:09:40 rasp hass[321669]: 2022-05-11 22:09:40 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
May 11 22:09:43 rasp hass[321669]: 2022-05-11 22:09:43 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
May 11 22:09:47 rasp hass[321669]: 2022-05-11 22:09:47 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
May 11 22:09:52 rasp hass[321669]: 2022-05-11 22:09:52 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
May 11 22:09:56 rasp hass[321669]: 2022-05-11 22:09:56 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
May 11 22:10:00 rasp hass[321669]: 2022-05-11 22:10:00 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
May 11 22:10:04 rasp hass[321669]: 2022-05-11 22:10:04 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
May 11 22:10:08 rasp hass[321669]: 2022-05-11 22:10:08 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
May 11 22:10:13 rasp hass[321669]: 2022-05-11 22:10:13 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
May 11 22:10:17 rasp hass[321669]: 2022-05-11 22:10:17 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - True, map name - retry, device retrieved - True
I have exactly this problem with my roborock.vacuum.a11 (Roborock T7):
2022-05-16 12:05:56 DEBUG (SyncWorker_9) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - True, map name - retry, device retrieved - True
2022-05-16 12:06:00 DEBUG (SyncWorker_17) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:06:05 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:06:05 DEBUG (SyncWorker_17) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:06:10 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:06:10 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
2022-05-16 12:06:10 DEBUG (SyncWorker_17) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:06:15 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:06:15 DEBUG (SyncWorker_17) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:06:20 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:06:20 DEBUG (SyncWorker_17) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:06:25 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:06:25 DEBUG (SyncWorker_17) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:06:30 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:06:30 DEBUG (SyncWorker_17) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:06:35 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:06:35 DEBUG (SyncWorker_17) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:06:40 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:06:40 DEBUG (SyncWorker_17) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:06:45 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:06:46 DEBUG (SyncWorker_17) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:06:50 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:06:51 DEBUG (SyncWorker_17) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - True, map name - retry, device retrieved - True
2022-05-16 12:06:55 DEBUG (SyncWorker_10) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:07:00 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:07:00 DEBUG (SyncWorker_10) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:07:05 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:07:05 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
2022-05-16 12:07:05 DEBUG (SyncWorker_10) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:07:10 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:07:10 DEBUG (SyncWorker_10) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:07:15 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:07:15 DEBUG (SyncWorker_10) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:07:20 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:07:20 DEBUG (SyncWorker_10) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:07:25 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:07:25 DEBUG (SyncWorker_10) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:07:30 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:07:30 DEBUG (SyncWorker_10) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:07:35 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:07:35 DEBUG (SyncWorker_10) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:07:40 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:07:41 DEBUG (SyncWorker_10) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-05-16 12:07:45 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2022-05-16 12:07:46 DEBUG (SyncWorker_10) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - True, map name - retry, device retrieved - True
2022-05-16 12:07:50 DEBUG (SyncWorker_21) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
@arman1371 @zhushp does this problem still exist?
@PiotrMachowski I tested it now with latest version and not worked. Same error as before. Maybe the problem is that this model does not support digital smart mapping and it just shows post mapping after cleaning finished. For me I can see the cleaning map after cleaning in Mi Home app: Options -> Cleaning history -> Select one of history to see the map. Also here They mentioned that:
view a post-cleanup map -> Compatible with the MiHome app only.
Oh, so you can't see a live map?
No, Just after cleaning map
Thanks a lot for taking a look at this issue. I can view the map now. But it seems I can't take control of it via the Lovelace Vacuum Map card at all.
I notice my card didn't auto generate the icons and tiles. Here's how my card looks like:

Here's the lovelace card configuration:
type: custom:xiaomi-vacuum-map-card
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
entity: vacuum.roborock_a11_fc27_robot_cleaner
vacuum_platform: default
Here's the configuration.yaml
camera:
- platform: xiaomi_cloud_map_extractor
host: !secret xiaomi_vacuum_host
token: !secret xiaomi_vacuum_token
username: !secret xiaomi_cloud_username
password: !secret xiaomi_cloud_password
country: cn
draw: ['all']
attributes:
- calibration_points
Petty much the same as recommendation.
@zhushp whether you can control it with the card or not depends on the integration that you use to add your vacuum to HA.
@PiotrMachowski oh I see. I am using hass-xiaomi-miot integration to add my vacuum to HA. To make it work, is that the vacuum_platform part of lovelace-xiaomi-vacuum-map-card I should look at?
@zhushp Xiaomi Miot integration is problematic, you can check out this issue
Can anybody tell me if there is a fix right now? I have the same problem with my Roborock S7. Oh I see the T7 is the S7. So the same problem as @zhushp . Back then I remember it worked. I got three maps and the logs look like this:
2022-06-06 04:48:24 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-06-06 04:48:29 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
2022-06-06 04:48:29 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-06-06 04:48:34 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-06-06 04:48:39 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-06-06 04:48:44 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-06-06 04:48:49 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:30
2022-06-06 04:48:49 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-06-06 04:48:50 INFO (SyncWorker_4) [pyfritzhome.fritzhome] Updating Devices ...
2022-06-06 04:48:50 INFO (SyncWorker_4) [pyfritzhome.fritzhome] Updating already existing Device 11934 0514446
2022-06-06 04:48:50 INFO (SyncWorker_4) [pyfritzhome.fritzhome] Updating already existing Device 11934 0514446-1
2022-06-06 04:48:54 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-06-06 04:48:59 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-06-06 04:49:05 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2022-06-06 04:49:10 DEBUG (SyncWorker_6) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - True, map name - retry, device retrieved - True
2022-06-06 04:49:19 DEBUG (SyncWorker_1) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
What I see is this:

@saschabrockel restarting your vacuum should help
@PiotrMachowski what do you mean with restarting? How to restart the roboter? I don't want to reset it.
@saschabrockel just turn it off and on again. You can do it by holding power button on the vacuum
@PiotrMachowski didn't help. Same problem.
@saschabrockel what is exact model code of your vacuum?
@PiotrMachowski Roborock S7 with firmware 4.1.5_1500. Product ID is S702-00.
@saschabrockel I meant one in this format: roborock.vacuum.a11
@PiotrMachowski ah sorry. roborock.vacuum.a15 is the model
Something must be blocked somewhere. Vacuum must be in the same network as HA, vacuum and HA must be able to access Xiaomi cloud for map extractor to work properly
@PiotrMachowski that is all applying. It is the same network. I mean it worked back then. The token is also correct.
@saschabrockel have you checked token with tokens extractor?
@PiotrMachowski ahhhhhh I'm so sorry. It works. I found the reason. I've added a repeater to my network and the robot connected to it and changed its IP. So of course the host IP I have defined in the secrets was wrong...
@saschabrockel Ok, that's great 👍 I will mark this conversation as off-topic, as original problem is different