KASA Integration: devices not responding or reporting properly

Hello there,
I have a bunch of wifi Kasa Wifi Plug devices (HS103) scattered around my house. They have all worked flawlessly with Hubitat via the built in app until just recently. I am on 2.3.4.123 with C5 hub.

This issue pertains to the Kasa Wifi Plugs.

Recently, hubitat dashboards will show that a lamp is on when it is not. The lamp in question is plugged into one of these Kasa Wifi Plugs. Sometimes when I turn on a lamp with the dashboard, the lamp does indeed turn on, but Hubitat seems to be unable to figure its state. At that point, continued attempts to activate/deactivate it with the dashboard will fail, as well as attempts to use another activation source connected to Hubitat (like a Z-wave switch or button controller for example).

Oddly enough, once Hubitat seems to get confused and no longer function for those lights, Google Assistant will have no issues activating/deactivating the lights even though Google access the switches via Hubitat's Google Home integration app.

All other devices seem to be unaffected, only Kasa devices. The only Kasa devices I have on my network are the little wifi plug switches (HS103).

Anybody else have a similar issue?

I've been having this on an off for awhile after migrating to the built in app.

Sometimes I can turn a light on from the dashboard but the dashboard doesn't reflect it actually turns on.

I would try rebooting the Hubitat. It may clean up whatever is causing the issues. Additionally, you could try a Save Preferences on the offending devices.

I have tried this numerous times over the past two weeks or so in attempts to resolve the problem. The problem started a couple weeks ago (also, I notice there was an update to the Kasa integration app and drivers listed on the changes for one of the recent updates, which I assume is the actual culprit of the problem here)

Not seeing the problem on my system at all. I have 25 Kasa devices or all varieties installed and operating normally. To troubleshoot further, I would need DEBUG logs for when you can duplicate the problem on a device.

1 Like

Additionally, try exiting the dashboard and then re-entering and see if the state is then correct. Sometimes, the dashboard/app do not update as well as expected. I had this Christmas day on my app and one of my zigbee lights.

1 Like

I have tried to refresh the dashboard before assuming something is hung. Additionally, it's not just the dashboard.... as I said above, when the issue appears, it manifests not only on the dashboard but the Z-wave switches or button controllers also don't function as you'd expect. It's like Hubitat is having trouble being aware of the Kasa devices status, and therefore it thinks the light is on when its not or off when it isn't and therefore doesn't know whether it should attempt to turn the light on or off. Any other external means of controlling the light or seeing its status works fine (Kasa app, google assistant, etc. It's ONLY Hubitat that recently has this issue)

I will attempt to provide a debug log ASAP

Also open a logging window and look at the tab Device stats and the values of % of Total. You can sort on that value and see the heavy hitters in your installation. Same would be true for the App stats tab.

Finally, what is the pollInterval (command Set Poll Interval) you have set for your devices? Should usually be set to 30 minutes. Other hints:

  1. If you use the Amazon Alexa skill, do not enable the Kasa Skill in the Alexa app. Provided dual control at the expense of device responsiveness / collisions at the port (which can cause a command to be ignored)
  2. Same may be true for Google.
  3. Same is true for SmartThings.

Question: Do you regularly control the device through the Kasa App?

I just checked. None of the plugs in question, nor the kasa integration app, nor the z-wave devices I'm using to activate them, appear anywhere near the top of the list. It seems there isn't anything causing undo stress on the hub.

It is set to 30 minutes on all of these Kasa plugs

I do use Google integration, and I only have the lights integrated thru Hubitat. I do not directly share the Kasa devices with Google, or any other service.

No. I only use the Kasa app itself as a last resort. I mostly only use the switches on the wall to control the lights. Let me give a little more detail:

There are 4 Kasa plugs connected to 4 lamps. 2 of these lamps are in my master bedroom, the other 2 are in my office. Primary method of control is via Z-wave button devices (Zooz ZEN34 button controller or ZEN71 paddle switches in scene controller mode)

Periodically while I am not home, I use the Hubitat dashboard to check on various things around my house. Around 2 weeks ago while I was out, I noticed I left my nightstand lamp on, according to the dashboard. I turned it off. 30 minutes or so later, I noticed it was reporting as ON again. I turned it off, although this time on the dashboard instead of showing the light as off, it just shows the hour glass. Reloading the dashboard again shows that the Hubitat still reports the light as ON. When I got home, the dashboard still says the light is ON but when I get to my room it is in fact OFF. So, then I use the wall switch to turn it ON, and it does come ON. However, when I go to leave the room, I hit the switch and the light fails to turn off. I go to Hubitat dashboard and turn the light OFF, but again it remains ON and shows an hourglass on the dashboard. Out of desperation, I say "Hey Google, turn off the lights" and the light properly turns off. Hubitat Dashboard now says the light is OFF too.

I am also having similar issues with the office lamps occasionally not being controlled by the dashboard or switches. Google or Kasa always work fine. However, the bedside lamp is the only one that seems to consistently erroneously report as ON when it clearly isn't. The other ones seem to report their last actual status but occasionally do not activate properly via Hubitat.

Sorry for the delay. The way I understand what you said, when using google to control the device it is through the Google Hubitat integration? Is that true?

Additionally, other than the Hubitat version, what has changed lately in your configuration. Wifi changes? Added Google Control for Kasa devices?

Finally, I need debug logs when this occurs as well as the event history. Please private message any logs to me as TEXT. A picture is not worth a thousand words when it comes to a picture of words.

Yup, thats exactly right. Google only has any access to these devices thru the Google Home app on Hubitat.

Yes, I recently added two Wemo devices back onto my network to control the Christmas lights towards the end of November. I am starting to think that might have been the issue honestly, as I haven't had the issue with Kasa devices pop back up in a few days since removing Wemo again...

The problem has always been intermittent, usually happening a few times per week, and I haven't been around to start a debug log the last few times I noticed it happening. That said, it's been several days since it last occurred. It seems to correspond to around the same time I took down the Christmas lights, and then removed the Wemo Connect app and devices from Hubitat again. Hmmm.....

That said, if the issue pops up again, I will post here again, hopefully with a debug log.

1 Like

I just saw this pop up again and was bored so I re-tested.

Any of my kasa switches from even the device page I can turn on or off, but sometimes the actual status takes anywhere from 15 seconds to several minutes to reflect that it actually turned on.

The device actually turns on and off as it should, the status is just lagged. And if you control it from the dashboard, it seems to go out to lunch until the status updates.

Not using any other skills or kasa app for control. Sometimes rebooting the hub helps the behavior it seems. But like OP said, it seems totally random.

Understand. Look at the events for the device when this occurs. The update of the event should be automatic after sending the command from Hubitat. If the event updated, then the issue is with Hubitat!

I wasn't able to recreate this last night, but I was this morning.

I turned a device on from the device page and about 7 seconds later the status updated to on. No entries in the log or events until it updated.

Tried to turn device back off, and I'm still waiting for the status to reflect that it's off. No entries for the off yet in logs or events.

I turned debug logging on, but naturally it's working fine now.. :confused:

Scoop - what is the Kasa model/type? This may help me understand the issue.

This particular one I was testing with and was able to recreate the issue on is a KP303 3 plug strip.

I know I've seen other switches/plugs do it but haven't looked that closely at them.

I did notice with debug on I see "parseUdp: [system:[set_relay_state:[err_code:0]]]" a bit. Didn't know if err_code:0 is normal or not.

Without errors/warnings in the PAST LOGS, the error points to delays within Hubitat.

Look at the log pages for deviceStats and appStats. Anything abnormally high in % of total? How about total utilization as precent of total (upper left of stat table on page)?

Assure the Hubitat version is the latest. Reboot either way (after doing the above).

Other than Hubitat version, what has changed in you Hubitat and Wifi setup?

  • New driver/app/rule?
  • WIFI changes or reconfigurations?

Basically if it was working OK and is not now, something has changed - and we need to identify the change that caused the problem.

Do the switches have static ips via dhcp

I honestly cannot pinpoint any changes that happened exactly when I started noticing this. I'm pretty sure is was around the time I migrated from the community to the built in app though. But that could just be my confirmation bias.

Typically a reboot clears this up for a few days.

Also possibly un-related but it seems like I've been getting a bunch of hub load messages despite nothing standing out in the app/devices.

I've messaged the staff to see if they can see anything on that front. At first I was thinking the kasa integration might have been the problem, but I'm starting to think it's lag is a symptom of something else.

kahn-hubitat, in my case yes. All static reservations.

I got one this morning after turning a kasa device on and off several times. Possibly a coinci

I just added on of these to my setup yesterday and it seems to respond immediately. Does your device respond immediately to on/off commands when you are seeing the delay on the device page or is the device also slow to respond? Several years ago I had issues with wifi outlets causing hub slowdowns if they were in an area with a weak wifi signal. I have since replaced my router and the problems stopped.