Skip to content
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

TPLink sockets stopped working #53755

Closed
bessarabov opened this issue Jul 30, 2021 · 11 comments · Fixed by #53770
Closed

TPLink sockets stopped working #53755

bessarabov opened this issue Jul 30, 2021 · 11 comments · Fixed by #53770
Assignees

Comments

@bessarabov
Copy link

The problem

After updating from 2021.8.0b1 to 2021.8.0b4 all my 3 TPLink sockets stopped working (I'm using TPLink HS110 model).

On 2021.8.0b1 everything worked fine.

On the page IP:8123/config/integrations is see error "Retrying setup: Communication error":

Screen Shot 2021-07-30 at 15 46 26

I see that in beta4 two pull requests was added about TPLink:

What is version of Home Assistant Core has the issue?

core-2021.8.0b4

What was the last working version of Home Assistant Core?

core-2021.8.0b1

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

tplink

Link to integration documentation on our website

https://www.home-assistant.io/integrations/tplink/

Example YAML snippet

tplink:
  discovery: false
  switch:
    - host: 192.168.31.125
    - host: 192.168.31.138
    - host: 192.168.31.160
    - host: 192.168.31.242

Anything in the logs that might be useful for us?

Config entry 'TP-Link Smart Home' for tplink integration not ready yet: Communication error; Retrying in background

Additional information

No response

@probot-home-assistant
Copy link

Hey there @rytilahti, @TheGardenMonkey, mind taking a look at this issue as it has been labeled with an integration (tplink) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)


tplink documentation
tplink source
(message by IssueLinks)

@bessarabov
Copy link
Author

I make a couple of experiments and now I know exactly that this broke in 2021.8.0b2. I've downgraded to 2021.8.0b1 and tplink sockets works fine, then I upgdate to 2021.8.0b2 and the sockets stop working.

I see that in 2021.8.0b2 there was PR #53596

@mib1185
Copy link
Contributor

mib1185 commented Jul 30, 2021

Hi @bessarabov
there are 4 hosts defined in your config, but only 3 devices on your screenshot.
The message Config entry 'TP-Link Smart Home' for tplink integration not ready yet: Communication error; Retrying in background says, that there was an connection issue with one of the - in your configuration defined - devices and those setup of tplink platform will be retried until all devices become available.

For further troubleshooting, please enable debug log and provide the logs - to do so, please add the following to your configuration.yaml

logger:
  default: info
  logs:
    homeassistant.components.tplink: debug
    pyHS100: debug

@bessarabov
Copy link
Author

bessarabov commented Jul 30, 2021

I have 4 TPLInk HS110, but only 3 are now connected (the one is disconnected and stored in a box).

I have once again updated to the version 2021.8.0b2, configured the logger as you said — and here are the logs:

https://gist.github.com/bessarabov/dabd7c637b2a38c3ccd536fcd9a87fe5

@bessarabov
Copy link
Author

bessarabov commented Jul 30, 2021

I have commented out the socket that is not connected:

tplink:
  discovery: false
  switch:
    - host: 192.168.31.125
#    - host: 192.168.31.138
    - host: 192.168.31.160
    - host: 192.168.31.242

after that the sockets are working on 2021.8.0b2

But on version 2021.8.0b1 sockets were working even with ip address of not connected device.

@mib1185
Copy link
Contributor

mib1185 commented Jul 30, 2021

@bessarabov may I ask you to test the linked PR if it works now without commenting the not connected socket?

@bessarabov
Copy link
Author

Yes, I have tried your code on my server. Everything is working as expected. 3 sockets are available in HA and for the disconnected socket I see line in the logs Device at '192.168.31.138' not reachable during setup, will retry later

Thank you!

Some tech info how I tested it. I've used the code from commit 89f7cee from your fork https://github.com/mib1185/homeassistant-core (link — mib1185@89f7cee )

I have taken 2 files from it:

  • homeassistant/components/tplink/init.py
  • homeassistant/components/tplink/const.py

And I have put them in my docker container homeassistant:

# docker exec -it homeassistant bash
bash-5.1# cd /usr/src/homeassistant/homeassistant/components/tplink
bash-5.1# cp __init__.py __init__.py.orig
bash-5.1# cp const.py const.py.orig
bash-5.1# vi __init__.py.new
bash-5.1# vi const.py.new
bash-5.1# cp const.py.new const.py
bash-5.1# cp __init__.py.new __init__.py

And then I have restarted HA.

@bessarabov
Copy link
Author

Thank you for solving this!

(I have updated to 2021.8.0b7 and everything is fine with this version)

@mbilsky
Copy link

mbilsky commented Aug 4, 2021

I updated to 2021.8 this morning and while it successfully added the new sensors to my HS300 power strip, it now broke all the switches that controlled the individual outlets. Any ideas?

@mib1185
Copy link
Contributor

mib1185 commented Aug 4, 2021

I updated to 2021.8 this morning and while it successfully added the new sensors to my HS300 power strip, it now broke all the switches that controlled the individual outlets. Any ideas?

@mbilsky please open a new issue and please also enable debug log and provide the logs - to do so, please add the following to your configuration.yaml

logger:
  default: info
  logs:
    homeassistant.components.tplink: debug
    pyHS100: debug

@mbilsky
Copy link

mbilsky commented Aug 4, 2021

Thanks! Posted here: #53989

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants