question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tapo P100 issue (

See original GitHub issue

He there.

Just trying to get your Python module working with Tapo P100, and I’m getting the following error messge:

` Traceback (most recent call last): File “/usr/local/lib/python3.6/dist-packages/PyP100/PyP100.py”, line 155, in login self.token = ast.literal_eval(decryptedResponse)[“result”][“token”] KeyError: ‘result’

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “./p100.py”, line 11, in <module> p100.login() File “/usr/local/lib/python3.6/dist-packages/PyP100/PyP100.py”, line 159, in login raise Exception(f"Error Code: {errorCode}, {errorMessage}") Exception: Error Code: -1501, Invalid Request or Credentials `

I am pretty sure that all info is currect, as can successfully connect from Tapo app. Tried both version from pip and from GitHub with the same result. Don’t know where the problem could be as I’m bad a Python coder However I was able to log in to tpcloud via curl and even see that device, althous it says tht it is offline.

Could you please recommed me what to do?

Thanks in advance.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
audohcommented, Dec 9, 2020

Yes, there are oddities with the password. So far I’ve observed:

  1. you must reset your plug to update the password https://github.com/fishbigger/TapoP100/issues/3
  2. your password must not be longer than 8 characters https://github.com/fishbigger/TapoP100/issues/4

The password that alerted me to issue #3 was actually weeks or maybe even months old, so I don’t have any reason to believe it is any kind of periodic sync or caching. I think it never updates. Therefore, any ‘password change’ steps from your testing would be invalid without a reset before testing again.

It’s actually kind of worrying that it is like this, because that’s potentially a security vulnerability right there, especially if your original password was compromised for some reason and you thought that you had safely changed it.

3reactions
technow0rkercommented, Nov 13, 2020

UPD:

Tried to install oldet Python (3.7.0) via pyenv (both local and global) – no luck. Tried to insyall 6.4 – no luck eve in virtual Python environment. Problem at login. Did fresh switch factory reset – no luck. I’m crazy about this. Negotiation seem to work, error arises when login is called.

UPD2

Strange things happening. 😃

  • So, I did reset switch and reinstalled app several times – no luck
  • Changed E-mail address and password – no luck (few resets between these actions)
  • Thought is is the issue with Python 2.9 version, so installed pyenv and installed 3.7.0 and 3.6.4, both with reset – no luck
  • Created a virtual separate Python environment on 6.4 and 3.7.0 (PyP100 was installed separately in each of the environments) – no luck
  • At this moment I began to think that the smart hammer is not a bad idea 😃
  • Finally, Last fctory reset. I’ve decided to change the password to something like ‘testing’ without changing e-mail, and BINGO! I couldn’t beleive. I’m still not sure what did the thing, I think it is about the password. There were no special symbols, but there was one capital letter and few digits. In the working config, here are only small case chars.
  • Tried to go up in Python version ladder, up to system 3.6.9 – all works fine.
  • Tried to change password from _‘testing’ to ‘testing123’got error!!! Here we go 😃 (able to get into tplink cloud via web)
  • Changed password from testing123’ to donottouchNO LUCK, OMG! 😉 (still able to get into cloud via web)
  • Changed password from donottouch back to testingstarted working again! MAGIC!
  • OK, let’s repeat. Chaged password to ‘smartsw’ – NO LUCK. BUT! Tried to connect to switch with older password of testing and it worked. But cloud password changed. DOUBLE MAGIC 😃 Does it store password somewhere in switch with periodic sync?

So how it works. Very interesting story.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tapo P100 problem, power off and still light - Smart Home ...
And now, tapo P100, power off and LED still little lights. It is normal? Propably no...Measured 30 V by voltmeter. 1.
Read more >
What should I do if I fail to configure the Tapo Smart Plug?
1. Move your phone closer to the smart plug, and disconnect other Bluetooth devices from your phone. · 2. Turn off Bluetooth on...
Read more >
User Guide - Mini Smart Wi-Fi Socket
The socket or Tapo P100, or device mentioned in this User Guide stands for Tapo P100 Mini Smart Wi-Fi Socket without any ......
Read more >
Issues · apatsufas/homebridge-tapo-p100 - GitHub
Homebridge TP-LINK Tapo P100 Platform Plugin. Contribute to apatsufas/homebridge-tapo-p100 development by creating an account on GitHub.
Read more >
Customer reviews: TP-Link Tapo Smart Plug ... - Amazon.com
... Remote Control Your Home Appliances from Anywhere, New Tapo APP Needed (P100) at Amazon.com. Read honest and unbiased product reviews from our...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found