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

Devices constantly become "unavailable" at Home Assistant for a few minites #687

Open
SvenAbels opened this issue Jan 22, 2024 · 43 comments

Comments

@SvenAbels
Copy link

SvenAbels commented Jan 22, 2024

Version of the integration

latest (v2.13.0)

Configuration

Exactly 20 tapo devices: 18 of them are P100 and 2 of them are P110

Describe the bug

All devices are connected to Home Assistant without any problems and are listing their current poweer consumption. But from time to time some of them become "unavailbale" at Home Assistant. This happens to multiple devices. After 1-5 minutes, the device is typically available again. However, the devices themselve have a proper web connection and I can still see their current valiues (including changes) in the tapo Android app.

In the logs menu of Home Assistant, I can only see that the device becomes unavailable but without any further details about the reason. The devices are connected to the tapo extension using their IP. The IP does not change and the device is still pingable from the PC where Home Assistant is installed on.

I already modified the refresh times of the devices as I was fearing that they might be too low. So I increased them from 10 to 20 seconds but this did not change anything.

The problem does not happen at all times: It sometimes works for many hours without any problem and then the problem appears again - e.g. 10 times an hour for a few hours... I'm experiencing this problem since >4 weeks now (since I started using tapos).

@Elastiek
Copy link

Same problem here.
When I trie to add the device again in HASSIO it say's "device already configured.
Anyone with a solution ?

@SvenAbels
Copy link
Author

For me, it works to reload the device by clicking on the 3 dots in the device overview:

image

However, this is not a good solution because it only works for a while and I cannot reload several devices a day...

@pan07gaz94
Copy link

Same problem here too.
11/11 devices not available.

@pan07gaz94
Copy link

For me, it works to reload the device by clicking on the 3 dots in the device overview:

image

However, this is not a good solution because it only works for a while and I cannot reload several devices a day...

For me it didn't working

@SvenAbels
Copy link
Author

Same problem here too. 11/11 devices not available.

This might be a different problem because for me, I never have the situation that all are not available at the same time. A typical situation is that 1 or 2 out of 20 devices are unavailable for 1 - 10 minutes or until I reload the config of the device.

Also, in about 95% of the time, all devices are working fine. This unavailability of single devices only happens every now and then. On some days it does not happen at all and on other days it hapens every few minutes that one of the decives gets unavailable and available again.

@ChrisMarriott38
Copy link

ChrisMarriott38 commented Jan 23, 2024

I get this happening also. Constantly for some. Some are showing the available/unavailable. And others are showing Overheat issues. Then checking and cancelling it as an issue. I've disabled/hidden the Overheat entities as a work around but the power available ones a bit of a pain. For Automatons to detect things. So i just added a 5 minute buffer for checking against it for now.

But it would be nice to have things stable.

@JCummings49
Copy link

I get similar behavior with the P125M. The device just turns off periodically during the day. It does not come back on, it must be manually turned on. Very annoying.

@pan07gaz94
Copy link

pan07gaz94 commented Jan 23, 2024

i reconnect all my plugs into my integration but when i restart my HAOS i lost again all my tapo p100 entities.

error : argument of type 'NoneType' is not iterable

@uncle-jegan
Copy link

Are your devices accessible in the Tapo app when they "unavailable" in HA? I experimented with isolation of network and DNS records, and get same problem. But when DNS is 8.8.8.8 and network connected directly to internet (devices online in Tapo app) there is no problem with "unavailable" condition.
Devices:
tapo L530 v1.1.0 build 230721 rel.224802
tapo P115 v1.3.0 build 230905 rel.152200

@ChrisMarriott38
Copy link

ChrisMarriott38 commented Jan 28, 2024

My actual devices don't become unavailable at all, lights always green also on the sockets. you can see them all the time in the app and home assistant - it's just in the log file that there are overheat and power issues detected. Unless the reconnects are unnoticed.

@petretiandrea

I mean this is silly because this is JUST today. Look how many flipping entries there are!!!!!
Subwoofer

I have noticed it seems to also VARY on which device does this. For example. I have 7 sockets currently linked up. It's only that device so far today reporting this. But the other day i had a similar one on another socket doing this.

@SvenAbels
Copy link
Author

Are your devices accessible in the Tapo app when they "unavailable" in HA?

Yes my devices are still accessible via the tapo application but not via HomeAssistant during that time. I also get no power consumption values in home assistant during that time but I do the real time power consumption in die App.

@ChrisMarriott38
Copy link

ChrisMarriott38 commented Jan 30, 2024

All mine are fine in Tapo, nothing is visible as changing. I don't even see any devices states change in home assistant. The only real clue i think is the log book saying something weird happening. Feels like the integration is causing it.

Is there a Tapo logbook anywhere? I'm wondering if it can be compared.

@ChrisMarriott38
Copy link

ChrisMarriott38 commented Feb 2, 2024

I have moved a Wifi repeater next to one of the plugs which this happened frequently on to diagnose if its a signal strength issue. Will report back.


There are some circumstances that Tapo smart devices do not work stably or lost connection from time to time, this could be due to the network environment or some other reasons, this article provides some helpful tips to fix the situation.

Step2 EnsureTapo smart device is receiving a Good Wi-Fi signal by checking RSSI (Received Signal Strength Indicator)

Tapo APP->tap in the left top> Device Settings->Device info ->tap Wi-Fi icon to see signal strength (the value of RSSI)

Strong: more than -50 dBm

Good to Average: among -70 dBm to-50 dBm

Poor: less than -70 dBm

Note: If RSSI is less than -70dBm, the signal is too weak, device disconnections are likely, relocate the smart device or router to get a stronger Wi-Fi signal.


One device P110 now has a Wifi repeater in the socket next to it - Signal strength -8(RSSI) So this will help determine if its Stability issue and not to do with the HA Addon componant

@SvenAbels
Copy link
Author

Hi,

for me the signal is not the problem. My repeater is in the same room for 4 of the Tapos but they still got this problem from time to time. Also, as I described earlier, I can ping the devices during the unavialability time and their real time data i also visible in the tapo app.

@ChrisMarriott38
Copy link

ChrisMarriott38 commented Feb 2, 2024

Hi,

for me the signal is not the problem. My repeater is in the same room for 4 of the Tapos but they still got this problem from time to time. Also, as I described earlier, I can ping the devices during the unavailability time and their real time data i also visible in the tapo app.

Agree, i don't think it will likely be to do with this. I'm just going to make certain with this test. I can see the logs, and multiple devices in locations near different wifis' and its happening on a lot. Can you see your logs? Do you get a crazy amount of unavailable/turned off and such like the image i posted above?

Are your devices on 2.4 or 5ghz frequency? That can also be known to be an issue.

@SvenAbels
Copy link
Author

My devices are all on 2.4 Ghz

@whoisthedaddy
Copy link

Posted this on another issue but might be worth a try...

Like many of you I've had a similar issue and tried a number of fixes (ensuring DNS was mapped to 8.8.8.8 which I read on this post) - none of these worked until I disabled the 'Try to track device dynamic ip using MAC address' (click on 3 dots or Configure and remove check) / as soon as I disabled this all devices came back online. I have a Ubiquiti Dream Machine and all these are on their own IOT VLAN (and were accessible on the app and via pinging) and will now assign them all static IP addresses to see if that helps... Might be useful but might not.... : )

@SvenAbels
Copy link
Author

Thanks for the hint. I checked it and the checkbox is already deactiavted on my devices.

I also notices, that the unavailability happens very infrequently: Sometimes I get then 3-4 days in a row every few hours and then sometimes I get no problems for a week or two..

@ChrisMarriott38
Copy link

Sadly, use Google DNS, and i have not used the dynamic track part as i already had fixed IP's for each device.

Yea same to the above, its so random and sporadic, sometimes is super frequent.

I did wonder if it could be to do with the device refresh rate. i think mine are default 30s or so.

@whoisthedaddy
Copy link

Ok thanks will keep an eye out and comment further - the only two things I’ve changed today are the DNS to 8.8.8.8 and the checkbox. My refresh rate is also set to 30 I believe…

@ChrisMarriott38
Copy link

Anyone tried any older versions? To see if its a more recent issue?

@whoisthedaddy
Copy link

Nope, I've not tried going back to an older version - wasn't sure whether I'd have to re-add everything which is far too painful! All the re-pairing, adding everything back in and then updating all the entities!

@ChrisMarriott38
Copy link

ChrisMarriott38 commented Feb 13, 2024

We've not heard anything in regards to this reply. I've updated to the latest home assistant and actually noticed that the TP-Link official integration now detects Tapo devices. It's still early on i think it said so maybe buys? It doesnt detect all the entities like this Tapo integration though.

I can see 4 entities per device on the TP-Link . Switch, current consumption, todays consumption, total consumption.

On this Tapo one i can see 8 entities per device. Switch, Current power, todays energy, Month energy, (These are extras - month run time, signal level, todays run time. overheat.)

I will try disable Tapo, though i would rather use this one as it's seemed better supported before. And see if the log issue clears.

@ChrisMarriott38
Copy link

So i tried disable a device from the TAPO integration. Just one of the plugs that reported the most log book errors. And added it via the new TP-LINK Direct integration but i think i get the same log book errors. It seems strange. Unsure if its related to the integrations now or actually if it's more related to the HA build. However, i looked back at my older test HA version.

Home Assistant 2023.8.2
Frontend 20230802.0 - latest

And i see the same Logbook issues in that also.

@ChrisMarriott38
Copy link

Anyone see this or similar in their logs?
image

image

@SvenAbels
Copy link
Author

I did not have this experience for several weeks now. Thus I intent to close this issue unless it's still unresolved for others...

@devangapatel
Copy link

I am seeing the same issue/pattern with the Tapo Mini Smart Wifi Plug TP 15. Wifi strength is not a concern. Also the device works fine in their native Tapo app when it is unavailable in HA. The older (4+year old) TP-Link smart plugs do not have this issue but the newer Tapo TP15 is experiencing this problem. This is definitely a bug with HA integration. Can someone please help fix this?

@jaymunro
Copy link

I have this issue. Checking to find out when it started...

@jaymunro
Copy link

It started before the log pruning date 10 days ago, so no info there. I have 7 devices and the issue is present on all of them with unavailability occurring several times an hour and lasting 5-40 minutes.

I am seeing a lot of these in the log:

This error originated from a custom integration.

Logger: custom_components.tapo.coordinators
Source: helpers/update_coordinator.py:347
integration: TP-Link Tapo (documentation, issues)
First occurred: 11:34:17 AM (28 occurrences)
Last logged: 12:07:26 PM

Error fetching tapo data: Unexpected exception:

Note HA was restarted at 11:33am

I have enabled debug logging to try and get more detail.

@jaymunro
Copy link

Not seeing anything more helpful in the DEBUG entries:

2024-04-23 12:17:35.803 ERROR (MainThread) [custom_components.tapo.coordinators] Error fetching tapo data: Unexpected exception: 
2024-04-23 12:17:35.803 DEBUG (MainThread) [custom_components.tapo.coordinators] Finished fetching tapo data in 10.003 seconds (success: False)

@elliotcz97
Copy link

Same Issue still happens, for me it's a bit better because it reconnects very fast, but still annoying.

@LaszloV369
Copy link

LaszloV369 commented May 31, 2024

Hello everyone. I have found a solution, at least for me it works. I have 10 tapo devices one or two became unvailable randomly, very annoying!!! I have observed that the wifi channel on the router was set to Auto. I mooved it to manual setting and set to be always on channel 6. I chose this cahannel using wifi analyzer android app on the phone to see wich channel is the most "empty" - no neighbouring wifis to interfere. Since then I hand NO MORE unavailability issues on any of the devices! My router is a Tplink Archer x73. How this helps!

@hareenl
Copy link

hareenl commented Jun 26, 2024

I'm also seeing this issue and it happens constantly through out the day accross 11 Tapo P110 outlets. It sometimes happens to groups of outlets and only certain outlets at other times. I have strong WiFi across the house with 3 access points on channels 1,6 and 11. All devices on the network are pinged utilizing uptime kuma and nothing drops on the network itself. The following was seen on the HA logs.

Screenshot 2024-06-26 at 1 16 46 PM
Screenshot 2024-06-26 at 1 16 56 PM

@jaymunro
Copy link

It used to happen to me a lot. Then I completely uninstalled the HACS version - deleted all entities and deleted the HACS integration version. That was months ago and it's only happened a couple of times since, usually after a significant upgrade in OS or HA. Suggest you try that or say that your only running on the HA Core integration and have removed the HACS one (which doesn't seem to be getting any love).

@andyevans-eng
Copy link

Since adding a Tapo P110 to my network one of my Kasa KP115 plugs occasionally becomes unavailable, but it was rock solid before, and the P110 becomes unavailable every 5 minutes or so. Signal strength is excellent. Only started having problems when P110 was set up. While devices are unavailable, they are still online in the Tapo app. It is getting very frustrating as my energy data in HA is intermittent because of it being unavailable, but all data in the Tapo app

@zqnikals
Copy link

same issue. I have 11 plugs for a few weeks. the signal is strong. today they became to become unavailable one by one. Also, i found One strange thing: sometimes plugs set auto-off timer to 120. I have never had such automation.

image

@Kopetan4egX
Copy link

sometimes plugs set auto-off timer to 120. I have never had such automation.

Auto-off timer time (120 by default for me, and seems like for you too) and the timer (meaning on/off status) itself are separate entities. The one with seconds just shows the time before turning of, it won't turn off the socket, if the entity "Auto-off enabled" is off/

@s55ma
Copy link

s55ma commented Jul 31, 2024

Also the same problem, but with Tapo P115 plugs. Kasa plugs works fine and other non Tplink devices also work fine.

@c-kick
Copy link

c-kick commented Sep 3, 2024

This is still an issue as of version 2024.8.3. And still, the only workaround to get things working again is blocking internet access to all the P115 plugs. But that doesn't even restore everything, as some of the device entities will still not work (such as current and total power usage, which is one of the main reasons I invested in these plugs).

@rheeqp
Copy link

rheeqp commented Sep 16, 2024

This is actually major issue, because it will reset changed time and updated time. I hope they will proritize to fix this issue on the next update.

@cassiomolin
Copy link

I noticed the same issue with the Tapo T315 temperature and humidity sensor.
I use the T315 sensor in the generic hygrostat. When the sensor becomes unavailable, the dehumidifier turns off (regardless whether sensor_stale_duration is present or not).

@LaszloV369
Copy link

What solved this issue in my case was separating 2.4G wifi from 5G wifi. Made separate SSID for 5Ghz and all devices now remained on the 2.4G network. Since the separation i have almoast 0 disconnections. Hope this helps. !!! :)

@dako5004
Copy link

dako5004 commented Jan 6, 2025

I have this issue, too, and I have a suspicious behavior: The issue appears when I switch on my PC. I use the PING integration of HA in order to switch on my printer when I turn on the PC. So, I deactivated ping for my PC and the problems have disappeared.
As others too, I have several access points and the RPi with HA on it is connected via cable to one of these access points. What I see is that HA gets unavailable as soon as I switch on my PC, gets available, unavailable and so on. Hence, for me, it seems not obviously a problem of my TAPO devices but I think the PING integration is suspicious as the pings seem to be blocked (and thus HA) by the router.

In past, I watched suspicious behavior of my wife's Android mobile phone: Although Wifi was enabled on it and Wifi was available at home, the device did not connect. I was detecting its presence via ping integraation as well. Now I use the sensors of the mobile HA app for presence detection.

I will look for that further. Is there anyone else both using ping integration and having problems on Tapo devices?

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