[DEPRECATED] Kasa Plug, Switch, and Bulb integration

They work locally.

1 Like

@djgutheinz
Dave,

Thank you for your wonderful work with the Kasa devices. I now have all of the KP125 and HS300 units in HE and all are working great.

You assistance was essential and I truly appreciate it and I salute you.

Bye Bye Reaction GIF by GritTV

1 Like

Has anyone written a rule that turns on/off the HS300 status LEDs. I would like to turn them off during Home+Sleep mode then back on when mode changes to Home+Awake. By specific time would work too. I am not sure how to toggle the attribute LED on and LED off using the simple/basic rule apps. I prefer to avoid RULE ENGINE.

I typically do not use rules. However, the LED is a command (not a preference), so you should be able to key it using rule machine.

Yeah, I include the as custom commands in my rm rules for transitioning to night and day modes, as well as adjusting polling rates

Hi @djgutheinz, I'm using these ( KL130 bulbs) in a new button controller rule (rule machine 5.x) and when setting the color temperature (and not a level), they just turn off instead. Do you have any thoughts on why this may be? I can provide logs and such if you think it may help.

I have been investigating the issue in this thread:

Also of note, this all works correctly in the legacy rule machine. But as we can no longer create new rules there, it would be nice for it to work in the new stuff too.

It is on the fix list for the next release. That will come out one or two weeks after next Hubitat Update (currently in Beta). The issue is that the rule sends a null level, so my original method of handling needs augmentation to handle passing of a null value.

1 Like

Thanks for the pointers. I was able to fix it by adding this to the "def setColorTemperature" section:
if (level == null) { level = device.currentValue("level") }

Not sure if more changes are needed, but at least my new rules are working so far.

I will do it elsewhere, but that is the general idea.

I'm having an issue where my Kasa switches only change state to on or off if they are changed within Hubitat(via the mobile app or in device details). If I turn them on physically they don't change their state within hubitat. If I turn them on physically they don't show any events under the log either. Iv tried rebooting, and removing and adding the kasa integration back into hubitat with no luck.

Any Ideas?

What is your polling set to? I had this same problem when I wanted to use Kasa devices as triggers. The interval is default of 30 minutes.

Edit: if you want to use it as a trigger you can usually safely crank individual devices up to 5 seconds.

Your polling schedule may have somehow been cancelled. You can verify if this is the case by looking at the Schedule section at the bottom of the page for poll or refresh.

To fix, try running Save Preferences. This will restart any scheduled events. If you do this, turn on debug logging and open that log page - looking for warning log entries.

for any manual switch/bulb activation, there will be a delay to the next poll to update the data.

PSA - For anyone that has the Cloud Plugs and Switches instance in HPM that constantly asks you to update, there is an un-match feature in the latest 1.8.6 release. Just tried it and it worked as expected, did not break the normal Kasa instance, does not reappear on match-up, and no longer appears as needing an update.

The new feature is hidden under Package Manager Settings.

1 Like

Activating the recently added login security two-step verification in the Kasa app breaks cloud access to all devices in this integration. Disabling two-step verification restores access.

Makes sense. Great catch!

Update Available to version 6.6.0.

Fixed null level issue. Updated app for clarity. Improved save preferences. Added link to help documentation on device's edit page. See: HubitatActive/Changes.pdf at master · DaveGut/HubitatActive · GitHub

Update instructions:
Update DRIVER and APP code
Run the App and select "Done" (this will update the driver version in the device as well as run Save Preferences).

Hello @djgutheinz. I tried updating via HPM and get an error on the driver upgrade. The version went to 6.6.0, but not the driver. I tried your added update instructions as well, then tried updating via HPM, but received the same error. Thanks.

Appears to be a HPM issue of some sort. I updated mine this AM without issue. That is a the final step in my testing - updating on my active hub.

image

Recommend manually installing the missing driver (plug-switch.groovy. Then finish upgrad instructions

Ok, I manually imported the updated driver code.
When you say "run the app", do you you mean basically just open the app and the click done?
If so, that's what I did.
But HPM still tells me it needs to upgrade. I tried using HPM to upgrade again, but still get that error. My app code and driver code indicate that I have 6.6.0 installed.

I know nothing about HPM other than my end. It is a different tool and since I can not duplicate, I can not troubleshoot. Open HPM and get the logs. They may be indicative of the issue. You could also try a repair in HPM.

Dave