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

Errors in the miio.py and protocol docs #4

Open
matangg opened this issue Mar 8, 2017 · 1 comment
Open

Errors in the miio.py and protocol docs #4

matangg opened this issue Mar 8, 2017 · 1 comment

Comments

@matangg
Copy link

matangg commented Mar 8, 2017

I tried recreating (in my own Python 2 code) a mihome packet that I sniffed with the protocol docs but I wasn't able to get the MD5 checksum right. The protocol docs say this value should be initialized with zeroes. However, in the miio.py code this field is initialized to the device token value. The init_msg_head function also has an error where it uses an "unknown const" value which should be the Device ID (did) value. When I used my own Device ID with the device token in the md5 checksum field before the MD5 calculation I got the correct packet.

@jaiverma
Copy link

Thank you for this comment. You are absolutely right. I spent quite some time debugging my code and realised that what is mentioned in the docs is different from how it is actually implemented.

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

2 participants