I will work on it
Latest update is causing this:
Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for tapo_p100_control doing I/O at custom_components/tapo_p100_control/switch.py, line 52: return self._p100.getDeviceName()
fixed (I think)
Hello,
thanks a lot for your awesome work!
I can’t make it working. I copied the folder and added the lines in configuration.yaml, I continue getting this error. I did also a password reset and several reboot but nothing. What am i missing?
Thank you
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 "/config/custom_components/tapo_p100_control/switch.py", line 35, in setup_platform
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
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 197, 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 37, in setup_platform
_LOGGER.error("Could not connect to plug. Possibly invalid credentials")
NameError: name '_LOGGER' is not defined
Is your correct email in the configuration.yaml file?
Yes it is, I tried to comment it reboot and uncomment, still the same error
Thank you
Can you sign into the tapo app with the same credentials?
Yes I did a logout from tapo app and I am able to login with same mail and pwd I wrote in configuration.yaml
Thanks
Have you done a password change? And does your password/email contain any special characters?
Yes I did. My password had special characters but now has only letters and numbers. Unfortunately still doesn’t work, same error messages. I don’t know what’s wrong with my HA. I have installed other custom components without any problems.
Thanks a lot for your support
Hi can you just unplug and replug in your plug see if that fixes anything. Also make sure your using your updated password in the configuration.yaml file
Cam confirm this appears to be fixed. Once again many thanks for this integration.
I’m sorry but nothing. I also did a reset of my plug. I have another one, still same error.
I’m doing anything I can. Do you have any other idea?
Thanks
What happens if you log out in the Tapo app and then while logged out try using HA?
Same result
I’m not facing these password issues but I’m beginning to think it must be an issue with special characters in passwords or something similar.
I’ve faced very similar issues before when programmatically reading YAML configs (although admittedly that was with PHP, not python).
A few possible remidies:
Try a password without special chars (or just different special chars like a “.” )
Ensure your YAML config has your username and pass surrounded by quote marks.
The tapo cameras allow to control them with the user admin, and using the password from the TP-Link account. They don’t allow the admn user to view the video feed, but anything else. Migth worth a try with admin as user.
My guess would be the same, that some character is encoded incorrectly, but the . cannot be the one, as that is a must, due to the ending of the mail address, ie.: .com, .co.uk, .net etc.
Might be an issue of the length of the email address or password.
The plugs do not allow the user “admin” to be logged into the plugs but from my tests the special chars @ . ! all work
Yes, both single and double quotes are fine. (Using either ’ or " is fine)