syssi / xiaomi_cooker

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

Add chunmi.pre_cooker.eh1 support #16

Open bor2121 opened 4 years ago

syssi commented 4 years ago

# Methods:
set_start [nameGBK, cookCode]
cancel_cooking []
set_menu [nameGBK, cookCode, bell]
set_delete [num]
set_factory_reset [bell]
set_info [setting]
set_open_bell [bell]
set_fire [params]
get_step_cookdata []
set_wifi_state [params]
get_temp_history []
get_cook_data []

# Properties:
get_prop ['status', 'phase', 'menu', 't_cook', 't_left', 't_pre', 't_kw', 'taste', 'temp', 'kpa', 'favs', 'akw', 'c_lock', 'c_status', 'c_enable', 'c_phase', 's_cook1', 's_cook2', 's_cook3', 'version', 't_start', 't_finish', 't_ccook', 'e_code', 't_pre1', 't_pre2', 't_pre3', 't_pre4', 't_pre5', 't_pre6', 't_pre7', 't_pre8', 'en_warm', 'e_press', 'setting', 'c_push']
anschein commented 3 years ago

same model and thx for work

ildarunic commented 3 years ago

Hello.

I also bought this cooker. It has all the menus in Chinese, and I really want to integrate it into Home Assistant. I can grant access to a virtual machine on my local network, from where you can connect to the cooker for tests.

Xiaomi MiJiA Electric Rice Cooker 5L (YLG01CM)

C:>miiocli device --ip IPAddr --token TOKEN info Model: chunmi.pre_cooker.eh1 Hardware version: esp32 Firmware version: 2.0.7_0018

C:>miiocli device --ip IPAddr --token TOKEN raw_command get_temp_history [] Running command raw_command Error: {'code': -9999, 'message': 'user ack timeout'}

C:>miiocli device --ip IPAddr --token TOKEN raw_command get_cook_data [] Running command raw_command Error: {'code': -9999, 'message': 'user ack timeout'}

C:>miiocli device --ip IPAddr --token TOKEN raw_command get_prop "['status', 'phase', 'menu', 't_cook', 't_left', 't_pre', 't_kw', 'taste', 'temp', 'rice', 'favs', 'akw', 't_start', 't_finish', 'version', 'setting', 'code', 'en_warm', 't_congee', 't_love', 'boil']" Running command raw_command [1]

timmaurice commented 1 year ago

Found this forked repo for eh1: https://github.com/sschirr/xiaomi_cooker But I wasn't able to get it to work:

Error during setup of component xiaomi_miio_cooker
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 288, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  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_miio_cooker/__init__.py", line 125, in setup
    from miio import Cooker, MultiCooker
ImportError: cannot import name 'MultiCooker' from 'miio' (/usr/local/lib/python3.11/site-packages/miio/__init__.py)