FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

HS200 (hw 5.0, fw 1.0.2) times out on initial update when HomeKit module query is batched · Issue #1803 · python-kasa/python-kasa · GitHub

Repository navigation

HS200 (hw 5.0, fw 1.0.2) times out on initial update when HomeKit module query is batched #1803

Closed as duplicate

Description

AI Generated Bug report:

Claude helped me troubleshoot this issue, when I implemented its fix, it worked for me.

HS200 (hw 5.0, fw 1.0.2) times out on initial update when HomeKit module query is batched

Describe the bug

An HS200 that previously worked in Home Assistant now fails setup with:

Unable to communicate with the device: Timeout after 5 seconds sending request to the device <ip>:9999

UDP discovery succeeds and TCP 9999 accepts connections, but the device never replies to the combined initial update query. Each module's query sent on its own over TCP succeeds, including smartlife.iot.homekit → setup_info_get, which returns {"err_code": -1, "err_msg": "module not support"}. The device stops responding only when the HomeKit query is batched together with the other modules.

Other IOT devices on the same network and the same python-kasa version (HS103, HS220, EP10, KL125, KL135) receive the same batched query without smartlife.iot.homekit and respond in about 25 ms. The HS220's batch is larger than the HS200's (it includes the dimmer module), so this does not appear to be a response-size limit.

Device

  • Model: HS200(US)
  • Hardware: 5.0
  • Firmware: 1.0.2 Build 200819 Rel.105309
  • Protocol: IOT.XOR (port 9999; port 80 refused, so not KLAP)

Environment

  • python-kasa: 0.11.0.1 (bundled with Home Assistant)
  • Home Assistant: 2026.10.1
  • Python: 3.14

Reproduction

Batched query sent by IotDevice.update() on initial update (times out, 3 retries):

{"system":{"get_sysinfo":{}},"smartlife.iot.homekit":{"setup_info_get":{}},"schedule":{"get_rules":{},"get_next_action":{},"get_realtime":{},"get_daystat":{"year":2026,"month":10},"get_monthstat":{"year":2026}},"anti_theft":{"get_rules":{},"get_next_action":{}},"time":{"get_time":{},"get_timezone":{}},"cnCloud":{"get_info":{}}}

Workaround

Skipping the HomeKit module registration in kasa/iot/iotdevice.py:

self.add_module(Module.IotHomeKit, HomeKit(self, "smartlife.iot.homekit"))

With that line replaced by pass, the device initializes and works normally in Home Assistant. This is a blunt local workaround that disables HomeKit for every IOT device, not a proposed fix.

Suggested fix

Either query smartlife.iot.homekit in a separate request instead of batching it, or register the module only on devices/firmware known to support it. If the module's support check happens after the first update, sending its first query separately would also avoid poisoning the initial batch on firmware that doesn't support it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL