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 new handshake protocol #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

watfordjc
Copy link

This pull request is regarding #81 and merges the new handshake protocol proof of concept by @chriswheeldon, along with the retry loop mentioned in my comment on the issue, and adds the new protocol as a fallback to the previous protocol.

  1. The changes add a few new dependencies that might not be installed on a system already using the script/program.
    • I have not updated version = 0.4.
  2. The protocol change requires setting a Kaza/TP-Link Cloud e-mail and password if the smart device is connected to the cloud.
    • Configuration file command argument (and parsing) and/or email/username/password command arguments have not been introduced.
    • Splitting user_hash into a separate script/program and adding a user_hash command line option may be preferable.
  3. The discovery protocol has not been included.
    • A discover/scan command line option (or separate script/utility) as well as related options (such as binding IP address) might be preferable.
  4. The classes are inline as I very seldom write python code and am not sure whether or not this repository prefers self-contained code.
  5. As this script/program is called for a single request/response, the use of persistent connections using the new protocol was not considered.
  6. Each retry in the retry loop adds a 0.25 second delay and the number of retries was arbitrarily chosen (I felt 2 seconds of failure should result in failure). This may need tweaking (or removing if the cause of failure can be discerned).
  7. I have done minimal tests (-c info, -c on, -c off) with two HS110 that use the old protocol, two HS110 that use the new protocol, and a KL130B (-c info only) that uses the old protocol.

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

Successfully merging this pull request may close these issues.

1 participant