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

Xiaomi Mijia Smart Sterilization Humidifier (SCK0A45) error - DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b'' #649

Closed
cayco opened this issue Mar 23, 2020 · 3 comments

Comments

@cayco
Copy link

cayco commented Mar 23, 2020

I'm trying to connect with Xiaomi Mijia Smart Sterilization Humidifier (SCK0A45).

~/miio  .env/bin/miiocli -d airhumidifiermjjsq --ip 10.0.0.74 --token cd2be39bd7274dfd36d7051cba9a5650 info
INFO:miio.cli:Debug mode active
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\x10\\/^\x00\x00\x12\x81' (total 16)
        value = Container:
            length = 32
            unknown = 0
            device_id = unhexlify('105c2f5e')
            ts = 1970-01-01 01:18:57
        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 105c2f5e with ts: 1970-01-01 01:18:57, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.device:10.0.0.74:54321 >>: {'id': 1, 'method': 'miIO.info', 'params': []}
DEBUG:miio.device:Retrying with incremented id, retries left: 3
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\x10\\/^\x00\x00\x12\x87' (total 16)
        value = Container:
            length = 32
            unknown = 0
            device_id = unhexlify('105c2f5e')
            ts = 1970-01-01 01:19:03
        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)
...

In order to retrieve the token I used 2 methods, both returning the same results:

I used token for the Xiaomi hub and also the one for the humidifier. I was able to communicate with a vacuum cleaner but not with the Humidifier.

I've seen report that it worked for. some device but several weeks ago stopped: #635

@rytilahti
Copy link
Owner

The raw bytes warning is normal for the handshake message, but I'd guess that that device is not using the miio protocol (as it's not answering to the info query). If you want to investigate how it communicates, this page gives some guidance on how to do that: https://github.com/aholstenson/miio/blob/master/docs/protocol.md

@rezmus
Copy link

rezmus commented Mar 28, 2020

afaik it's deerma.humidifier.mjjsq and should be supported.

@rytilahti
Copy link
Owner

Thanks for the info, @rezmus!

@cayco try miiocli airhumidifiermjjsq info (and other commands), and report back if it is not working as expected!

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

No branches or pull requests

3 participants