TapoP100
TapoP100 copied to clipboard
P100 - Failed to initialize protocol AuthProtocol
I have a P115 Smart Plug
Failed to initialize protocol AuthProtocol
Traceback (most recent call last):
File "/Users/storm/dev/sandbox/tapo/env/lib/python3.13/site-packages/PyP100/PyP100.py", line 35, in _initialize
protocol.Initialize()
~~~~~~~~~~~~~~~~~~~^^
File "/Users/storm/dev/sandbox/tapo/env/lib/python3.13/site-packages/PyP100/auth_protocol.py", line 110, in Initialize
raise Exception("Failed to authenticate")
Exception: Failed to authenticate
Error: {'error_code': 1003}
Failed to initialize protocol OldProtocol
Traceback (most recent call last):
File "/Users/storm/dev/sandbox/tapo/env/lib/python3.13/site-packages/PyP100/PyP100.py", line 35, in _initialize
protocol.Initialize()
~~~~~~~~~~~~~~~~~~~^^
File "/Users/storm/dev/sandbox/tapo/env/lib/python3.13/site-packages/PyP100/auth_protocol.py", line 244, in Initialize
result = self._request_raw("handshake", {"key": public_key})
File "/Users/storm/dev/sandbox/tapo/env/lib/python3.13/site-packages/PyP100/auth_protocol.py", line 173, in _request_raw
raise Exception(f"Error code: {data['error_code']}")
Exception: Error code: 1003
Traceback (most recent call last):
File "
Could you make sure your credentials are correct using the official website: https://tapo.tplinkcloud.com/tapo_web/#/login/signIn
I have the same issue with one of my 4 P100s which was recently commissioned. My login is working in the link above.
Failed to initialize protocol AuthProtocol
Traceback (most recent call last):
File "/share/tapo/venv/lib/python3.9/site-packages/PyP100/PyP100.py", line 35, in _initialize
protocol.Initialize()
File "/share/tapo/venv/lib/python3.9/site-packages/PyP100/auth_protocol.py", line 110, in Initialize
raise Exception("Failed to authenticate")
Exception: Failed to authenticate
Error: {'error_code': 1003}
Failed to initialize protocol OldProtocol
Traceback (most recent call last):
File "/share/tapo/venv/lib/python3.9/site-packages/PyP100/PyP100.py", line 35, in _initialize
protocol.Initialize()
File "/share/tapo/venv/lib/python3.9/site-packages/PyP100/auth_protocol.py", line 244, in Initialize
result = self._request_raw("handshake", {"key": public_key})
File "/share/tapo/venv/lib/python3.9/site-packages/PyP100/auth_protocol.py", line 173, in _request_raw
raise Exception(f"Error code: {data['error_code']}")
Exception: Error code: 1003
I am also having a "KLAP handshake failed" error using this homebridge plugin. All other P100s are working with this as well.
Same issue with tapo version 1.4.0 build 250901 rel. 175625. I had automatic updates on, and the new release hangs the connection...
Error: {'error_code': 1003} Failed to initialize protocol OldProtocol
Could be "OldProtocol" is the cause of error? and how can I switch to the NewProtocol?
Thank you in advance
Umm, I have check the new protocol and I receive the same error...
It seems the error is caused by "requests" module...
raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: http://192.168.20.103/app/handshake1
check this if you are using version 1.4.0 : https://github.com/almottier/TapoP100/issues/35#issue-3523292729
I don't see this option in my config, only Alexa, google Samsung and something named IFTTT...
I don't see this option in my config, only Alexa, google Samsung and something named IFTTT...
try to update the Tapo app
I've updated the app and now appears the option and finally the script works...
Thank you almottier.
JanusHL
Thanks for the solution altmottier!, it was just so damn hard to find again.
I used your repository before, eventually installed multiple different versions and none worked, only to search for a version that contains the "get_status()" function, leading me back here. Still didn't work, until in a comment I found that the "3rd party connections" need to be allowed in the "Tapo App". Long story short, one damn setting can lead you down a rabbit hole, and I would love to help others avoid that dilemma.
Therefore I would like to ask @almottier to please include the fact that the repository works with "Tapo P100 plugs firmware 1.4.0" ONLY if the "Third-Party Compatibility" is activated. The setting can be found in the "TAPO App" under "Me > Third-Party-Services > Third-Party Compatibility".
I take no credit here, as the information is essentially already spread out over the issues, but that sadly made it impossible to find the solution (search engines, even AI won't find the associated facts here), which is sad.
So please add the collected information in one place, for future searches.
Best regards, Patrick
Hello @Xylvier, I updated the project readme, thanks.