almottier / TapoP100

A module for controlling the TP-Link Tapo P100 Plugs
MIT License
82 stars 25 forks source link

Tap0 p100 failed to authentification 1003 #30

Open MM-old opened 5 months ago

MM-old commented 5 months ago

With this code I tried to use the Tapo P100 / P110 from PyP100 import PyP100 p100 = PyP100.P100("192.168.178.xx", "xxx@gmail.com", "password") # creates a P100 plug object p100.getDeviceInfo() # Returns dict with all the device info of the connected plug

I got this error message: Failed to initialize protocol AuthProtocol Traceback (most recent call last): File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 35, in _initialize protocol.Initialize() File "/home/pi/.local/lib/python3.9/site-packages/PyP100/auth_protocol.py", li ne 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 "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 35, in _initialize protocol.Initialize() File "/home/pi/.local/lib/python3.9/site-packages/PyP100/auth_protocol.py", li ne 244, in Initialize result = self._request_raw("handshake", {"key": public_key}) File "/home/pi/.local/lib/python3.9/site-packages/PyP100/auth_protocol.py", li ne 173, in _request_raw raise Exception(f"Error code: {data['error_code']}") Exception: Error code: 1003 Traceback (most recent call last): File "/home/pi/solar/p100.py", line 10, in p100.getDeviceInfo() # Returns dict with all the device info of the connect ed plug File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 58, in getDeviceInfo return self.request("get_device_info") File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 46, in request self._initialize() File "/home/pi/.local/lib/python3.9/site-packages/PyP100/PyP100.py", line 42, in _initialize raise Exception("Failed to initialize protocol") Exception: Failed to initialize protocol I use raspian os, python 3.9 and the actual firmware from Tapo. I have no ideas what I have to change. Thanks for your help.

marosg42 commented 5 months ago

What firmware is in your device? I updated fw in all my devices(6) yesterday and switched to this fork and all problems went away.

MM-old commented 5 months ago

Hi Marian, thank you for your response. I Have two devices. No 1: P100, Hardware Version EU/2.0 Firmware 1.2.5 Build 240411, Rel 143808 No 2: P110, Hardware Version EU/1.20 Firmware 1.3.0 Build 230905 Rel 152200. The app from tapo says,itis the aktual firmware. Both devices do not work. Now I have no ideas what I can do. Best regards Martin

Am Mo., 24. Juni 2024 um 09:20 Uhr schrieb Marian Gasparovic < @.***>:

What firmware is in your device? I updated fw in all my devices(6) yesterday and switched to this fork and all problems went away.

— Reply to this email directly, view it on GitHub https://github.com/almottier/TapoP100/issues/30#issuecomment-2185787626, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJCTOFFXPZE7B7BHDBXMVO3ZI7CCBAVCNFSM6AAAAABJHZFBRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBVG44DONRSGY . You are receiving this because you authored the thread.Message ID: @.***>

almottier commented 5 months ago

Hello, try to log in using your credentials on https://tapo.tplinkcloud.com/tapo_web/#/login/signIn you may need to create a new password, which should work with your script.

MM-old commented 5 months ago

Thank you very much. It works now perfect.