Hi Lindsay.
Unfortunately this is not ready yet
I think I will try to incorporate it into the main repo, what do you think?
That would be great, but as I said, itās not ready yet.
I have a new version that Iāll push once Iāve tested it a bit where I replaced the mqtt connection with HASSās own mqtt. You only have add the valetudo map data camera to the config instead of mqtt connection details.
And, as mentioned above, there are still some scaling/coordinate translation issues I need to wrap my head around.
Once Iāve sorted that out Iāll open a PR to integrate it into the main repo.
The problem is that I plan to make some bigger refactor soon, which will make it harder to integrate your changes. Maybe you can merge it in parts, to dev
branch?
Hello,
Recently, i think after one of the upgrades i started to have this error and my entity is no more availaable:
Error occurred loading configuration flow for integration xiaomi_miio: cannot import name 'ROCKROBO_S7_MAXV' from 'miio.integrations.vacuum.roborock.vacuum' (/usr/local/lib/python3.10/site-packages/miio/integrations/vacuum/roborock/vacuum.py)
I try to reinstall the integration but without any success.
Please let me know you advice.
im running:
Home Assistant 2023.3.6
Supervisor 2023.03.2
Operating System 9.5
Frontend 20230309.1 - latest
Thanks,
Alin.
This error is related to Xiaomi Miio integration, not Map Extractor
Do you have any suggestion for me?
Thanks,
Alin.
You probably use some custom integration that forces a specific version of python-miio
package. You can check it in manifest.json
files. Map Extractor doesnāt need a specific version, so the error is not caused by it.
For others, into the manifest i chaanged the version of miio from python-miio==0.5.9
to python-miio==0.5.12
Seems .10 is not anymore available in HA (that was the previous value in my deployment). This changed solved the problem.
Thanks @3_14 because you drived me to reasearch in that direction.
Thanks,
Alin.
This doesnāt seem to work with roborock.vacuum.a38 (Q7 Max). It works fine with my S5 Max but not the other one. Does anyone have any ideas?
Itās there anything in logs?
I get these lines in the log:
2023-04-05 08:37:06.430 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2023-04-05 08:37:11.431 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
2023-04-05 08:37:11.432 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
2023-04-05 08:37:11.539 WARNING (SyncWorker_9) [custom_components.xiaomi_cloud_map_extractor.camera] Got exception while fetching the state: Unable to discover the device 192.168.0.164
2023-04-05 08:37:14.066 ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching J Edgar Hoover data
I can connect to the machine and it responds, so there is no problem with the wifi and the card works flawless with my S5 Max.
Does your vacuum (the problematic one) work with built-in Xiaomi Miio integration?
Is it named J Edgar Hoover
and have IP 192.168.0.164
?
Yes to both questions. J Edgar Hoover (Q7 Max) works with the integration and has ip 192.168.0.164
- Compare token with one retrieved with Tokens Extractor
- Restart your vacuum by holding start button
- If steps above didnāt help remove working vacuum from config, [enable debug logging] and restart HA. Check and send logs here
Iām a bit uncertain regarding how to post the debug log since its HUGE.
The log with just warnings gives me this:
2023-04-06 14:33:18.546 WARNING (MainThread) [homeassistant.helpers.entity] Update of camera.xiaomi_cloud_map_extractor is taking over 10 seconds
2023-04-06 14:34:43.569 WARNING (MainThread) [homeassistant.components.camera] Updating xiaomi_cloud_map_extractor camera took longer than the scheduled update interval 0:00:05
Is that at all useful?
The token extractor gives me the same token, so thatās not the issue. I have power cycled the vacuum and restarted home assistant.
My camera.yaml looks like this:
- platform: xiaomi_cloud_map_extractor
host: !secret xiaomi_vacuum_host
token: !secret xiaomi_miio_vacuum_token
username: !secret xiaomi_cloud_username
password: !secret xiaomi_cloud_password
draw: #['all']
- charger
- cleaned_area
- goto_path
- vacuum_position
- path
- predicted_path
attributes:
- calibration_points
colors:
color_map_inside: [50, 50, 50]
color_map_outside: [0, 0, 0]
color_map_wall: [245, 245, 245]
color_map_wall_v2: [230, 230, 230]
color_grey_wall: [120, 120, 120]
color_ignored_obstacle: [255, 255, 255, 127]
color_ignored_obstacle_with_photo: [255, 255, 255, 127]
color_obstacle: [255, 255, 255, 127]
color_obstacle_with_photo: [255, 255, 255, 127]
color_path: [50, 250, 30]
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_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: [150, 200, 130]
color_robo: [255, 0, 0]
color_room_names: [0, 0, 0]
color_unknown: [0, 0, 0]
color_scan: [0xDF, 0xDF, 0xDF]
room_colors:
1: [120, 120, 120]
2: [120, 120, 120]
3: [120, 120, 120]
4: [120, 120, 120]
5: [120, 120, 120]
6: [120, 120, 120]
7: [120, 120, 120]
8: [120, 120, 120]
9: [120, 120, 120]
10: [120, 120, 120]
11: [120, 120, 120]
12: [120, 120, 120]
13: [120, 120, 120]
14: [120, 120, 120]
15: [120, 120, 120]
16: [120, 120, 120]
17: [120, 120, 120]
18: [120, 120, 120]
19: [120, 120, 120]
20: [120, 120, 120]
21: [120, 120, 120]
22: [120, 120, 120]
23: [120, 120, 120]
24: [120, 120, 120]
25: [120, 120, 120]
26: [120, 120, 120]
27: [120, 120, 120]
28: [120, 120, 120]
29: [120, 120, 120]
30: [120, 120, 120]
31: [120, 120, 120]
32: [120, 120, 120]
33: [120, 120, 120]
34: [120, 120, 120]
35: [120, 120, 120]
map_transformation:
scale: 2
#rotate: 180
trim:
top: 18
bottom: 18
left: 14
right: 14
EDIT:
Ok so i found something in the logs:
2023-04-06 15:11:55.291 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieved device model: roborock.vacuum.a38
2023-04-06 15:11:55.291 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Created device, used api: xiaomi
2023-04-06 15:11:55.291 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2023-04-06 15:11:55.447 WARNING (SyncWorker_8) [miio.device] Found an unsupported model 'roborock.vacuum.a38' for class 'RoborockVacuum'. If this is working for you, please open an issue at https://github.com/rytilahti/python-miio/
2023-04-06 15:11:55.468 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2023-04-06 15:11:55.468 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2023-04-06 15:11:55.591 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2023-04-06 15:11:55.591 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2023-04-06 15:11:55.713 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2023-04-06 15:11:55.713 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2023-04-06 15:11:55.835 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2023-04-06 15:11:55.835 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2023-04-06 15:11:55.957 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2023-04-06 15:11:55.957 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2023-04-06 15:11:56.079 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2023-04-06 15:11:56.079 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2023-04-06 15:11:56.201 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2023-04-06 15:11:56.201 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2023-04-06 15:11:56.322 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2023-04-06 15:11:56.323 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2023-04-06 15:11:56.445 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2023-04-06 15:11:56.445 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Retrieving map name from device
2023-04-06 15:11:56.572 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Map name retry
2023-04-06 15:11:56.572 DEBUG (SyncWorker_8) [custom_components.xiaomi_cloud_map_extractor.camera] Unable to retrieve map, reasons: Logged in - True, map name - retry, device retrieved - True
It looks like this model doesnāt support getting map name. Can you try using different apis: force_api: viomi
, force_api: roidmi
, force_api: dreame
?
How do you get it to generate rooms config? Itās always greyed out for me.
Dude! Thanks, not sure how I missed that.