[DEPRECATED] Kasa Plug, Switch, and Bulb integration

I have encountered an issue suddenly with my Kasa devices and could use some advice here.

We randomly noticed our garage exterior lights were on in the morning yesterday when we returned from a trip to the cottage. They are on a Kasa single pole switch. They are on a scheduled ON every night at sunset and turn off at either us hitting out "good night button" or midnight (back up option for when we are gone overnight). I had noticed while we were away for the last 5 days that twice in the morning I saw the light was on on our security cameras but just assumed it was a glitch. I turned them off via Kasa app each time and went on with my day.

Last night I checked the light after we hit goodnight, it was still on. So again I turned it off via Kasa app and went to sleep. This morning is the first time I have been able to sit down and troubleshoot. Here are some observations I found:

  1. I have other Kasa devices, primarily smart plugs but they are used sporadically (some less than once a week). I opted to test them via Hubitat app and none seemed to cycle power when I told them to. I controlled them via the Kasa app then checked the Hubitat logs, all of the power events were properly reported yet control still did not work via Hubitat.

  2. All of my Kasa dervices are set for local control in Hubitat as opposed to Cloud. I prefer to stay local whenever possible which has never been an issue for me with my Kasa devices. I switched a few to cloud and suddenly Hubitat control was back.

  3. The only change between them working and them not working that I can narrow down is my Asus router had an update. I use ASUSWRT-Merlin.

The fact I can control remotely but not locally and the only change made was a router update leads me to believe my router is somehow preventing the control. As I mentioned the Hubitat logs correctly display all on/off events (with Kasa app OR manual push buttons on devcices) from the devices even if they are set to local in Hubitat so I know some information is getting through. It seems somehow the ON/OFF commands are not making it through to the devices though.

Does anyone have any ideas as to what settings I should look at on the router to see if it is the culprit? I don't know network setup well enough to even begin to search for what could be the problem.

EDIT: I don't know is this information is relevant or not but I am still using the integration via User app. I only just discovered that it was made to be built-in awhile back. I was about to switch over however I can not find he supposed button to " Migrate Kasa devices to built-in app". I looked everywhere in the app and can not see it in either the User version or built-in so I opted to just stay on the user app. Is there any reason this could be the problem?

When you changed your router, did you re-discover and then re-assign static IP addresses to the Kasa Devices. Your symptoms indicate that the IP addresses in Hubitat no longer match the actual IP address.

Usually this can be corrected by running the app and then rediscovering the devices. That will usually find the new IP addresses. If not, get back with the explicit version you are running and some logs collected while you are trying to run the device.

That is OK. The migrate function had some problems and I assume until resolved, they disabled it.

Sorry for my slow response. I have not had a chance to take a look at things until now.

I did not do the re-discover initially as I have all my smart devices set to static IPs dictated by the router so the IPs have not changed at all. I have confirmed they are set correctly on each device but I did run the discovery again. Everything seems to work now. I am not sure sure what exactly the issue was. I always hate when the solution is unclear but I am glad it is functioning again.

Thank you for the assistance.

This integration is much appreciated. Kasa's products are simple and reliable and it's great to be able to integrate them as triggers and devices in the Hubitat environment!

Are there any plans to support the illuminance and motion features of Kasa's smart switches? It would be great to be able to detect fire motion and illuminance events within Hubitat from the Kasa devices.

Thanks for all the effort and support.

I will check again; however, I believe the illuminance and motion features were originally internal only.

1 Like

Update. I found the exposed api for the motion sensing function. It is on my list (list below):

  • Finish TP-Link TAPO integration
  • Finish Kasa Matter device Integration (community code - to be discussed for built-in code). (Kasa has gone full-blow on these and the Matter devices use a new api and security protocol from the existing devices).
  • Work some TV/Soundbar
  • This enhancement; however, I will need a tester or two to validate changes.

Dave

6 Likes

I was in market for a smart power strip, as opposed to a power strip loaded down with individual Zigbee plugs. Sadly, Kasa Wifi-based seems the only option that works with Hubitat these days. The only Zigbee/Zwave options are Tuya devices that lack compatibility with Hubitat, and are even possibly a fire hazard (looking at you Zau Zau).

I picked up a Kasa HS300 and dove into the integration today. I had to use the cloud option to detect my devices, with LAN detection failing. How reliable is this device if you experience an outside Internet outage or if Kasa were to shut down or deprecate cloud functionality for this power strip? Is it just a doorstop then, or one of those devices you can rely on even when disconnected from a proprietary cloud backend?

Really learning to hate these cloud backends, and I only grudgingly accept wifi devices, since they seem to be the only option in so many cases these days.

I have my few Kasa devices totally turned off from cloud control, they are as reliable as anything else I have. Get the local LAN control working if you dont want to depend on the internet.

:thinking: Working on an advanced driver for this right now. Hubitat has built in support.

1 Like

Please make sure you read the installation instructions. There is a not there on the individual plug name limitations due that effect the LAN integration (and not cloud). If you can live with the limitation, that is the way to go.

I installed an HS300 tonight. Kasa integration can see them but when I go to install it just says they were not installed. Tried locally and via cloud. Cant seem to figure out why it wont let me install them. I looked at the install instructions and I dont have anything scheduled and the names are all the default.

I just installed my first "matter" switch, the TP-LINK KS205 switch, and I'm struggling to figure out how to add it to my Hubitat Hub. The Kasa Integration detects the switch but it simply doesn't add it, gives the message "The following devices were not installed:".

I turned on logging and this is likely the relevant log entry:
[status:failedToAdd, label:Front Light Switch, driver:kasaSmart_plug, ip:x.x.x.x, errorMsg:com.hubitat.app.exception.UnknownDeviceTypeException: Device type 'kasaSmart_plug' in namespace 'davegutBuiltin' not found]

Is this switch supported yet? Any suggestions?

The matter devices use a new protocol that was included in the build provided to the staff. They somehow missed adding the driver. @gopher

Alternatively, you can use the community integration that has added the new matter devices to the fray. I am using two Kasa matter EM plugs already through the community integration.

Dave

Thanks @djgutheinz. To use the community integration do I need to remove the built-in Kasa app completely? Or maybe I can just add the relevant driver? Just trying to decide whether it's worth it to me if I have to re-add all my existing Kasa devices and then fix the automations that will break. Or I can just wait.

You can run the community app independently; however, be cautious to ONLY install the matter devices. Others devices will be offered but will not install due to the dni already being taken.

I would not copy over the driver from another source. It will not work because of some signature data the Hubitat staff inserts before loading as a built-in.

Dave

Thanks for the suggestion, but I couldn't get it to find the switch with the community app. I figured out a workaround using a virtual switch in Hubitat and syncing on/off through a Google Home automation. It's a bit clunky but it works for now, I'll wait for the next Hubitat update and try again.

Any tips for my HS300 issue I posted above?

I am using the community app and that specific driver and It discovers and works OK. ?????

need log messages for the install. Otherwise, I am shooting in the dark.

Dave

Did anything change in the last few weeks that could affect energy monitoring plugs on Hubitat?

I had two Rule Machine rules that had been working perfectly for eight months on my washer and dryer, which are plugged into two separate KP125 plugs. The rules would trigger on a power change greater than 50 watts and send a Pushover notification at the start of the cycle, followed by a wait command for when the power dropped to 3 watts, and then announce the end of the cycle on Echo speakers and send another Pushover notification.

For the last few weeks, my wife has been telling me that the rules are no longer sending notifications or announcing the end of the cycle. I haven't been paying attention to the notifications myself because I've been working weekends. I looked at the logs for the rules and they show that the power usage is changing on the devices, but the rules are not triggering on their own. I spent a couple of hours troubleshooting the Kasa integration to see if my credentials or IP address had changed, but everything looks correct.

Summary

I've attached screenshot of logs, device page, and rule.

I'm trying to figure out if the problem is with the current Hubitat firmware, the last few firmware releases, or something changed in the Kasa integration. I can't figure out why the rules are no longer triggering on power change.

Kasa device. My EM plug looks OK. On the device's edit page, select the Events button in the upper left. You are looking for the power event going up when you turn on the appliance then down as usage decreases.