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

Xiaomi Rice Cooker Normal5: get_prop only works if "all" properties are requested #380

Closed
schemacs opened this issue Sep 14, 2018 · 2 comments

Comments

@schemacs
Copy link

schemacs commented Sep 14, 2018

  • model: chunmi.cooker.normal5
  • firmware version: 1.2.8.0008
  • python-miio version: 4.0.1
 ~/.virtualenvs/ha/bin/mirobo --ip 192.168.1.2 --token xxx raw_command get_prop '["all"]'
Sending cmd get_prop with params ['all']
['waiting', '0004', 'null', '34', '2', '-1', '1440', '100f', '05040f', '0008570a', '0100', 'ffff....']
~/.virtualenvs/ha/bin/mirobo --ip 192.168.1.2 --token xxx  raw_command get_prop '["version"]'
Sending cmd get_prop with params ['version']
ERROR:miio.device:Got error when receiving: timed out
Error: No response from the device
~/.virtualenvs/ha/bin/mirobo --ip 192.168.1.2 --token xxx raw_command get_prop '["menu"]'
Sending cmd get_prop with params ['menu']
ERROR:miio.device:Unable to discover a device at address 192.168.42.150
Error: Unable to discover the device 192.168.42.150
~/.virtualenvs/ha/bin/mirobo --ip 192.168.1.2 --token xxx raw_command get_prop '["func", "menu", "stage", "temp", "t_func", "t_precook", "t_cook", "setting", "delay", "version", "favorite", "custom"]'
Sending cmd get_prop with params ['func', 'menu', 'stage', 'temp', 't_func', 't_precook', 't_cook', 'setting', 'delay', 'version', 'favorite', 'custom']
ERROR:miio.device:Got error when receiving: timed out
Error: No response from the device

So after I change https://github.com/rytilahti/python-miio/blob/0.4.1/miio/cooker.py#L729, now home assistant which calls status func works fine.

        properties = ['func', 'menu', 'stage', 'temp', 't_func', 't_precook',
                      't_cook', 'setting', 'delay', 'version', 'favorite', 'custom']
-       values = self.send("get_prop", properties)
+       values = self.send("get_prop", ['all'])

Does anybody also have this output?

@syssi
Copy link
Collaborator

syssi commented Sep 20, 2018

Thanks for your input! I will try to respect this case of your model in future.

@syssi
Copy link
Collaborator

syssi commented Oct 8, 2018

Could you provide the complete response? This one is truncated:

['waiting', '0004', 'null', '34', '2', '-1', '1440', '100f', '05040f', '0008570a', '0100', 'ffff....']

@syssi syssi changed the title Xiaomi Rice Cooker raw_command get_prop only works for "all" argument Xiaomi Rice Cooker Normal5: get_prop only works if "all" properties are requested Oct 8, 2018
syssi added a commit to syssi/python-miio that referenced this issue Oct 8, 2018
@syssi syssi closed this as completed in 8eb7097 Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants