I get that message @viciovb and other messages (see below).
I had fishbigger’s Tapo-P100-Control running on my Raspberry, but then decided to test petretiandrea’s tapo integration. With the 1st I used the configuration.yaml ok. With the 2nd I can only get the devices by “Add Integration”; if I put them in the configuration.yaml, I get these errors -
One of these lines per device in the configuration.yaml -
2022-01-24 14:05:31 WARNING (MainThread) [homeassistant.components.switch] Setup of switch platform tapo is taking over 10 seconds.
Then -
2022-01-24 14:05:31 ERROR (MainThread) [custom_components.tapo.common_setup] Error fetching tapo data:
Then a set of these per device -
2022-01-24 14:05:31 ERROR (MainThread) [homeassistant.components.switch] Error while setting up tapo platform for switch
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/tapo/switch.py", line 28, in async_setup_platform
coordinator = await setup_tapo_coordinator_from_dictionary(hass, config)
File "/config/custom_components/tapo/common_setup.py", line 31, in setup_tapo_coordinator_from_dictionary
return await setup_tapo_coordinator(
File "/config/custom_components/tapo/common_setup.py", line 60, in setup_tapo_coordinator
raise Exception("Failed to retrieve first tapo data")
Exception: Failed to retrieve first tapo data
Anyone got any ideas on this?
I will go back to fishbiggers, and see if that works on this test system.
Hi Pedro, I am using the tapo platform, not fishbiggers tapo_p100_control.
My HA is running on an a PC running Virtualbox, in an Ubuntu 20.04 Virtual Machine - that seems to work ok (mostly).
When I look at Integrations, I see “information” :
v1.2.2
@petretiandrea
# Home Assistant Tapo Integration
This is a custom integration to control Tapo devices from home assistant.
The core of the integration is provied by plugp100 python library based on work of @K4CZP3R.
My /HomeAssistant/configuration.yaml contains :
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
# Tapo P100 plugs
switch 1:
platform: tapo
ip_address: ipaddress
email: xxx@yyy
password: ****************
switch 2:
platform: tapo
ip_address: ipaddress
email: xxx@yyy
password: ****************
Where :
ipaddress is each devices IP address ala 192.n.n.n
Apologies - intending to get a proper GitHub bug report in…
HA 2021.12.10, running on HA OS, on a Pi 4 8GB. Using the frontend integration, and have commented out any other references in the config.
I’m getting a lot of:
Logger: custom_components.tapo.common_setup Source: helpers/update_coordinator.py:219 Integration: Tapo Controller (documentation, issues) First occurred: 22 January 2022, 09:33:02 (69 occurrences) Last logged: 05:30:06
Error fetching tapo data:
…as well as…
Logger: homeassistant.helpers.service Source: helpers/service.py:129 First occurred: 22 January 2022, 09:33:59 (19 occurrences) Last logged: 04:06:51
** Unable to find referenced entities switch.tapo_15*
** Unable to find referenced entities light.aquarium_spot_rgbw*
** Unable to find referenced entities switch.lg_tv*
** Unable to find referenced entities media_player.rb_study_sonos*
…and…
Logger: homeassistant.components.switch.reproduce_state Source: components/switch/reproduce_state.py:38 Integration: Switch (documentation, issues) First occurred: 12:29:36 (1 occurrences) Last logged: 12:29:36
Invalid state specified for switch.tapo_01: unavailable
FYI - another hole I fell in…
Just for fun (!?!?!) I have installed the HA os VM (using Virtualbox).
See : https://www.home-assistant.io/installation/linux
Using - haos_ova-7.2.vdi
And after installing HACS, I can not add a custom repository.
This appears to be the issue - https://github.com/hacs/integration/issues/2451
I am getting a little worn out keep bumping into showstoppers with HA… Sigh…
Maybe tomorrow will go better…
and more weirdly, the “custom repository” option is no longer greyed out…
So I added the repo, and installed Tapo Controller. Restarted HA. Edited the configuration.yaml and restarted again…
I am now at the same point on the HA os VM (Virtualbox) as I was with Ubuntu VM :
Errors in the logs as above ("ERROR (MainThread) [custom_components.tapo.common_setup] Error fetching tapo data:").
Hi! I’m reporting the “invalid authentication” issues even with lower case email and 8 digit password.
I also noticed that even if I type in lower case my email, the tapo app shows it with the first capital letter.
is there any check that i can do to correctly integrate these plugs in my HA?
If tapo app show your email with a capital letter, seems that the integration won’t work. Follow this issue and the nested one to see how a user has fixed this problem temporary https://github.com/petretiandrea/home-assistant-tapo-p100/issues/122. Spoiler: it create a new account
Hi Pedro, sorry being an HA noob, it took me a while.
I have used pyscript to run the code - I assume that is ok.
I get :
2022-01-27 14:59:40 ERROR (MainThread) [homeassistant] Error doing job: Unclosed client session
2022-01-27 14:59:40 ERROR (MainThread) [custom_components.pyscript.file.tapo-test] Exception in </config/pyscript/tapo-test.py> line 11:
print(await sw.get_state())
^
TypeError: object TapoDeviceState can't be used in 'await' expression
2022-01-27 15:01:20 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140090319703728] Error handling message: Service pyscript:tapo-test does not match format <domain>.<name> for dictionary value @ data['sequence'][0]['service']. Got 'pyscript:tapo-test'
Line 11, as I added a print to try and avoid the “does not match format <domain>.<name>” error - which I think is when the script returns nothing.
I did this after deleting the one device I had added in the UI, and with no tapo devices in the configuration.yaml; and after a restart.
I then added a device using the UI, and I still get the same errors.
The “Unclosed client session” looks a worry !?
I have also now run this from a userid in an Ubuntu terminal window -
I have put the dots in above, as I was not sure what was coded in those strings…
AGAIN I see a “Unclosed client session” error. That was straight after a reboot too.
Does this help? Cheers, Ian
.