[Custom Component] Tapo P100 Plug Control

@Extreeeme put together some helpful directions for installing PyP100 in a post above. Give that a try.

Sorry, Im a newbie and I do not know where I have to type this. I tried SSH but no luck.
I ve HA installed on a Raspberry pi 4

Ive to run pip3 command on HassOS? Someone can help me? Thanks!

Just wanted to say a HUGE thx to @fishbigger. I was looking at the Tape plugs, having a hard time on PrimeDay to commit to either Kasa or these cheaper, less clunky, more modern Tapo switches. No one haven’t figured them out yet, but saw your posts and just was confident you’ll triumph :stuck_out_tongue:.

Anyways, just wanted to share how extremely easy it was for me:

  1. Install HA --> docker run --init -d --name="home-assistant" -e "TZ=Europe/Vienna" -v /Users/me/Documents/HAConfig:/config -p 8123:8123 homeassistant/home-assistant:stable
  2. cd /Users/me/Documents/HAConfig/; mkdir custom_components & copy tapo_p100_control folder (from GitHub)
  3. nano configuration.yaml (or any Texteditor) and add (for multiple switches):
switch: 
  - platform: tapo_p100_control
    ip_address: 192.168.1.103
    email: [email protected]
    password: yy
  - platform: tapo_p100_control
    ip_address: 192.168.1.104
    email: [email protected]
    password: yy
  - platform: tapo_p100_control
    ip_address: 192.168.1.105
    email: [email protected]
    password: yy

First I just copypasted the single config entry and renamed each “switch:” like “switch bed:”, but @Soos’s way is more concise. I think the copypasting of credentials is ok, because u could have multiple accounts set up that way, which is nice if needed.

And because there haven’t been many screenshots of the UI (especially with multiple switches setup), here you go :wink:

Next up my ultimate goal, I’ll try to get them bidged over to HomeKit so I have one unified central convenient control with no extra app whatsoever. Still have to integrate my Eachen Wifi Relais switches though.
If anybody got some thoughts on how to bridge custom components to HomeKit or other HA Integrations (like the HomeKit Bridge there), let me know!

With the app Tapo we can see the information of Runtime (Today, Past 7 days and Past 30 days).
Do you know how can we retrieve that information from the device? Maybe @K4CZP3R

IMG_4018

1 Like

Probably something really silly I’m doing, but I am getting this error:
image

I’m running HA core in docker, do I need to add the PyP100 module somehow?

EDIT: Got this working by installing the module:

apt install python3-pip
pip3 install PyP100

Thank you so much for this, awesome work!!

Yep :slight_smile: Another feature I can work on :slight_smile:

1 Like

You have done some awesome work here! Will this become an official add on at some point? I really like these plugs as they are nice and compact.

I cant get to work tapo with the credentials problem Its very dissaponting

It does seem that the component sometimes doesn’t like plugs / accounts that are already set up, giving a ‘Possibly bad credentials’ error in the HA Log. It’s not clear why.

Many people seem to have had success by resetting the plugs, and then creating a totally new Tapo account. Have you tried this?

After a few tries, I managed to get it working. First of all thank you fishbigger for your work.
Just for context, I run HASSIO with HA 0.118 inside a Docker container on a RPi3B+.

As many of you, I had the “Possibly invalid credentials” error. This is what I did:

  • reset the P100;
  • deleted it from my account;
  • changed my app password and set it to 8 characters, only lowercase, 1 number, no special characters;
  • added the P100 to my account (I simply called it “tapo”)

After rebooting HA it worked.

1 Like

Thanks @dogez
Now my two Tapo are working!!!
I also gave different name like “Christmas tree”, no problems!!
Thanks a lot!

If you missed the sh!tstorm with some of the Tp-Link Kasa plugs:

Ouch. Well yeah I feel this could unfortunately happen at any time with the tapo plugs because ultimately this connection we have now is even more hacky and “unapproved” than the Kasa local integration was.

Have a look at the end of the topic, the py-kasa integration is about to be updated, there seems to be a similar protocol for those plugs as well. App/handshake1 and handshake2 endpoints for the handshake. It is called KLAP protocol.

After a Black Friday spree on cheap P100s, I decided to beef up my rubbish password on the account. The integration failed with ‘Possibly Invalid Credentials’ again. Eek. So I repeated the new account, reset everything, re-add everything method. Aaaaaaand can’t get them back.

@fishbigger - you’ve done some sterling work on getting this integration moving quickly. But there is clearly something a little rum about how TP-Link are validating credentials here. Combined with the rather shifty stuff going on with the Kasa range (ie cutting off local access), I wondered if you’re still actively looking at how this is achieved, and potentially looking at an official API route… (as @GSzabados mentions above)?

*Nothing to do with the now 15 plugs sat here blinking at me, you understand…

An update: after all sorts of juggling, I went back to the account that worked, changed the password back to the terrible one, and… it all works again as if nothing changed. If I change the password again, it breaks. Obviously something very specific going on about whether it likes the credentials or not.

1 Like

Just wanted to add that reducing my password length from 10 to 8 characters fixed the credentials issue for me. It included numbers too.

1 Like

Interesting. I’ve just managed to get (yet another) new account working. And I also took the password down to 8 characters from 10…