-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TP-Link switch stopped working after upgrade to 2023.7.0 (fixed in 2023.7.1) #95938
Comments
Hey there @rytilahti, @TheGardenMonkey, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) tplink documentation |
Noticed the same problem, seems to be an issue introduced with python-kasa 0.5.2. Rolling that back to 0.5.1 and the problem went away |
Possible with HA OS? |
Which models are the devices that stopped working? Is it all the same model? Do some of the same model work and some don't? |
In my situation it was both KP115 devices. EP40 and HS300 were not impacted and still functioned. using the kasa-python command line I would get the following errors trying to discover devices:
|
3rd answer in my case. Some devices of a certain model work, others don’t. |
Thanks. Ordered a KP115. Should be here early next week. Will see if I can figure out what's going wrong |
I bet it's a null/0 byte in the encrypted data and it's prematurely truncating the string in the conversion. If you can get a wire shark dump of it happening I can probably fix it without waiting for the device |
Tcpdump or any type of pcap will work as well |
@bdraco This is not only related to KP115. I have other switches that are behaving the same way, specificallyHS100, HS200, HS220. |
Just need one to trigger the issue. Any of the ones not working with the same symptom should probably be enough to find the issue |
But thanks for answering my original question and providing the model numbers |
I have 6 Kasa KP125 smart plugs. After upgrading to 2023.7 one of the plugs stopped working and gave me a setup error in Home Assistant. Works without issue in 2023.6.3. All KP125 are the same with hardware version 1.0 and firmware version 1.0.10 |
If you rename that device in the tplink app does it fix it? |
@geekofweek suggested that a rollback to python-kasa 0.5.1 fixed it for him. Maybe a code diff? |
It's likely a problem with the encryption library changes. Rolling back should fix it. Ideally we find source the problem instead of reverting it right away because it just means it will come back next time we upgrade the library. |
Same problem here, with one HS105 outlet and two separate HS200 switches. |
Should be fixed in python-kasa/kasa-crypt#3 if someone wants to install that and test |
I pushed that change to my production system and all is well. All was well before though. Can't test it in person since I'm on an airplane still for another few hours |
Dedication has no limits! Thanks for your prompt response. |
Is there a quick way to pull this into an existing HA docker setup? I have a few broken devices but it is weird, its not affecting all my Kasa devices just two EP10s and ironically I have others that are fine.... |
Check out the PR in the container, and do a pip install on it. You'll need to remount /tmp to allow it to execute first |
Never mind, I manually brought in the changes and still seeing issues with the SAME two after that. All my other KASA devices are working and reporting. Just not this two... |
I'll do a release of the lib after I finish manual testing. Than you can install the wheel in the container. That will be a lot easier |
Piggybacking on @pyrodex‘s question: Any temporary fix for HA OS installs? |
0.2.1 published You can install it with the advanced ssh addon with protection mode disabled if you are using x86_64
Than restart ha |
For other architectures not x86_64 Wait for https://github.com/home-assistant/core/actions/runs/5470867696 to finish and run the below:
|
HAOS 10.2 here on Intel Nuc i3
|
Renaming the device in the uplink app does not fix it. Going back to 2023.6.3 fixes it.
… On Jul 5, 2023, at 4:36 PM, J. Nick Koston ***@***.***> wrote:
I have 6 Kasa KP125 smart plugs. After upgrading to 2023.7 one of the plugs stopped working and gave me a setup error in Home Assistant. Works without issue in 2023.6.3. All KP125 are the same with hardware version 1.0 and firmware version 1.0.10
If you rename that device in the tplink app does it fix it?
—
Reply to this email directly, view it on GitHub <#95938 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/A5J55L2NDUZKI2X4J2NJFILXOX3AXANCNFSM6AAAAAAZ7QL76M>.
You are receiving this because you commented.
|
Understood, but doesn't the encryption/decryption play a role in successfully connecting to these TP-Link devices? They are all on-line, and I can ping them. If my post isn't relevant, please feel free to remove or strike-through it. Thanks for your speedy efforts!! I'm rolling back to 2023.6.3... |
The encryption only happens after the connection is established. If the connection cannot be made the encryption can't be the problem |
I can confirm that kasa-crypt 0.2.1 works perfectly on HA OS / HA Blue ODROID. All switches are now responding. Kudos @bdraco! |
Yea, the pip worked without issues now. |
The dep isn't pinned in HA so the next HA release will automatically build with the new version |
Thank you for the fix. Had the same problem on a mix of 15 devices:
No problems with the:
|
Closing this issue as a solution is available and 2023.7.1 is shipping in a few hours via #96006 |
Please read before posting
If you are seeing the problem, please capture a wire shark or tcpdump and post it in this issue.
If you have a different model than the ones listed below please post the model
Otherwise give this issue a 👍 instead of posting to let us know you see the issue.
This will keep the issue nice and clean
The problem
After upgrading to 2023.7.0, the following errors started appearing in the log. Below devices are pingable. I also rebooted them, restarted HA. The same error appears again.
What version of Home Assistant Core has the issue?
core-2023.7.0
What was the last working version of Home Assistant Core?
core-2023.6.x
What type of installation are you running?
Home Assistant OS
Integration causing the issue
TP Link Kasa Smart
Link to integration documentation on our website
https://www.home-assistant.io/integrations/tplink/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: