Problem with Kasa plugs automatically changing IP address and becoming unresponsive

On a C-8, I have a space heater in a small greenhouse with citrus trees. For the last several years, I have a temperature sensor (Xiaomi/Aqara) and a Kasa KP400 smart plug (2-outlet). The Kasa plug is added as a device through the Kasa Integration app. I use Advanced vThermostat Manager to read the temperature and toggle on and off the heater, usually set to 45*. It had worked well the last few winters.
This year, however, the switch keeps becoming unresponsive, the thermostat will toggle on. Under "Events" for the KP400, it will show several "on" commands but the heater won't actually turn on. My Kasa app can still toggle it on and off without issue.
I noticed awhile ago that my router has a reserved IP for the plug (192.168.0.10). Yet the device page for the plug shows under "Manual IP Update (caution) 192.168.50.95." I can update this to match the router (192.168.0.10) and the thermostat and heater operate as expected for an hour or so. Eventually, the IP address updates back to 192.168.50.95 and it breaks again. I have tried re-adding the plug both to Kasa Integration and by resetting the plug completely and re-adding to the Kasa app and then back to hubitat. I've also tried toggling Kasa Cloud Binding. I cannot add the device using the Tapo integration, it isn't recognized. I also cannot change the IP reservation on the router to match what Hubitat keeps changing it to. I'm getting to the point where I either need to buy a new smart plug, or set up a new router and hope I can get it to work. I really don't want my lemon and lime trees to die this year, they are getting real big and full of fruit. What should I try next?


Please provide your hub model (C7, C8, etc.) and its platform version from Settings>Hub Details.

Check out the following post for help troubleshooting problems and gathering details that will help others to identify and solve the problem you are experiencing: β€Ό READ FIRST - Before Posting in Get Help


Are you using the community Kasa integration or the built in system one? I think they are both the same code as this point, as the community one is basically final and not getting updates anymore.

I thought that once the IP was set it would not change by itself unless you run a discovery again. @djgutheinz might know what would cause the IP to change.

What are your LAN settings in the app itself? Show a screenshot of your settings.

I believe its the built-in Kasa Integration.

Are these the settings you want to see?

Yeah looks right according to your other info supplied.

Only other thing I can think if would be to turn on debug logging for one of the devices, and then fix the IP again. Then to go logs > schedules jobs and find the scheduled task to turn off debug logging (usually 30 mins) and remove it. So that debug logging stays activated.

Might catch something in the logs when the IP switches back?

You are showing two different ip ranges. Do you have vlans enabled?

1 Like

Unfortunately I'm not knowledgable enough to understand that, but it looks like I do? I don't see an easy toggle for that but am googling. Or I guess I can just select "Untagged"?

Ok, the debug caught the switch this time:

Have you added any devices to your network recently? Could one of them be a rogue DHCP server?

1 Like

The problem might have started when I switched ISPs this summer and replaced my router with a Quantum Fiber ONT, router and "pod." Upon suggestion from Reddit, I unplugged the POD extender in case it was causing the issue. I don't know what else could be causing it.

Sounds like you have a network with two DHCP servers. Can’t fix this on the Hubitat end.

2 Likes

Yeah agreed, those logs seems to be showing first errors reaching the device, then I think the driver/app is trying to find it by running a configure. Somehow it is landing on that .50.95 IP, which must be coming form the LAN somewhere, it would not just make something up.

So you either have two DHCP servers and/or you have a double NAT going on, with two routers.

Possibly unplugging the POD will help, if it was configured horribly.

If you can give some detail on your networking hardware, make and model, and anything else relevant, I am sure we can help you get it sorted out. Also would be good to know which piece of equipment is running the Wifi, and also where the Hub is connected.

Lastly, can you go to the Hub Settings > Network Setup and tell us the IP of the hub, then click on Network Test and run the "Ping Gateway" and post a screenshot of that. All of that IP info is generic LAN IP addresses, so no harm in sharing on here.

Ok. I have unplugged the POD so now my system is the Quantum ONT, which is a c5500XK paired with their access point/router which is a w1700k.

Hub's IP addresses are 192.168.0.23 (Ethernet), 192.168.0.29 (WiFi - anonymous) via DHCP .

Here is the Ping Gateway results

I have a good router from my old set up that I might just switch over to and abandon the Quantum w1700k. The Quantum stuff is supposed to be wifi 7 and mesh so I wanted to give it a try but I think it's just too whacky.

Does the problem seem to be solved with the Pod (I assume a w1701k) unplugged?

Sounds like the w1700k by itself should cover up to about 2800 sqft if you have it centrally located. So if you don't need the extra AP I would just put it away for now. Otherwise if you need to add it back, something must have been configured wrong. I am not even sure if you can configure it yourself, some people are saying they cannot get into it.

I unplugged the pod a few days ago, it's gone. Problem persists.

Try poking around with this tool: https://angryip.org/

See if you can find anything that points to that 192.168.50.x subnet.

You sure you dont have some other router or Wifi setup?
Do you possibly have multiple Wifi SSID's? Like for a guest network or something?

It sounds like you have two networks operating in the house, and since the switch can connect to both via Wi-Fi , then you have at least 2 Wi-Fi AP's, and at least one is on a different subnet.

It does sound like a double NAT situation (i.e. 2 routers in the house), with each AP connected to a different router.

Can you confirm if you have more than 1 AP? An AP could be a POD or a router's built in Wi-Fi.

Do you have a guest network turned on in your router that the switch may be connecting to?

You could be connecting to an uprotected AP in your neighbor's house. Use a Wi-Fi Scan APP on your phone to look for open networks.

When the app says the IP is 192.168.50.95, can you ping that address from the HE network testing tools.? If you are double NAT'd there is a 50% chance the ping will be successful, and if it is successful, it will confirm double NAT.

2 Likes

The 192.168.50 network is default network in many models of Asus routers (and possibly other brands, but Asus for sure)

Many people connect a personal router to the ISP modem/router for better security. Do you do anything like this with an Asus router? Do you have any Asus equipment in your network?

1 Like

Thanks for this. I do believe this was the problem, sort of. My old personal (non-ISP provided) router was an ASUS. It was not powered on or plugged into the network but the Kasa plug must have been somehow seeing it as an artifact. It doesn't really make any sense but it has to have been related. Over the weekend I unplugged all the Quantum hardware except for the modem/ont and switched back to the ASUS router with a new wifi network. So far everything is working as expected and I don't anticipate any more problems.

1 Like

I'm glad to hear that it is working, but I don't understand how.

In your OP you said that when the Kasa Plug switched to 192.168.50.95,that you could still access it from the app. There must have been a working Wi-Fi connection in order for that to happen. That couldn't have been to the Asus router if it was unplugged.

1 Like

So the Hubitat was showing that changed IP address but the Kasa app still reflected the other IP address. So if only functioned when the Hubitat matched the Kasa with the non-ASUS IP. So the plug was not actually changing up addresses it just was reporting the wrong one to Hubitat or Hubitat was somehow attributing the wrong one to it.

1 Like