Commit d152ed1
Fix viomi map download by triggering a cloud map upload
Viomi vacuums do not keep a map in the cloud. They upload the current map only when sent the set_uploadmap miio command, and the uploaded map is stored as cloud object "1" (not "0"). ViomiCloudVacuum therefore always failed to download a map with "Object Not Found".
ViomiCloudVacuum now overrides get_map_name() to send set_uploadmap through the existing cloud miio relay (get_other_info -> /v2/home/rpc/<device_id>) before returning map name "1". This keeps the viomi platform pure-cloud, with no local connection added. On a failed upload it returns None so the caller raises FailedMapDownloadException and retries.
Also widens get_other_info's parameters annotation to dict | list: legacy miio commands such as set_uploadmap take positional list params.
Verified end-to-end against a live viomi.vacuum.v8.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 688fe3e commit d152ed1
2 files changed
Lines changed: 24 additions & 1 deletion
File tree
- custom_components/xiaomi_cloud_map_extractor/connector
- vacuums
- xiaomi_cloud
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
7 | 20 | | |
8 | 21 | | |
9 | 22 | | |
| |||
29 | 42 | | |
30 | 43 | | |
31 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
717 | | - | |
| 717 | + | |
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
| |||
0 commit comments