core: TP Link Dimmer switch (HS220) hardware version 2.0 not being discovered

The problem

TP Link Dimmer switch (HS220) hardware version 2.0 not being discovered. All other TP Link switches, bulbs, and plugs are successfully discovered.

Environment

  • Home Assistant Core release with the issue: 0.114.4
  • Last working Home Assistant Core release (if known):
  • Operating environment (OS/Container/Supervised/Core): Docker
  • Integration causing this issue: TP Link
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/tplink/

Problem-relevant configuration.yaml


Traceback/Error logs


Additional information

Related issue: https://github.com/plasticrake/homebridge-tplink-smarthome/issues/131

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 5
  • Comments: 18 (8 by maintainers)

Commits related to this issue

Most upvoted comments

Ok, I found a workaround that seems to work. Am running the HaasOS image, so had to modify the file in the docker container:

docker exec -it homeassistant vi /usr/local/lib/python3.8/site-packages/pyHS100/discover.py

I changed: class Discover: DISCOVERY_QUERY = {"system": {"get_sysinfo": None}, "emeter": {"get_realtime": None}}

to

class Discover: DISCOVERY_QUERY = {"system": {"get_sysinfo": None}}

And then rebooted everything. Now all of my new dimmers show up and are controllable.

@appleguru I was thinking the same thing, Releasing a forked version of pyHS100 with this patch is easy enough, and switching the component to use it is also easy. I could do that if that’s helpful.

@rytilahti I have the same question @appleguru asks: what are the downsides to this approach? Should I open PRs for this?

Could you please create an issue to python-kasa project so that won’t be forgotten? Looks like HS220 does not like when multiple modules being requested, so the discovery process should be adapted accordingly.