[Custom Component] Tapo P100 Plug Control

Hi, this is not my integration. With HACS you need to add my repository as custom repository for HACS. After that you can find my integration without manually installation.

Try removing the entry from the configuration.yaml for it - restart homeassistant, and then add it back.

Hi, I tested it with a Tapo Bulb L530. It works great (+ one star). Only problem I have found, the color temperature slider makes the bulb unavailable when set to the furthest cool white.

Hello,

I have the Tapo L530 and whats causing me some issues is that if I Turn Off the light on the switch (Shelly1) the Bulb doesnt recognize that its off… :confused: and so its really hard to make scenes with it

Is recognized as unavailable or not? You need to recognize as turned off when unavailable?

Thanks for it, please open an issue on github and post the log and value that you set :slight_smile:

no it still thinks that is turned on… even doe it doesnt have power, because it was switched off.

there is an issue on github, I’m working on it :slight_smile:

Obrigado! Thank you!

This issue was fixed on latest release (v1.1.1), use it :slight_smile:

1 Like

il ggive it a go!

Hello. I installed the repo from Hacs But when I try to install the tapo_p100 from integrations, I get a Config flow could not be loaded message. There is an issue with pip that I really can not fix however much I try.

Unable to install package plugp100==2.1.6: ERROR: Will not install to the user site because it will lack sys.path precedence to chardet in /snap/home-assistant-snap/218/lib/python3.8/site-packages WARNING: You are using pip version 20.2.4; however, version 21.1 is available. You should consider upgrading via the '/snap/home-assistant-snap/218/bin/python3 -m pip install --upgrade pip' command.

I have tried the command and It does not make a difference. I get

Defaulting to user installation because normal site-packages is not writeable
Collecting pip
  Using cached pip-21.1-py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  WARNING: The scripts pip, pip3 and pip3.8 are installed in '/root/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

homeassistant 2021.4.6 requires pip<20.3,>=8.0.3, but you'll have pip 21.1 which is incompatible.
Successfully installed pip-21.1
WARNING: You are using pip version 20.2.4; however, version 21.1 is available.
You should consider upgrading via the '/snap/home-assistant-snap/218/bin/python3 -m pip install --upgrade pip' command.

This is on Ubuntu 20. Has anybody any Idea how to fix the pip thing?

With the --use-feature command I get

 sudo /snap/home-assistant-snap/218/bin/python3 -m pip install --upgrade pip --use-feature=2020-resolver
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in /snap/home-assistant-snap/218/lib/python3.8/site-packages (20.2.4)
Collecting pip
  Using cached pip-21.1-py3-none-any.whl (1.5 MB)
ERROR: Will not install to the user site because it will lack sys.path precedence to pip in /snap/home-assistant-snap/218/lib/python3.8/site-packages
WARNING: You are using pip version 20.2.4; however, version 21.1 is available.
You should consider upgrading via the '/snap/home-assistant-snap/218/bin/python3 -m pip install --upgrade pip' command.
 pip --version
pip 21.1 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)
 pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

This is an interesting problem. I will try to fix it, plugp100 (is my library), give me two days :slight_smile:

Thank you for the help! I am not sure if it is a problem from your side or mine to be honest. Now both pip and pip3 are using the 21.1 but Home Assistant still has the same message.

EDIT: From what I am understanding since home assistant is installed through snap, it does not allow me to update pip in that folder because it is set as read only. I am sure there is a way to make the user python override that but I can not find it yet.

Logger: homeassistant.util.package
Source: util/package.py:96
First occurred: 8:08:58 PM (1 occurrences)
Last logged: 8:08:58 PM

Unable to install package plugp100==2.1.6: ERROR: Will not install to the user site because it will lack sys.path precedence to keyring in /snap/home-assistant-snap/218/lib/python3.8/site-packages WARNING: You are using pip version 20.2.4; however, version 21.1 is available. You should consider upgrading via the '/snap/home-assistant-snap/218/bin/python3 -m pip install --upgrade pip' command.
Logger: aiohttp.server
Source: requirements.py:138
First occurred: 8:08:58 PM (1 occurrences)
Last logged: 8:08:58 PM

Error handling request
Traceback (most recent call last):
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/components/http/forwarded.py", line 71, in forwarded_middleware
    return await handler(request)
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/components/http/ban.py", line 74, in ban_middleware
    return await handler(request)
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/components/http/auth.py", line 135, in auth_middleware
    return await handler(request)
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/components/http/view.py", line 131, in handle
    result = await result
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/components/config/config_entries.py", line 128, in post
    return await super().post(request)
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/helpers/data_entry_flow.py", line 70, in post
    result = await self._flow_mgr.async_init(
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/data_entry_flow.py", line 120, in async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/config_entries.py", line 570, in async_create_flow
    await async_process_deps_reqs(self.hass, self._hass_config, integration)
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/setup.py", line 373, in async_process_deps_reqs
    await requirements.async_get_integration_with_requirements(
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/requirements.py", line 81, in async_get_integration_with_requirements
    await async_process_requirements(
  File "/snap/home-assistant-snap/218/lib/python3.8/site-packages/homeassistant/requirements.py", line 138, in async_process_requirements
    raise RequirementsNotFound(name, [req])
homeassistant.requirements.RequirementsNotFound: Requirements for tapo not found: ['plugp100==2.1.6'].

Is there any way to just put directly the login info on configuration.yaml without using the interactive dialog that creates this issue?

thank you for your efforts here but I have a noob question alert the email and password… should I maintain them as is [email protected] and password123… or should I actually use my personal email or password… or TPlink tapo app email & password…

Apologies again for the dumb question

Don’t worry, but yes you need to insert your tapo credentials :slight_smile:

Actually there is no way, but this not resolve your problem, plugp100 library will be installed regardless.

Analyzing your log I think that is the problem:

The scripts pip, pip3 and pip3.8 are installed in '/root/.local/bin' which is not on PATH.

Indeed, you receive:

ERROR: Will not install to the user site because it will lack sys.path precedence to pip in /snap/home-assistant-snap/218/lib/python3.8/site-packages

I think that using snap the normal site-packages is not writable, for this reason pip try to install package into another folder, as the log says:

Defaulting to user installation because normal site-packages is not writeable

Plugp100 is actually working using pip, I think that problem is related to your machine.

Thanks pedro96, may you please help with the below errors as for some reason i am getting invalid credentials and can’t set up.

I already restarted my server as well


2021-05-01 12:49:25 ERROR (SyncWorker_4) [custom_components.tapo_p100_control.switch] Could not connect to plug. Possibly invalid credentials
2021-05-01 12:49:25 ERROR (MainThread) [homeassistant.components.switch] Error while setting up tapo_p100_control platform for switch"

Do you know if there is any way to configure home assistant to use a specific path for pip? Thank you very much for your help.