TP-Link Tapo P100

I can’t find any attributes (i’m using Developer tools). I installed Tapo Controller from HACS. Should I install something else?

Which plug have you got? The P100 doesn’t support energy monitoring, only the P110 does (I have both)

J.

That explains it. I have the P100. Thanks for the information.

I have a P100 defined as a switch, and would like to use a 433MHz RF remote to turn it on/off. I have a Sonoff RF Bridge running Tasmota, and this generates MQTT messages on the tele/rf-bridge/RESULT topic whenever I press the buttons on the remote. Each MQTT message includes a “Data” item which uniquely identifies the button which was pressed.
Is it possible to extend my switch definition to define on/off MQTT actions for it, or do I need to define automations to achieve this?

switch:
  - platform: tapo_p100_control
    ip_address: 192.168.1.73
    email: [email protected]
    password: p@ssw0rd

Unfortunately i’m not able to move the plug to a room.
It tells me that the entity does not have a uniq id. Maybe related ?

Does anyone know if this can operate the TP100 when there is no internet connection (i.e. when only the LAN is accessible via wifi)?

hello everyone. first of all thanks for you effort and contribution to the community.
following this thread and the code on github I was able to write a shell script version of the library to control the smart plug.
I didn’t know how to directly reach every contribution and I would like to add reference / credits in my github project to yours.
my repo is here: https://github.com/nackstein/P100
if you need to reach me you can find my email in the LICENSE file at my repo.
thanks

So, I see that it “almost” works for most of you… but I couldn’t find anybody having the problem I’m facing. Any clue would be really nice to have…

I tried downloading the repo & creating manually the custom_components entry, it fails to load/restart complaining about a missing module

If I use HACS and I try to add a custom repo, I see a message like this:

[supervisor.store] https://github.com/fishbigger/HomeAssistant-Tapo-P100-Control is not a valid add-on repository

So, I’m stuck without being able to reach my shinny TP100, any idea?

…and I also had to create a account to say a big thanks to YOU!!!

The f***ing “-” symbol ruined me a couple if hours until I found your comment!

The python integration works like a charm, so, thanks also to the author

Huge thanks to fishbigger et al for creating this, I had 4 tapo P100’s in my cupboard that I wasn’t using as they didn’t support tasmota, searched again as I needed another smart plug and found this thread. I now have them all up and running in Home Assistant :slight_smile:

Thought I’d write out the steps I took to get them working, YMMV:

1 – Download the tapo app, register with your email and an 8 character password, including 1 upper case letter and 1 number
2 – Follow the app to add your device(s), if you’re adding more than one, make sure you give them unique names, in my case, I was adding 4 P100 smart plugs, so I imaginatively called them tapo1, tapo2, tapo3, tapo4
3 – Optional – the integration requires that you enter the IP address of the device in your HA configuration, I was a bit concerned about this changing over time, ie after a power cut etc, so I configured my router to use static IPs for the four devices. You can use the app to display the current IP address of the device, click on a device, click on the settings icon (gear) and then device info, you’ll see the IP and MAC addresses.

That’s the devices setup, now to HA:

4 – You now need to download the code from fishbiggers repo on Github and install it in your custom_components directory in ha. Personally, I use ssh for this, but there are many other ways:

[core-ssh ~]$ cd /tmp
[core-ssh tmp]$ git clone git clone https://github.com/fishbigger/HomeAssistant-Tapo-P100-Control.git
Cloning into 'HomeAssistant-Tapo-P100-Control'...
remote: Enumerating objects: 135, done.
remote: Counting objects: 100% (135/135), done.
remote: Compressing objects: 100% (118/118), done.
remote: Total 135 (delta 76), reused 27 (delta 12), pack-reused 0
Receiving objects: 100% (135/135), 27.12 KiB | 2.26 MiB/s, done.
Resolving deltas: 100% (76/76), done.
[core-ssh tmp]$ cd HomeAssistant-Tapo-P100-Control/
[core-ssh HomeAssistant-Tapo-P100-Control]$ ls
LICENSE            README.md          tapo_p100_control
[core-ssh HomeAssistant-Tapo-P100-Control]$ mv tapo_p100_control/ /config/custom_components/
[core-ssh HomeAssistant-Tapo-P100-Control]$ cd ..
[core-ssh tmp]$ rm -fr HomeAssistant-Tapo-P100-Control/
[core-ssh tmp]$

The main point here is that the tapo_p100_control directory from fishbiggers repo is now copied into the custom_components directory, usually under /config on your HA server.

5 - Now that the code is installed in custom_components, you need to restart HA, you cannot skip this as if you try and add the devices to configuration.yaml at this stage, it will fail, as it has not yet loaded the new code (I know, I tried…). To restart, go to the HA UI, then Configuration, Server Controls, Check Configuration and if all is well, Restart.

6 - It’s time to add the devices to your configuration, I added them directly to configuration.yaml, but you can use a separate include file if you prefer, see the docs for this. I already had a switch: section in my file, so I just added the lines for the tapo devices to that section:

switch:
  - platform: tapo_p100_control
    ip_address: 192.168.9.5
    email: [email protected]
    password: Passwor1
  - platform: tapo_p100_control
    ip_address: 192.168.9.6
    email: [email protected]
    password: Passwor1
  - platform: tapo_p100_control
    ip_address: 192.168.9.7
    email: [email protected]
    password: Passwor1
  - platform: tapo_p100_control
    ip_address: 192.168.9.8
    email: [email protected]
    password: Passwor1

Note – change the ip_address, email and password fields to your values.

7 - That’s it, time to restart again to load the new configuration, as always, go to the HA UI, then Configuration, Server Controls, Check Configuration and if all is well, Restart.

8 - As others have mentioned, this integration doesn’t add them as devices, you’ll find them under entities instead, so after restarting I went to my dashboard, hit Edit, chose Add Card, By Entity, selected the four tapo devices, Continue and finally Add to Lovelace UI.

That’s it, they seem to be working fine, next steps for me will be to block them at firewall level from connecting to the internet, but that’s for another day.

Hope this helps and thank you again for the code.

2 Likes

Because you are amazing. Any chance someone wants to look at the p110 and pulling the energy monitoring in from tapo as well :slight_smile:

2 Likes

+1 for pulling energy stats from the P110 as this would be a great feature for me too.

Another question: integration is working for me only if I am using the password directly in configuration.yaml but it does not work if I use password via secrets.yaml. Anybody was successful with secrets? EDIT: it does work.
Also, why this is not available in HACS, is there any particular reason?

Currently it is not available in hacs as I haven’t had the time to work out how to upload it their.

I think energy monitoring is reported in the getDeviceInfo() method but I don’t have any P110 to test it though.

This is really great work, but can someone tell me why this isn’t a built in integration or, at the very least, installable with HACS?

Thanks for the write up @jon.g. The problem is I am using YAML mode and cannot add the plug once it is in the config. Anyone else have this issue?

Thanks @jon.g for the clear instructions. I think I followed them to a T, but I am getting a credential error and it’s failing at the last part.

This is from my log:

Error while setting up tapo_p100_control platform for switch
18:24:09 – (ERROR) Switch (custom integration)

Could not connect to plug. Possibly invalid credentials
18:24:02 – (ERROR) tapo_p100_control (custom integration)

Setup of switch platform tapo_p100_control is taking over 10 seconds.
18:23:50 – (WARNING) Switch

I’ve changed my password multiple times and it still hasn’t worked. Any ideas?

What is your log file saying? I could not see them as entities after multiple restarts. Checked the log and it says possible invalid credentials. Changed password multiple times and still not worked.

Hi,
I’m using them as members of a group, so in my groups.yaml, I refer to them as follows:

tv_lights:
name: TV Lights
entities:
← snip →
- switch.tapo1
- switch.tapo3

ie switch.DEVICENAME, not sure if that helps?

Forget who it was, but someone in the thread said the password must be 8 chars and include 1 upper case letter and 1 number, have you tried that?

I’m not seeing much in the logs, just some slow warnings, ie:
2021-12-06 17:25:00 WARNING (MainThread) [homeassistant.helpers.entity] Update of switch.tapo1 is taking over 10 seconds

Thank you! My own fault for not reading the entire thread, I changed my password to 8 char, all lowercase with 1 number and it worked fine after that.