-
Notifications
You must be signed in to change notification settings - Fork 141
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
Cannot connect to Tapo P100 #128
Comments
Duplicate of #123 |
For me the handshake problem with the P100 has arisen after the change of firmware from 1.1.0 to 1.2.1 to fix a security bug. This is a shame as I had just started using these functions with a P100 and was amazed that it worked so well until I did a firmware update. I'm now holding off updating my other P100s which are still OK for now. I do hope someone can find a fix. |
@kebos00 try this fork: https://github.com/almottier/TapoP100 , it works for P100 version 1.2.1 |
That's great! I didn't know if I had to uninstall the previous Py100 but as I wasn't sure how to I just installed your fork anyway. |
Hello @kebos00 , I added support for old firmware using a fallback to the old authentification mechanism. |
I installed your new code but if I use it on old firmware I get the following error. It could be me doing something wrong of course but it still works fine on the latest firmware.
Exception: Failed to initialize device: Failed to authenticate |
@kebos00 I think you are still using the old version.
|
Thanks. I've done that. Failed to initialize protocol AuthProtocol |
Yes, the error message is expected as it will first try the new authentication protocol. It could be avoided by using an optional parameter passing the protocol to use. |
Thank you very much. Your fix is much appreciated! |
Hi dude @almottier thank you for new fork, how did you fix it? can you explain? |
Hello @hams-i , |
Hello, I still have an result error. I'm using handshake and login otherwise I get an errot ('P100' object has no attribute 'token'), but these methods are deprecated, how to replace them ? |
Hi @RFNO
You should not need to call login or handshake. If you still have a problem, please open an Issue in the fork with the error details. |
No, so I try ... The install get no error but ... Still 'P100' object has no attribute 'token' Nevertheless, it works with library tapo (but harder to use) |
I tried again but the command doesn't work with windows... ERROR: Error [WinError 2] Le fichier spécifié est introuvable while executing command git version It works with git installed, and now your library works too. Thank you for your work. |
I confirm @almottier 's fix works for me. Thanks for the contribution @almottier ! |
Many thanks for this - I've had to resort to this as the official control app wouldn't allow me to create an automation with a quick on then off in order to control a fish tank light that uses that to toggle the mode. |
So I was stupid enough to update the firmware on Tapo L510 light bulb to v1.3.1. This branch works for me: I use it as a sunrise simulator before the alarm clock goes off, it became essential in winter. |
Hey there, today we got our first Tapo P100 smartplug. Before buying it I looked into controlling it via Python and found this library. I setup the plug via the app and everything works fine, however when trying to use your example code I always get the following error:
File "#PATH#", line 133, in handshake
encryptedKey = r.json()["result"]["key"]
KeyError: 'result'
I printed out the return value (r.json()) of the post method in your code and get this result:
{"error_code":1003}
The App shows the following information about the plug:
Hardware Version 2
Firmware 1.2.1 Build 230804 Rel. 190922
Since I'm using your example code (with my credentials and ip of course) I don't think it's a usage problem. Did the API maybe change and the code needs to be updated? I hope someone can help =)
The text was updated successfully, but these errors were encountered: