Tp-link kp400

TP-LINK KP400 does not work in 96.5. problem is it’s a two outlets and HA only report one that turns both on. but a moment later it returns to indicating off when the outlets are on. It would be nice to be able touse this with HA. Any Takers out there.

Tom B.

Hoping someone can take this one before Christmas time! :slight_smile:

https://github.com/rytilahti may be willing to add this…

Commenting to keep this relevant, because I just bought one and it is disappointing I cant use it with Home Assistant. I am so ingrained in HA that anything that doesn’t work in it is practically useless because I refuse to use another app

Just made a PR on code that works for me inside a custom component:

https://github.com/home-assistant/home-assistant/pull/26655

That is fantastic news, thanks @gjbadros !!! I can’t wait to see your PR added to Home Assistant! I took a look at your code and am really curious as to if it will also work on the TP-Link HS300 power strip. I don’t see why that wouldn’t work, also. Basically this could add support for all multiple/child objects on the TPLink style power strips.

Does anyone have a HS300 they could try to validate? I have been holding off buying the multiple outlet TPlink switches, but it looks like I’ll be getting some of these shortly!!! Both the KP400 and HS300.

Yea I tried to make it work more generally… I wasn’t aware the smartstrips even existed until I read the pyHS100 code. I just ordered one and it should arrive tonight so I can test it.

Just noticed the HS300 also has energy monitoring as an added bonus. I know that at least one of the existing TP-Link switches has this and is supported in HA.

I noticed the same thing when reading the pyHS100 code. Hoping your tests go well and we can get this all added into the release HA well before Christmas time. :slight_smile: That will really help since I need a good outdoor switch solution for the lights.

TP-Link also has hard-wired indoor outlets (KP-200). I’m wondering if your code will support all the other multiple switch devices, like that one too!

I just tested the smart strip and it looks like the emetering code from pyHS100 needs updating for the smart strip emetering support. I can make the HS300 strip almost work if I catch some keyerrors, but I strongly suspect the right fix is a change to pyHS100 (or a bump to the latest version of pyHS100). Possibly one of the hass reviewers will have experience with the pyHS100 code base and an ability to do a new release there for hass to state as a new dependency.

Regardless, I’m confident in my patch for the outdoor switches and I’m hopeful it’ll get merged soon, long before Christmas. I’m pretty interested in the smart strips, too (though I also really like wattbox ethernet-based IP-controllable outlets which I built support for in hass but not in the general release yet).

Was checking tplink related pull requests today and noticed @mattkasa created one for HS300 and HS107 support! Between his pull request and yours, fans of tplink devices and HA will be VERY happy! You can see his request here: https://github.com/home-assistant/home-assistant/pull/26220

Looks like I’m going to be ordering a KP400 and maybe an HS300 soon! :slight_smile:

1 Like

Oh cool, thanks for the pointer… I’ll comment on that one since there is a lot of commonality – in particular my PR avoids a breaking change, but theirs uses a plugs member of the SmartStrip that, if it works for all of the devices, will be simpler than my extension of SmartPlug.

So it appears that as of 0.101 the kp400 has been added to Home assistant (https://www.home-assistant.io/integrations/tplink/), but I cannot get it to work… Every time I add a “strip” entity to my configuration for tplink it breaks the integration. Anyone have any luck getting it running?

Running 0.103 over here now and have a KP400 for my outside Christmas Lights. Working perfectly with Home Assistant. Here is all the tplink configuration from my setup:

tplink:
  discovery: false
  light:
# Marks Office Light
    - host: 192.168.0.161
  switch:
# Marks Office Salt Lamp Switch
    - host: 192.168.0.179
# Marks Office M Light Switch
    - host: 192.168.0.165
# Outdoor Lamp Post
    - host: 192.168.0.73
# Outdoor Front Lights
    - host: 192.168.0.186
# Alexs Room Light
    - host: 192.168.0.60
# Alex Humidifier
    - host: 192.168.0.187
# Mark Humidifier
    - host: 192.168.0.188
# Christmas Tree
    - host: 192.168.0.76
# Christmas Train
    - host: 192.168.0.83
# Living Room Lamp
    - host: 192.168.0.184
# Christmas 1st Floor Bedroom
    - host: 192.168.0.174
# Christmas Alex Room
    - host: 192.168.0.185
# Christmas Foyer
    - host: 192.168.0.164
# Christmas Foyer 2
    - host: 192.168.0.175
# Christmas Living Room
    - host: 192.168.0.173
  strip:
# Outdoor Lights Plug 1&2
    - host: 192.168.0.171

Yeah, I think one of the minor updates after .101 fixed it. I got it running a couple of weeks or so after posting. Thanks for checking though! I should have updated when I got it running