-
Notifications
You must be signed in to change notification settings - Fork 137
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
Cant login to P100 #62
Comments
I just updated to Home Assistant Core 2022.4.6 and also updated PyP100 from 0.0.18 to .19 and now run also into an exception 'result' when calling getDeviceName. This is the relevant stack backtrace:
I suspect #52 |
@fishbigger Comparing this issue here #62 with #50 and #54 ... |
Yes they are @realzoulou. I definitely think some better error detection should be put around there that can attempt to diagnose the problem. At the moment all we can do is guess at what the issue is. I will try and add this asap so we can diagnose it! |
I did a comparison of PyP100 0.0.18 vs .19 regarding what bytes are actually going back and forth between my test P110 smart plug and my Home Assistant Core running in my WSL2. Following is the "Follow TCP stream" of Wireshark with PyP100==0.0.18 (still good for me) when HA executes self.handshake in P100.getDeviceName method:
to compare with PyP100==0.0.19 (bad for me):
Note: I saw already that I have an "old" requests==2.24.0 and updated to 2.27.1. Did not change anything for good. |
Did a few experiments and I am now pretty sure that (some or all?) Tapo devices (or firmware versions?) do not allow a 2nd handshake and/or login within the same TCP session. So my two cents on the alternatives I could image for fixing this issue: |
I had this problem even on .18 version. I'm doing something wrong?
|
Fix fishbigger#50, fishbigger#54, fishbigger#62, fishbigger#64. Description: P100 instance initially has no open requests.Session. When P100.handshake() is called, a previous Session is closed and a new one created. Behavioral change: P100.getDeviceName() now expects that handshake() and login() has happened on the P100 instance before. Signed-off-by: richi <zoulourns@gmail.com>
Its the pull request fishbigger#65 `P100.handshake() starts new TCP session`, which should fix the recent issues fishbigger#50, fishbigger#54, fishbigger#62, fishbigger#64
TapoP100 it's working or closed as unsuccessful project? Maybe some day it will work? even one time? I changed password and still getting Invalid "Request or Credentials". DFA disabled. Tested e-mail and login name. Even tested login from tplink camera. |
i looked into this a bit and im getting the following error
so wondering if the api has changed (hardware 1.20.0, firmware 1.4.10) |
I'm getting the invalid credentials problem on the P105. Firmware on the plug: 1.3.6 With PyP100 0.0.25, I can operate the plug fine. With 0.1.0, I get this on
|
Similar issue here.
|
Got things working months ago by updating the millisec part of the requests as noted in a different issue/ I think this value is used to deduplicate requests, and therefore just passing 0 all the time won't work. |
Could you point me to where that millisec part issue is? |
I cant login into P100 - i did check password to tp-link cloud
any one home some idea?
I got error:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.10/dist-packages/PyP100/PyP100.py", line 167, in login
raise Exception(f"Error Code: {errorCode}, {errorMessage}")
Exception: Error Code: -1501, Invalid Request or Credentials
The text was updated successfully, but these errors were encountered: