syssi / xiaomi_cooker

Xiaomi Mi Electric Rice Cooker integration for Home Assistant
Apache License 2.0
143 stars 37 forks source link

Add support for model normal1 and press1 #1

Closed bluefoxlee closed 6 years ago

bluefoxlee commented 6 years ago

Hi Wonder if components is planning to add support for other model as well? or if you need any data provided for it. since I see the discussion here. Currently I owned normal1 and press1.

Thanks you.

syssi commented 6 years ago

If you provide some testing I would be happy to support your devices.

bluefoxlee commented 6 years ago

Will read through the discussion again and follow the instructions there. BTW, should I post the testing result here or the thread?

syssi commented 6 years ago

Please post the python-miio request/responses here.

bluefoxlee commented 6 years ago

It seems wired. One of my rice cooker is local Taiwanese version (normal1). And I got error when try to use "mirobo --ip --token info" command:

Error: Unable to discover the device 192.168.1.195

And no problem with lumi.acpartner.v3 (this one is from China). Will provide the press1 data when I back to town.

syssi commented 6 years ago

Please check token and may be the ip address.

bluefoxlee commented 6 years ago

Let me reset it and reconnect it again. quite sure it's correct, that's why I use other xiaomi's device to make same test as well.

syssi commented 6 years ago

Are you aware of each device has an individual token? There was much confusion in the past about this point. ;-)

bluefoxlee commented 6 years ago

^^ yes, I do. I use echo command to convert token from the data I got from Mi Home app sqlite.

Resetting...

bluefoxlee commented 6 years ago

It works after resetting. here is so far I can get from 'Normal1'

Result:

mirobo --ip --token info chunmi.cooker.normal1 v1.3.0 ([MAC]) @ [IP] - token: [TOKEN]

mirobo --ip [IP] --token [TOKEN] raw_command get_prop '[“all” ]' Sending cmd get_prop with params ['all'] ['waiting', '0000', 'null', '30', '0', '-1', '60', '100f', '05040f', '00160101', '0100', 'ffffffffffff011effff010000001e1f']

mirobo --ip [IP] --token [TOKEN] raw_command get_temp_history "[]" Sending cmd get_temp_history with params [] ['0']

syssi commented 6 years ago

Please cook some rice and request the current state (get_prop) every minute:

watch -n60 "mirobo ... | tee -a normal1.log"

bluefoxlee commented 6 years ago

Here is chunmi.cooker.press1

mirobo --ip [IP] --token [TOKEN] info chunmi.cooker.press1 v1.4.0 ([MAC] @ [IP] - token: [TOKEN]

mirobo --ip [IP] --token [TOKEN] raw_command get_prop '["all"]' Sending cmd get_prop with params ['all'] ['waiting', '0001', 'null', '34', '60', '-1', '60', '1c0f', '05040f', '00010026', '021e', '0b00ffffffff011effff011e']

mirobo --ip [IP] --token [TOKEN] raw_command get_prop '["func", "menu", "stage", "temp", "t_func", "t_precook", "t_cook", "setting", "delay", "version"]'

Sending cmd get_prop with params ['func', 'menu', 'stage', 'temp', 't_func', 't_precook', 't_cook', 'setting', 'delay', 'version'] ['waiting', '0001', 'null', '34', '60', '-1', '60', '1c0f', '05040f', '00010026', '021e', '0b00ffffffff011effff011e']

mirobo --ip [IP] --token [TOKEN] raw_command get_temp_history "[]" Sending cmd get_temp_history with params [] ['0']

mirobo --ip [IP] --token [TOKEN] raw_command get_prop '["favorite"]' Sending cmd get_prop with params ['favorite'] ['waiting', '0001', 'null', '34', '60', '-1', '60', '1c0f', '05040f', '00010026', '021e', '0b00ffffffff011effff011e']

Will try to get some cook log when back. So the command will be like below? Thank you.

watch -n60 "mirobo --ip [IP] --token [TOKEN] raw_command get_prop '["all"]' | tee -a normal1.log"

bluefoxlee commented 6 years ago

@syssi Thank you!

syssi commented 4 years ago

@bluefoxlee Could you provide the product name and model no. of your devices to improve this list of supported devices: https://github.com/syssi/xiaomi_cooker#supported-devices

bluefoxlee commented 4 years ago

@syssi Added. Thanks.

syssi commented 4 years ago

@bluefoxlee You missed a last step. Please go to this page an create a pull request:

https://github.com/syssi/xiaomi_cooker/pulls

Thanks!