Xioami cooker integration

Since we have a rather large presence of Xiaomi in the platform are there anyone interested in integration of the Xiaomi cookers (it says “rice” but it much more then just that) to the HA?

Product page:
https://xiaomi-mi.com/appliances/xiaomi-mijia-induction-heating-pressure-rice-cooker-white/
Pricing:
https://www.aliexpress.com/wholesale?catId=606&initiative_id=AS_20171201003136&SearchText=xiaomi+rice+cooker

Would be a rather handy automation with “proximity” sensor

no one bought this?? im keen on HA integration too

I did. Probably one of most useful purchases of kitchen appliances. All you have to do is figure out you favorite dish load it up in the morning and by the moment you arrive you have it done and hot (keep worm feature is there as well).

I would implement the component if somebody provides some support/testing. The needed steps:

  1. Install the Mi Home app and add the xiaomi device. This will download a device plugin.
  2. Please provide a copy of the mi home plugin. cp. Xiaomi Humidifier support
    You don’t need a rooted android device. A emulator is sufficient or a android backup of a non-rooted device.
  3. I will decompile the android app and provide the used API calls/methods
  4. Extract the access token may be a downgrade of the android app is needed: https://www.home-assistant.io/components/vacuum.xiaomi_miio/#retrieving-the-access-token
  5. The API methods can be tested my mirobo --ip <ip> --token <token> raw_command <method> <parameter>
  6. Please provide a example response of every API call.

After these steps the device can be implemented in github.com/rytilahti/python-miio. The last step is a official Home Assistant component.

1 Like

i can help but I have limited programming knowledge… the problem is that I’m on iOS (no android at home) and using hassio

No problem. @garvarma used NoxPlayer (android emulator) a few days ago.

A Home Assistant isn’t needed at the moment. We need a python setup later on. It’s part of a typical OSX install as far as I know. You should be able to install python-miio by:

pip3 install python-miio

Hi there found these translated plugins
https://drive.google.com/drive/mobile/folders/0BzFWe26yNg9DTEVsV3RvbTZjUGc?usp=sharing

and seems plugin you looking is 161:
https://drive.google.com/drive/mobile/folders/0BzFWe26yNg9DTEVsV3RvbTZjUGc/0BzFWe26yNg9DUWV2dFJjSVVUc28?usp=sharing&sort=13&direction=a

Wow. This is a awesome collection!

Yeah it rather wide. But some name are in Russian so please ping me if you need any support with integration.
It seems it similar to purifier so we need to extract token, is it a same procedure?

Thanks for interest.

I’ve extracted the supported methods:

get_prop '["func", "menu", "stage", "temp", "t_func", "t_precook", "t_cook", "setting", "delay", "version", 
get_prop '[{"all"}]'
"favorite"]'
get_temp_history '[]'
miIO.info '[]'
set_func '["nowarn"]'
set_func '["ack"]'
# stopCook
set_func '["end02"]' # if (model == COOKER_MODEL_PRESS1 && firmwareVersion >= 39) OR (model == COOKER_MODEL_NORMAL2 && firmwareVersion >= 22) OR (model == COOKER_MODEL_NORMAL3 && firmwareVersion >= 9) OR (model == COOKER_MODEL_PRESS2) OR (model == COOKER_MODEL_NORMAL1) OR (model == COOKER_MODEL_NORMAL4) OR (model == COOKER_MODEL_NORMAL5)
set_func '["end"]' # else

set_start '["cookingProfileHexdata"]'
set_interaction '["new String[]{setting + "," + shutLedDelay + "," + lidOpenTimeout + "," + lidOpenTimeoutAlarmTime"]'
set_menu '["hexdata"]' -> CookingActivity.this.recipe.getProfile().toHexData()

The method parameters still needs to be extracted. The first 3 can be tested already.

1 Like

Wow. You are fast. Please let me know what I can do more to help you…

Could you provide the output of

# requests miIO.info '[]'
mirobo --ip <ip> --token <token> info

already? And

mirobo --ip <ip> --token <token> raw_command get_prop '["func", "menu", "stage", "temp", "t_func", "t_precook", "t_cook", "setting", "delay", "version", 
mirobo --ip <ip> --token <token> raw_command get_prop '[{"all"}]'
# i'm unsure about the format
mirobo --ip <ip> --token <token> raw_command get_prop '["all"]'

would be interesting, too.

On my way now. Will provide response later today.

Hi,

If you need some help, as @syssi said, few day ago i did a similar task with hsi help.

The problem is that i don’t have this device at home. :frowning:

In my case, these commands as syssi ask, i did it in the machine where my HA is running.

Unfortunatly cant identify the cooker token with “mirobo discover”. Any other way to do it?
Probably due to the fact it is an unknown device class.

Which OS are you using in your device where do you have de Mi Home app? Android? iOS?

Android. Not rooted.

There are additional ways to retrieve the token. python-miio provides a command line tool to extract the token from a iOS backup and/or android backup.

Corporate phone encrypted phone with policy restriction - not an option for me unfortunatly