Closed danielsmith89 closed 1 year ago
My three model HS100, hardware version 1.0, with firmware 1.2.6 were all not working yesterday, but this morning, all started working again. Port 9999 (abyss) was open yesterday on each and is the same still today. I made no changes over night and had tried rebooting Home Assistant several times yesterday with no change.
Supervisor 2020.11.0 OS HassOS 4.16 HA 0.117.6
@deosrc do you have a TP-Link account (so that you can control the plug from outside your local network)? If so then you might need to set an email and password at https://gist.github.com/chriswheeldon/3b17d974db3817613c69191c0480fe55#file-hs110-py-L79
I've not tried this as I do not have an account.
@chriswheeldon I don't have a TP-Link account and the app is showing "Guest"
Just had this comment from TP-Link Support:
Thank you very much for your email requesting information about TP-Link product.
We were aware that there were some security vulnerability on the previous firmware, some third parties might take advantage of the vulnerability to manage the plug. To avoid the potential attacks and security risks causing by this, we have released a new firmware version 1.1.0 to fix it. After upgrading to the latest firmware, some customers who were not using KASA app to manage the plug might found that it is not working.
It is suggested to use the TP-Link official App KASA to manage the plug, and we can confirm that there are no functionalities on the KASA app have been removed on the latest firmware. Your understanding will be much appreciated.
So it might be time to look to replace them for my use case. Really don't want to use their app.
Just had this comment from TP-Link Support:
I've now blocked my other TP-link plugs from accessing the internet to stop them getting upgraded and using REST via the cloud (see previous comments) to access emeter and control the ones that have been upgraded.
I won't be buying TP-Link again, time to support hardware manufacturers that include open protocols out of the box. On that note just read Shelly are about to release a UK plug, so that will probably be the way to go.
I also think it's arrogant for TP-Link to upgrade our stuff without warning or permission, the update caused a reboot of the device and who knows what could have been plugged in to it.
@RobBie1221 agreed, its a bit disappointing from TP-Link, I've switched to Gosund UP111 UK plugs and flashed them with Tasmota to avoid issues like this. Interesting about Shelly, I'll keep an eye out.
Just had this comment from TP-Link Support:
Yep I got the exact same response, I emailed back to complain loads but doubt they'll do anything. So annoyed at this, I literally bigged up the HS100s to lots of people saying how solid they were and how well they worked in HA! I love smart home tech but also despise it!
Anyone else lost HS110 connection too this morning? I was only having issues with HS100s but today my HS110s are appearing in HA but trying to change state throws an API error.
Anyone else lost HS110 connection too this morning? I was only having issues with HS100s but today my HS110s are appearing in HA but trying to change state throws an API error.
I only have HS110's and the hardware v4.1's were updated the other day. I've disabled the others from accessing the Internet so they don't get updated.
@RobBie1221 agreed, its a bit disappointing from TP-Link, I've switched to Gosund UP111 UK plugs and flashed them with Tasmota to avoid issues like this. Interesting about Shelly, I'll keep an eye out.
I have four UK HS100s which are now 'bricked' for my application. Stuffed my heating system. Can you point me to any information on flashing the Gosund plugs ? I may just switch horses and scrap the TP-Link devices.
I've also just contact TP-Link support and even pointed the to this Github page. Suffice to say this will be the last TP-Link product I will be buying if this is their attitude.
I've also just contact TP-Link support and even pointed the to this Github page. Suffice to say this will be the last TP-Link product I will be buying if this is their attitude.
I think they're a bit between a rock and a hard place tbh, as it was reported to them as a vulnerability, I'd imagine the whole TP-Link smartplugs are Insecure thing would have lost them a lot more sales than breaking various integrations does, I don't think they were ever sold as being locally controllable by 3rd party systems.
That said given it was a breaking change It would have been better if they could have pushed a message to Kasa warning that the firmware was to be upgraded and given you an option to opt-out with a standard disclaimer to cover themselves or provided an option to turn the old "insecure" way back on.
I actually find their multiple hardware revisions of the same product sometimes with different features more of a problem than this.
I've now blocked my other TP-link plugs from accessing the internet to stop them getting upgraded and using REST via the cloud (see previous comments) to access emeter and control the ones that have been upgraded.
Which port(s)/host(s) did you block?
I've now blocked my other TP-link plugs from accessing the internet to stop them getting upgraded and using REST via the cloud (see previous comments) to access emeter and control the ones that have been upgraded.
Which port(s)/host(s) did you block?
If it were me I'd just block all outbound traffic from the ip of the plug.
Sadly mine already upgraded so too late for me.
I've now blocked my other TP-link plugs from accessing the internet to stop them getting upgraded and using REST via the cloud (see previous comments) to access emeter and control the ones that have been upgraded.
Which port(s)/host(s) did you block?
I blocked everything except port 9999 - the port used for local talking
Which port(s)/host(s) did you block?
I just blocked the plugs from accessing the Internet.
Only my dimmer switches are still available in HA, but I got this response from Kasa. Thank you very much for your email requesting information about TP-Link product.
We didn't release new firmware for our smart switch, so there is no change to Kasa smart switch. So would you please double confirm if your switch can work with home assistant?
Would you please confirm if you can control your Kasa smart devices remotely when you're not at home or using mobile data?
Looking forward to your reply. Have a nice day! Your kindly feedback is much appreciated, please feel free to contact us if you need any further help. Best Regards!
Latest response from TP-link seems more promising:
Thank you for your feedback.
For the other hardware version, like version 1 or version 2.1 etc, we didn't have the plan to upgrade the firmware of them.
We are aware that the support of third party is a very useful feature for some customers to manage their smart devices.
I have forwarded your feedback our R&D department and our seniors are still evaluating and looking into a possible solution for this.
We will let you know if a solution is available.
We really appreciate your patience and understanding in this matter.
Not quite sure why the exact same protocol on HW v4.1 isn't an issue on HW versions 1 and 2.1 but best not to question that.
Probably eol versions they don't still sell.
I got a similar response from my last email to them suggesting they make an API or official SDK available.
I suspect they're getting a few compliants about it, I'm hoping that if they come to realise that working with 3rd party tools like homeassistant means they sell more devices they'll be a bit better at supporting such integrations.
Won't hold my breath however.
The response I had this morning from them wasn't anywhere near as promising:
This is one of tp-link supervisors Candice to follow up your case. Thank you for let us know your concern. We could understand your frustration as the Home assistant has been working before, but I'm afraid Home assistant does not have the privilege to manage HS100/HS110 V4 plugs anymore. The new firmware fixed the security vulnerability that may be utilized for attacks on TP-Link plugs and certain resources currently are not open to unauthorized applications for security reason. We are sorry that Home assistants was affected by that but this a decision we have to made to protect smart plugs for our customers. Besides, tp-link has not advertised the Home Assistant integration on official websites, and we can not guarantee that feature will work properly.
TP-Link are downgrading HS100/110 devices too users who request it; https://community.tp-link.com/en/home/forum/topic/236268?page=3
Based on @chriswheeldon work here - https://gist.github.com/chriswheeldon/3b17d974db3817613c69191c0480fe55 and some earlier protocol sniffing I had been doing, I've extended python-kasa to support the new protocol. I've contributed it as their pull request 117.
With this, Home Assistant should just work with plugs that are set up in "Local" mode (where you configure them from an app without a cloud account connected) and auto discovered. Plugs that are connected to an authenticated cloud account, or those which are configured statically, will need some changes in Home Assistant to support passing a username and password into the Discover.discover call, or the SmartPlug constructor.
Of course, if they're now downgrading devices, I could have saved myself the effort!
My HS110 is still on 1.0.4 and working. I wonder, can TP-Link update firmware without the Kasa app? And does anybody know what the url is of the TP-Link service? I'd like to block it in Pi-hole/Router to avoid an update.
I wonder, can TP-Link update firmware without the Kasa app?
Yes they can. The plugs connect directly to the TP-Link servers to update.
I'd like to block it in Pi-hole/Router to avoid an update.
Not sure about the hostname to block but I believe you can block a specific client on PiHole. Depending on your router, you may also be able to block the plug from accessing anything except local network.
Thanks. I have two domains, from somewhere. Unfortunately my router is some sort of DNS proxy, so the individual clients don't show up in AdGuard/Home. And disabling the device in my router (Orbi) seems to disable local network access as well :(
HA TPLink integration use a abandoned library (pyHS100), must upgrade to the new one https://github.com/python-kasa/python-kasa
In this new python library the new Firmware will be fully supported: https://github.com/python-kasa/python-kasa/pull/117
Christmas is coming, and I needed my plugs back in action to be able to turn the tree lights on and off.
So I've made a quick and dirty back port of my python-kasa pull request to support the new protocol into the pyHS100 library that's currently used by Home Assistant. This is designed as a drop in replacement for the existing pyHS100 library. As there's no way of passing in usernames and passwords without also modifying home assistant, this will only support plugs that are configured without a cloud account - you can do this in the Kasa app by skipping the "create a cloud account" step when setting them up.
If you're interested in trying it, you can download the modified library by doing
pip3 install git+https://github.com/SimonWilkinson/pyHS100.git@new-protocol
from with your Home Assistant virtual environment. You then also need to prevent Home Assistant from replacing the modified library, either by running hass
with --skip-pip
, or modifying the homeassistant/components/tplink/manifest.json
manifest file to remove the forced pyHS100 version.
I hope this is of use to people trying to get their plugs back online!
@SimonWilkinson Thank you very much for posting this workaround! Is there a different approach needed for people with Home Assistant OS running on VirtualBox?
For those using Home Assistant via Docker who are interested in @SimonWilkinson's workaround the path for the files is /usr/src/homeassistant/homeassistant/components/tplink/manifest.json
. You can use sudo docker exec -it [your HASS container name] /bin/bash
to get into the container to make the modifications.
Thank you again @SimonWilkinson for the workaround.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Tp-link pushed an update to one of my plugs (the other one is in the draw) that re-enabled local access (According to the changelog) I'm not sure if you have to open a support case for them to do that or if they're doing it for everyone.
@dragon2611 Can you please include:
Note also: Kasa iOS app version 2.30.0 was released 31/03 with a recent review saying:
I haven't updated to this version yet to confirm.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Plugs still don’t work with latest HA if they’ve been updated to the latest firmware from TP link.
Having issues as well
The TPLink integration will switch to using python-kasa
next month.
https://github.com/python-kasa/python-kasa/pull/117 has gone a bit stale, but it does provide a path forward to support the new encryption protocols.
It needs a champion to finish the work who has one of the affected devices to test with.
I get this error once per day:
Logger: homeassistant.components.tplink.coordinator Source: helpers/update_coordinator.py:219 Integration: TP-Link Kasa Smart (documentation, issues) First occurred: October 27, 2021, 12:58:57 (3 occurrences) Last logged: October 27, 2021, 22:45:52
Error fetching 192.168.55.111 data: Unable to connect to the device: 192.168.55.111
Address Resolution Protocol (ARP) is how Ethernet converts an IP address to the MAC address that is used on the LAN. I discovered my HS103 does not respond to ARP queries, so Windows can't figure out where to try to send a packet, gives "Destination Host Unreachable" errors and just stops without sending anything out.
In Windows, adding an ARP entry is long and convoluted, must be run in an administrative command window, and yet doesn't solve the problem:
e.g. netsh interface ipv4 add neighbors "Wi-Fi" 192.168.17.2 e8-48-b8-f5-12-34
(Replace the name of the interface, the IP address and MAC address with your local values)
This only changes the error to "Request timed out". Wireshark-ing it, the ping is sent out now, but no response is received. I'm not sure what to make of that.
Adding a permanent ARP cache entry has been a useful work-around in Linux. There, with the ARP issue wallpapered over, Linux can successfully ping the plug. The command is simpler, too:
sudo arp -v -s 192.168.17.2 e8:48:b8:f5:12:34
TP-Link support has been responsive in getting me through the "local only" setup described here, which does work if you're patient enough. When the instructions say "may take a few minutes", they really mean it. Don't interrupt it, thinking that it must be hung up.
I will lobby with them that the ARP issue is a network bug (not a "security feature") and should be fixed.
plug version info: (venv) davs2rt@heavymetal:~/code/kasa$ kasa --host kasa22 --plug sysinfo == System info == {'active_mode': 'none', 'alias': 'TP-LINK_Smart Plug_DD83', 'dev_name': 'Smart Wi-Fi Plug Mini', 'deviceId': '8006E70EFABC14B8E62408640F9AE5581E743039', 'err_code': 0, 'feature': 'TIM', 'hwId': 'B25CBC5351DD892EA69AB42199F59E41', 'hw_ver': '5.0', 'icon_hash': '', 'latitude_i': 0, 'led_off': 0, 'longitude_i': 0, 'mac': 'E8:48:B8:F5:DD:83', 'mic_type': 'IOT.SMARTPLUGSWITCH', 'model': 'HS103(US)', 'next_action': {'type': -1}, 'oemId': '211C91F3C6FA93568D818524FE170CEC', 'on_time': 1809, 'relay_state': 1, 'rssi': -32, 'status': 'new', 'sw_ver': '1.0.3 Build 201015 Rel.142523', 'updating': 0}
I'm not longer actively working on this. I found the Kasa plugs with the new firmware to be somewhat unreliable - they would reboot at seemingly random times during the night, and when they rebooted they'd come back on with their output off. So, I've removed them from my setup in favour of Zigbee based plugs.
Happy to provide what help I can to get this moving along though.
@SimonWilkinson I’m interested to know what zigbee plugs or strips you’ve transitioned to using.
@SimonWilkinson I’m interested to know what zigbee plugs or strips you’ve transitioned to using.
I went to a Smartthings Zigbee plugs as they have energy monitoring. I couldn’t find anything else in the UK. I use them with zigbee2mqtt via a conbee.
For energy monitoring I’m using a mixture of the SmartThings Smart Plug and the Aurora AOne double socket (which requires installation) For just turning things on and off, the IKEA Tradfri plug works a charm.
I love the Tradfri sockets. Has anyone in this thread that is surely to be closed any moment now for off topic chatting found a good zigbee power strip with 3+ outlets?
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I found the solution to integrate my HS100 in HA again. Local setup worked after resetting the Kasa HS100 and following this guide from TP-Link: https://www.tp-link.com/us/support/faq/2707/
Initially I setup a Cloud account, which caused the problems after updating HA.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Just to add I've had my Kasa plugs and bulbs for a couple of years now and only just got round to installing HA. I've used the Kasa app (Android) in the past to update to latest firmware and checked again and it says they're the latest.
It detected them fine and have had no issues with them.
KL110B HW1.0- Firmware 1.8.11 KP105 HW1.0 - Firmware 1.0.7
(UK models possibly. Bought in UK at least)
Also, the note about the plugs rebooting at times. I had that early on, particular late and night and all the plugs would switch off and back on again. Since firmware updates I've not had that problem since. I'm pretty happy with them really. Power monitoring on the plugs would be nice but can't have everything. Not about to bin them over that.
A lot of this could be hardware specific though.
p.s. the workaround link is dead. Or maybe they think it's fixed? https://www.tp-link.com/us/support/faq/2707/
Add me to the mix. I have both single and 3 way wall switches, plugs, and various bulb
Just to add I've had my Kasa plugs and bulbs for a couple of years now and only just got round to installing HA. I've used the Kasa app (Android) in the past to update to latest firmware and checked again and it says they're the latest.
It detected them fine and have had no issues with them.
KL110B HW1.0- Firmware 1.8.11 KP105 HW1.0 - Firmware 1.0.7
(UK models possibly. Bought in UK at least)
Also, the note about the plugs rebooting at times. I had that early on, particular late and night and all the plugs would switch off and back on again. Since firmware updates I've not had that problem since. I'm pretty happy with them really. Power monitoring on the plugs would be nice but can't have everything. Not about to bin them over that.
A lot of this could be hardware specific though.
p.s. the workaround link is dead. Or maybe they think it's fixed? https://www.tp-link.com/us/support/faq/2707/
Try powerc
Just to add I've had my Kasa plugs and bulbs for a couple of years now and only just got round to installing HA. I've used the Kasa app (Android) in the past to update to latest firmware and checked again and it says they're the latest.
It detected them fine and have had no issues with them.
KL110B HW1.0- Firmware 1.8.11 KP105 HW1.0 - Firmware 1.0.7
(UK models possibly. Bought in UK at least)
Also, the note about the plugs rebooting at times. I had that early on, particular late and night and all the plugs would switch off and back on again. Since firmware updates I've not had that problem since. I'm pretty happy with them really. Power monitoring on the plugs would be nice but can't have everything. Not about to bin them over that.
A lot of this could be hardware specific though.
p.s. the workaround link is dead. Or maybe they think it's fixed? https://www.tp-link.com/us/support/faq/2707/
Try powercalc
https://github.com/bramstroker/homeassistant-powercalc
it will allow you to build “virtual sensors” based upon known factors regarding various brands of devices.
What's the status of Kasa devices in homeassistant? I bought some plugs and switches and I can control them directly using python-kasa by using their IP addresses. But discovery doesn't work so I have to add them one by one by their IP address. Is there another way of doing this?
WORKAROUND
https://www.tp-link.com/us/support/faq/2707/
The problem
Lost communication with all TP Link Smart Plugs. Smart Lightbulbs still working as expected. However all works fine on TP Link Kasa App, so I know it's on the network and working correctly.
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
Additional information