TP-Link offers way to add local API back

Hello Everybody especially @system I have good news.
I can verify that I have regained local control of my HS100 (UK) V4 (firmware 1.1.0) plug by using the python-kasa library.

i.e. From command line on my laptop (debian 10) I can toggle this plug on/off and obtain its state info. This give us a path to updating to HomeAssistant TP-LINK plugin to incorporate the capabilities of the python-kasa lib (or perhaps spinning up new plugin) See my post over on this other thread.

Hey all,

Looking to get a few energy monitoring plugs. Tried Tuya Convert, no go. Now looking at this.

So I should stay away from the TP link as well? none of this works anymore?

Thanks

I can confirm that the python-kasa library at githib (https://github.com/python-kasa/python-kasa) works to control my local tp-link kasa switches (HS-103 and HS-105 US). Looks like we just need a way to integrate the python-kasa library back into Home Assistant to regain control of these switches.

2 Likes

Tuya Convert works well, but a fair few Tuya devices are no longer ESP8266-based, which means they cannot work with Tasmota. Can recommend some UK ones that work for me, if that helps, and the process to convert them is very straightforward. Oh, and with the bonus that once converted, you know they’ll never get killed in the future :slight_smile:

What does this mean?

TP-Link: Hi, the previous affected firmware 1.1.0 for HS110-UK-v4 had been deleted from the cloud server, and currently, no more new plugs could be blocked with the home integrations such as Home Assistant. And We are planning to push a more secure cloud API in the future before upgrading a more secure local communication authentication method on all Kasa devices. At that time, other third-party platforms/applications can register a developer account on our official website and integrate with us through our more secure APIs. Thank you very much.

1 Like

This part is especially confusing. Does one developer for, say, HA, need to register, or does every HA user who wants local control need to register?

1 Like

Hi, Why don’t you make it more clear?
I have reached to them many times and they kept telling me only HS110/HS110(UK V4 would be affected and my US plugs would still work.
I did not believe it at first but I do now.
I also noticed that they have stopped releasing the beta firmware and please add that too!!!
So it would save us more time.

I recently (March 2021) ordered two HS200 (US) switches from Amazon. Version levels are:
Hardware = V3
Firmware = 1.1.3, next upgrade:1.1.4

Everything works as expected in Home Assistant. Although this conversation is centered on HS100, it has brought me to ask: Will this firmware upgrade break my HA config/automatons?

Likewise:

HS200 (qty 3) HW=V1, FW=V1.2.5, next upgrade: 1.2.6
HS100 (2) HW=V1, FW=V1.2.5, next upgrade: 1.2.6

Will any of the above firmware upgrades break my HA config/automatons?

For completeness:

KP400 (1) HW=V1, FW=1.0.15 (no upgrade available)
HS105 (2) HW=V1, FW=1.5.6 (no upgrade available)

Update 2021-04-05 (I now see this updated from February)

In the latest Kasa firmware release, we upgraded the local communication authentication method for the two smart sockets HS100(UK)4.1 and HS110(UK)4.1 ONLY (Other models and hardware versions would not be affected) to prevent local communication security risks. As a result, some third-party smart home software and platforms (such as Home Assistant) that use local APIs can no longer communicate with our devices.

…that answers my question above…

I’ll admit that this thread is difficult to follow. To the extent this link is of no help, please delete.

On Friday I started to move my 11 Kasa devices off of the cloud using this procedure: https://www.tp-link.com/us/support/faq/2707/

The “local only” devices work perfectly fine with Home Assistant. (Static IP addresses assigned at router.)

The only issue now is that there is no access to these devices with voice via Amazon Alexa. I hope I can solve this by re-installing Alexa Media Player via HACS.

8 Likes

Thank you tarheelz for this. This got me going and since I use Google Home I just exposed the switches to it and I can turn them on and off with Google voice commands.

1 Like

I have a:

KP400(US)by TP-Link
Firmware: 1.0.15 Build 200825 Rel.111911

And as of a few days ago, no matter what I do, I cant get it to work with HA anymore. All my other Kasa’s work fine though.

I have another KP400(US) that is on firmware Firmware: 1.0.6 Build 200821 Rel.090909 which is still working.

Could my issue be related to this? I know its not one of the 2 affected models but since its running a newer firmware than the one that is sitll working, i am suspect of it.

that solution worked for me.

HS110 hw 1.0 fw 1.2.5

not upgrading the firmware just in case

You can use the hue emulation feature in HA to make available your light and/or switch entities on your local network in a way that Alexa discovers them (without ANY additional skills - including Philips Hue). This will give you voice control of on/off/dimming (but no color) for your devices. If you happen to have an Echo Plus (1st or 2nd gen) or an Echo Show 10 1st gen, you will even have local voice control over these devices.

I believe this is one of the best kept secrets of the Alexa ecosystem. I learned about this feature four years ago when I setup my first Echo (Dot) to allow voice control of my extensive X10 setup. Just successfully tested the local control feature earlier this week as I do have an Echo Plus 1st gen in my collection of Alexa devices. Neither Nabu nor any other cloud or subscription services are required.

1 Like

HI all I am now having a similar issue on my HS200 sires devices. I can only control them with HA if I have an internet connection. This started after updating the firmware.

This solved for me too. I think this is ideal fix for nabu casa users who have google assistant integration. Follow the link from @tarheelz unlink your lights from your Kasa account and put them on guest. Then delete and reinstall home assitant integartion fro TP Link Kasa. Not full control both by HA and google home voice within house.

@system Hello, can you read this thread created by @MCLF

Does this mean tp-link HS110 V4 1.1.0 have a chance to work with Home Assistant again?
Thank you for your help:

Feedback from TPLINK

TP-Link: Good day. Since the beta firmware has been stopped pushing already, there is no more beta available now. And We're also planning to push a more secure cloud API in the future before upgrading a more secure local communication authentication method on all Kasa devices. At that time, other third-party platforms/applications can register a developer account on our official website and integrate with us through our more secure APIs. If possible, Please wait for a while for the later official firmware. For more details, please refer to this link: https://community.tp-link.com/en/smart-home/forum/topic/239364 Thanks for your understanding and support.

What a shameful company, I will never buy from them again.

1 Like

awesome! this works for many of my tp-link devices.

the following models and versions all are now working.

Model: KL130, Hardware Version: 1.0, Software Version: 1.8.11
Model: HS105, Hardware Version: 1.0, Software Version: 1.5.6
Model: HS105, Hardware Version: 4.0, Software Version: 1.0.2
Model: HS200, Hardware Version: 2.0, Software Version: 1.5.5

the following require a cloud account and no longer work.

Model: KP400, Hardware Version: 1.0, Software Version: 1.0.15
Model: HS107, Hardware Version: 1.0, Software Version: 1.0.10

note that most of these devices were upgraded after i re added them using a private account (no account).

@tarheelz thank you for your perseverance and being motivated to mention this idea. theres too much info about what isnt working, and only your one single post about what dos work.

thanks

I just built a house and had 72 TP-Link Kasa switches installed. Some single pole, 3-way, and dimmers. All 72 have worked flawlessly in HA without the cloud (I have them on a separate VLAN blocked from WAN). They are also crazy fast! I have a few automated to turn closet lights on when the closet door is opened (binary sensor using ESPHome). They turn on so fast that the wife thinks that someone left the closet light on.

I’m just using this code in my configuration.yaml.

tplink:
  discovery: false
  switch:
    - host: 192.168.2.83
    - host: 192.168.2.125
    - host: 192.168.2.133
    - host: 192.168.2.249
.........
2 Likes

Thanks for this post, definitely saved me some time. I just bought an outdoor 2 outlet Kasa EP40 today, only to get it on my network and realize that the Home Assistant TP-Link Kasa integration wasn’t seeing it. My first clue should have been that the only way the Kasa app would let me get the device on the network was to sign up for an account. I found a few options to skip the account setup, but ultimately forced me to create a cloud account to configure that device type. Once I had it on the network, I tried the Home Assistant integration, but it didn’t find any devices. At first I assumed it was because I run a separate IOT VLAN, but then started reading through all of these threads to see they seem to be pulling away local access options.

On the bright side, I was able to specify the integration and host in the configuration.yaml as suggested by @bphillips921 which is working for now. I am a bit concerned about whether it will continue to work, but it’s the only Kasa device I have and for $20 I’ll just leave it integrated until it breaks. Hopefully TP-Link comes through on this, but I won’t likely buy any more until I know for sure.

If it helps anyone, my device info shows

  • Model EP40
  • Hardware Version 1.0
  • Firmware Version 1.0.2

configuration.yaml

tplink:
  discovery: false
  strip:
    - host: 192.168.5.186