Open arsenal3008 opened 2 years ago
You have to send me raw map file to make anything possible. Add following lines to config of Map Extractor:
store_map_raw: true
store_map_path: /config
After restart there should be a raw map file created in /config
directory
this is?
Yup. You should get a map file with extension .unknown
there is nothing
In this case there should be something in logs
what log to give you? home-assistant.log home-assistant.log.1
First one (home-assistant.log)
Try 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']
attributes:
- calibration_points
store_map_raw: true
store_map_path: /config
force_api: roidmi
and check if a file appeared
Also I think that you might have provided an invalid token. Can you confirm it is the same as one retrieved by Tokens Extractor? If it is the same you can try config from comment above
everything turned out you were right the token is not the same map_data_chuangmi.vacuum.hmi707.zip
map_data_chuangmi.vacuum.hmi707.gz file appeared map_data_chuangmi.vacuum.hmi707.gz
there are more files
I see that the map image appeared as well. Was it after you used force_api: roidmi
in your config?
yes
Ok, I will add it to supported vacuums.
This is a problem with your config of map card. What integration do you use to add vacuum to HA?
token which is in mi home properties or insert which Tokens Extractor?
Nooo, not camera
. How have you added your vacuum to HA? (not its map)
Xiaomi MIoT
I thought so... This integration is problematic to use with map card, you have to configure it manually by yourself. Discussion: https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/issues/251 Example configs: https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/discussions/406
which file should be edited?
It is in yaml config of Xiaomi Vacuum Map Card. Map Extractor part is done.
No, this is a code of the card itself. You have to go to your dashboard, click open edit mode, edit map card and open YAML editor
Yup
I'm afraid to spoil what I need to write?
You won't break anything by editing this config. Unfortunately this is the part you need to do by yourself. Your config should look more or less like this:
type: custom:xiaomi-vacuum-map-card
entity: vacuum.xiaomi_vacuum
map_source:
camera: camera.xiaomi_cloud_map_extractor
calibration_source:
camera: true
map_modes:
- template: vacuum_clean_segment
max_selections: 1
repeats_type: EXTERNAL
max_repeats: 5
service_call_schema:
service: xiaomi_miot.call_action
service_data:
entity_id: '[[entity_id]]'
siid: 2
aiid: 6
params:
- piid: 9
value: '[[[selection_unwrapped]]]'
force_params: true
predefined_selections:
# HERE YOU HAVE TO PROVIDE ROOMS
Getting rooms: https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/discussions/317
entity_id: '[[entity_id]]' ? siid: 2 ? aiid: 6 ? params:
nothing (I have updated it, there were mismatched brackets). Documentation: https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card#supported-templates
Please bear in mind that config I have pasted above is just a wild guess, I can't validate if it will work with your vacuum
sorry, I'm not a programmer and I can't figure it out without the help of the one who wrote the code
Ok, you can try to call xiaomi_miot.call_action
with appropriate data using dev tools:
You can start with following config:
service: xiaomi_miot.call_action
service_data:
entity_id: vacum.hmi707_cloud_787133
siid: 2
aiid: 6
params:
- piid: 9
value: '[1, 11, 14, 16]' # here you can provide IDs of your rooms
force_params: true
When you succeed you can send service call data here and I will help with card setup.
Failed to call service xiaomi_miot.call_action. Unable to find service xiaomi_miot.call_action
Which integration do you use? https://github.com/al-one/hass-xiaomi-miot or https://github.com/ha0y/xiaomi_miot_raw
Xiaomi Miot For HomeAssistant https://github.com/al-one/hass-xiaomi-miot
Failed to call service xiaomi_miot.call_action. required key not provided @ data['aiid']. Got None required key not provided @ data['siid']. Got None
Try this one:
service: xiaomi_miot.call_action
data:
entity_id: vacum.hmi707_cloud_787133
siid: 2
aiid: 6
params:
- piid: 9
value: '[1, 11, 14, 16]' # here you can provide IDs of your rooms
force_params: true
I don't understand the syntax, but somewhere is an error
service: xiaomi_miot.call_action
data:
entity_id: vacum.hmi707_cloud_787133
siid: 2
aiid: 6
params:
- piid: 9
value: '[1, 11, 14, 16]'
force_params: true
service: xiaomi_miot.call_action data: entity_id: vacuum.hmi707_cloud_787133 siid: 2 aiid: 6 params:
Failed to call service vacuum/send_command
Failed to call service vacuum/send_command
It won't work. You have to use xiaomi_miot.call_action
I don't know where to write this
Can you advise tomorrow afternoon?
You already did it here. You should be able to get some help in https://github.com/al-one/hass-xiaomi-miot repository
Checklist
piotr.machowski.dev [at] gmail.com
(Retrieving map; please provide your GitHub username in the email)What vacuum model do you want to be supported?
IMILAB V1
What is its name?
chuangmi.vacuum.hmi707
Available APIs
Errors shown in the HA logs (if applicable)
No response
Other info
No response