Closed TomBrien closed 3 years ago
Hey there @rytilahti, @thegardenmonkey, 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!
(message by CodeOwnersMention)
tplink documentation tplink source (message by IssueLinks)
I was able to fix this by manually adding the hosts to the config entries but obviously this isn't ideal. Presumably if I were to delete and setup again it would be ok.
I should mention my switches are on a separate VLAN and blocked from internet so presumably wouldn't be found in discovery
Potentially related to #57215
Looks like route cause is when migrating legacy config entries we only try and pull the host from hosts_by_mac
which is the discovered hosts. L54 below will give None
in this case
The old integration didn't store the ip address so if we can't find it by discovery at least once we cannot connect to it.
Once it is discovered, the ip address should get updated and the device will recover. If its just a case of it didn't respond to discovery the first time #57221 will fix it.
If it will never respond to discovery, it needs to be removed and added manually.
If you had them configured via yaml and it didn't import the ip address, then we have a bug
I just updated today to Home Assistant 2021.10.0 and now all my TPLink Kasa swtches are unavailable. I had them set up before the upgrade. Mine are not on a separate VLAN, though unlike above. I do see this in the log. I've done the basic troubleshooting, such as click the reset button on the switch and reboot the TPLink integration, but the switches are still not connected.
Logger: homeassistant.components.tplink.coordinator
Source: helpers/update_coordinator.py:219
Integration: TP-Link Kasa Smart (documentation, issues)
First occurred: 3:26:37 PM (66 occurrences)
Last logged: 10:34:38 PM
Error fetching 192.168.68.62 data: Unable to connect to the device: 192.168.68.62
Error fetching 192.168.68.65 data: Unable to connect to the device: 192.168.68.65
Error fetching 192.168.68.159 data: Unable to connect to the device: 192.168.68.159
Error fetching 192.168.68.157 data: Unable to connect to the device: 192.168.68.157
Error fetching 192.168.68.158 data: Unable to connect to the device: 192.168.68.158
Any additional information I can provide?
Looks like you have IP address. Would you please open a new issue, as it's a different problem, And whatever fix happens from this issue will not solve it.
Please include specific model number in the new case
Thanks 👍
Thank you!
This is the old config entry from backup, I have the hosts, is it worth in the migration running through the list and trying to connect to each host and get it's mac before migrating:
{
"entry_id": "3b72d6d536bb4d048554151061d02537",
"version": 1,
"domain": "tplink",
"title": "TP-Link Smart Home",
"data": {
"switch": [
{
"host": "192.168.66.21"
},
{
"host": "192.168.66.10"
},
{
"host": "192.168.66.11"
},
{
"host": "192.168.66.20"
},
{
"host": "192.168.66.9"
},
{
"host": "192.168.66.12"
},
{
"host": "192.168.66.13"
},
{
"host": "192.168.66.14"
}
],
"discovery": true,
"light": [],
"dimmer": [],
"strip": []
},
"options": {},
"pref_disable_new_entities": false,
"pref_disable_polling": false,
"source": "import",
"unique_id": null,
"disabled_by": null
},
We already do that if it's still in the yaml. I take it the yaml was deleted ?
Yeah when it migrated to the now legacy config flow I commented out the yaml
Can you give #57308 a shot?
Sure I'll give it a go today
Looks good to me. What I did:
null
hostsAll switches seem to have been correctly migrated now
The problem
After 2021.10.0 my TP Link plugs are all unavailable with an error in logs and Integration UI of:
What is version of Home Assistant Core has the issue?
core-2021.10.0
What was the last working version of Home Assistant Core?
core-2021.9.7
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/
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Example config entry:
Additional information
No response