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

[Scishare Coffe Maker] params commands not working #979

Open
khmelevskikh opened this issue Mar 20, 2021 · 10 comments
Open

[Scishare Coffe Maker] params commands not working #979

khmelevskikh opened this issue Mar 20, 2021 · 10 comments
Labels

Comments

@khmelevskikh
Copy link

Hi,
As discussed in a previous thread raising a separate report. I've tried to use Scishare Coffe Maker, but for me script doesn't work with parametrised commands like boil_water/brew_americano
Device:

Model: scishare.coffee.s1102
Hardware version: ESP8266
Firmware version: 1.2.8

Version:
miiocli, version 0.5.5

Testcase:

/usr/local/bin/miiocli -d scisharecoffee --ip <ip> --token <token> boil_water 300 90
INFO:miio.cli:Debug mode active
Boiling 300 ml water (90C)
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.miioprotocol: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\x04:\xf3k\x00\x02\x973' (total 16)
        value = Container: 
            length = 32
            unknown = 0
            device_id = unhexlify('043af36b')
            ts = 1970-01-02 23:09:39
        offset1 = 0
        offset2 = 16
        length = 16
    checksum = b'&\xabD;\xc5~\xf2\xf9\x3d\rf4\xcg\x8e\x93%O\xf4' (total 16)
DEBUG:miio.miioprotocol:Discovered 043af36b with ts: 1970-01-02 23:09:39, token: b'<token>'
DEBUG:miio.miioprotocol:<ip>:54321 >>: {'id': 1, 'method': 'Hot_Wate', 'params': [300, 90]}
DEBUG:miio.miioprotocol:<ip>:54321 (ts: 1970-01-02 23:09:39, id: 1) << {'result': ['error'], 'id': 1}
False
@rytilahti
Copy link
Owner

rytilahti commented Mar 20, 2021

I used the names given in #833 (comment) for the implementation.

Could you manually try to change it to Hot_Water just in case it was fixed in some never firmware versions (although @matteos1 explicitly stated that the name misses r? Or test changing the parameters, just in case your selected parameters are out of range for what is accepted by the device?

@khmelevskikh
Copy link
Author

khmelevskikh commented Mar 21, 2021

This one works fine:

miiocli scisharecoffee --ip <ip> --token <token> raw_command Hot_Wate
Running command raw_command
['ok']

so I don't believe it relates to missing 'r'
Other parametrised commands aren't working as well:

miiocli scisharecoffee --ip <ip> --token <token> brew_espresso 30 90
Brewing 30 ml espresso (90C)
False

In Mi Home I can set 30 ml 90C for espresso. I've also tried with different values

@khmelevskikh
Copy link
Author

khmelevskikh commented Mar 24, 2021

Played with python script a bit:
This works fine:
return self.send("Hot_Wate")[0] == "ok"
This works fine as well and gives me correct ml value:
return self.send("Hot_Wate",[amount])[0] == "ok"
This one gives me 300ml(constantly) and temp is changing now:
return self.send("Hot_Wate",amount,temperature)[0] == "ok"

@rytilahti
Copy link
Owner

Would you mind creating a PR for the necessary changes?

@matteos1
Copy link

some solution?

@khmelevskikh
Copy link
Author

khmelevskikh commented Apr 13, 2021

Would you mind creating a PR for the necessary changes?

I'd love too.. But I didn't find the exact solution... I still have no idea how I can control both amount & temperature at the same time...
If anyone have any suggestions I can test...

@matteos1
Copy link

how could i help?

@khmelevskikh
Copy link
Author

I've checked that for my machine it cannot pass more than one parameter for any command, even for raw_command Americano_Coffee [80]
So I've no ideas... Can we make params optional? So at least we will be able pre-set params in mi home and use it from script without options

@nekromant
Copy link

Anybody tried wiresharking stock app? Can't try myself just yet - I'm only thinking of getting this very coffee machine quite soon.

@rytilahti
Copy link
Owner

rytilahti commented Jul 20, 2022

I just added some information about how to perform traffic analysis to figure out the protocol to the docs (#1471 - https://python-miio.readthedocs.io/en/latest/contributing.html#improving-device-support). If someone with a device wants to do that and create a PR, I'm happy to help if needed.

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

No branches or pull requests

4 participants