[DEPRECATED] Kasa Plug, Switch, and Bulb integration

Hi @djgutheinz ,

Noticed something recently that I thought may be worth including, unless I have missed it :slight_smile: Also, not sure how many new requests you are taking, but again, thought I would at least ask.

I turn off the LED indicator light on some of my Kasa smart plugs (HS110's and KP115's) in the bedrooms when I am in Night mode, then turn them back on when I enter Day mode. Mostly a "because I can" thing, there are plenty of other indicator lights on other devices. Occasionally in the morning I use Evening mode rather than Day Mode, to have softer lighting as I am starting my day. I seem to have missed turning the LED indicator lights back on when transitioning to Evening mode. One of the plugs is for my Iron, so when it is on and I have used Evening mode in the morning, there is no light on the plug to say whether it is on or off.

Now this is completely my fault in the way I have setup my rules and chosen to use the drivers. But I do wonder whether it may be worth offering an option to have the light come back on when the switch is turned on? Maybe a Preference setting to enable this feature. That way if the switch is turned on you get a visual indication of this on the plug, regardless of any smarts that have been (poorly) setup. I also acknowledge I could do this myself using the same kinds of rules and commands I am using already, which I will likely do sometime soon, but I think a built-in feature like this would be a good addition.

Having the light turn back off again when the switch is turned off would be nice, but am wiling to forgo that if it would be too hard.

Thanks,
Simon

Simon, I looked at this and decided it is not an implementation I want to incorporate. It is basically setting up a rule within the device instantiation and the function would best be handled in rule-machine. (Any rule I could set up would cover only limited cases; while rule machine would allow a full range of cases.)

Thanks for the idea.
Dave

Thanks for considering it Dave, no worries that you chose to not include it, like you say, a simple enough rule to setup, which I will likely do in the next few weeks.

1 Like

I am still still seeing this issue. I have been using Hubitat Package Manager for updates, but it still has this old release and message. Am I doing something wrong?

If you are on 6.6.1, ignore the releaseNotes and DriverMismatch states for now. I will clear these in the next update.

@djgutheinz Is there a reason why the altLAN option is only shown for HS200s?

I was having some reliability issues due to a noisy network and I found that option in the code. When I enabled it for my devices all my issues went away. I think it should at least be allowed as an option without having to modify the code. Or better yet, why not make TCP the default?

That is the only system where it was ever necessary. Even then, it is a very poor option that only works with some of the devices.

It seems to work perfectly for the KP115 EM and EP10 devices I'm using, what makes it a poor option?

You are welcome to modify the code for your personal use. Providing TWO (LAN/CLOUD) paths of communications seems enough. Try using the CLOUD to solve your problem.

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.