Basic Rules with Kasa Devices not working for me

I received my hub yesterday, installed it and updated the software. From the browser, I used the Kasa app to find all 11 of my existing installed Kasa devices. All that went well. I then tried to make basic rules to turn on and off a Kasa plug switch from a Kasa wall switch. When I use the Hubitat browser to toggle the wall switch, I get the expected result: the wall switch toggles on and off, followed quickly by the plug toggling on and off. But when I physically toggle the actual wall switch, it toggles but the plug does not. What step have I missed?

I have only used the excellent Community developed integration that the built-in one is based on, so I expect it is similar. I would expect that there is a polling period setting for the switch that will dictate how quickly you see updates appear on the HE device when the physical switch is adjusted. Have you looked at the polling interval on the HE device?

2 Likes

You most likely will not be able to replicate this in Hubitat.

When you toggle the switch from within Hubitat, Hubitat is immediately aware of that change and executes the automation. However, the Kasa integration is a polling only app...which means that Hubitat periodically polls the device to get status updates. When you physically change the switch, Hubitat is unaware of that change until the next polling event. You would need to lower the poll interval for the switch to get a timely update into Hubitat to trigger the automation. The downside is that the lowest you can go is 5 seconds, but that may incur some negative consequences due to how often the polling would run.

image

3 Likes

I had already set the polling for the plug to 5 seconds, and now I have set the polling for the wall switch to 5 seconds, and pushing the switch now controls the plug, but with a lag of up to 5 seconds. I was hoping for better. In another thread in this community, I saw advice to set the devices to "LAN mode" to solve the lag problem. But both devices seem to be in the LAN mode (I took no action to do that, but that's the way they were automatically configured as far as I can tell). I also saw there is a way to edit the minimum polling interval down to 2 seconds, but I haven't tried that yet.

For “instantaneous” responses to device state changes, you will need devices that publish changes in their state to the hub. There are some WiFi devices that do this, but Kasa devices don’t.

Also bear in mind that device polling can slow other apps depending on the number of devices polled and their network connectivity.

2 Likes

I have multiple switches and plugs and outlets which instantly trigger on and off. To understand you have a rule that when you press the kasa switch at the wall it turns off a kasa plug and it's delayed?

I have all my polling set to default and things instantly turn on and off with both voice commands, button (remotes) presses. However, I never used my kasa wall switch to trigger any other devices. I can test it when I get home to see if I get lag. How much lag is it on default polling?

Are your device(s) showing "connection : LAN" in the device properties? Not sure if that plays a role or not.

This is what @JacktheSE is doing, and there’s an inherent polling delay involved.

Automations that rely on Hubitat-initiated changes are anticipated to be instantaneous, since the hub is aware of the change it has initiated.

Honestly, I never had a need to press the paddle/rocker on the wall. I use motion sensors and only reason I bought the switches was just to control multiple lights before I got into colored bulbs. My wife does from time to time and the bathroom fan for a timmer.

I'll def test it this afternoon and report back. I'll try both a plug and an outlet. @JacktheSE Which plug model is it?

Hey guys, thanks for your quick and insightful responses. Everything is now understood and working exactly as you have collectively described. I can live with Hubitat's 5 second polling (and it always seems to beat that by a bit in actual use). That's actually better than my experience with the native cloud-based Kasa system, which had lags up to 8-10 seconds typically. All my new devices will be Z Wave, but it's nice to be able to use my legacy installed base of Kasa devices. And I note that Kasa plugs respond instantly when a command is issued by the Habitat Hub (no polling there). My Kasa switches all have integrated motion detection which operates perfectly for my use case, and I would want to find Z Wave equivalents.

3 Likes

Zigbee devices also work well with Hubitat. And generally are less expensive - especially sensors.

2 Likes

Enbrighten Z-Wave In-Wall Smart Motion Switch
Just a teensy bit more expensive than Kasa. :wink:

And for increased functionality versus the built-in driver:

1 Like

https://community.hubitat.com/t/release-ge-z-wave-plus-motion-switch-component-driver/48951. Ranchitat...Perhaps this a motion detector that could solve a problem I've been having since 2004, believe it or not. I have a L-shaped garage with a shop that requires two motion detectors to fully span where I might be when I'm working in the shop. Every detector I've tried has a timer that issues a "no motion detected" command at the end of a set duration with no motion. And it only issues a "motion detected" signal if the timer is not running. Perhaps I could write a custom program with three boolean variables, one for each sensor that is true if it's timing for an off command (otherwise false), and the third that's true if the lights are on. If the lights are off and either sensor went to true, I would turn the lights on. If the lights are on and both sensors indicate no motion then the lights would turn off. Do you think the GE sensor would support that? Note that I just got my Hubitat yesterday and have never written a program, so I have a long road ahead on this, but I'm willing to try...

I'm sure there's multiple methods to get where you're going...
But maybe take a look at this built-in app, might be just what you're looking for:

1 Like

Wow, the Motion Aggregation Zone option looks promising, as long as the motion sensors I would use issued continuing motion detected messages while its own internal off-timer was still timing. The Kasa sensors I have are integrated into a switch, and continuing motion detection by the sensor is obviously updating its own internal off-timer, but it issues no external messages about that. Looks like I'm in the market for a couple of reliable stand-alone Z Wave or Zigbee sensors to try this out. Thanks very much for pointing out this app--it looks perfect. ...

1 Like

Most motion sensors work this way. They report motion when it goes active and don't update again until motion goes inactive. There is variance in how long that takes. I have some SmartThings motion sensors that report inactive pretty quickly but some Sonoff that take something like 30 seconds after motion stops to report it.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.