After update to .89, TP-Link devices frequently show as entity not available

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.

Any ideas/suggestions? Thanks!

3 Likes

No suggestions, just wanted to say I’m experiencing this one as well. Usually takes 3 or 4 restarts to pick up all my HS110’s.

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 have the same issue after updating to .89.
Switch is no longer available, restarting HA does not help.

The device is listed in the known_devices and is online but switch is not available…

Any suggestions?

Tried statically adding them rather than auto discovery?

I use this method and have had no issues post the recent changes.

My switches have always been statically defined (carried over from pre-0.89) and I am getting random switches unavailable as well.

1 Like

How do you add them statically?

Examples are on the component page,

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 am running HA on unraid - updated to 0.89.2 - ALL tplink devices are “Entity not available”

Tried new format—
tplink:
light:
- host: 192.168.200.xxx
(lights, switch/plugs does not show-up in entities)
old format–

  • platform: tplink
    name: lightlb230_porch
    host: 192.168.200.xxx

nothing works… after two years of use - what a breaking change!

1 Like
tplink:
  light:
    - host:

Also did you add the Integration?

It is in Configured status in information section (did not change any integration from previous ver.)
TP-Link Smart Home: TP-Link Smart Home


configuration.yaml ->
tplink: !include tplink_devices.yaml

tplink_devices.yaml ->

light:
  #name: lightlb230_porch
  - host: 192.168.200.83
  #name: lightlb230_theater
  - host: 192.168.200.84
  #name: lightlb100_braincnt
  - host: 192.168.200.124
  #name: lightlb100_kitsink
  - host: 192.168.200.125

switch:
  # name:: plughs105_livroomlamp
  - host: 192.168.200.81
  # name:: plughs105_famroomlamp
  - host: 192.168.200.82
  # TP-link hs200 Wall Switches
  # name:: switchhs200_masterbathentry  
  - host: 192.168.200.86
  # name:: switchhs200_theaterRoom 
  - host: 192.168.200.85

(no lights, switches related to tplink ips in entities)

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:

https://github.com/home-assistant/home-assistant/issues/21966

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:

I have same issue running 0.94.1, usually one of my HS-110s are reporting “entity not available” for some reason…

Still seeing these issues as of 95.4, none of my TP-Link devices are usable. How hasn’t this been fixed yet? Very frustrating.

@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)