Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Request or Credentials #1

Open
remusgondecjr opened this issue Oct 31, 2020 · 8 comments
Open

Invalid Request or Credentials #1

remusgondecjr opened this issue Oct 31, 2020 · 8 comments

Comments

@remusgondecjr
Copy link

Hi,

I'm trying to set this up for one of my Tapo P100 plugs but I get the following error:
"Exception: Error Code: -1501, Invalid Request or Credentials"

I'm sure that credentials are OK. I even tried changing my password, it works on the Tapo app, but not in home assistant.

@fishbigger
Copy link
Owner

Hey, does your password have any special characters in it? And have you tried a password reset in the app?

@remusgondecjr
Copy link
Author

Yes, I did try a password reset in the app, but no luck. Tried different passwords, also without special characters but still no luck.

@niahane
Copy link

niahane commented Dec 2, 2020

Same here

@rywi
Copy link

rywi commented Dec 3, 2020

Same

2020-12-03 17:18:20 ERROR (SyncWorker_1) [custom_components.tapo_p100_control.switch] Could not connect to plug. Possibly invalid credentials
2020-12-03 17:18:21 ERROR (MainThread) [homeassistant.components.switch] Error while setting up tapo_p100_control platform for switch
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-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 "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
await asyncio.shield(task)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/tapo_p100_control/switch.py", line 41, in setup_platform
add_entities([P100Plug(p100)])
File "/config/custom_components/tapo_p100_control/switch.py", line 49, in init
self.update()
File "/config/custom_components/tapo_p100_control/switch.py", line 79, in update
self._p100.login()
File "/usr/local/lib/python3.8/site-packages/PyP100/PyP100.py", line 159, in login
raise Exception(f"Error Code: {errorCode}, {errorMessage}")
Exception: Error Code: -1501, Invalid Request or Credentials

@piio
Copy link

piio commented Dec 3, 2020

It looks like there is problem with passwords longer than 8 chars.

I also had a problem with Exception: Error Code: -1501, Invalid Request or Credentials with Tapo L510E bulb.

Firstly I got old firmware when I was configuring bulb on Tapo, after configuring it I upgraded to newest one - 1.1.7 Build 20201029 Rel. 40821

With this version I get -1051 error.

After that I changed password to 8-chars (was 12 chars previously) and verified again - nothing changes.
So I removed bulb from Tapo app and re-added it.
After this change the bulb started to work from HA.

@MrSleeps
Copy link

MrSleeps commented Dec 6, 2020

I've also been having the same issue with credentials not being valid.

Can confirm that removing and then adding the plug back into the app worked for me (also be careful you don't get yourself locked out of the account)..

The PHP library tp-link-info by jacobkossman doesn't have this issue..

@deangoldhill
Copy link

I also managed to get it working after some trial and error. And I think there are 2 issues here.
1 - It won't work with a password longer than 8 characters.
2 - the device needs to be removed and re-added to the app for the password change to take effect. This is what had me so confused!
I verified this by changing my password again, but HA continued to work having the old password in the config file. When I once again re-added the device, HA stopped working with the same 1051 error.

@addrum
Copy link

addrum commented Jan 14, 2021

Just did the exact same. Changed password to 8 characters, and readded the plugs. They now show up as entities.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants