[Custom Component] Tapo P100 Plug Control

Home Assistant Tapo P100 Control

A custom integration for home assistant to control the Tapo P100 plugs

Installation

To install the Tapo P100 integration copy the tapo_p100_control folder from the github into the custom_components folder on your home assistant instance then these lines should be added to your configuration.yaml file.

switch: 
    platform: tapo_p100_control 
    ip_address: 192.168.x.x 
    email: [email protected] 
    password: Password123

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change

Contributors

15 Likes

@fishbigger thanks for the work on this. It is good to see, that this device is working with HA finally.

@JurajNyiri, you can move forward to the Tapo plugs as they are working finally.

Thanks for good job, I have been following this topic for a long time. But i have error in home assistant:
Platform error switch.tapo_p100_control - No module named PyP100
How can i install this module?

Very nice work here!

Just a heads up, I do not personally use P100 but I checked your source code and I see hardcoded IP address 192.168.0.157 in several places at https://github.com/fishbigger/TapoP100/blob/e3e92ee0ad3a6c104c27af6ce534dfaea941b9b3/PyP100/PyP100.py . That will probably not work for most people.

@bonoirk

It’s working for me but I’m not on a fresh install, it’s maybe because I had run the command

pip3 install PyP100

Before testing the repo

If you run HA on Docker, you could do this :

sudo docker ps

To show you the container’s ID of your HA

Then

 sudo docker exec -t -i [ID of HA] /bin/bash

when you are in it :

pip3 install PyP100

Not sure about that solution but I think that command help my environnement to run the module

I tried out the integration and it works great. There is a slight delay before the switch state updates.

Edit: I just copied the folder, added the lines to the yaml file, and restarted HA. No other steps were necessary.

Great! Thanks a lot! It works!

By the way, what about Tapo bulb L510E? Maybe it can be controlled the similar way?

Does the bulb use Bluetooth or WiFi for its setup?

It use WiFi, in addition to switching on and off there is also a brightness adjustment

@bonoirk, have a look what open port does it have, if 80, then probably yes, if 443, then the API might be different and maybe closer to the camera API.

That’s what I was thinking :slight_smile: I’ve been looking for a smart bulb so I might buy one and have a look :slight_smile:

Port 80 is open on my tapo bulb, 443 closed

Can you use the bulbs IP address instead of the plugs and test that?

Wow! It works with Tapo bulb too! Tanks! All that remains is to adjust the brightness.

3 Likes

@fishbigger, can you have a look on the Tapo Camera API commands? You might going to find some to get details of the bulb, what would give idea what to call to change brightness…

My guess is a param called “brightness” needs to be used in the request, where you have “device_on”. It would make sense.

Once again @fishbigger and all the other guys that contributed massive work! I’ll try to have some contributions as soon as I can figure out the dictionary returned by the getDeviceInfo method.

1 Like

We’ve already found a method :slight_smile: it’s in PyP100 as p100.getDeviceInfo()

1 Like

I have now added the ability to get the name of the plug into the name field rather than the original hard coded value. The new code is now on github and can be installed the same way as before :slight_smile:

Been watching the development eagerly. Just tried it out and I’m glad to report that it’s working perfectly so far. The only mistake I made was adding the config before restart which resulted in an error. After commenting that out, restarting, then uncommenting and restarting again, everything works great.

Many thanks all for your hard work on this.

One thing though. Can we get this to be HACS installable? Will make for much easier updates going forward.