[DEPRECATED] Kasa Plug, Switch, and Bulb integration

I've given the HS110 a test run. Results coming in a PM

I just did a fresh install of the application and I am not seeing this option in the setting or rule machine. Can you highlight how to turn off the led light on the HS220? That functionality is definitely worth a few bucks your way :slight_smile:

Thanks Dave

It's in the app, under advanced settings (if your particular device allows it).

@mike Thanks for the pointer. Looks like it works great for the 210 but the older HS200 is not supported. I think I read this somewhere before when I was looking to write my own applet. I think they said that the workaround was to report the 200 was a different model and the same command worked.

Found what I recalled seeing.
channel-to-control-the-led-status

The HS200 does work in it's own weird way.
LED Setting / LED with Switch On / LED with Switch Off
0n / OFF / ON
Off / ON / ON
VERY WEIRD - but a Kasa issue. The command is exactly the same whether HS200 or HS220 and the functionality within the device may be different.

Dave

So Dave,
Is there a way I can trick it so that it is off when the light is off? I swear the HS200 in my bedroom is the brightest LED in the house. Looking at the setting above, it looks like they have the off setting with led always on.

Guess it's time to wire up one of the 3 way switches to my fan.

You are correct, and no, it can not. You could use some thin white tape to manually hide the LED. If that works, a thin white tape at bottom may also work. (total kluge here).

I don't have the HS200 so don't exactly know what the problem is, but if I am reading the situation correctly, Google Lightdims. They are excellent at what they do. Takes away the glow completely, but still allows you to see the LED if you are looking at it.

2 Likes

6/25 Message Update

Change Rationale:

  • People have been reporting UDP error message when using quick poll functionality. The problem is on the MultiPlugs and only when more that 3 devices are set for 5 second quick polling. The issue is hitting a single device with 6 quickpolls in 5 seconds causes a lot of command collisions (where the second command is ignored).
  • The native comms for the devices are TCP, not UDP, so a lot of sub-optimal issues are raised when using UCP.

Changes coming:

  • All drivers will use rawSocket communications in their production release.
  • The EM Multi-Plug and Multi-Plug UDP implementation will be deprecated and not used for future installation. I have updated to add some states so you can see how badly your devices are behaving and reduce warning messaging. See note below.
  • A new Multi-Plug Parent - Child set using rawSocket communicaitons will be the production version. This requires a re-install of the Multi-Plugs to utilize. See Note Below.

Note on Multi-Plug Parent Child Implementation. This implementation will uses a single parent driver and two child drivers (EM Multi-plug and Multi Plug.) Some planned nuances

  • Now have onOff polling and power polling
    • OnOff polling can be called only from the parent. All children will get onOff results with each poll.
    • Power polling is at the individual device level and only works if emFunction is set to true.
  • Added state.totalParses and state.totalErrors to the driver for the first edition. This will allow further checking on excessive errors. Note that 1% error rate is not that bad. 10% is terrible.

Recommendation to users: WiFi calling, VOIP, video streaming use a lot of bandwidth and resources. Move all of these to your 5GHz WiFi ports. This may improve UDP errors.

Planned implementation is July 1. I need to generate the code and then do robustness testing for a week or so.

Thanks to this group of users for all you do for me. It makes it a pleasure while I get to play.
Dave

Updated. Planned delivery delayed due

5 Likes

Hi @djgutheinz,

I have recently received the UK variant of the Kasa Mini Smart Plug known as the KP105.

Although the device isn't recognised by the integration, I have manually created it as a normal Plug and assigned the IP and can confirm it works perfectly. I haven't tested other features like turning off the LED indicator yet.

Let me know if you need any further info.

1 Like

That is partially why I allow manual installation on ALL of my drivers. I will add it to the device list so the device can be installed using the App. Will likely be on the 1 July version.

Dave

1 Like

I have a question. This is probably me being dumb. I do not see a link to any code to install this app? There are 600 comments on this thread...

All I am wanting to do is something simple. We have an air purifier connected to one of the outlets in the media cabinet, which are all on an HS300 (for the power monitoring integration of Sense energy monitor). I just want the plug that has the air purifier to turn off when the TV is turned on and then turn back on 10 seconds later (the air purifier requires a button press to come back on).

I think you're right. The convention is most Dev's will update the first post with updates to their features and a link to their code, which I assume how I accessed this some time ago. I'm pretty sure @djgutheinz is setup in package manager / explorer if you want to install those and then access the drivers / app from there. Otherwise I'm sure @djgutheinz will get back to you soon. Let me know if you need a hand with the package manager option.

I'm not familiar with Package Manager. This is literally the first app I'm trying to install. Is that one of the build in apps?

No it's not, give me a moment and I'll find the links for you

I think I managed to find the code. Is there an advantage to using Package Manager over installing the app and the driver manually? I assume it'll do things like notify me if there is an update?

Was typing the instructions below and just noticed your post. Essentially you are right, it's a more convenient method for the user and developer, with added benefits like reminders when an update available. It's also good for apps with a number of drivers.

Package Manager is built by one of the members of the HE Community, @dman2306. The thread is here and the code and installation instructions are here. This app was developed to make it more convenient to install apps such as the kasa integration.

Once installed I think you may be able to lookup the kasa app and install it, otherwise (or in addition to) lookup package explorer on this forum.

2 Likes

Got it working. There's about a 15 second delay for the air purifier to turn off, but that's because I'm letting Sense turn off the plug using IFTTT instead of polling the HS300 for when the TV turns on. The Sense is already polling it every 2 seconds asking for energy data. Though, I might try polling the TV and just see if it impacts Sense at all. I would prefer to keep everything as local as possible. Just made a simple rule in RM to turn the switch on if it's turned off and delayed the action by 10 seconds.

EDIT: At least I hope it showing pollFreq as 0 means it's not polling the plug.

1 Like

Great to hear you got it working and have already moved on to playing with some rules.

The specifics on using it I might leave for @djgutheinz to comment on. My use is relatively simple, mostly just monitoring my energy usage and used in conjunction with a laundry monitor app to alert me when the washing is done.

Yes, my integrations are in Package Manager as Kasa under control category.

Yes, pollFreq of 0 means it is not polling. (I may change that interface in the next version (using a drop-down) to be clearer.)

Does Sense connect to the HS300? How often does it poll for power and energy or does it let Kasa the cloud do that response?

Recommendation to turn off Air Purifier. I recommend turning the EM function and quick polling ON for only the TV set and off for everything else (unless you need the data for some reason). Then, I would set up a rule using a threshold of 20 watts to turn the air purifier off then with a 10 second delay turn it back on. On my Samsung TV, I get the following log from HS300 power-on command to various power reports. Essentially, in 5 seconds from power on the device it will report over 20watts (your TV may differ - use text logging with quick poll set to see yours.)

[dev:3942](http://192.168.50.197/logs#dev3942)2020-07-07 04:06:20.911 am [info](http://192.168.50.197/device/edit/3942)Video 5.2.1 powerPollResponse: power = 98

[dev:3942](http://192.168.50.197/logs#dev3942)2020-07-07 04:06:15.664 am [info](http://192.168.50.197/device/edit/3942)Video 5.2.1 powerPollResponse: power = 37

[dev:3942](http://192.168.50.197/logs#dev3942)2020-07-07 04:06:10.453 am [info](http://192.168.50.197/device/edit/3942)Video 5.2.1 powerPollResponse: power = 30

[dev:3942](http://192.168.50.197/logs#dev3942)2020-07-07 04:06:05.533 am [info](http://192.168.50.197/device/edit/3942)Video 5.2.1 commandResponse: switch: on

Concern. Your post highlights something I had placed in my don't worry bin. When connected to the cloud, the Kasa devices send a status message to the cloud periodically and when a change occurs. This may account for some of the errors I get on the HS300 since one WiFi interface is servicing six devices. Nothing for you to do. Just a note as we go forward.

PS - sorry for all the posts here, but I have open discussions on issues, improvements, and updates. The integration has evolved from a cloud-based to local wifi using UDP. The next version will use the (Alpha) rawSocket implementation on Hubitat to reduce overhead when quickPolling. Maybe I will Deprecate this thread and have it closed on the next release and start a new thread.

1 Like