I commented out the setup in configuration.yaml and enabled TP-Link in integrations. On a restart of Hassio, 1 or more devices will show as entity not available. It’s always random which ones become unavailable.
On .88 and earlier, never had this problem. Was originally running on a RasPI but starting seeing database errors so moved to a Docker install of Hassio with a partial restore of original configuration. Sill, it continues to happen.
It will take several restarts before all of the devices are actually loaded correctly and after that, I avoid making any more changes. I have a mix of HS100, HS200, HS210 and HS220 devices.
I saw a few issues logged for TP-Link devices but wasn’t sure any of those are related to what I’m seeing.
Home-assistant.log shows the following:
Thu Mar 14 2019 16:22:20 GMT-0500 (Central Daylight Time)
Could not read state for 192.168.2.180: Communication error
There have been no changes to the network and all devices function properly within the Kasa app.
Yeah, this version of the component certainly seems to have worse connectivity. Also if you list the IPs, but one is offline, Home Assistant won’t start at all.
I tried keeping the original configuration just updating to match the formatting for .89 but it would not find the switches. I’m looking into rolling back to .88. Rather ridiculous that I have to restart 20 different times before the all switches are found and even then, I’ll randomly lose one or two.
I successfully rolled back to .88.0. It’s definitely nice to have all devices consistently available but certainly miss the ability to use the dimmer function for my dimmer switches.
Looks like someone has logged an issue for it though not any traction on it at the moment:
Updated to .90 – same behavior - I created HA in raspberry PI to just test the tp-pink devices. They all showed up! Looks like problem in running HA as docker on unraid server. Hopefully someone finds the solution.
----------------- correction
I had commented tplink: !include tplink_devices.yaml line in configuration.yaml ( because of above issues in v .89). After un-commenting the line,
still no bulbs or switches added in HA from tplink_devices.yaml file.
but… adding discovery: true option in tplink_devices.yaml now finds the switches and plugs! (shows up in .storage/core.entity_registry file)
Still no bulbs in the storage/core.entity_registry file or in HA on unraid.
Not sure if this something that has been fixed now, but I am running 0.94.3 on docker (Rpi). I always get Unavailable no matter what option I choose (manual or auto discovery). I can see it in my .storage/core.entity_registry. Have just one switch, HS110(AU).
Wondering if this link is talking about the same issue:
@mgguinne, that PR you mentioned is now merged in pyhs100, and it may inadvertently help with connectivity issues as it implements caching of queries, but there is no release date set yet (and it will require some small changes to the homeassistant integration).
Anyway, I think I have encountered this behavior of getting unavailable with my bulbs and from the debug logs it seemed to be caused by the sheer amount of concurrent requests, causing the the bulb to become unresponsive.
If someone could verify that and/or check with debug logging enabled if that’s the case, it would be helpful.
https://github.com/home-assistant/home-assistant/pull/23668 is also related to this (got into 0.94.4) in a sense, that if the bulb was not available during the homeassitant’s startup, it got ignored completely until the next restart / reconfiguration through the integrations page.
Thanks heaps for replying, I think it was my setup in this case, I had switch instead of light. No further issues since then. Others with issues should still try to get as much logs as possible.
I am experiencing the same in v0.99.2 with my TP-Link entities…so far both lights and outlets.
It appears to be impacted by network path. When I have my Raspberry Pi Zero W downstairs on the main wifi router, one set of devices show “entity not available”. When I move the RPI upstair where is would connect to my network extender, a different set of devices become “not available” and the other now work.
Note: They devices all work (pretty consistently) via the KASA mobile app (Android)