[DEPRECATED] Kasa Plug, Switch, and Bulb integration

I am rethinking this issue. Some of the new Kasa devices are going into power-saving mode on wifi and this is noted on GitHub to cause issues. I have not been able to duplicate; however......

Question:
Did you disconnect your device from the Kasa Cloud (Kasa Cloud Binding)?

My devices aren't connected to the cloud. I don't think my issues are anything specific to kasa, other devices using udp also miss commands on occasion. Just an overcrowded urban WiFi environment unfortunately.

How often do we need to refresh our tokens in the integration?

I noticed my plugs stopped reporting and weren't controllable. Come to find that my token was null in the integration. I'd like to add a calendar event to remind me to refresh it, if there's a timeline for it's expiry.

They last about 4 days. If you are using LAN control, then the token is NEVER used. If cloud....

The app should automatically do this. However, if you have two-factor authentication enabled in the Kasa phone app, that process may fail. I also recommend you convert your devices to LAN control. Removes that issue completely.

1 Like

Oddly, they're LAN connection status, now that you mentioned to look at that. Maybe I needed to just rerun the integration to pull in the IP's. Not sure, but all is well. Thank you.

1 Like

There is a manual driver for the MATTER KP125M energy monitor plug. See: TP-Link Kasa and Tapo Discovery - #8 by djgutheinz

Ok this is blowing my mind. I just moved all my IoT to a different vlan and it broke many wonderful things. So i couldn't fix it, so i restarted. Deleted the integration, and then re-installed it. Here is what i am trying to re-achieve. My kitchen main lights binded to my kitchen island lights. I am using switch bindings. Now all of this worked before but not no more. When i turn the kitchen switch off in the app, the kitchen island light goes off right away, and logs show this.


but when i do it manually from the actual switch nothing happens, nothing in the logs. Device itself shows the right IP address too. i thought maybe firewall rules, so i turned them all off and it still doesn't work. The fun part is that once in a while... it does work. Kitchen light goes off and then about 2 minutes later the Kitchen island light goes off. Again i try in the app and it works instantly.

Any ideas?

Did you set the poll interval to 5 seconds? That will allow HE to capture the manual switch push.

No, it tells me a warning kot to do that. Am I suppose to do that for all of my devices then? That doesn't seem right.

The warning is OK. It is designed for you to consider prior to enabling - but the impact is acceptable as long as you do not have 50 devices all polling at 50 seconds.

Moved into a new house that has lots of Kasa switches/dimmers and wanted to integrate them in HE. They are all on a different VLAN than the HE Hub and I've selected "Modify LAN Configuration", changed the IP range to my IOT VLAN but no devices are found. I've even created a firewall rule to allow my IOT VLAN to talk to my HE Hub's static IP but no luck. Anything else I need to enable/allow to get this to work?

You are in the area of LAN configuration, so I can not adequately help. VLANs are always problematic due to the security settings.

First try is disable the firewalls completely and see if it works. If it does, the play with settings until you can control the devices.

Second, look at your WPA settings. The Kasa devices are old design, so may be limited to work with WPA2 / AES security, not WPA3. Try both exclusive WPA2/AES and hybrid WPA2/WPA3 settings.

Any chance of someone summarizing a very long thread to help with what is going on:
C8, Mix of 35 KASA HS200, 210, 220. All DHCP connecting through PFSense router/FW. I use TPLINK E75 in AP mode for wifi. I just turned off beamforce and fast roam. I have Aqara motions that worked flawlessly firing lights on/off prior to 2.3.5.152. Sometime in the past 2-3 weeks something has gone wonky. I have light switches bouncing on and off the KASA app trying to upgrade and failing. There is a 2-5 second delay on motion lights turning on (most of the time/very random) When I attempt to use Hubitat device off/on, about 20% instant, rest varies on doesn't do it or delayed. Logs don't seem to show anything. I have tried disabling cloud binding (on by default) doesn't seem to help. All light switches were added using KASA integration app using the Scan Lan. All were found and working perfectly prior to ~2 weeks ago.

I would like to move the KASA local only. Just want understand best way to get back to where I was. Based on what I am reading, I should be moving to static IP's and manually adding? Just need some guidance.

Thanks.

Questions:

  • Are you local (LAN) or cloud control currently???
  • When did you last reconfigure you WIFI/ACCESS points. Any correlation to performance issues?

For the Kasa devices, the TP-Link Kasa phone app has gone wonky. Probably some instability by incorporating Matter capability into the cloud / phone app itself and will like clear out in time. I have seen this myself. This may also impact "cloud" control via Hubitat. So if cloud, go to Lan control (you can do this w/o uninstalling and reinstalling).

For Hubitat issues while in LAN control,

  • The phone app may be causing the device to have issues (I have seen this). Suggest REBOOTING the device via the Hubitat device preferences section if you encounter issues. That often clears the issue up.
  • quick polling could also be interfering. If the Kasa device receive one UDP command while executing any other command, it appears to throw it into the bit-bucket. Use only if needed.
  • You can also disconnect the devices for most devices using the Hubitat Kasa device preferences. AFTER you have converted to LAN control, deselect Bind to Kasa Cloud and save preferences. This will take the Kasa cloud out of the picture.
    • You can reconnect using the Hubitat device's preferences; however, this does not always work on newer devices).

LAN Note: Generally, LAN works great. However, static IP addresses are called for. Also, some older 2.4 GHz wifi devices (all manufacturers) have issues with the network's WPA setting. They do not like the WPA3 settings and sometimes do not like hybrid (auto) WPA2/WPA3. (saw article on this lately).

Local lan, will check WPA3, default 30 min polling, will deselect/test other as suggested.

I seem to be working again with cloud disabled. But, still a 1-2 second delay turning lights on.

Thanks again.

1 Like

For anyone who has an existing install of this, be careful if you go to update to 2.3.6 (released a few days ago) via HPM. In my case it was going to create duplicates of the driver I use which would then have to be manually switched on each device. Looks like it wiped out the IP on one device also, and I cannot figure out how to run the discover again to fix it... button seems to be gone from the app :frowning:, not sure when that change was made.

I was able to get my device working again by manually setting the IP on the device page. Not sure what happened with the discovery process that wiped it out.

Also, I did send the dev a DM with more details on the issue, I did not want to call it all out on here.

1 Like

Too late me me, I just upgraded a few hours ago :face_with_symbols_over_mouth:
I now have versions 2.3.5 and 2.3.6 of the app and associated drivers (mono bulbs and plugs in my case). How do I tell which version of the app my devices are using? How do I safely remove the duplicates?

1 Like

@steve007 I would "Unmatch" in HPM from any Kasa installs you have in there.
Then in your Apps Code, look at the last modified date. The one just recently modified should be the new version, and it should be safe to delete it. If somehow it is in use the hub will not let you remove it. You could then edit the app code that remains, and see what version # is listed inside the code.

Then you can also do the same for the drivers. I would just remove the new code and leave everything on 2.3.5-1 for now. If the manifest file gets fixed then HPM will be able to match up and update correctly. Also, the update seems to be mostly just adding some new drivers for Matter devices so if you have no need for those I don't think updating is needed.

2 Likes

Issue solved. See next message.

HPM IS CURRENTLY NOT WORKING FOR THE KASA INTEGRATION. FIX IS IN WORK.

My HPM files are messed up OR something else. Working on a fix.

3 Likes

HPM Now working for update. However, there is a special (one-time) procedure due to a discrepancy.

Special HPM Instructions for this release only. After updating via HPM, do a HPM Repair of the Kasa installation..

2 Likes