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
TP-Link Smart Home Devices does not show unavailable after home assistant restart 0.89.1 #21966
Comments
unfortunately the tplink component appears to be in its early stages, not sure why it was pushed into "production". A solution would be to setup manual, however, there is little control/options to do so. see docs on how to setup via |
I agree. The component is really flakey. It wasn't ready for release. Mine are setup manually. If a device is unavailable or temporarily drops from the network it will not show up in home assistant again. The previous component worked flawlessly. |
I am having the same on 0.91.3 & 0.91.4. I can't get my tp link lights/switches to load at all as of about a week ago. |
Adding a me too. It's just my TPlink lights that don't work however. My single TPLink switch works fine. For what it's worth this is running within docker. |
Me, too. Three or four deletions of the config are necessary to pick up my 10 switches. And I’ll randomly lose one or two eventually and need to reconfig again within a couple days. |
Instead of deleting the integration, I generally need to restart HA 3-4 times before all my devices appear as usable. |
Having the same problem too. I reconfigured to manual configuration for now:
And set a DHCP reservation of all my TP-Link devices. I'm not sure why the TP-Link devices become unavailable after some time as I can't see anything at all in the logs anywhere. |
@prologic I can confirm that your fixes worked for me as well. Something must be up with auto discovery. |
My post here is related: #22313 (comment) - the problem with devices not being available during the homeassistant startup / configuration of integration will obviously leave them undetected as the discovery process is only done during the homeassistant's startup and/or when the integration gets configured via the UI. I hope some core developer (@home-assistant/core) will chime in on how this should be fixed properly, an obvious solution could be to have a way to re-trigger the discovery process again. edit: to add, it seems weird that multiple restarts are required to get the detected (assuming they are all online and accessible). Maybe there is a problem with your network and/or the devices are not responding in that three second timeout the discovery uses per default. You could try to change the |
Dumb question; But why would we perform discovery only on startup? It this generally true of other components too? |
This is how my configuration.yaml has been configured since the change in syntax.
The switch works 100% of the time. All 3 devices are sticky DHCP assignments in the router. The 3 devices work properly in the TP-Link app. I've tried manually setting discovery to false and true to see if anything changes but no luck on the 2 switches. Also, I'm currently running 0.92.2 within docker. |
#23668 is a potential fix. |
I tried this and it did not seem to help. I suspect that the first discovery packet is missed by the device because the network coverage is spotty, and then discover() never sends another packet. Part of the total solution might need to include attempting discovery more than once and combining the results. I'd like to be able to run discovery from the UI. |
That's a fair point, you could try to modify https://github.com/GadgetReactor/pyHS100/blob/master/pyHS100/discover.py#L45 to be:
to see if it helps. That will simply send the discovery packet three times and wait for the answers. To be able to run the discovery from the UI is another matter and not related to this, but you can create another issue to see how other developers feel about it. |
This is a great suggestion, and it seems to have helped in my case. I have noticed that pinging the difficult devices before running discovery helps as well. Usually the first ping has a long delay and then the rest of them are normal. The long delay probably affects discovery. Between increasing the discovery wait time to 10 seconds and sending the packet 3 times my detection rate has significantly improved. |
As UDP datagrams may get lost in transit, e.g., due to poor network connectivity, we can improve the detection rate by sending multiple datagrams and hoping some will get through to the devices. Confirmed to improve the detection by @scubanarc: home-assistant/core#21966 This is a new configurable option, defaulting to three discover packets.
Glad to hear it helped! I did prepare a PR to make the number of requests configurable. |
As UDP datagrams may get lost in transit, e.g., due to poor network connectivity, we can improve the detection rate by sending multiple datagrams and hoping some will get through to the devices. Confirmed to improve the detection by @scubanarc: home-assistant/core#21966 This is a new configurable option, defaulting to three discover packets.
As UDP datagrams may get lost in transit, e.g., due to poor network connectivity, we can improve the detection rate by sending multiple datagrams and hoping some will get through to the devices. Confirmed to improve the detection by @scubanarc: home-assistant/core#21966 This is a new configurable option, defaulting to three discover packets.
I'm having the same kind of issues. I have 8 tplink smart plugs. If I delete the TPLink integration and re-add it it finds random plugs out of my 8, sometimes just a couple. I get various random errors in my logs indicating communication errors, variable and object errors, etc. I have added all plugs manually in my config with static IPs and now they are all in the integration UI but still some are unavailable and if I restart then it's random which ones are available after the restart. I have not successfully had all 8 active at the same time. If I unplug one, it becomes unavailable and will not become available again. Also, autodiscovery should certainly not only work during adding of the integration. I plugged some new sonoma plugs in yesterday and within seconds they were discovered and added. If I unplug one and plug it back in that works correctly also. We need this to work the same way. We need to have ongoing discovery without deleting and adding the integration, and we need to have it try to find a plug that becomes unavailable and then becomes available again. Honestly, my TPlink plugs are basically unusable right now. I'm new to HA and I really like it, having moved from HCA to Openhab ,and now to HA. I'm not familiar enough to try and contribute to code yet, like I did with HCA and Openhab, but I'll get there. It takes time. |
Please update to at least 93, I'm on 94.2 and tplink entity work like a charm to me. I've 7 units and got the same issues as you on prior 93.0 (from memory). Are you updated to the lastest version? |
I have this problem on . 993. I have 6 devices all are set with static IPs and discovery false. 3 are unavailable. All are seen by the Kasa app. |
How long as it been like that? can you ping from your HA machine to the TPLink device? |
Problem since update. Did .100 update last night and all working again. |
Problem is back this morning. Three of the six devices not available. All can be pinged and all seen by kasa. |
Will you set the log level for tplink to debug and upload what you have when the issue occurs?
…-------- Original Message --------
On Oct 12, 2019, 3:57 AM, bschatzow wrote:
Problem is back this morning. Three of the six devices not available. All can be pinged and all seen by kasa.
—
You are receiving this because you were mentioned.
Reply to this email directly, [view it on GitHub](#21966), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AANL2MVZVKKFBSVCM4CLMOLQOGURHANCNFSM4G5KV7HA).
|
All working again with the latest release. |
Just did the latest update .101.0 and lost one of the switches. All are static called out in router, all are in my custom yaml |
Please open a new issue with details to avoid sending notifications on all of those who participated in this (already fixed) issue. |
After restarting hassio 0.89.1 if device is not connected it will not show up in the entity states but will be missing completely. This causes an issue with my automatons because I have one bulb on a switch and when this bulb comes back online it signals for the others to come on as well.
The text was updated successfully, but these errors were encountered: