almottier / TapoP100

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

Tapo P100 connection issue #18

Open sachinpatil280 opened 8 months ago

sachinpatil280 commented 8 months ago

Hi, I tried running the your code with my username, password and IP. Device Type: Tapo P100 Hardware version: 2.0 Firmware Version: 1.2.1

I am getting below response:

Traceback (most recent call last): File "C:\Users\xviewla\OneDrive - Konecranes Plc\Desktop\CodeBase\TapoP100-main\power_control.py", line 7, in p100.handshake() # Creates the cookies required for further methods ^^^^^^^^^^^^^^^^ File "C:\Users\xviewla\OneDrive - Konecranes Plc\Desktop\CodeBase\TapoP100-main\PyP100\PyP100.py", line 136, in handshake encryptedKey = r.json()["result"]["key"]


KeyError: 'result'
Session:  <bound method Response.json of <Response [200]>>
Session:  {'error_code': 1003}

Process finished with exit code 1
almottier commented 8 months ago

Hello, It looks you are still using the original code and not the one from this fork. There is no line 136 in PyP100.py