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
- Removes emeter discovery This caused interoperatbility isssues with newer HS220 hardware. Removing this has fixed it for several folks. See https://github.com/home-assistant/core/issues/39395 — committed to bmbouter/pyHS100 by bmbouter 4 years ago
- Removes emeter discovery This caused interoperatbility isssues with newer HS220 hardware. Removing this has fixed it for several folks. See https://github.com/home-assistant/core/issues/39395 — committed to bmbouter/pyHS100 by bmbouter 4 years ago
- Removes emeter discovery This caused interoperatbility isssues with newer HS220 hardware. Removing this has fixed it for several folks. See https://github.com/home-assistant/core/issues/39395 — committed to bmbouter/pyHS100 by bmbouter 4 years ago
- Removes emeter discovery (#197) This caused interoperatbility isssues with newer HS220 hardware. Removing this has fixed it for several folks. See https://github.com/home-assistant/core/issues/39... — committed to GadgetReactor/pyHS100 by bmbouter 4 years ago
- Bump pyhs100 dependency to fix hs220 discoverability issues Fixes #39395 — committed to rytilahti/home-assistant by rytilahti 4 years ago
- Bump pyhs100 dependency to fix hs220 discoverability issues (#43619) Fixes #39395 — committed to home-assistant/core by rytilahti 4 years ago
- Bump pyhs100 dependency to fix hs220 discoverability issues (#43619) Fixes #39395 — committed to rccoleman/core by rytilahti 4 years ago
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.pyI 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.