TP-Link Kasa switches - work with Kasa phone app, Home Assistant won't talk to them?

Here’s the deal. I have a bunch of TP-Link Kasa switches, and often a few of them go ‘offline’ in Home Assistant. When they do, I’ve reloaded the TP-Link integration, even more than once. Still, HA doesn’t see them. But the TP-Link Kasa iPhone app can talk to them. To my thinking, this means they are online and accessible by their IP address/MAC address. So, why doesn’t reloading the integration cause them to come back online in HA?

Just wondering. I know the wi-fi in these can be unreliable, but if the Kasa app operates them, then anything else that talks that protocol should be able to operate them, as well.

Thanks in advance for any advice or suggestions.

Have the switches been assigned static IP addresses? If not, Kasa will scan for them occasionally, HomeAssistant will not. If the address changes, Kasa would still see and operate the switches and they’d go unavailable in HomeAssistant.

Not all of them have static IP addresses, no. And those dropping off are dynamic, so this is probably the reason. THANK YOU!

All good. Shout if you need anything else :slight_smile:

@Razgriz @FredTheFrog I am having the same issue as you described. Did the solution of static IP addresses solve your issue?

Also forgot to ask how you got the devices that dropped off back online?

I am considering removing from HA and then just reloading the integration but advice would be appreciated.

Yes.

Static IP address and updating the tplink config with the addresses is what worked for me.

Removing from HA and reloading will do the same thing, but only for as long as those devices have the same IP address. If it changes, the device will go offline until HA is restarted, or the device discovered again some other way.

Not entirely. I already had static IP addresses (DHCP reservations on my router) for all the TP-Link gear. Recent HA releases have made the situation better, but not entirely great.

@Razgriz @FredTheFrog

Thanks both. with the information here i was able to fix the situation. Also been running for 2 days and no switch has fallen off of HA since i made them static IPs.