Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unavailable TapoL510 bulb after updating to new 1.2.13 version and plugp100==2.1.17 #206

Closed
piio opened this issue Jul 9, 2022 · 67 comments

Comments

@piio
Copy link

piio commented Jul 9, 2022

Hi,

After updating to newest version on HA 2022.7.2 integration is now installed correctly, but my light bulbs are unavailable

I tried to run python with debug enabled:
import logging

import asyncio
from plugp100 import TapoApiClient
logging.basicConfig(level=logging.DEBUG)

async def main():
# create generic tapo api
sw = TapoApiClient("ip", "email", "password")
await sw.login()
await sw.on()
await sw.set_brightness(100)
print(await sw.get_state())

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.run_until_complete(asyncio.sleep(0.1))
loop.close()

And I got result:

DEBUG:plugp100.api:Device inner response: {'error_code': -1501}
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "", line 4, in main
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 85, in login
await self._login_request(self.username, self.password)
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 209, in _login_request
self.token = decrypted_inner_response['result']['token']
KeyError: 'result'

Version of the custom_component

1.2.13, HA 2022.7

Configuration

Describe the bug

Can't use light bulbs - before with 2022.6.7 it worked correctly. There was no changes on devices

Debug log

@TomMiga
Copy link

TomMiga commented Jul 9, 2022

I have same problem.
Screenshot_2022-07-09-20-12-51-311_io homeassistant companion android
Screenshot_2022-07-09-20-13-04-725_io homeassistant companion android

@petretiandrea
Copy link
Owner

Hi,

After updating to newest version on HA 2022.7.2 integration is now installed correctly, but my light bulbs are unavailable

I tried to run python with debug enabled:
import logging

import asyncio
from plugp100 import TapoApiClient
logging.basicConfig(level=logging.DEBUG)

async def main():
# create generic tapo api
sw = TapoApiClient("ip", "email", "password")
await sw.login()
await sw.on()
await sw.set_brightness(100)
print(await sw.get_state())

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.run_until_complete(asyncio.sleep(0.1))
loop.close()

And I got result:

DEBUG:plugp100.api:Device inner response: {'error_code': -1501}
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "", line 4, in main
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 85, in login
await self._login_request(self.username, self.password)
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 209, in _login_request
self.token = decrypted_inner_response['result']['token']
KeyError: 'result'

Version of the custom_component

1.2.13, HA 2022.7

Configuration

Describe the bug

Can't use light bulbs - before with 2022.6.7 it worked correctly. There was no changes on devices

Debug log

This could be a regression issue. Have you tried to remove and re-add device?

@pothirak
Copy link

pothirak commented Jul 10, 2022

This could be a regression issue. Have you tried to remove and re-add device?

I tried, it doesn't work

@deivll
Copy link

deivll commented Jul 10, 2022

Here the same problem with L530 Series in two different devices. Before it was perfectly working

@digitaljamie
Copy link

I've got the same issue. 3 L510 lights not working with HA 2022.7.2 and 1.2.13. I get invalid authentication when I try to remove and readd them, when I know they added with the same details before the updates

@DarioPalmisan
Copy link

Hello,
the same happen to my Tapo P 100 socket, while the two P110 work fine!
I tried removing and reinstalling the P100, without success.

@pietrouk
Copy link

Same authentication issue for me on Raspberry Pi 4 and p100 plugs
Home Assistant 2022.7.2
Supervisor 2022.07.0
Operating System 8.2
Frontend 20220707.0 - latest
Tapo Controller v1.2.13

@t0nyb
Copy link

t0nyb commented Jul 10, 2022

Exactly same setup and problem as pietrouk above

@piio
Copy link
Author

piio commented Jul 10, 2022

Hi,

In my case changing password (changing capital letters to lower case only) as suggested in #122 make my L510 smart bulb available again.

@t0nyb
Copy link

t0nyb commented Jul 10, 2022

username and password all lower case and numerals

@Aljosha89
Copy link

+1 not working with P100 plug.

Already tried to change psw, remove and add again device. Still invalid credentials (no capital letters)

@donoghdb
Copy link

+1 I have done the same and the issue continues. I wish I could figure out the issue?

@SkoobyDu
Copy link

Hi, same issue all of my p100 sockets are offline following the latest HA release. PW is all lowercase as suggested and I'm still getting authentication failed. Any idea?

@masoneff3
Copy link

I had the same issue with 1.2.13 on HA 2022.7.2, but changing the PSW to all lowercase (+ numbers and symbols) worked for me. My email was already all lowercase. My setup includes a P100 and two L530E lightbulbs.
Note: minutes before upgrading the component on HA, I removed and re-added my devices on the Tapo app, since I needed to change the WiFi network anyway; I don't know if this can make a difference.

@petretiandrea
Copy link
Owner

Hi guys, I've a tapo l510 that's works fine with the latest version. My suggestion is to remove all tapo devices from integration and re-add it. Similarly, I suppose that the "Invalid authentication" is related to a "transient" state of tapo devices, which aren't synchronized properly with tapo cloud. So try to change password and remove and re-add tapo device from tapo app.

@petretiandrea
Copy link
Owner

1501

-1501 error is an invalid credentials error, so check your credentials. If it doesn't work, try to change credentials from tapo app and remove re-add device to tapo app and integration.

@DarioPalmisan
Copy link

Hello,
I am sorry to report that even after lowering the password, removing all tapos (I have P100 and P110), add all again, only the tapo P110 works fine, P100 returns "Invalid authentication"!

@TEMPLATER1
Copy link

+1 not working with P100 plug.

Already tried to change password, remove and add again device. Only rolling back to version 2022.6.7 helps me 🫤

@SkoobyDu
Copy link

SkoobyDu commented Jul 11, 2022

+1 P100 isn't authenticating following upgrade.
I've reset the PW to be all lowercase; removed from both HA and TAPO app; TAPO app re-adds fine; HA still gives a failed authentication message.
All TAPO P100 plugs are on the latest firmware.

@petretiandrea
Copy link
Owner

Can you report a detailed log?

@SkoobyDu
Copy link

Can you report a detailed log?

If you can let me know where to grab it from I will

@petretiandrea
Copy link
Owner

system > logs. You can search on google how to get home assistant log registry

@neildsb
Copy link

neildsb commented Jul 11, 2022

1st jump to 2022.7.3

Logger: homeassistant.setup
Source: setup.py:162
First occurred: 11:15:42 am (1 occurrences)
Last logged: 11:15:42 am

Setup failed for custom integration tapo: Requirements for tapo not found: ['plugp100==2.1.14'].

then upgraded in HACS
v1.2.12
Downloaded version
v1.2.13
Available version

restart
nothing in the logs :-(

image

Restore my VM snapshot back to 2022.6.7 & v1.2.12, all working again

@petretiandrea
Copy link
Owner

Setup failed for custom integration tapo: Requirements for tapo not found: ['plugp100==2.1.14'].

This suggests that you are installing an old version of tapo integration.

I suggest you to follow this steps:

  • remove tapo integration
  • upgrade to 2022.7.x
  • install tapo integration from HACS
  • add tapo devices

@SkoobyDu
Copy link

SkoobyDu commented Jul 11, 2022

Hi, this is all I can find in the logs:
2022-07-11 11:10:52 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration tapo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

2022-07-11 12:05:52 DEBUG (MainThread) [custom_components.tapo.common_setup] Finished fetching tapo data in 18.409 seconds (success: False)

@TEMPLATER1
Copy link

TEMPLATER1 commented Jul 11, 2022

Setup failed for custom integration tapo: Requirements for tapo not found: ['plugp100==2.1.14'].

This suggests that you are installing an old version of tapo integration.

I suggest you to follow this steps:

  • remove tapo integration
  • upgrade to 2022.7.x
  • install tapo integration from HACS
  • add tapo devices

After these actions, there are no logs, and in the integration displays "Retrying setup:None"
This line is the only thing in the logs:
2022-07-11 14:05:03 DEBUG (MainThread) [custom_components.tapo.common_setup] Finished fetching tapo data in 0.726 seconds (success: False)
2022-07-11 14:17:15 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Свет на балконе' for tapo integration not ready yet: None; Retrying in background
plug100

@TEMPLATER1
Copy link

Okay, there is good news, or rather in the logs there is an error. I tried to add the tapo p100 device via YAML and got the following error in the logs

2022-07-11 14:17:16 ERROR (MainThread) [homeassistant.components.switch] Error while setting up tapo platform for switch
Traceback (most recent call last):
File "/config/custom_components/tapo/common_setup.py", line 96, in _update_with_fallback
return await self.api.get_state()
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 89, in get_state
state=await self.get_state_as_dict(),
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 213, in get_state_as_dict
return await self._execute_method_request(device_info_method)
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 225, in _execute_method_request
dim_encrypted = self.tp_link_cipher.encrypt(jsons.dumps(method))
AttributeError: 'NoneType' object has no attribute 'encrypt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/config/custom_components/tapo/common_setup.py", line 90, in _async_update_data
return await self._update_with_fallback()
File "/config/custom_components/tapo/common_setup.py", line 99, in _update_with_fallback
await self.api.login()
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 85, in login
await self._login_request(self.username, self.password)
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 209, in _login_request
self.token = decrypted_inner_response['result']['token']
KeyError: 'result'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/tapo/common_setup.py", line 92, in _async_update_data
raise UpdateFailed() from exception
homeassistant.helpers.update_coordinator.UpdateFailed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, 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 57, in setup_tapo_coordinator
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 178, in async_config_entry_first_refresh
raise ex
homeassistant.exceptions.ConfigEntryNotReady

@petretiandrea
Copy link
Owner

Setup failed for custom integration tapo: Requirements for tapo not found: ['plugp100==2.1.14'].

This suggests that you are installing an old version of tapo integration.

I suggest you to follow this steps:

  • remove tapo integration
  • upgrade to 2022.7.x
  • install tapo integration from HACS
  • add tapo devices

After these actions, there are no logs, and in the integration displays "Retrying setup:None"
This line is the only thing in the logs:
2022-07-11 14:05:03 DEBUG (MainThread) [custom_components.tapo.common_setup] Finished fetching tapo data in 0.726 seconds (success: False)
2022-07-11 14:17:15 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Свет на балконе' for tapo integration not ready yet: None; Retrying in background
plug100

No retry should be shown if you remove It, upgrade, and install, cause removing delete everything.

@TEMPLATER1
Copy link

Setup failed for custom integration tapo: Requirements for tapo not found: ['plugp100==2.1.14'].
This suggests that you are installing an old version of tapo integration.
I suggest you to follow this steps:

  • remove tapo integration
  • upgrade to 2022.7.x
  • install tapo integration from HACS
  • add tapo devices

After these actions, there are no logs, and in the integration displays "Retrying setup:None"
This line is the only thing in the logs:
2022-07-11 14:05:03 DEBUG (MainThread) [custom_components.tapo.common_setup] Finished fetching tapo data in 0.726 seconds (success: False)
2022-07-11 14:17:15 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Свет на балконе' for tapo integration not ready yet: None; Retrying in background
plug100

No retry should be shown if you remove It, upgrade, and install, cause removing delete everything.

I tried to remove the tapo integration from hacs completely and reinstall it, but it had no effect. The logs still show the same error as I showed above, and when adding a device via UI, the error: "Invalid authentication".

@SkoobyDu
Copy link

This has just popped up in my logs: Setup failed for custom integration tapo: Requirements for tapo not found: ['plugp100==2.1.14']. 15:52:59 – (ERROR) setup.py invalid tapo config

You need to update the Tapo integration via HACS to the latest version

Sorry realised that after I'd posted the reply.... I've just updated to the latest version and I still can't re-add my P100 plugs...

@t0nyb
Copy link

t0nyb commented Jul 11, 2022

Strange, something is telling lies. Installing the integration fails, but adding the TP100 smart plug manually into configuration.yaml with its ip address and username and password gives me a working Tapo switch on my dashboard.

Who knows?

@TEMPLATER1
Copy link

TEMPLATER1 commented Jul 11, 2022

Strange, something is telling lies. Installing the integration fails, but adding the TP100 smart plug manually into configuration.yaml with its ip address and username and password gives me a working Tapo switch on my dashboard.

Who knows?

What? How? Are you using the latest version of tapo integration and HA?
My yaml configuration only gives me an error. 😕

@DarioPalmisan
Copy link

Strange, something is telling lies. Installing the integration fails, but adding the TP100 smart plug manually into configuration.yaml with its ip address and username and password gives me a working Tapo switch on my dashboard.

Who knows?

I tried that now. It does not work and produce the following log:

2022-07-11 17:18:41 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration tapo which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-11 17:18:41 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2022-07-11 17:18:48 ERROR (MainThread) [homeassistant.components.switch] Error while setting up tapo platform for switch
Traceback (most recent call last):
File "/config/custom_components/tapo/common_setup.py", line 96, in _update_with_fallback
return await self.api.get_state()
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 89, in get_state
state=await self.get_state_as_dict(),
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 213, in get_state_as_dict
return await self._execute_method_request(device_info_method)
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 225, in _execute_method_request
dim_encrypted = self.tp_link_cipher.encrypt(jsons.dumps(method))
AttributeError: 'NoneType' object has no attribute 'encrypt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/tapo/common_setup.py", line 90, in _async_update_data
return await self._update_with_fallback()
File "/config/custom_components/tapo/common_setup.py", line 99, in _update_with_fallback
await self.api.login()
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 85, in login
await self._login_request(self.username, self.password)
File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 209, in _login_request
self.token = decrypted_inner_response['result']['token']
KeyError: 'result'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
self.data = await self._async_update_data()
File "/config/custom_components/tapo/common_setup.py", line 92, in _async_update_data
raise UpdateFailed() from exception
homeassistant.helpers.update_coordinator.UpdateFailed
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, 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 57, in setup_tapo_coordinator
await coordinator.async_config_entry_first_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 178, in async_config_entry_first_refresh
raise ex
homeassistant.exceptions.ConfigEntryNotReady

@petretiandrea
Copy link
Owner

There is a lot of confusion ahahaha

So please READ THIS:

  1. Please install the latest version of integration -> 1.2.13 version which use plugp100==2.1.17. So if your logs show 2.1.14 is not the latest version of integration. BE SURE OF THIS
  2. I've a P100 with hardware 1.0.0 and firmware 1.3.6 and works great. So if you're not, there is something wrong in your configuration.
  3. Also, I've a L510 bulb with hardware 1.0.0 and firmware 1.2.2 and works great. So if you're not, there is something wrong in your configuration.
  4. I noticed 1.20.0 as hardware in some screenshot, this could be the source of problem like hardware version 2.0.0. If this please open another dedicated issue for hardware 1.20.0 by reporting screen of tapo app and logs.
  5. Make IP of devices static through DHCP.

@SkoobyDu
Copy link

latest from log (when attempting manual set up):
2022-07-11 16:19:16 ERROR (MainThread) [homeassistant.components.switch] Error while setting up tapo platform for switch
File "/config/custom_components/tapo/common_setup.py", line 96, in _update_with_fallback
File "/config/custom_components/tapo/common_setup.py", line 90, in _async_update_data
File "/config/custom_components/tapo/common_setup.py", line 99, in _update_with_fallback
File "/config/custom_components/tapo/common_setup.py", line 92, in _async_update_data
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 57, in setup_tapo_coordinator

@neildsb
Copy link

neildsb commented Jul 11, 2022

yes, I have HW 1.20 and have the auth problem

@petretiandrea
Copy link
Owner

yes, I have HW 1.20 and have the auth problem

As I say, open a new issue with a detailed report

@TEMPLATER1
Copy link

There is a lot of confusion ahahaha

So please READ THIS:

  1. Please install the latest version of integration -> 1.2.13 version which use plugp100==2.1.17. So if your logs show 2.1.14 is not the latest version of integration. BE SURE OF THIS
  2. I've a P100 with hardware 1.0.0 and firmware 1.3.6 and works great. So if you're not, there is something wrong in your configuration.
  3. Also, I've a L510 bulb with hardware 1.0.0 and firmware 1.2.2 and works great. So if you're not, there is something wrong in your configuration.
  4. I noticed 1.20.0 as hardware in some screenshot, this could be the source of problem like hardware version 2.0.0. If this please open another dedicated issue for hardware 1.20.0 by reporting screen of tapo app and logs.
  5. Make IP of devices static through DHCP.

I have the latest version of tapo installed and every device has a static IP. Okay, let's assume that the whole problem is in the firmware of the Tapo device itself, because it has version 1.20.0. But why then on the previous version of HA (2022.6.7 and version Tapo Control 1.2.12) everything works fine? 🤔

@petretiandrea
Copy link
Owner

But why then on the previous version of HA (2022.6.7 and version Tapo Control 1.2.12) everything works fine?

There are a lot of variables. First python3.10 and third party dependencies, if you want you can try to use the snippet of code inside plugp100 library by using plugp100 at 2.1.14 version to check if works independently of integration

@neildsb
Copy link

neildsb commented Jul 11, 2022

yes, I have HW 1.20 and have the auth problem

As I say, open a new issue with a detailed report

#209

@t0nyb
Copy link

t0nyb commented Jul 11, 2022

More and more curious

I reported a plug working. It did.

It doesn't now because I have added another 5 plugs to the yaml file in the same manner and with ascending fixed ip addresses.

Now the first plug is greyed out on the dashboard and the other 5 dont appear.

I very much appreciate the time and effort put into this by the developer/s and I cant help because I dont understand much more than I've already reported.

All I can say is that when this does get resolved l will be buying said developer quite a few coffees.

I probably wish I had bought the Ikea triffid stuff.

@t0nyb
Copy link

t0nyb commented Jul 11, 2022

Its repeatable.
.
Take the other 5 out of the yaml file and one works.

Something is wrong with either the addon or my configuration. But that's been working without issue and I was a very early adopter of the 8 Gb pi4.

I'll be back in a week to see if there is any progress. In the meantime i will delete the custom comp0nents tapo directory and the yaml item.

@digitaljamie
Copy link

I tried removing one of my L510's from the UI integration and adding it to config, where I get this error

Error while setting up tapo platform for switch
Traceback (most recent call last):
  File "/config/custom_components/tapo/common_setup.py", line 96, in _update_with_fallback
    return await self.api.get_state()
  File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 89, in get_state
    state=await self.get_state_as_dict(),
  File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 213, in get_state_as_dict
    return await self._execute_method_request(device_info_method)
  File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 225, in _execute_method_request
    dim_encrypted = self.tp_link_cipher.encrypt(jsons.dumps(method))
AttributeError: 'NoneType' object has no attribute 'encrypt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/tapo/common_setup.py", line 90, in _async_update_data
    return await self._update_with_fallback()
  File "/config/custom_components/tapo/common_setup.py", line 99, in _update_with_fallback
    await self.api.login()
  File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 85, in login
    await self._login_request(self.username, self.password)
  File "/usr/local/lib/python3.10/site-packages/plugp100/api.py", line 209, in _login_request
    self.token = decrypted_inner_response['result']['token']
KeyError: 'result'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 205, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/tapo/common_setup.py", line 92, in _async_update_data
    raise UpdateFailed() from exception
homeassistant.helpers.update_coordinator.UpdateFailed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 250, 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 57, in setup_tapo_coordinator
    await coordinator.async_config_entry_first_refresh()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 178, in async_config_entry_first_refresh
    raise ex
homeassistant.exceptions.ConfigEntryNotReady

Raspberry Pi 3B, Home Assistant OS 2022.7.3, Tapo Controller v1.2.13
Tapo L510 Series, Hardware 1.0.0, Firmware 1.2.2 Build 20220110
Results of plugp100 code example:
image

@TEMPLATER1
Copy link

In short, I dare say it's because of the move to Python 3.10. Based on its documentation a lot of things have changed, and most likely because of this integration does not work.

@sharpmindstudio
Copy link

It worked for me after removing all tapo lights, removing and reading the TAPO integrations(hacs), changed tapo credentials (no capital letters), readed the lights. 5 Lights L530.
Thanks!

@petretiandrea
Copy link
Owner

It worked for me after removing all tapo lights, removing and reading the TAPO integrations(hacs), changed tapo credentials (no capital letters), readed the lights. 5 Lights L530. Thanks!

Can you report firware and hardware version of tapo device by taking a screenshot oftapo app?

@petretiandrea
Copy link
Owner

More and more curious

I reported a plug working. It did.

It doesn't now because I have added another 5 plugs to the yaml file in the same manner and with ascending fixed ip addresses.

Now the first plug is greyed out on the dashboard and the other 5 dont appear.

I very much appreciate the time and effort put into this by the developer/s and I cant help because I dont understand much more than I've already reported.

All I can say is that when this does get resolved l will be buying said developer quite a few coffees.

I probably wish I had bought the Ikea triffid stuff.

can you attach here your configuration yaml?

@t0nyb
Copy link

t0nyb commented Jul 11, 2022 via email

@sharpmindstudio
Copy link

It worked for me after removing all tapo lights, removing and reading the TAPO integrations(hacs), changed tapo credentials (no capital letters), readed the lights. 5 Lights L530. Thanks!

Can you report firware and hardware version of tapo device by taking a screenshot oftapo app?

image

@gintgunaras
Copy link

gintgunaras commented Jul 12, 2022

Two Tapo lamps L510 Series, both Hardware 1.0.0, Firmware 1.2.2 Build 20220110 Rel.72329 (latest found and installed by the Tapo app).

Password (8-char long) and email contain only lowercase letters and digits.

Tapo Intergration stopped working since HA 2022.7.

With new 1.2.13 version got the same auth error in UI, same logs for yaml config.

  1. Tried to remove and re-add lamps without changing credentials - no success.

  2. Changed password several times - same length (8 char), but different set of lowercase letters and digits, and re-added lamps then - same result.

  3. Changed password again, but added one special symbol at the end (round bracket), so it became 9-char long, removed lamps. But this time, when re-adding lamps in app, also changed the name of both lamps at the last step. That worked for me, managed to add lamps into HA successfully Then I renamed lamps (restored old names) in app and HA, and did the same for their auto-created sensors/switches in HA to comply with the current HA config.

Lamps still work without issues.

@piio
Copy link
Author

piio commented Jul 12, 2022

Hi,

In my case I have problem with changes with file taporequest.py from 2.1.17 - after going back to previous version (containing requestTimeMils and terminalUUID) my light bulbs are correctly working.

I'm using example code using plugp100 library:

import logging

import asyncio
from plugp100 import TapoApiClient

logging.basicConfig(level=logging.DEBUG)

async def main():
# create generic tapo api
sw = TapoApiClient("ip", "email", "password")
await sw.login()
print(await sw.get_state())

loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.run_until_complete(asyncio.sleep(0.1))
loop.close

I have created pull request to roll back this changes petretiandrea/plugp100#48

@petretiandrea
Copy link
Owner

petretiandrea commented Jul 12, 2022

Thanks for hint, I will release a new version by now. It's an unexpected regression

@petretiandrea
Copy link
Owner

A new version of integration released, please try it (v1.2.14)

@DarioPalmisan
Copy link

Now it seems to be working correctly (also for Tapo P100).

Thank you very much to all contributors!

@deivll
Copy link

deivll commented Jul 12, 2022

Now it works with L530, thank you very much for the effort!

@VictoriousCupid
Copy link

works perfect again! aweseom thanks!

@pietrouk
Copy link

@petretiandrea - Same for me, it's now working again, thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests