TapoP100: Unable to setup a session/ handshake with TpLink Tapo bulb

File "python/site-packages/PyP100/PyP100.py", line 129, in handshake
encryptedKey = r.json()["result"]["key"]
KeyError: 'result'

I checked the response and it happens to be: {'error_code': 1003}

I am trying to set a connection with my TpLink Tapo L530 bulb and run this code to turn it on and off:

from PyP100 import PyL530

l530 = PyL530.L530("IP Address", "Mail ID", "Password")

l530.handshake()
l530.login()

l530.turnOn()
l530.turnOff()
l530.turnOn()

How do I tackle this issue?

About this issue

  • Original URL
  • State: open
  • Created 10 months ago
  • Reactions: 7
  • Comments: 20

Most upvoted comments

Im also interester if someone could fix this issue asap. KeyError result also here.

Hello, I forked the project and added the new auth support. I tested it with P100 version 1.2.1 and it works great.

Let me know if it works for you.

Hi ,

I have the exact same response for the P100 plug device. Until today, 2023/09/12, I was able to utilize the package and create a wrapper class to control the switch. Now I get the same error when executing the handshake() function, as the JSON response I get is:

{‘error_code’ : 1003}

@fishbigger , I hope it is okay to tag you for this >.<

Thank you @almottier for fixing this. I really appreciate it.

Thank you @almottier!!!

All my P100’s are working again… both hw version 1.20.0 + fw 1.5.5, and hw version 2.0 + fw 1.2.1 are all working.

Thank you!!