Closed PiotrMachowski closed 2 years ago
Hi @PiotrMachowski, I own a Z10 pro. I think is the same as L10.
I check valetudo code. It needs "only" to convert that js file into python, right? I could help with this, but how can i configure a developing environment and a testing area? Is there somewhere documentation?
I never created implementation for HA, i don't know where start and what is needed for doing it, but i would help. Thank you.
Hi @davideZavattero
Yes, that's the "only" thing that has to be done.
For development you can use get_map.py script.
You have to include your implementation here (create image_handler.py
and map_data_parser.py
like in other platforms), the rest code should be already prepared for working with Dreame.
You can DM on HA forum with any problems
Hi! I just got a new Xiaomi 1C, exactly the model mentioned on the first comment (dreame.vacuum.mc1808). But when I set up the .yaml like you said I got this: Do I something wrong?
When I try the retrieving map with this command:
Open terminal and use the following command to copy file: docker exec homeassistant bash -c "mkdir -p /config/tmp/ && cp /tmp/map_* /config/tmp/"
I got:
cp: omitting directory '/tmp/map_*'
@facutopa as you see this vacuum model is currently not supported by map extractor, so you won't get map image.
If you want to receive raw map data to send it to me then you don't have to, I already have map from this model
@facutopa as you see this vacuum model is currently not supported by map extractor, so you won't get map image.
If you want to receive raw map data to send it to me then you don't have to, I already have map from this model
So If I understand, I can't use "Xiaomi Vacuum Map Card" right? Or sending to you the map is someway possible? Sorry, my english is bad and I understanded that send you the map is for help you to solve this issue, right?
You can use it with map screenshot instead of live map, but it's much harder than using extractor.
I need maps to test implementation for Dreame vacuums in the future
Hi @davideZavattero
Yes, that's the "only" thing that has to be done.
For development you can use get_map.py script. You have to include your implementation here (create
image_handler.py
andmap_data_parser.py
like in other platforms), the rest code should be already prepared for working with Dreame.You can DM on HA forum with any problems
Ok, thank you. i'll try during holydays.
@davideZavattero Do you have any progress? Can I help with anything? :)
Sigh... Dreame Bot L10 Pro
@PiotrMachowski can you share some commands helpful for a faster debugging/developing? something like:
put the file
map_data_dreame.vacuum.p2041o.b64
in the dreame folder that executepython xiaomi_cloud_map_extractor/dreame/map_data_parser.py parse
and you should find the generated.png
in the same folder
@FrancYescO I think I can prepare something like this, I already have similar scripts
@PiotrMachowski
Do you need an extracted map for Z10 Pro? I can share if it would help
@Techfreak96 thanks, I already have a map from this model
@FrancYescO @davideZavattero I have prepared a nice and easy to use script that will download a map from cloud or parse an already downloaded one: map processor
I tried this with the dreame d9 max (dreame.vacuum.p2259). When i use the map processor script i get a ~5KB b64 file and the not supported image. When i use the store raw configuration i also get the the b64 file but the logging always says:
Retrieving map from Xiaomi cloud
Map data retrieved
Map is empty
The map extractor script:
Validating configuration file: camera.yaml
Configuration validation successful
Downloading map data...
Map data successfully saved to "camera" directory!
I have a map in the Mi Home app. Would the b64 file helpful to implement it?
@manujedi You can send me this file as well as screenshot from Mi Home app, I probably don't have a map from this model yet
is the b64 file the map? As the map extractor expects a *.gz file so i wasn't sure. Thanks
@manujedi yes, different models provide different file formats:
xiaomi -> gz
viomi -> zlib
roidmi -> gz
dreame -> b64
Perfect thanks, will send you the files
hello, Is the support going well? I really want to use this integration, is there any way to help? (because I'm a developer, maybe I can help)
Thanks
Hi @Nicooow,
Personally I don't do it, maybe @FrancYescO and @davideZavattero have done something. There is a link to a working implementation written in JavaScript in the first comment, it needs to be rewritten in Python
Hi @Nicooow,
Personally I don't do it, maybe @FrancYescO and @davideZavattero have done something. There is a link to a working implementation written in JavaScript in the first comment, it needs to be rewritten in Python
unfortunately i can only do small basics in python and co. has anyone already written something to fall back on?
ok I'll look at next week to do this, there shouldn't be any problem
Nothing about Dreame D9? DÃŪs you receive my map, @PiotrMachowski ?
@kisjeth I think I did. I have a lot of maps for many different vacuums, I will test all of them before release.
@kisjeth I think I did. I have a lot of maps for many different vacuums, I will test all of them before release.
Ok tnks! Anyway great job!
@PiotrMachowski could you just quickly explain to me what image_handler.py
is for?
@Nicooow
map_data_parser.py
- parses whole raw binary map file
image_handler.py
- parses map image data
You can DM on HA forum with any problems
Just sent an email with a screenshot and raw map for MOVA L600 or Dreame F9/D9 (similar) (Dreame p2157). Thank you so much. Can't wait to use it =)
Hi @PiotrMachowski you are doing really grate job! I am also seeing no support alert for one of my robots - dreame.vacuum.mb1808 . What exactly should I send to you right now?
@Pxvvxp you can send me map_data_dreame.vacuum.mb1808.b64
file + screenshot from Xiaomi Home.
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
store_map_raw: true
force_api: dreame
store_map_path: "/config"
Hello @PiotrMachowski, I just wanted to make sure you received my email with screenshot + file for mb1808 and if I did everything fine. Thanks in advance.
@Pxvvxp yup, everything is ok
Hello ð
I've got a dreame.vacuum.p2008
model and I'm currently working on transcribing Valetudo's javascript code for map parsing of Dreame
models.
I'm quite comfortable with Javascript, but I'm just discovering Python so it's taking me a little while.
Here is the actual map I can generate with my model :
You can see floor, walls, charger and vaccum position as well as no go areas.
I also implemented path parsing, but the dreame map contains several paths and the MapData
can only contain one if I understand correctly. I tried to flatten the list but it causes unwanted interconnections between paths :
I have a lot of work to do and I will submit a P.R if you're intesrested @PiotrMachowski
Nice ð I think I can add support for multiple paths without any problems. You can create a PR, I will check it out and adjust if needed ð
ð It's wonderful to see progress on this!
Is this intended to pull data from the cloud or directly from the robot? I've blocked internet access in the router and control it via xiaomi_vacuum.
@PulsarFX well, the name contains the word "cloud"... ð
nevermind :nerd_face: :exploding_head: This would be a valetudo only feature, then?
Yup, if you want to remain cloud-free
Did someone already start (or has ben successfull) to add support for the Dreame D9 Pro (dreame.vacuum.p2187) if not, does anyone plan to do that so we could join forces?
I probably go for a Dreame bot w10. Is there any chance this robot will be included in this feature in the future or is it impossible?
@RaJeronimo I think it will
I have send the raw map file and a screenshot to support dreame.vacuum.p2041o. Tia!
Will the Dreame Z10 Pro (dreame.vacuum.p2028) also added?
@mirkin1993 I think so
A noob question - is the support for "Dreame" vacuums includes also the vacuum functionality like "goto" on the xiaomi-vacuum-map-card?
@aviadlevy this is a completely different thing. Map card has to support integration used to control vacuum.
Is there any update on this. I would love to have mc1808 supported
Vacuums confirmed to use this API:
dreame.vacuum.p2008
(Dreame F9)dreame.vacuum.mc1808
(Xiaomi Mi Mop/Xiaomi Miija 1C)You can help in implementation of this feature by sending your map file and a screenshot from Xiaomi app at
piotr.machowski.dev [at] gmail [dot] com
.To get raw map file you have to use following config:
and then follow steps provided in documentation: Retrieving map.
Existing implementation of map decoder