Xioami cooker integration

Anybody have a nice Lovelace card to control the cooker? I did some searching but couldn’t find anything.

Hi, someone could explain in detail how to install the component files in ha?
I can see in previous post that the way is/was:
to copy as follows:
/config/custom_components/xiaomi_cooker.py
/config/custom_components/sensor/xiaomi_cooker.py
but the current files on github have not a “xiaomi-cooker.py” file but a custom-component folder.
I have copied that folder and its content (only) on my HA and is not working.
Is is necessary also to copy the cooking profiles to the same folder to make it work?
what to do with the other files on github? (.hound.yaml, flake8.ini …)

Thanks in advance!

1 Like

Hello, I have been successful finding the Token and connecting to the rice cooker via mirobo commands. It seems that everything is working, but I cant actually start the cooking, when I try to send command mirobo raw_command set_start '["K2A profiles"]' it will always end up with error -9999 ‘time out’. My model is chunmi.cooker.normal2. Did anyone else encounter this issue? Any solutions? Thank you.

Do you really use one of the K2A profiles? f.e.

mirobo raw_command set_start '["0001E101000000000000800200A00069030103730000085A020000EB006B040103740000095A0400012D006E0501037400000A5A0401FFFF00700601047600000C5A0401052D0A0F3C0A1E91FF820E01FF05FF78826EFF10FF786E02690F0DFF826EFF691000FF826EFF69100069FF5AFF00000000000081E9"]'

Yep, still the same error. I even tried different profiles but nothing is working.

1 Like

Could you provide the output of

mirobo info

I want to know the model name and firmware version(s).

Sure: chunmi.cooker.normal2 v2.0.4 (04:CF:8C:54:9C:65) @ 192.168.0.8 - token: xxx

Anyone has chunmi.pre_cooker.eh1 ?
Looks like I have different model of the Xiaomi Cooker.
I tried to get anything but it looks like it is something new…

INFO:miio.vacuum_cli:Debug mode active
DEBUG:miio.vacuum_cli:Read stored sequence ids: {'seq': 1, 'manual_seq': 0}
DEBUG:miio.vacuum_cli:Connecting to  with token 
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.device:Got a response: Container: 
    data = Container: 
        data = b'' (total 0)
        value = b'' (total 0)
        offset1 = 32
        offset2 = 32
        length = 0
    header = Container: 
        data = b'!1\x00 \x00\x00\x00\x00\x06^a\t\x00\x00\x16\xd0' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = b'\x06^a\t' (total 4)
            ts = 1970-01-01 01:37:20
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.device:Discovered 065e6109 with ts: 1970-01-01 01:37:20, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.device::54321 >>: {'id': 2, 'method': 'miIO.info', 'params': []}
DEBUG:miio.device::54321 (ts: 1970-01-01 01:37:20, id: 2) << {'id': 2, 'result': {'life': 5840, 'uid': 87255710, 'model': 'chunmi.pre_cooker.eh1', 'token': '', 'fw_ver': '2.0.5_0016', 'miio_ver': '0.0.5', 'hw_ver': 'esp32', 'mmfree': 147108, 'mac': '40:31:3C:47:F4:AB', 'wifi_fw_ver': 'v3.1.4-56-g72a66bc98-dirty', 'ap': {'ssid': '', 'bssid': '', 'rssi': -56, 'primary': 6}, 'netif': {'localIp': '', 'mask': '255.255.255.0', 'gw': ''}}}
chunmi.pre_cooker.eh1 v2.0.5_0016 (40:31:3C:47:F4:AB) @  - token: 
DEBUG:miio.vacuum_cli:Full response: {'ap': {'bssid': '',
        'primary': 6,
        'rssi': -56,
        'ssid': ''},
 'fw_ver': '2.0.5_0016',
 'hw_ver': 'esp32',
 'life': 5840,
 'mac': '40:31:3C:47:F4:AB',
 'miio_ver': '0.0.5',
 'mmfree': 147108,
 'model': 'chunmi.pre_cooker.eh1',
 'netif': {'gw': '', 'localIp': '', 'mask': '255.255.255.0'},
 'token': '',
 'uid': 87255710,
 'wifi_fw_ver': 'v3.1.4-56-g72a66bc98-dirty'}
DEBUG:miio.vacuum_cli:Writing {'seq': 2, 'manual_seq': 0} to .cache/python-miio/python-mirobo.seq

Hi guys,
So i see theres alot of work done on this. Thanks alot

Also i came across this github

Now it does say Rice Cooker V2.
Im about to plunge and buy one right now, but have no idea how to differentiate between different versions (if any) of that rice cooker

Does anyone have a link that they can tell me what to buy? like aliexpress/gearbest?
Thers alot and i dont know which one is what

hello, I am the user of this system and already have a rice cooker. But I could not find a single example of how to use the services. I ask for your help. write an example of using the sart and stop service

1 Like

Hey so i just got it working

You can do a call service

  • Developer Tools > Services > serivce = xiaomi_cooker.start
  • Service Data = {“profile”:“0002E100280000000000800200D20069030103730000075A0200012D006B040103740000075A02000182006E050003740000095A0401FFFF0070060004760000095A040100280A063C0D1E91FF820E01FF05FF78826EFF10FF786E02690F0FFF826EFF69100082826EFF69100069FF5AFF00000000000015B6”}

So the example above is to start the cooker to do 40 min quick rice

If that works for you then you can just create a template switch/script based on that

3 Likes

I could not call the service. and if you can show an example script or template. I’m not good at it yet. Therefore, I ask such questions
Не удалось вызвать службу xiaomi_cooker/start. expected dict for dictionary value @ data[‘service_data’]. Got ‘data = {“profile”:“0002E100280000000000800200D20069030103730000075A0200012D006B040103740000075A02000182006E050003740000095A0401FFFF0070060004760000095A040100280A063C0D1E91FF820E01FF05FF78826EFF10FF786E02690F0FFF826EFF69100082826EFF69100069FF5AFF00000000000015B6”}’

So edit your configuration file to add the following under your switches:

switch:
  - platform: template
    switches:
      xiaomi_cooker:
        value_template: "{{ is_state('sensor.xiaomi_cooker_mode', 'Running') }}"
        turn_on:
          service: xiaomi_cooker.start
          data:
            profile: "0002E100280000000000800200D20069030103730000075A0200012D006B040103740000075A02000182006E050003740000095A0401FFFF0070060004760000095A040100280A063C0D1E91FF820E01FF05FF78826EFF10FF786E02690F0FFF826EFF69100082826EFF69100069FF5AFF00000000000015B6"
        turn_off:
          service: xiaomi_cooker.stop
2 Likes

Thanks for the feedback, I was happy as a child when the rice cooker sawed through

anyone knows why this is not working?

type: button
tap_action:
  action: call-service
  service: xiaomi_cooker.start
  service_data:
    profile: >-
      010088003201000028000012000000000000000000000846822A6E14002018000F6E82736E140A201810000000000000000000003C8782716E1400200A100000000000000000000000000000000000000000000000000000000000003C0A000000008700000000000000000000000000424D
hold_action:
  action: more-info
show_icon: true
show_name: true
icon: 'mdi:cake'
name: Baking Cake
icon_height: 40px

Edit: it actually works but this profile dosen’t with my press.2 :frowning:

Hello I’m trying to set up multi switch so every profile has its own switch but I only get error

Log Details (ERROR)

Logger: homeassistant.components.switch
Source: helpers/entity_platform.py:436
Integration: Switch (documentation, issues)
First occurred: 8:02:36 PM (1 occurrences)
Last logged: 8:02:36 PM

Entity id already exists - ignoring: switch.xiaomi_cooker

This is how o made my setup

https://pastebin.com/PQstUw3n

in which file did you write them the text?

I only defined different buttons in Lovelace. (Just define a new input in Lovelace, select manual and copy the code. You propoply have to change the profile code)

If you want different switches, you have to name them different like:

switches:
      xiaomi_cooker:
        value_template: "{{ is_state('sensor.xiaomi_cooker_mode', 'Running') }}"
        turn_on:
.....
      xiaomi_cooker_2:
        value_template: "{{ is_state('sensor.xiaomi_cooker_mode', 'Running') }}"
        turn_on:
.....
      xiaomi_cooker_3:
        value_template: "{{ is_state('sensor.xiaomi_cooker_mode', 'Running') }}"
        turn_on:
...
1 Like

Can you explain how I make a turn off button in the same profile so the code also have a turn off function, so beside the cake it shows a turn off button?

Paste this in manual card:

card:
  entity: sensor.xiaomi_cooker_state
  icon: 'mdi:pot'
  icon_height: 40px
  name: Stop Cooking
  tap_action:
    action: call-service
    service: xiaomi_cooker.stop
  type: entity-button
conditions:
  - entity: sensor.xiaomi_cooker_mode
    state: Running
type: conditional

It only shows when cooker is running

1 Like