TP-Link Tapo P100

Thanks for this guy’s. Now I can buy more tapo plugs. Works nicely.

Logger: homeassistant.helpers.entity
Source: helpers/entity.py:477
First occurred: 3:18:41 (1 occurrences)
Last logged: 3:18:41

Update of switch.kerstboom is taking over 10 seconds

Hi guys,

I’ve recently bought a box of four Tapo P100 sockets and they’re great but as we already know, they can only be controlled in the tapo app. Well, until I found this. I’m very interested in installing this in my raspbery pi as soon as I get home in the next weeks.

Anyway, about this topic, I was trying the python code and I get the following error:

[p100.py:154 -        login_request() ] Device responded with: {'error_code': 0, 'result': {'response': 'Ijx76G6qj6oYULCPeB/MdKB2OKEdn8EVExcKZpzfYtc='}}
[p100.py:164 -        login_request() ] Device inner response: {'error_code': -1501}
Traceback (most recent call last):
  File "main.py", line 25, in <module>
    my_bulb.login_request(args.tplink_email, args.tplink_password)
  File "C:\Users\MYUSER\Downloads\tapo-p100-python-main\p100.py", line 166, in login_request
    self.token = decrypted_inner_response['result']['token']
KeyError: 'result'

My tapo socket is in firmware version 1.4.3 Build 29291127 Rel. 60156

I changed my password and now it has only letters, both upper and lower case.

Am I doing something wrong?

Thanks!

TP-Link P100 Switches

switch:

  • platform: tapo_p100_control
    ip_address: 192.168.xx.25
    email: [email protected]
    password: password1
  • platform: tapo_p100_control
    ip_address: 192.168.xx.26
    email: [email protected]
    password: password1

I am trying to set up two plug, this is in my config file, but i cant find the plugs in the entity section.
Apologies if the terminology isn’t correct i am a complete noob to HA.
Platform does have the dash before, i think this formats differently.

Your config file is correct.

But do this:

  1. remove that from the config file and save it;
  2. remove the folder tapo_p100_control from your custom_components folder;
  3. restart HA;
  4. add the folder tapo_p100_control to your custom_components folder;
  5. restart HA;
  6. add the configurations to the config file and save it;
  7. restart HA;

Hope it helps.

1 Like

Hi sorry it hasnt helped i cant find the plugs still :confused:

here is my full code just in case i am missing something stupid

Seems ok to me. Maybe a blank line after line 25?!?!? Also, do you have your HA updated? I have the latest version.

Maybe someone more experienced can help…

currently running os 5.10 and version 2020.12.7

Did you mange to fix this issue? I am having the same issue

I got 4 plugs working. This is my experience:

  1. I had the error others mentioned until I change the password to 8 chars 1 number and 1 upper
  2. The formatting below works for more than 1 plug
  3. Restarting the Supervisor|System|Core|Restart Core several times somehow fixes things. Give it a few minutes after a restart to register everything.
  4. I think it important to know what “working” means. Once working your new device will appear in the Configuration|Entities list. It will no appear in the Integration or Devices tab.

Thanks VM for those that helped me get this working.


# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
  - platform: google_translate
switch:
  - platform: tapo_p100_control
    ip_address: 192.168.0.118
    email: [email protected]
    password: Passwor1
  - platform: tapo_p100_control
    ip_address: 192.168.0.150
    email: [email protected]
    password: Passwor1
  - platform: tapo_p100_control
    ip_address: 192.168.0.214
    email: [email protected]
    password: Passwor1
  - platform: tapo_p100_control
    ip_address: 192.168.0.242
    email: [email protected]
    password: Passwor1

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

Also tested with 8 character password with only letters and lowercase. Working fine.

I have an error:
Platform error switch.tapo_p100_control - No module named ‘PyP100’

Can anyone help me?

I bought this plug several months ago and today I saw that there is a solution.

Hi,
I just remove customs_components folder and configuration.yaml entries and made all again step by step with in between reboots.
Error disappear but I’n not seeing any new device or entities.
What’s your recommendation?
Thanks

Same issue on my side. Tried to reinstall the module but get this message in the logs

Setup of switch platform tapo_p100_control is taking over 10 seconds.
8:27:57 PM – Switch (WARNING)

I don’t have any device / entities related to the Switch

Any idea?

Upgrading & doing installation from scratch has solved my issue

Congrats!
I’m on the same position… not working :frowning:
I just uninstall everything and do it again… but it stills doesn’t working and doesn’t showing any device.

Hi Guys,
also having some issues getting things to work.
I am now passed the "no module named ‘PyP100’ error by adding the folder and then restart before adding the config entry, and then restart once more. So far so good. :smiley:
Now I am having the authentication issue:
Exception: Error Code: -1501, Invalid Request or Credentials
I have tried to change my password to something not so cryptic, only having one capital letter and numbers, no special characters. It’s 9 characters in length is that an issue. ?(shouldn’t be I guess as the installation example on Github shows 11)
I am able to login using the Tapo app and confirm the account still works wit the new password and email, but so far in HA no luck!
Was there also something about you couldn’t use the primary tp-link account to connect to the switch, or it doesn’t matter which user you use?
I also tried adding the credientials directly instead of secrets file.
I am using latest version on my pi3b
Version 2021.1.5 Home Assistant OS
Home Assistant OS 5.10

any ideas what I could try.

Thanks.

Sorry for the error the installation on github is just showing where to put your password. On some occasions changing to a 8 letter password worked and other people have tried forgetting all the devices and readding them. For some reason tapo don’t like the encryption on some types of passwords.

I will try to change it to 8 letter instead and also afterwards the remove / re-adding part.
Thx.

EDIT: So I tried to remove the switch from Tapo and add it again. Perhaps this is an issue when you have to change user password to something else and the entries has to be “re-authenticated” back in! don’t know. I did stay on the password with 9 letters, but now I am actually thinking about trying to go back to the old password more complicated and with special characters to see if it works. Or is it confirmed that special characters is a NO GO. Otherwise no need for me to try. :slight_smile: also entity came in as the real name, and I didn’t have to do anything it just works, and fast. Spend a long time with this and Finally this plug is in HA.
Thanks for suggesting to remove the device it self.

Solved!
I did this schema:

  • uninstall everything from HA and device from Tapo app;
  • put folder on custom_components;
  • restart;
  • put code on configuration.yaml file
  • restart
  • install device on Tapo app;
  • restart
  • force a password change in Tapo app (i had the old password format, so my password didn’t match the new format);
  • edit configuration-yaml
  • restart

And after those steps Tapo P100 appear on entities TAB with the name that I choose on Tapo app

Many thanks