Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor
Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor copied to clipboard
Invalid calibration camera_image
Checklist
- [x] I have updated the integration to the latest version available
- [x] I have checked if the problem is already reported
The problem
Hi. I've tried to make it works but i have this error: Invalid calibration. Please check your configuration. Can anyone help me?
What version of an integration has described problem?
v2.2.3
What was the last working version of an integration?
No response
What vacuum model do you have problems with?
S6 Pure
What version of Home Assistant do you use?
2025.2.5
What type of installation are you running?
Home Assistant OS
Camera's configuration
camera:
- platform: xiaomi_cloud_map_extractor
host:
token:
username:
password:
country: "de"
name: "My Vacuum Camera"
colors:
color_map_inside: [32, 115, 185]
color_map_outside: [19, 87, 148]
color_map_wall: [100, 196, 254]
color_map_wall_v2: [93, 109, 126]
color_grey_wall: [93, 109, 126]
color_ignored_obstacle: [0, 0, 0, 127]
color_ignored_obstacle_with_photo: [0, 0, 0, 127]
color_obstacle: [0, 0, 0, 127]
color_obstacle_with_photo: [0, 0, 0, 127]
color_path: [147, 194, 238]
color_mop_path: [255, 255, 255, 0x5F]
color_goto_path: [0, 255, 0]
color_predicted_path: [255, 255, 0, 0]
color_cleaned_area: [127, 127, 127, 127]
color_zones: [0xAD, 0xD8, 0xFF, 0x8F]
color_zones_outline: [0xAD, 0xD8, 0xFF]
color_virtual_walls: [255, 0, 0]
color_carpets: [0xA9, 0xF7, 0xA9 ]
color_no_carpet_zones: [255, 33, 55, 0x5F]
color_no_carpet_zones_outline: [255, 0, 0]
color_new_discovered_area: [64, 64, 64]
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_room_names: [0, 0, 0]
color_unknown: [0, 0, 0]
color_scan: [0xDF, 0xDF, 0xDF]
room_colors:
1: [240, 178, 122]
2: [133, 193, 233]
3: [217, 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]
draw:
- charger
- cleaned_area
- goto_path
- ignored_obstacles
- ignored_obstacles_with_photo
- mop_path
- no_carpet_zones
- no_go_zones
- no_mopping_zones
- obstacles
- obstacles_with_photo
- path
- predicted_path
- room_names
- vacuum_position
- virtual_walls
- zones
texts:
- text: "Room 1"
x: 25
y: 25
color: [125, 20, 213]
- text: "Room 2"
x: 25
y: 75
color: [125, 20, 213, 127]
font: "FreeSans.ttf"
font_size: 25
map_transformation:
scale: 2
rotate: 180
trim:
top: 10
bottom: 20
left: 30
right: 40
sizes:
charger_radius: 4
vacuum_radius: 6.5
path_width: 1
mop_path_width: 16
obstacle_radius: 3
ignored_obstacle_radius: 3
obstacle_with_photo_radius: 3
ignored_obstacle_with_photo_radius: 3
attributes:
- calibration_points
- carpet_map
- charger
- cleaned_rooms
- country
- goto
- goto_path
- goto_predicted_path
- image
- is_empty
- map_name
- mop_path
- no_carpet_areas
- no_go_areas
- no_mopping_areas
- obstacles
- ignored_obstacles
- obstacles_with_photo
- ignored_obstacles_with_photo
- path
- room_numbers
- rooms
- vacuum_position
- vacuum_room
- vacuum_room_name
- walls
- zones
scan_interval:
seconds: 10
auto_update: true
store_map_raw: false
store_map_image: true
store_map_path: "/tmp"
force_api: xiaomi
Errors shown in the HA logs (if applicable)
Additional information
No response
You have used the config that has been explicitly marked as something you shouldn't use. Use the following one instead:
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']
attributes:
- calibration_points
- rooms
Hi,
Thank you for your answer. Still i have this issue. What can i do ?
This is not an issue, it is just an info. Here is your camera entity:
Okay. I see it but when i'm trying to acces and view the map.. This is what i see
Anything in HA logs?
Logger: homeassistant.components.camera
Source: helpers/entity_platform.py:1039
integration: Camera (documentation, issues)
First occurred: 18:18:05 (1 occurrences)
Last logged: 18:18:05
Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
and
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:960
First occurred: 18:10:46 (798 occurrences)
Last logged: 19:17:24
Update for camera.xiaomi_cloud_map_extractor fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 960, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1320, in async_device_update
await hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 279, in update
self._handle_device()
~~~~~~~~~~~~~~~~~~~^^
File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 315, in _handle_device
country, user_id, device_id, model = self._connector.get_device_details(self._vacuum.token, self._country)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_cloud_map_extractor/common/xiaomi_cloud_connector.py", line 238, in get_device_details
return self.get_device_details_from_home(token, country)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_cloud_map_extractor/common/xiaomi_cloud_connector.py", line 217, in get_device_details_from_home
if match := next(matching_token, None):
~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_cloud_map_extractor/common/xiaomi_cloud_connector.py", line 208, in get_devices_iter
for home in homes:
^^^^^
File "/config/custom_components/xiaomi_cloud_map_extractor/common/xiaomi_cloud_connector.py", line 169, in get_homes_iter
if homelist := response["result"]["share_home_list"]:
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
KeyError: 'share_home_list'
Please help me..
Do you use a shared home in Xiaomi Home?
I m the owner.. I didn t share it to another person.
Ok, in that case the token might be invalid. Which tool have you used to get it?
An old apk application. It worked for a while about 1 year ago and now i have time and i want to make it works.
If you are willing to try the version that might be a bit unstable then I would suggest to try the alpha version of this integration. It should be easier to set up, will get a token on its own and won't have Xiaomi ban issues.
https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor/releases/tag/v3.0.0-alpha-3
You can install it using HACS by manually selecting this version. After installing you have to remove camera config from configuration.yaml, restart HA and configure Map Extractor using UI.
Thank you for all your help and time. I'll try.
Worked for me flawlessly. Thank You. (Beta 3)
Here Beta 3 didn't solve it! I have the same problem!
Registrador: homeassistant.components.automation.update_map_extractor_camera Fonte: components/automation/init.py:717 integração: Automação (documentação, problemas) Ocorreu pela primeira vez: 15:35:34 (15 ocorrências) Último registro: 15:49:38
While executing automation automation.update_map_extractor_camera Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/automation/init.py", line 717, in async_trigger return await self.action_script.async_run( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ variables, trigger_context, started_action ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1828, in async_run return await asyncio.shield(create_eager_task(run.async_run())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step self._handle_exception( ~~~~~~~~~~~~~~~~~~~~~~^ ex, continue_on_error, self._log_exceptions or log_exceptions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 556, in _handle_exception raise exception File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 715, in _async_step_choose await self._async_run_script(script) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 632, in _async_run_script result = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<6 lines>... ) ^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1828, in async_run return await asyncio.shield(create_eager_task(run.async_run())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step self._handle_exception( ~~~~~~~~~~~~~~~~~~~~~~^ ex, continue_on_error, self._log_exceptions or log_exceptions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 556, in _handle_exception raise exception File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 715, in _async_step_choose await self._async_run_script(script) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 632, in _async_run_script result = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<6 lines>... ) ^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1828, in async_run return await asyncio.shield(create_eager_task(run.async_run())) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 460, in async_run await self._async_step(log_exceptions=False) File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 526, in _async_step self._handle_exception( ~~~~~~~~~~~~~~~~~~~~~~^ ex, continue_on_error, self._log_exceptions or log_exceptions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 556, in _handle_exception raise exception File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1009, in _async_step_call_service response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<9 lines>... ) ^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2794, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2837, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ hass, entity, func, data, call.context ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 767, in async_turn_on await self.hass.async_add_executor_job(self.turn_on) File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 763, in turn_on raise NotImplementedError NotImplementedError
Registrador: homeassistant.components.automation.update_map_extractor_camera Fonte: helpers/script.py:524 integração: Automação (documentação, problemas) Ocorreu pela primeira vez: 15:35:34 (45 ocorrências) Último registro: 15:49:38
Update Map Extractor camera: Choose at step 1: choice 2: Choose at step 1: choice 1: Error executing script. Unexpected error for call_service at pos 1: Update Map Extractor camera: Choose at step 1: choice 2: Error executing script. Unexpected error for choose at pos 1: Update Map Extractor camera: Error executing script. Unexpected error for choose at pos 1: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 524, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1009, in _async_step_call_service response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<9 lines>... ) ^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 624, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2794, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2837, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1007, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ hass, entity, func, data, call.context ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1079, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 767, in async_turn_on await self.hass.async_add_executor_job(self.turn_on) File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/components/camera/init.py", line 763, in turn_on raise NotImplementedError NotImplementedError
Este erro originou-se de uma integração personalizada.
Registrador: custom_components.xiaomi_cloud_map_extractor.connector.vacuums.base.vacuum_base Fonte: custom_components/xiaomi_cloud_map_extractor/connector/vacuums/base/vacuum_base.py:83 integração: Xiaomi Cloud Map Extractor (documentação, problemas) Ocorreu pela primeira vez: 13:54:07 (24 ocorrências) Último registro: 15:49:28
FailedMapDownloadException
@LeandroIssa logs from your first two comments are for the automation, not this component. I suspect you still use the blueprint to refresh the camera. It won't work with v3+
Which vacuum model do you have?
@LeandroIssa logs from your first two comments are for the automation, not this component. I suspect you still use the blueprint to refresh the camera. It won't work with v3+
Which vacuum model do you have?
You're right, I was using the blueprint, I didn't know I couldn't use it in v3! I turned off blueprint automation but the camera still hasn't appeared. My Roborock is the Roborock S5
Disable the integration, hard reboot the vacuum and re-enable the integration when the map will be back in Xiaomi Home
Disable the integration, hard reboot the vacuum and re-enable the integration when the map will be back in Xiaomi Home
Thank you, the map is back!
@LeandroIssa that's great 👍
KeyError: 'share_home_list'
Worked for me flawlessly. The map is back! Thank You. (Beta 3).
After update to Core 2025.3.4 error: This error originated from a custom integration.
Logger: custom_components.xiaomi_cloud_map_extractor.coordinator Source: helpers/update_coordinator.py:380 integration: Xiaomi Cloud Map Extractor (documentation, issues) First occurred: 5:55:16 PM (4 occurrences) Last logged: 5:57:15 PM
Unexpected error fetching xiaomi_cloud_map_extractor data Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 380, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 281, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/xiaomi_cloud_map_extractor/coordinator.py", line 35, in update_data return await self.connector.get_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/xiaomi_cloud_map_extractor/connector/init.py", line 65, in get_data await self._get_map() File "/config/custom_components/xiaomi_cloud_map_extractor/connector/init.py", line 117, in _get_map await self._update() File "/config/custom_components/xiaomi_cloud_map_extractor/connector/init.py", line 84, in _update map_data, map_saved, map_raw_data = await self._vacuum_connector.get_map() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/xiaomi_cloud_map_extractor/connector/vacuums/base/vacuum_base.py", line 91, in get_map map_data = self.decode_and_parse(raw_map_data) File "/config/custom_components/xiaomi_cloud_map_extractor/connector/vacuums/base/vacuum_base.py", line 67, in decode_and_parse return self.map_data_parser.parse(decoded_map) ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/vacuum_map_parser_roborock/map_data_parser.py", line 183, in parse image, rooms = self._parse_image( ~~~~~~~~~~~~~~~~~^ img_data_length, ^^^^^^^^^^^^^^^^ ...<3 lines>... map_data.carpet_map, ^^^^^^^^^^^^^^^^^^^^ ) ^ File "/usr/local/lib/python3.13/site-packages/vacuum_map_parser_roborock/map_data_parser.py", line 227, in _parse_image image, rooms_raw = self._image_parser.parse(data, image_width, image_height, carpet_map) ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/vacuum_map_parser_roborock/image_parser.py", line 31, in parse cached_colors = self._colors_palette.cached_colors ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'ColorsPalette' object has no attribute 'cached_colors'
@vlad36N restart of HA should help
Restart helps
Hi @PiotrMachowski,
thanks for all the help on this matter to the community. I have a xiaomi s10+ and the same error, it didn't import the coordinate points. It's the device that is not compatible with this integration? I'm new int o home assistant and i'm still taking the pulse into all this stuff.
Cheers
Hey @PiotrMachowski
Intended to be used with an older Roborock S5.
- commented removed older code in configuration.yaml
- remove cloud extrator from HACS entirely
- reboot
- Download alpha3
- reboot
- trying to setup integration but
You can add this integration by including it in your 'configuration.yaml'. See the documentation for more information.
What am i doing wrong?
@abacao You have to configure it using UI
If it doesn't work it most probably mean that alpha version was not installed correctly
@PiotrMachowski
Any suggestions on how to install it correctly? I have used the HACS and enforced the alpha3 to do be installed.
I'm currently on the most updated system Core 2025.4.2 Supervisor 2025.04.0 Operating System 15.2 Frontend 20250411.0
It should be ok. You can download it again and check version in config/custom_components/xiaomi_cloud_map_extractor/manifest.json and restart again