home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
70.88k stars 29.56k forks source link

TP-Link P100 goes offline then refuses authentication #121953

Closed MarcusCulverTHL closed 1 month ago

MarcusCulverTHL commented 1 month ago

The problem

My P100 smart plugs are one by one falling offline on Home assist (remaining active on the Tapo Android app).

When removed and the tp-link integration re-polls (forced via a restart) the devices are picked up on the integrations initial scan of the network but clicking configure and prompting for the TP-Link account details it refuses to accept them even though I am able to log in to the TP-Link site confirming thatthe credentials are valid and correctly stored via my password manager.

HA is up to date on 2024.7.2 and the P100 smart plugs are on firmware versions 1.3.7 BUild 20230711 Rel. 61904

My P110 on the same integration have remained active and unaffected to date

What version of Home Assistant Core has the issue?

core-2024.7.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

tplink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tplink

Diagnostics information

Error message when entering valid credentials: image

Log file from Enable debug logging during the authentication attempt: home-assistant_tplink_2024-07-14T20-32-11.677Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 month ago

Hey there @rytilahti, @bdraco, @sdb9696, mind taking a look at this issue as it has been labeled with an integration (tplink) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `tplink` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign tplink` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


tplink documentation tplink source (message by IssueLinks)

steverumsby commented 1 month ago

Same is happening to my P100s. They work OK in the Tapo app and alexa can still control them so it seems to be the HA integration that has the problem.

sdb9696 commented 1 month ago

There is an issue with the P100s and a fix is scheduled for the 19th in 2024.7.3. In the meantime could you try going into the tapo app > Device Info (top right) and changing the Led Status rule from 'AutotoOffand then back toAuto`. Then restart the device and the issue should hopefully go away.

steverumsby commented 1 month ago

There is an issue with the P100s and a fix is scheduled for the 19th in 2024.7.3. In the meantime could you try going into the tapo app > Device Info (top right) and changing the Led Status rule from 'AutotoOffand then back toAuto`. Then restart the device and the issue should hopefully go away.

That sorted it. Thanks!

sdb9696 commented 1 month ago

@MarcusCulverTHL can you advise if you have tried the suggestion above?

applegeeks commented 1 month ago

There is an issue with the P100s and a fix is scheduled for the 19th in 2024.7.3. In the meantime could you try going into the tapo app > Device Info (top right) and changing the Led Status rule from 'AutotoOffand then back toAuto`. Then restart the device and the issue should hopefully go away.

in my case where some of the devices would easily flick LED status state from auto to off to auto without restarting. I had to unplug or completely power off the smart plug and power it back on. (manual workaround I guess) and was able to reload it in the integration again.

saffi1974 commented 1 month ago

There is an issue with the P100s and a fix is scheduled for the 19th in 2024.7.3. In the meantime could you try going into the tapo app > Device Info (top right) and changing the Led Status rule from 'AutotoOffand then back toAuto`. Then restart the device and the issue should hopefully go away.

I can only confirm the method. After switching the status from automatic to off and reloading the devices (P115), all devices in the HA were recognized normally again and can now continue to be used. Thank you for this help!

DarthSonic commented 1 month ago

Workaround did initially work, but 2 days later entities of devices (P100) are unavailable again. I do not want to do this workaround every other day for ten devices on three floors. Hope the release planned for 19th July will fix that issue.

harvey0100 commented 1 month ago

Would also like to comment this seems to be happening with the P110's also. I have two of them and they seem to keep randomly disconnecting now and have to power cycle them fully and reload the integration for them to work.

gergernaut commented 1 month ago

Would also like to comment this seems to be happening with the P110's also. I have two of them and they seem to keep randomly disconnecting now and have to power cycle them fully and reload the integration for them to work.

Same here, all my P110s and P100 get randomly unavailable in HA while being constantly connected in the Tapo app. Happens since today without any firmware upgrade (auto upgrades are off). Changing LED status doesn't help, only unplugging them completely and reloading the integration does the trick. However after an hour or two they all got unavailable again.

sdb9696 commented 1 month ago

Thanks for the logs @DarthSonic. I can see that the device is having issues with one of the queries it makes to the tplink cloud for the latest firmware. We were notified by tplink yesterday that they would need to throttle this on their side until the HA patch on the 19th July reduces how often it's being called. Should be fixed after then.

As a short term fix until Friday you could try to disable polling in the config entry system options

LucVerhelst commented 1 month ago

As a short term fix until Friday you could try to disable polling in the config entry system options

Could you possibly provide us with a how-to for this?

sdb9696 commented 1 month ago

On the integration page which lists all the config entries you click the three dots on the right of the config entry. Then select “system options” and switch off “enable polling for updates”

LucVerhelst commented 1 month ago

On the integration page which lists all the config entries you click the three dots on the right of the config entry. Then select “system options” and switch off “enable polling for updates”

Thanks. Found it. You meant the three dots next to the individual integration items.

DarthSonic commented 1 month ago

Disable polling does not fix it for me.

realzoulou commented 1 month ago

Tapo App -> Device -> LED state : Change from Auto to Off and back to Auto. Then unplug the plug and replug in. Then it is available in HA again.

WangChungBaby commented 1 month ago

None of the above fixed for me. All devices randomly dropping and initialising. All devices have polling for updates disabled and LED state set to off.

DarthSonic commented 1 month ago

Tapo App -> Device -> LED state : Change from Auto to Off and back to Auto. Then unplug the plug and replug in. Then it is available in HA again.

We are beyond that non-permanent workaround and looking for permanent solution or waiting for new release on Friday.

kraizelburg commented 1 month ago

Same issue here, all my TAPO plugs are gone because I cannot re authenticate. Previously was working fine with custom integration. HA 24.7.2

WangChungBaby commented 1 month ago

All Tapo devices are behaving erratically. Bulbs (KL130's) and plugs.

kkevindev commented 1 month ago

Would also like to comment this seems to be happening with the P110's also. I have two of them and they seem to keep randomly disconnecting now and have to power cycle them fully and reload the integration for them to work.

Same here, all my P110s and P100 get randomly unavailable in HA while being constantly connected in the Tapo app. Happens since today without any firmware upgrade (auto upgrades are off). Changing LED status doesn't help, only unplugging them completely and reloading the integration does the trick. However after an hour or two they all got unavailable again.

Same here with the P115.

geofflove commented 1 month ago

Same here - latest HA and about 20 P100 and 110's. All randomly dropping out and reappearing. Interestingly they are also becoming unresponsive in Alexa. I assume due to TP throttling requests? Solutions above get the plugs back on but doesn't last long. I hope Friday sorts it.

sdb9696 commented 1 month ago

Yeah apols everyone but should be sorted on Friday.

geofflove commented 1 month ago

Yeah apols everyone but should be sorted on Friday.

Thanks in advance!

geofflove commented 1 month ago

As a follow up, this has coincided with plugs going offline randomly in the alexa app and also the Tapo app. Would this or the fact that TP link are throttling things be causing this too or do I have a separate issue?

djcleland commented 1 month ago

@geofflove I have the same issue. The plugs are not available in the Tapo app, I assume it's all related as everything was rock solid until the update.

evolsano commented 1 month ago

As a follow up, this has coincided with plugs going offline randomly in the alexa app and also the Tapo app. Would this or the fact that TP link are throttling things be causing this too or do I have a separate issue?

I thought it's my WiFi problem since all my plugs went offline in Tapo app this morning until I restart every single of them. And it also random off and on since last night which turn off my devices. But how does it link to HA?

WangChungBaby commented 1 month ago

I turned off auto polling and LED management completely for all devices in the Tapo app yesterday evening. At the point of update and refresh all appeared to be just as unstable. As of this morning, all bar one plug is available and apprently stable (or at the very least has been stable for the last 3 hours).

martymart8864 commented 1 month ago

This is not only happening with the P100/110 but also with my some of my TP-link HS220 light switches. Same behaviors as above.

Cyruz143 commented 1 month ago

Also noted with L630 bulbs endlessly dropping and reconnecting. Just a note for anyone searching.

drabgail commented 1 month ago

Good to see not just me. All my P110/P100 have been intermittent the past few days and all are not working now

bigjezza commented 1 month ago

So if some kind of throttling in the TPLink cloud can knock these out, is it OK to block internet access for them on my firewall to prevent something like that in the future?

DarthSonic commented 1 month ago

So if some kind of throttling in the TPLink cloud can knock these out, is it OK to block internet access for them on my firewall to prevent something like that in the future?

At least you will not be able to update firmware, and I doubt that you can control your devices from outside your network anymore as they cannot authenticated with the TP-Link / Tapo / Kasa cloud. Correct me if I am wrong, but that should not be needed to do. The integration should limit the calls to the cloud as much as possible and practical.

DarthSonic commented 1 month ago

As a follow up, this has coincided with plugs going offline randomly in the alexa app and also the Tapo app. Would this or the fact that TP link are throttling things be causing this too or do I have a separate issue?

I thought it's my WiFi problem since all my plugs went offline in Tapo app this morning until I restart every single of them. And it also random off and on since last night which turn off my devices. But how does it link to HA?

Yes. I would like to know that too. Why is HA triggering firmware update or version check? This is done by the device itself I thought.

geofflove commented 1 month ago

Yes. I would like to know that too. Why is HA triggering firmware update or version check? This is done by the device itself I thought.

From what I've read HA isn't triggering an update. There has either been an update to the firmware issued by Tapo updating the plus meaning HA is now falling over or Tapo has changed something in the cloud access meaning that HA needs to be updated to cope. But my knowledge is very limited.

bigjezza commented 1 month ago

Thanks for the logs @DarthSonic. I can see that the device is having issues with one of the queries it makes to the tplink cloud for the latest firmware. We were notified by tplink yesterday that they would need to throttle this on their side until the HA patch on the 19th July reduces how often it's being called. Should be fixed after then.

As a short term fix until Friday you could try to disable polling in the config entry system options

Sounds like HA is asking it to check for updates? I’d actually prefer HA instead of TPLink Cloud/Alexa etc controlling these. I only bought 6 of them 2 days ago as my first try with these particular ones and let’s just say it hasn’t been smooth sailing lol

WangChungBaby commented 1 month ago

I turned off auto polling and LED management completely for all devices in the Tapo app yesterday evening. At the point of update and refresh all appeared to be just as unstable. As of this morning, all bar one plug is available and apprently stable (or at the very least has been stable for the last 3 hours).

Now stable with no dropouts all day.

andyevans-eng commented 1 month ago

I have been experiencing this problem for the last month or so, previously all devices had been rock solid. As of yesterday, my Tapo L900 lights have started doing exactly the same thing, and there is nothing I can do to force them to reconnect to HA, but all devices working properly via the Tapo app

djcleland commented 1 month ago

Has it impacted the plug history on the Tapo app for anyone. I have noticed. a few of my plugs now don't have history in terms of energy use. I am not sure if this is related to the same issue or not.

DarthSonic commented 1 month ago

Has it impacted the plug history on the Tapo app for anyone. I have noticed. a few of my plugs now don't have history in terms of energy use. I am not sure if this is related to the same issue or not.

Yes. All entities are unavailable and so there is nothing updated including energy stats.

andyevans-eng commented 1 month ago

No impact on any data in Tapo app, for me it is only HA that is affected

From: djcleland @.> Sent: Thursday, July 18, 2024 2:30 PM To: home-assistant/core @.> Cc: andyevans-eng @.>; Comment @.> Subject: Re: [home-assistant/core] TP-Link P100 goes offline then refuses authentication (Issue #121953)

Has it impacted the plug history on the Tapo app for anyone. I have noticed. a few of my plugs now don't have history in terms of energy use. I am not sure if this is related to the same issue or not.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/121953#issuecomment-2236528036 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AN6PDOGUN6RX3NMHATAR3O3ZM67M5AVCNFSM6AAAAABK3OCMXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZWGUZDQMBTGY . You are receiving this because you commented. https://github.com/notifications/beacon/AN6PDODR2PBMCXAVKJICSTDZM67M5A5CNFSM6AAAAABK3OCMXWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUFJ222I.gif Message ID: @. @.> >

-- This email has been checked for viruses by AVG antivirus software. www.avg.com

DarthSonic commented 1 month ago

Has it impacted the plug history on the Tapo app for anyone. I have noticed. a few of my plugs now don't have history in terms of energy use. I am not sure if this is related to the same issue or not.

Yes. All entities are unavailable and so there is nothing updated including energy stats.

Sorry. This is only HA side stats. Tapo app should not be affected.

djcleland commented 1 month ago

Has it impacted the plug history on the Tapo app for anyone. I have noticed. a few of my plugs now don't have history in terms of energy use. I am not sure if this is related to the same issue or not.

Yes. All entities are unavailable and so there is nothing updated including energy stats.

Sorry. This is only HA side stats. Tapo app should not be affected.

Ok, thanks, my HA data is fine, my tape history is empty for some plugs... oddly.

drabgail commented 1 month ago

I'm missing a good amount of data in the taop app. It's 7:45pm and here is the power draw I see on my server which has been on all day. All other plugs went to zero atthe same time.

serverplug

sdb9696 commented 1 month ago

Home assistant core 2024.7.3 has just been released and should fix the issues that have occurred over the last few days due to tplink throttling their cloud services. After upgrading I would recommend power cycling any devices that are having issues as they get themselves into a bad state after encountering the throttling.

hildevo commented 1 month ago

I just installed 2024.7.3. The TP-link Smart Home integration detects my devices, but when I try to add them, the authentication for TP-Link Cloud is refused. I am able to sign in on TP-Link Cloud though.

sdb9696 commented 1 month ago

I just installed 2024.7.3. The TP-link Smart Home integration detects my devices, but when I try to add them, the authentication for TP-Link Cloud is refused. I am able to sign in on TP-Link Cloud though.

Did you power cycle the devices?

hildevo commented 1 month ago

I did that now with a few of my devices. Seems to work. Thanks!

Op vr 19 jul 2024 om 21:27 schreef Steven B. @.***>:

I just installed 2024.7.3. The TP-link Smart Home integration detects my devices, but when I try to add them, the authentication for TP-Link Cloud is refused. I am able to sign in on TP-Link Cloud though.

Did you power cycle the devices?

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/121953#issuecomment-2239979066, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFWHFM36UYDW3LE43WVMHBDZNFSBZAVCNFSM6AAAAABK3OCMXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZZHE3TSMBWGY . You are receiving this because you commented.Message ID: @.***>

martymart8864 commented 1 month ago

Updated to 2024.7.3 and power cycled + reconfigured all 3 of my HS220 that were causing issues. So far so good.

geofflove commented 1 month ago

Update sorted the plugs it seems. Good work!