Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request new Vacuum Xiaomi s12 #460

Open
2 of 7 tasks
alejarvis opened this issue Aug 19, 2023 · 83 comments
Open
2 of 7 tasks

Request new Vacuum Xiaomi s12 #460

alejarvis opened this issue Aug 19, 2023 · 83 comments
Assignees
Labels
enhancement New feature or request new platform

Comments

@alejarvis
Copy link

alejarvis commented Aug 19, 2023

Checklist

  • I have updated the integration to the latest version available
  • I have checked if the vacuum/platform is already requested
  • I have sent raw map file to 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?

xiaomi.vacuum.b106eu

What is its name?

Xiaomi Robot Vacuum S12

Available APIs

  • xiaomi
  • viomi
  • roidmi
  • dreame

Errors shown in the HA logs (if applicable)

2023-08-19 05:08:13.598 ERROR (MainThread) [homeassistant.helpers.entity] Update for camera.xiaomi_cloud_map_extractor fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 699, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 940, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 278, in update
    self._handle_map_data(map_name)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 335, in _handle_map_data
    map_data, map_stored = self._device.get_map(map_name, self._colors, self._drawables, self._texts,
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_cloud_map_extractor/common/vacuum.py", line 27, in get_map
    response = self.get_raw_map_data(map_name)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_cloud_map_extractor/common/vacuum.py", line 45, in get_raw_map_data
    map_url = self.get_map_url(map_name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/xiaomi_cloud_map_extractor/common/vacuum_v2.py", line 18, in get_map_url
    if api_response is None or "result" not in api_response or "url" not in api_response["result"]:
                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable

Other info

No response

@4ronos
Copy link

4ronos commented Oct 14, 2023

I'm joining the add request!

@4ronos
Copy link

4ronos commented Oct 20, 2023

@PiotrMachowski, please tell me if there is any reason why support for this vacuum cleaner is not yet available? (s12/s10) Is it a matter of time, or do mijia servers not provide a card for it?

@PiotrMachowski
Copy link
Owner

@4ronos it is not a simple process "just download a map image from a URL". API has to be found and map has to be parsed from a binary file that has an unknown structure. And I have a lot of other repositories to maintain. If you can find an already existing implementation (even not in python) then it would be much much easier for me.

@yopami
Copy link

yopami commented Oct 22, 2023

I need that too.
Thanks.

1 similar comment
@nineteen0815
Copy link

I need that too.
Thanks.

@vadss
Copy link

vadss commented Dec 8, 2023

Have the same model. Anything i can do to help to speed up the fix?

@daco77
Copy link

daco77 commented Dec 14, 2023

Hi, same vacuum for me.

@vadss
Copy link

vadss commented Dec 15, 2023

It's the same model as Xiaomi Robot Vacuum S10 B106GL, i don't think they changed something.

@casablancashub
Copy link

Yeah, it would be great to have that integration available

@Borty97
Copy link

Borty97 commented Feb 25, 2024

I have the same vacuum and I would like to help! I'm very interested supporting this model

@maksp86
Copy link

maksp86 commented Mar 1, 2024

I`ve done some research and succesfully downloaded map from xiaomi.vacuum.c103
I guess that would work with some newest models as well
The url for obtaining map file is https://api.io.mi.com/app/v2/home/get_interim_file_url_pro
Object name is ``{user_id}/{device_id}/0`` I only have one map on my vacuum, later I will try to create another one and check if it possible to download map by ``{user_id}/{device_id}/{map_name}``

It seems like map file is not in zlib/gz format, maybe it is encrypted. At that point I cannot say it exactly

@r-jean-pierre
Copy link

I could hep too, I just received a xiaomi.vacuum.b106eu

@Borty97
Copy link

Borty97 commented Mar 7, 2024

@maksp86 wich is the format of the payload? The URL is correct? I get {"code":0,"message":"auth err"} JSON response (without autentication 😓). How do you authenticate? Shall we add the {user_id}/{device_id}/{map_name} endpoint?

@maksp86
Copy link

maksp86 commented Mar 7, 2024

Update: I've got map decrypted by reverse engineering the mihome plugin for xiaomi.vacuum.c103 (i guess that would work not only for my vacuum). I will post some code later.
Now I have only one thing (some weird serial number) that I cant get from api

Some summary: encryption algorithm is a AES (ECB mode), pkcs7 padding
Key is generated from serial_num+owner_id+device_id

After decryption I got hex string, that represents some zlib inflated file, so I think map is in viomi format

@maksp86
Copy link

maksp86 commented Mar 8, 2024

This is a reverse-engeneered map encryption algorithm

from Crypto.Cipher import AES
from Crypto.Hash import MD5
from Crypto.Util.Padding import pad, unpad
import base64

isEncryptKeyTypeHex = True

def aesEncrypted(data, key: str):
    cipher = AES.new(key.encode("utf-8"), AES.MODE_ECB)

    encryptedData = cipher.encrypt(
        pad(data.encode("utf-8"), AES.block_size, 'pkcs7'))

    encryptedBase64Str = base64.b64encode(encryptedData).decode("utf-8")
    return encryptedBase64Str


def aesDecrypted(data, key: str):
    parsedKey = key.encode("utf-8")
    if isEncryptKeyTypeHex:
        parsedKey = bytes.fromhex(key)

    cipher = AES.new(parsedKey, AES.MODE_ECB)

    decryptedBytes = cipher.decrypt(base64.b64decode(data))
    decryptedData = unpad(decryptedBytes, AES.block_size, 'pkcs7')
    decryptedStr = decryptedData.decode("utf-8")
    return decryptedStr


def md5key(string: str, model: str, device_mac: str):
    pjstr = "".join(device_mac.lower().split(":"))

    tempModel = model.split('.')[-1]

    if len(tempModel) == 2:
        tempModel = "00" + tempModel
    elif len(tempModel) == 3:
        tempModel = "0" + tempModel

    tempKey = pjstr + tempModel
    aeskey = aesEncrypted(string, tempKey)

    temp = MD5.new(aeskey.encode('utf-8')).hexdigest()
    if isEncryptKeyTypeHex:
        return temp
    else:
        return temp[8:-8].upper()


def genMD5key(wifi_info_sn: str, owner_id: str, device_id: str, model: str, device_mac: str):
    arr = [wifi_info_sn, owner_id, device_id]
    tempString = '+'.join(arr)
    return md5key(tempString, model, device_mac)


def unGzipCommon(data: bytes, wifi_info_sn: str, owner_id: str, device_id: str, model: str, device_mac: str):
    tempKey = genMD5key(wifi_info_sn, owner_id, device_id, model, device_mac)
    base64map = base64.b64encode(data)

    tempString = aesDecrypted(base64map, tempKey)
    return tempString

P.S functions naming was taken from original code
Usage:

map_file = some_func_to_download_map() -> bytes
wifi_info_sn = "Weirdo looking string, that I got from attributes section of vacuum entity in Xiaomi Miot Auto"

image

unGzipCommon(map_file, wifi_info_sn, owner_id, device_id, model, device_mac)

@maksp86
Copy link

maksp86 commented Mar 8, 2024

@PiotrMachowski Think my research would help ;-)

@maksp86
Copy link

maksp86 commented Mar 8, 2024

vacuum_map_parser_dreame raised Unsupported frame type error
vacuum_map_parser_viomi parsed without errors but it seems like nothing is parsed
Also it prints in console "223371 bytes remained in the buffer"

parsed_map output
image

vacuum_map_parser_roborock raised IndexError: index out of range error somewhere in parsing code

I can send you a decrypted map file if you want

@xvolte
Copy link

xvolte commented Mar 20, 2024

I m also very interested for this integration for the S12
Did you send the raw map? (It is listed in the first post as « unticked »)
Thank you very much for your hard work!
@PiotrMachowski @maksp86

@xvolte
Copy link

xvolte commented Mar 23, 2024

Could you please attach or publish somewhere then decrypted map file (before using any parser / parsing obviously) but already decrypted, to save time ?
Thanks in advance

@maksp86
Copy link

maksp86 commented Mar 24, 2024

Could you please attach or publish somewhere then decrypted map file (before using any parser / parsing obviously) but already decrypted, to save time ? Thanks in advance

Here you go decrypted_encrypted_map_test.tar.gz

@maksp86
Copy link

maksp86 commented Mar 24, 2024

Also there is all files needed to download map from miot-based vacuum (3C Enchanced, S10/S12, ijai.vacuum.*)
map-download-kit-for-miot-vacuums.tar.gz
I`ve also added patch files for two components

@xvolte
Copy link

xvolte commented Mar 24, 2024

@

vacuum_map_parser_dreame raised Unsupported frame type error vacuum_map_parser_viomi parsed without errors but it seems like nothing is parsed Also it prints in console "223371 bytes remained in the buffer"

parsed_map output image

vacuum_map_parser_roborock raised IndexError: index out of range error somewhere in parsing code

I can send you a decrypted map file if you want

Maybe it is a dumb question but ... did you try the xiaomi map parser? what is the result ?

@maksp86
Copy link

maksp86 commented Mar 24, 2024

Maybe it is a dumb question but ... did you try the xiaomi map parser? what is the result ?

It fails on parsing.. at least for me
on line 55 of xiaomi_cloud_map_extractor\xiaomi\map_data_parser.py
block_type = MapDataParserXiaomi.get_int16(header, 0x00)

@xvolte
Copy link

xvolte commented Mar 24, 2024

For information, the vacuum does not allow connection if the PC is on another subnet.... i connected in the same subnet, and now got a different error ...

now it fails here :

    if wifi_info_sn == None:
        raise Exception("Get wifi_info_sn failed")

it is strange as in your code, you seem to be working with a config option ? WIFI_INFO_SN

Traceback (most recent call last): File "C:\Users\XXXX\Downloads\xiaomimapextractor\master\map_downloader.py", line 59, in <module> main() File "C:\Users\XXXX\Downloads\xiaomimapextractor\master\map_downloader.py", line 35, in main raise Exception("Get wifi_info_sn failed") Exception: Get wifi_info_sn failed

@maksp86
Copy link

maksp86 commented Mar 24, 2024

Are you on latest version of python-miio?
You should use lib from their master git branch

@xvolte
Copy link

xvolte commented Mar 24, 2024

yes i am.
I have a xiaomi.vacuum.b106eu, maybe there are small adaptation to make, i don't know. but i don't have the wierd looking wifi string.... mine looks like this :

device.get_property_by(7, 45)[0]["value"]

'value': '[0,3,1,3,2,0,-3600,15,12.0,0,"fr_FR","xx23xxxxxxx46","en_US",0,-1,0,0,1,2,1]' --> i did replace the numbers with some xxx

The user_id is NOT present in this sentence, nor there is any semi column in the text. (i saw you are looking for semicolumn)

version of my robot is 4.3.3_0016

@Tarh-76
Copy link

Tarh-76 commented Apr 24, 2024

It occurred to me that at least for S10 and Mijia 3C (and I suspect for all ijai models) the decompressed map is one big protobuf message (with nested messages of course). Some info on protobuf message encoding: https://protobuf.dev/programming-guides/encoding/
So, might be we should look for the description of this message structure / contract inside the plugin for a specific model.

@PiotrMachowski
Copy link
Owner

You can easily decode protobuf messages online (e.g. here), even without schema

@maksp86
Copy link

maksp86 commented Apr 25, 2024

Here is protobuf schema for map, extracted from Mi Home plugin code RobotMap.proto.gz it is same in my plugin and plugin provided to me by Tarh-76, so I think they are the same for all ijai.* and 3rd-gen Xiaomi vacuums
Also
@Tarh-76 did a great job researching plugin for his vacuum

@xvolte
Copy link

xvolte commented Apr 25, 2024

@4ronos : Were you able to do it ? what model do you have ?

@xvolte
Copy link

xvolte commented Apr 25, 2024

i don't know if It is of any importance, but when I do try the key "Mac address + tempModel[0:4] ", the error I get is
DEBUG ERROR Function : aesDecrypted : PKCS#7 padding is incorrect.

If I try anything OTHER THAN the "Mac address + tempModel[0:4] ", I have the following error:
DEBUG ERROR Function : aesDecrypted : Padding is incorrect.

@Tarh-76
Copy link

Tarh-76 commented Apr 25, 2024

i don't know if It is of any importance, but when I do try the key "Mac address + tempModel[0:4] ", the error I get is DEBUG ERROR Function : aesDecrypted : PKCS#7 padding is incorrect.

If I try anything OTHER THAN the "Mac address + tempModel[0:4] ", I have the following error: DEBUG ERROR Function : aesDecrypted : Padding is incorrect.

Did you try the original algorithm?

  1. first extract the digits from mac address (hex digits a..f should be lower case) - this should give you the string of length 12
  2. extract the rightmost part (after '.') of the model string - this should give you at most a 4-char string. If less - you should complete it with leading '0's (0x30 ascii). (In my case it is 'v17' transformed to '0v17')
  3. concatenate these two. You should get exactly a 16-char string
  4. ENCRYPT f"{wifi_info_sn}+{owner_id}+{device_id}" with the string you've got on step 3 using AES128
  5. get md5 hash of the result

And this is the key to be used to decrypt the map

@maksp86
Copy link

maksp86 commented Apr 26, 2024

Updated decryption kit, now with ability to save image of your map
Check requirements in map_downloader.py
Place all the files in decrypt_scripts directory in the root of downloaded repository

decrypt_scripts.tar.gz

@hugoquintal
Copy link

hugoquintal commented Apr 26, 2024

Hello @maksp86 and @Tarh-76 :) I need your help to progress and identify how the key is generated for b106eu. can you tell me how you decompiled mi home plugin? I know we are all spending free time and you already made very good progress so i thank you a lot for you work! Thanks in advance

You can send me plugin using vevs modded mi home To do so:

  • Open Vevs Mi Home
  • Long tap on your vacuum -> more -> rename -> remember Plugin ID (if there no that one, click on vacuum and wait to load)
  • Go to profile -> additional settings -> laboratory
  • Write custom log files -> grant access
  • Delete plugins (long press)
  • Restart mi home
  • Open your vacuum page
  • Go to /sdcard/vevs/files/plugin/install/rn/(Plugin ID from the first paragraph)/android/
  • Send here your main.bundle

Hi everyone, I've been following this thread and I have a S12 vacuum (xiaomi.vacuum.b106eu).
I've extracted the bundle asked here.
Tell me if I can help with anything else :)

signed_10078_1013967_4_ANDROID_bundle_6497872f3d7279bab1ce003fb7773efa.zip

@xvolte
Copy link

xvolte commented Apr 27, 2024

i don't know if It is of any importance, but when I do try the key "Mac address + tempModel[0:4] ", the error I get is DEBUG ERROR Function : aesDecrypted : PKCS#7 padding is incorrect.
If I try anything OTHER THAN the "Mac address + tempModel[0:4] ", I have the following error: DEBUG ERROR Function : aesDecrypted : Padding is incorrect.

Did you try the original algorithm?

  1. first extract the digits from mac address (hex digits a..f should be lower case) - this should give you the string of length 12
  2. extract the rightmost part (after '.') of the model string - this should give you at most a 4-char string. If less - you should complete it with leading '0's (0x30 ascii). (In my case it is 'v17' transformed to '0v17')
  3. concatenate these two. You should get exactly a 16-char string
  4. ENCRYPT f"{wifi_info_sn}+{owner_id}+{device_id}" with the string you've got on step 3 using AES128
  5. get md5 hash of the result

And this is the key to be used to decrypt the map

Yes i did.
the extracted model name is b106eu which is 6 characters. I tried to crop it to b106 and also tried with b106eu (which throws a invalid key size of 18) and also tried 06eu. No luck.
i tried also a 32 bit key with 0’s before b106eu. Still no luck

This is the files I use btw (I modified to get a little more debug, and added the crop for model number)
mapdecrypterdonwloader.zip

@NilusvanEdel
Copy link

So, while having some trouble at first I was able to get the map_downloader running for me, with the T12 (country=de).
Lot's of tries and error involved - I user your script as base @xvolte but already included the image_download from @maksp86. You (xvolte) can try it out whether this works for you: https://github.com/NilusvanEdel/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor-Support-For-T12/tree/feat/support_for_t12_and_s12

The good news is, seemingly all these models are using the same encryption, the key is seemingly always 06xx. In the main_bundle, the verison is checked and hard set to either 06eu, 06bk or 06tr.

@hugoquintal
Copy link

So, while having some trouble at first I was able to get the map_downloader running for me, with the T12 (country=de). Lot's of tries and error involved - I user your script as base @xvolte but already included the image_download from @maksp86. You (xvolte) can try it out whether this works for you: https://github.com/NilusvanEdel/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor-Support-For-T12/tree/feat/support_for_t12_and_s12

The good news is, seemingly all these models are using the same encryption, the key is seemingly always 06xx. In the main_bundle, the verison is checked and hard set to either 06eu, 06bk or 06tr.

Does your wifi_info_sn have a semicollumn?
I think the main problem to figure out the encryption is this part.
My wifi SN looks like this 475022SD2303A16797, as you can see there's no user_id nor semicollum to split the string.
I have a S12 and failing on the same steps @xvolte reported before.

@xvolte
Copy link

xvolte commented Apr 28, 2024

i can confirm that @NilusvanEdel version, works on my side. i do not know what was the change involved yet, as it looks pretty much the same... i'll have a look in much more detail to understand what was causing the issue ...

but a BIG thanks to everyone involved !

@xvolte
Copy link

xvolte commented Apr 28, 2024

So, while having some trouble at first I was able to get the map_downloader running for me, with the T12 (country=de). Lot's of tries and error involved - I user your script as base @xvolte but already included the image_download from @maksp86. You (xvolte) can try it out whether this works for you: https://github.com/NilusvanEdel/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor-Support-For-T12/tree/feat/support_for_t12_and_s12
The good news is, seemingly all these models are using the same encryption, the key is seemingly always 06xx. In the main_bundle, the verison is checked and hard set to either 06eu, 06bk or 06tr.

Does your wifi_info_sn have a semicollumn? I think the main problem to figure out the encryption is this part. My wifi SN looks like this 475022SD2303A16797, as you can see there's no user_id nor semicollum to split the string. I have a S12 and failing on the same steps @xvolte reported before.

you can ignore the split if you don't have any semicolumn, just take the whole wifi SN.

@xvolte
Copy link

xvolte commented May 4, 2024

@PiotrMachowski : Hi Piotr ! now that this version does work, any chances that it is going to be integrated in your repo ?
Thanks in advance,

@r-jean-pierre
Copy link

@PiotrMachowski : Hi Piotr ! now that this version does work, any chances that it is going to be integrated in your repo ? Thanks in advance,

Hi,

I saw that many people did a great work to make the map decryption working. If I understood correctly, we might have the S12 working.
I tried by myself to install the other repo you mentioned 1 week ago, but it failed at installation in HACS (I also tried to remove the official one to avoid collision), it just displays 'Unknown error' and no other information why it failed

2024-05-04 21_25_47-HACS – Home Assistant

Is there any trick to use the one from NilusvanEdel?

(Of course it would be wonderful to have it integrated in the official repo!!!)

@PiotrMachowski
Copy link
Owner

@xvolte yes, I was waiting for it to be functional and I'll try to incorporate this feature into my integration. It might need to be adjusted, as I am rewriting this repo a little bit, but I should be able to handle it

@xvolte
Copy link

xvolte commented May 14, 2024

@PiotrMachowski : Hi Piotr ! now that this version does work, any chances that it is going to be integrated in your repo ? Thanks in advance,

Hi,

I saw that many people did a great work to make the map decryption working. If I understood correctly, we might have the S12 working. I tried by myself to install the other repo you mentioned 1 week ago, but it failed at installation in HACS (I also tried to remove the official one to avoid collision), it just displays 'Unknown error' and no other information why it failed

2024-05-04 21_25_47-HACS – Home Assistant

Is there any trick to use the one from NilusvanEdel?

(Of course it would be wonderful to have it integrated in the official repo!!!)

I only used the script as "standalone", on my pc, (not in home assistant)
I am waiting for the new update of @PiotrMachowski :)

@Wellynounet
Copy link

hi,

any news about this vacum ? i have try and still not connecting :)

@diegogarciaarriaza
Copy link

We will wait for any updates

Thanks every one for the efforts.

I have too the S12 model and I could help in anything.

Regards!

@diegogarciaarriaza
Copy link

By the way if you what to have you S12 in HA meanwhile, you can use Xiaomi Miot Auto...

image

@Wellynounet
Copy link

thanks its working any tips to get the maps ? on miot ?

@r-jean-pierre
Copy link

I confirm you could get 2 entities with Xiaomi Miot Auto, which can allows some basics to control and monitor your robot:
2024_06_27_14_42_01_YAML_Dashboard_Home_Assistant

Of course, you must wait an update of Cloud-Map-Extractor to have map functionalities, here is an example of another! xiaomi robot:

2024-06-27 14_43_52-

As I also have the S12 model and I can also help for testing debugging etc.

@diegogarciaarriaza
Copy link

I confirm you could get 2 entities with Xiaomi Miot Auto, which can allows some basics to control and monitor your robot: 2024_06_27_14_42_01_YAML_Dashboard_Home_Assistant

Of course, you must wait an update of Cloud-Map-Extractor to have map functionalities, here is an example of another! xiaomi robot:

2024-06-27 14_43_52-

As I also have the S12 model and I can also help for testing debugging etc.

Could you tell me how did you do this?!, what type of card for show the S12 photo and other controls.
The max I get was the picture in my message (entities)

Thanks!

@r-jean-pierre
Copy link

I confirm you could get 2 entities with Xiaomi Miot Auto, which can allows some basics to control and monitor your robot: 2024_06_27_14_42_01_YAML_Dashboard_Home_Assistant
Of course, you must wait an update of Cloud-Map-Extractor to have map functionalities, here is an example of another! xiaomi robot:
2024-06-27 14_43_52-
As I also have the S12 model and I can also help for testing debugging etc.

Could you tell me how did you do this?!, what type of card for show the S12 photo and other controls. The max I get was the picture in my message (entities)

Thanks!

Just used custom:vacuum-card, if you read carefully the documentation and adapt to your vacuum, you can have great effects with minimum effort. FYI, one of the entities contains a lot of attributes, and this custom card can make benefit of it

@diegogarciaarriaza
Copy link

I was discovering vacuum-card while I was waiting for your response xD.
Could you share your configuration?, I cannot get the stats working...

Thank you very much!

@diegogarciaarriaza
Copy link

diegogarciaarriaza commented Jun 27, 2024

But, thinking a bit, I don't have recognized any sensor of my vacuum... just entity: vacuum.xiaomi_b106eu_bcc5_robot_cleaner
And sensor: sensor.xiaomi_b106eu_bcc5_battery_level

Any idea?

@r-jean-pierre
Copy link

Cause the main entity contains all the attributes
My config is:

- type: custom:vacuum-card
entity: vacuum.xiaomi_s12_robot_cleaner
stats:
  default:
    - attribute: sweep.main_brush_life
    - attribute: sweep.side_brush_life
    - attribute: sweep.hypa_life
    - attribute: sweep.cleaning_area
    - attribute: sweep.water_state

I didnt check recently is something else could be added
Personally, I will wait for a firmware update of the S12, because, unless I'm unlucky, there are bugs and missing features on this S12. I wont invest time in HA. I bought a D9 several years ago and, from both hardware and software point of view, I'm quite disappointed with this "new" S12.
Somehow also a bit pessimistic to see one day the map feature in HA. Except a quick fix, there was no release of Xiaomi-Cloud-Map-Extractor for more than 2 years now... and I could understand/suppose integration of the S12 map decryption is not top priority if soon something popups ... :-(

@diegogarciaarriaza
Copy link

diegogarciaarriaza commented Jun 29, 2024

Thanks you!
I will take a while researching into this attributes, but "sweep", what the hell is sweep?, xDD.
It works! Hahaha

Oh, I saw where get the attrs..

Anyway, I'm pessimistic to about a possible update of that Xiaomi-Cloud-Map-Extractor

Thanks so much!

@cofw2005
Copy link

I just got a Xiaomi S12 (b106eu) version last week. It is successfully integrated into HA via MioT. But I cannot successfully get the Map Extractor work. I got no map image.
I also try to use the call service to trigger a room sweeping, it didn't work too. I used venv mode version of the MiHome app, but can get the necessary information in the log, e.g. room id. Don't know whether the manufacture changed something in firmware. Looks like with this version it is not easy to do what I want.
I will also keep following up this topic, hope there will some fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new platform
Projects
None yet
Development

No branches or pull requests