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

Support for chunmi.ihcooker.v2 (Xiaomi Induction Cooker 2) MIoT #1976

Open
BorhnN opened this issue Oct 14, 2024 · 1 comment
Open

Support for chunmi.ihcooker.v2 (Xiaomi Induction Cooker 2) MIoT #1976

BorhnN opened this issue Oct 14, 2024 · 1 comment

Comments

@BorhnN
Copy link

BorhnN commented Oct 14, 2024

Device information:

  • Name(s) of the device: Xiaomi Induction Cooker 2
  • Link: AliExpress

Use miiocli device --ip <ip address> --token <token> info.

Running command info
Model: chunmi.ihcooker.v2
Hardware version: esp32
Firmware version: 2.2.0_0016
Supported using: GenericMiot
Command: miiocli genericmiot --ip 192.168.0.100 --token xxxxxxxxxxx
Supported by genericmiot: True

Additional context

I was able to get some properties with genericmiot and was able to call some actions without parameters. But I've faced issues when calling actions with parameters

What worked:

  1. Started cooking manually
  2. Called pause cooking through API and it worked
miiocli genericmiot --ip <ip> --token <token> call_action_by 2 3
Running command call_action_by
{'code': 0, 'out': []}

What I did not manage to do:

  1. Starting cooking through API
  2. Setting Heat-Level by property
miiocli genericmiot --ip 192.168.0.100 --token 441499be04f68f03190defc1da419e55 call_action_by 2 1 "[{'value':1 }]"                    Running command call_action_by
{'id': 2, 'exe_time': 10}
@BorhnN
Copy link
Author

BorhnN commented Oct 14, 2024

This is the print generated by miottemplate.py

Device 'urn:miot-spec-v2:device:induction-cooker:0000A033:chunmi-v2:2': Induction Cooker with 3 services

* Service siid 1: (Device Information): 5 props, 0 actions

        ## Properties ##
                siid 1: piid: 1 (Device Manufacturer): (string, unit: None) (acc: ['read'])
                siid 1: piid: 2 (Device Model): (string, unit: None) (acc: ['read'])
                siid 1: piid: 3 (Device ID): (string, unit: None) (acc: ['read'])
                siid 1: piid: 4 (Current Firmware Version): (string, unit: None) (acc: ['read'])
                siid 1: piid: 5 (Serial Number): (string, unit: None) (acc: ['read', 'notify'])

* Service siid 2: (Induction Cooker): 7 props, 3 actions

        ## Properties ##
                siid 2: piid: 1 (Status): (uint8, unit: None) (acc: ['read', 'notify'])
                        {'value': 1, 'description': 'Idle'}
                        {'value': 2, 'description': 'Cooking'}
                        {'value': 4, 'description': 'Appoint'}
                        {'value': 8, 'description': 'Error'}
                        {'value': 9, 'description': 'IdleTiming'}
                        {'value': 10, 'description': 'CookingTiming'}
                        {'value': 11, 'description': 'Shutdown'}
                        {'value': 12, 'description': 'Pause'}
                        {'value': 14, 'description': 'Charging'}
                        {'value': 18, 'description': 'StopCooking'}
                siid 2: piid: 2 (Device Fault): (uint8, unit: None) (acc: ['read', 'notify'])
                        {'value': 0, 'description': 'No Faults'}
                siid 2: piid: 3 (Switch Status): (bool, unit: None) (acc: ['read', 'write', 'notify'])
                siid 2: piid: 4 (Cook Mode): (uint8, unit: None) (acc: [])
                        {'value': 0, 'description': 'Mode0'}
                        {'value': 1, 'description': 'Mode1'}
                        {'value': 2, 'description': 'Mode2'}
                        {'value': 3, 'description': 'Mode3'}
                        {'value': 4, 'description': 'Mode4'}
                        {'value': 5, 'description': 'Mode5'}
                siid 2: piid: 5 (Left Time): (uint16, unit: minutes) (acc: ['read', 'notify'])
                        Range: [0, 1440, 1]
                siid 2: piid: 6 (Working Time): (uint32, unit: minutes) (acc: ['read', 'notify'])
                        Range: [0, 300, 1]
                siid 2: piid: 7 (Heat Level): (uint8, unit: None) (acc: ['read', 'write', 'notify'])
                        Range: [0, 99, 1]

        ## Actions ##
                siid 2: aiid 1 Start Cook: in: [4] -> out: []
                siid 2: aiid 2 Cancel Cooking: in: [] -> out: []
                siid 2: aiid 3 Pause: in: [] -> out: []

* Service siid 3: (custom): 36 props, 15 actions

        ## Properties ##
                siid 3: piid: 1 (menu): (string, unit: None) (acc: ['read', 'notify'])
                siid 3: piid: 2 (phase): (uint8, unit: None) (acc: ['read', 'notify'])
                        Range: [0, 19, 1]
                siid 3: piid: 3 (work-status): (uint8, unit: None) (acc: ['read', 'notify'])
                        {'value': 1, 'description': 'Idle'}
                        {'value': 2, 'description': 'Cooking'}
                        {'value': 4, 'description': 'Appoint'}
                        {'value': 8, 'description': 'Error'}
                        {'value': 9, 'description': 'IdleTiming'}
                        {'value': 10, 'description': 'CookingTiming'}
                        {'value': 11, 'description': 'Shutdown'}
                        {'value': 12, 'description': 'Pause'}
                        {'value': 14, 'description': 'Charging'}
                        {'value': 18, 'description': 'StopCooking'}
                siid 3: piid: 4 (cook-time): (uint16, unit: minutes) (acc: ['read', 'notify'])
                        Range: [0, 1440, 1]
                siid 3: piid: 5 (appoint-time): (uint16, unit: minutes) (acc: ['read', 'notify'])
                        Range: [0, 1440, 1]
                siid 3: piid: 6 (pause-time): (uint16, unit: seconds) (acc: ['read', 'notify'])
                        Range: [0, 600, 1]
                siid 3: piid: 7 (temperature): (uint8, unit: celsius) (acc: ['read', 'notify'])
                        Range: [0, 255, 1]
                siid 3: piid: 8 (target-temperature): (uint8, unit: celsius) (acc: ['read', 'notify'])
                        Range: [0, 255, 1]
                siid 3: piid: 9 (fire-gears): (uint8, unit: None) (acc: ['read', 'notify'])
                        Range: [0, 99, 1]
                siid 3: piid: 10 (step-time): (uint32, unit: seconds) (acc: ['read', 'notify'])
                        Range: [0, 14400, 1]
                siid 3: piid: 11 (version): (string, unit: None) (acc: ['read', 'notify'])
                siid 3: piid: 12 (custom-details): (string, unit: None) (acc: ['read', 'notify'])
                siid 3: piid: 13 (error-code): (uint8, unit: None) (acc: ['read', 'notify'])
                        {'value': 0, 'description': 'NoError'}
                        {'value': 2, 'description': 'NoPan'}
                        {'value': 3, 'description': 'Hvprotection'}
                        {'value': 4, 'description': 'Lvprotection'}
                        {'value': 5, 'description': 'BotsensorHigh'}
                        {'value': 7, 'description': 'IgbtsensorHigh'}
                        {'value': 8, 'description': 'IgbtsensorBad'}
                        {'value': 10, 'description': 'BottomsensorBad'}
                        {'value': 11, 'description': 'CommunicationBad'}
                        {'value': 12, 'description': 'Wirebroken'}
                siid 3: piid: 14 (recpe-type): (uint8, unit: None) (acc: ['read', 'notify'])
                        {'value': 0, 'description': 'OfficialFunctions'}
                        {'value': 1, 'description': 'SingleFire'}
                        {'value': 2, 'description': 'MultiFire'}
                        {'value': 3, 'description': 'SingleTemperature'}
                        {'value': 4, 'description': 'Recipe'}
                        {'value': 5, 'description': 'SingleRecipes'}
                siid 3: piid: 15 (step-flag): (uint8, unit: None) (acc: ['read', 'notify'])
                        Range: [0, 255, 1]
                siid 3: piid: 16 (cook-data): (string, unit: None) (acc: [])
                siid 3: piid: 17 (charge-data): (string, unit: None) (acc: [])
                siid 3: piid: 18 (user-id): (string, unit: None) (acc: [])
                siid 3: piid: 19 (information): (string, unit: None) (acc: [])
                siid 3: piid: 20 (bell): (uint8, unit: None) (acc: [])
                        {'value': 0, 'description': 'NoBell'}
                        {'value': 1, 'description': 'Bell'}
                siid 3: piid: 21 (recipe-name): (string, unit: None) (acc: [])
                siid 3: piid: 22 (menu-order): (uint8, unit: None) (acc: [])
                        Range: [0, 10, 1]
                siid 3: piid: 24 (buzzer-mark): (bool, unit: None) (acc: ['read', 'notify', 'write'])
                siid 3: piid: 25 (menu-id): (string, unit: None) (acc: [])
                siid 3: piid: 26 (charge-phase): (uint8, unit: None) (acc: ['read', 'notify'])
                        Range: [0, 255, 1]
                siid 3: piid: 27 (finish): (uint8, unit: None) (acc: ['read', 'notify'])
                        Range: [0, 255, 1]
                siid 3: piid: 28 (move-temperature): (uint8, unit: celsius) (acc: ['read', 'notify'])
                        Range: [0, 255, 1]
                siid 3: piid: 29 (cookingdatatab): (string, unit: None) (acc: ['notify'])
                siid 3: piid: 31 (menuchange): (string, unit: None) (acc: [])
                siid 3: piid: 32 (runstatus): (string, unit: None) (acc: ['notify', 'read'])
                siid 3: piid: 33 (finish-push): (uint8, unit: None) (acc: ['write', 'notify', 'read'])
                        Range: [0, 255, 1]
                siid 3: piid: 35 (time-out): (uint8, unit: minutes) (acc: ['read', 'notify', 'write'])
                        Range: [1, 60, 1]
                siid 3: piid: 36 (selfcheck-cmd): (uint8, unit: None) (acc: [])
                        {'value': 0, 'description': 'Null'}
                        {'value': 1, 'description': 'Voltage'}
                        {'value': 3, 'description': 'Sensor-NTC'}
                        {'value': 4, 'description': 'Sensor-IGBT'}
                        {'value': 5, 'description': 'Communication'}
                siid 3: piid: 37 (selfcheck-value): (int16, unit: None) (acc: [])
                        Range: [-32768, 32767, 1]
                siid 3: piid: 38 (wifiled-status): (bool, unit: None) (acc: ['read', 'notify'])
                siid 3: piid: 39 (): (uint32, unit: seconds) (acc: ['read', 'notify'])
                        Range: [0, 86400, 1]

        ## Actions ##
                siid 3: aiid 1 start-cooking: in: [21, 16, 18] -> out: []
                siid 3: aiid 2 pause-cooking: in: [19, 18] -> out: []
                siid 3: aiid 3 pause-recover: in: [19, 18] -> out: []
                siid 3: aiid 4 cancel-cooking: in: [19, 18] -> out: []
                siid 3: aiid 5 set-menu: in: [21, 16, 18, 20] -> out: []
                siid 3: aiid 6 delete-menu: in: [19, 18, 22, 20] -> out: []
                siid 3: aiid 7 continue-cooking: in: [19, 18] -> out: []
                siid 3: aiid 8 next-step-cooking: in: [19, 18] -> out: []
                siid 3: aiid 9 factory-reset: in: [19, 18] -> out: []
                siid 3: aiid 10 set-charge: in: [19, 18] -> out: []
                siid 3: aiid 11 set-wifi-state: in: [38] -> out: []
                siid 3: aiid 12 set-timeout: in: [35] -> out: []
                siid 3: aiid 13 set-info: in: [33] -> out: [33]
                siid 3: aiid 14 get-falsh-data: in: [19] -> out: [17]
                siid 3: aiid 15 get-selfcheck: in: [36] -> out: [37]

        ## Events ##
                siid 3: eiid 1 (cook-finish): (args: [25])
                siid 3: eiid 2 (cooking-complete): (args: [])
                siid 3: eiid 3 (hvprotection): (args: [])
                siid 3: eiid 4 (lvprotection): (args: [])
                siid 3: eiid 5 (botsensorhigh): (args: [])
                siid 3: eiid 6 (igbtsensorhigh): (args: [])
                siid 3: eiid 7 (igbtsensorbad): (args: [])
                siid 3: eiid 8 (bottomsensorbad): (args: [])
                siid 3: eiid 9 (communicatebad): (args: [])
                siid 3: eiid 10 (wirebroken): (args: [])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant