petretiandrea / plugp100

Work in progress implementation of tapo protocol in python.
GNU General Public License v3.0
72 stars 27 forks source link

passthrough_protocol stuck in a recursive loop with use_v2 default to False #125

Closed frisbee09 closed 1 year ago

frisbee09 commented 1 year ago

In attempting to debug my issues with the Tapo HomeAssistant integration, I think I have found a bug in the _login_with_version function.

The code here will exit if v2 has been tried, and I'm assuming should call itself again with use_v2 as True: image

However, since use_v2 defaults to False, it gets stuck. I have Home Assistant logs hitting a recursion limit so I think this tracks.

I still, however, have no idea how to resolve this credential issue. The credentials being used on the request do not decode back to my username and password correctly. But that's a different issue and if I find this problem I'll raise separately.

The following is my working solution. If you'd like me to I can open a PR for it, but I don't know if this was the intention of the block. image

frisbee09 commented 1 year ago

Update on my credentials issue, I had a + sign in my email address. A new account without a + sign works just fine.