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

Add support for xiaomi scishare coffee machine #833

Closed
matteos1 opened this issue Oct 11, 2020 · 9 comments · Fixed by #858
Closed

Add support for xiaomi scishare coffee machine #833

matteos1 opened this issue Oct 11, 2020 · 9 comments · Fixed by #858

Comments

@matteos1
Copy link

matteos1 commented Oct 11, 2020

@rytilahti Is it possible to integrate xiaomi scishare coffee machine in home assistant ? I tried with raw miio commands and it seems to work. thank you

Model: scishare.coffee.s1102
Hardware version: esp8266
Firmware version: 2.1.0

aholstenson/miio#284

@rytilahti
Copy link
Owner

The first step is to implement support for this library, which can then be used to create a homeassistant integration.

@matteos1
Copy link
Author

can you integrate it into miio? If you give me advice I could help you ..

@rytilahti
Copy link
Owner

Sorry, I don't have time to work on this, but if you want to add support to this library, look at some implementations of already existing ones (e.g., #544 is a fairly simple device) for some ideas how the implementation should look like.

After this library supports the device, integrating it to homeassistant will require more work, especially as there is no device class for this type of devices to my knowledge. Here's a relevant architecture issue: home-assistant/architecture#51

@matteos1
Copy link
Author

Sorry, I don't have time to work on this, but if you want to add support to this library, look at some implementations of already existing ones (e.g., #544 is a fairly simple device) for some ideas how the implementation should look like.

After this library supports the device, integrating it to homeassistant will require more work, especially as there is no device class for this type of devices to my knowledge. Here's a relevant architecture issue: home-assistant/architecture#51

I tried to read the code of the examples you mentioned but sometimes it is incomprehensible to me. Maybe, if one day you have time, I would be very grateful for a possible implementation.

@matteos1
Copy link
Author

@rytilahti there is a possibility to use commands via the custom component https://github.com/syssi/xiaomi_raw/tree/develop/custom_components/xiaomi_miio_raw ??
Machine_OFF : turns the machine off. No params. Returns {"result":["ok"],"id":5685}
Machine_ON: turns the machine on. No params. {"result":["ok"],"id":5688}
Query_Machine_Status: returns {"result":["ok",5],"id":5689} or {"result":["ok",203],"id":5696} . The ID is incremented every call. No idea of what the 5 or 203 means.
Buzzer_Frequency_Time: returns {"result":["ok"],"id":5694} . ID is also incremented. No idea of what it means.
Espresso_Coffee: "params":[35,85] those params are mililiters (35) and temperature (85 Celsius). Returns {"result":["ok"],"id":5
Stop_Boiler_Preheat : No params. Returns {"result":["ok"],"id":6446}
Cancel_Work_Alarm : No params. Returns {"result":["ok"],"id":6430}
Hot_Wate : (missing the R for Water). "params":[160,55] (160 ml, 55 Celsius). Returns {"result":["ok"],"id":6427}
Americano_Coffee: "params":[80,90,40,85] (80 ml water, 90 C, 40 ml coffee, 85 C). Returns {"result":["ok"],"id":6409}

@matteos1
Copy link
Author

matteos1 commented Nov 8, 2020

hi @rytilahti and @syssi , with some friends we tried to integrate the scishare coffee machine but it still doesn't seem to work. It does not appear in entities. could you take a look at the code and maybe fix it? thanks

xiaomi_miio_coffee.zip

@matteos1 matteos1 changed the title xiaomi scishare coffee machine Add support xiaomi scishare coffee machine Nov 9, 2020
@matteos1 matteos1 changed the title Add support xiaomi scishare coffee machine Add support for xiaomi scishare coffee machine Nov 9, 2020
@rytilahti
Copy link
Owner

I just created a PR to add initial support for this. It would be great to find out what those unknown commands do, and what sort of status codes are available. Could you please try it out and report back what status codes you are getting for status during different phases of brewing?

@syssi
Copy link
Collaborator

syssi commented Nov 9, 2020

Some additional feature/methods:

Query_Machine_Status []
Machine_ON []
Machine_OFF []
Buzzer_Frequency_Time [1, 100]
Espresso_Coffee_Set [35,85]
Americano_Coffee_Set [80,90,40,85]
Hot_Wate_Set [160,55]
coffeeType params
Cancel_Work_Alarm []
Boiler_Preheating_Set [temp]
coffee []
All_Recovery []
Machine_Descaling []
Stop_Boiler_Preheat []
Continue_Operation []

I assume you can store some presets at the machine (Espresso_Coffee_Set [35,85]). If you call the method "Espresso_Coffee" the configuration is used.

@syssi
Copy link
Collaborator

syssi commented Nov 9, 2020

Some status codes:

  • 1: machineClose: 'The machine is in the shutdown mode'
  • 2: machineOpen: 'The machine open'
  • 3: machineChecked: 'Machine self-checking'
  • 4: stopMachinePreheat: 'Stop preheating'
  • 5: makeComplete: 'Complete the making'
  • 6: stopMachineDescaling: 'Stop descaling'
  • 7: machineStandby: 'Machine standby'
  • 8: machinePreheatSet: 'Preheating boiler set'
  • 10: cancelWorkOrWarn: 'Cancel work or report to the police'
  • 51: stopMake (selectedCup !== 0): 'Stop making coffee'
  • 52: stopMake (selectedCup !== 1)
  • 55: stopMake (selectedCup !== 2)
  • 61: stopMake
  • 150: italyCoffee, americaCoffee, hotWater !?
  • 151: coffee 35, cupAmount 35, temp 85
  • 152: coffee 40, cupAmount 120, water 80, temp 90
  • 160: cupAmount 160, water 160, temp 55 (no coffee!?)
  • 195: italyCoffee, americaCoffee, hotWater
  • 201: making: 'The machine is making coffee'
  • 202: ntcWarn: 'NTC fault alarm'
  • 203: tankLow: 'The tank lacks of water'
  • default: machineOpen: 'The machine open'

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

Successfully merging a pull request may close this issue.

3 participants