Skip to content

Smart plug unable to connect after factory reset #270

Description

@perezjuanj

Type

Bug

Summary

A previously connected plug (HS103) no longer works after a factory reset. Here are the logs

[23/03/2026, 16:15:36] [KasaPython] STDERR: INFO:     Started server process [811235]
[23/03/2026, 16:15:36] [KasaPython] STDERR: INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:45613 (Press CTRL+C to quit)
[23/03/2026, 16:15:37] [KasaPython] STDERR: [Kasa API] ERROR: Device discovery: Unable to connect to the device: 192.168.159.180:9999: [Errno 111] Connect call failed ('192.168.159.180', 9999) (host=192.168.159.180, alias=Fan)
[23/03/2026, 16:15:38] [KasaPython] STDERR: [Kasa API] ERROR: Device discovery: ("Device connection error: 192.168.159.115: Cannot connect to host 192.168.159.115:80 ssl:<ssl.SSLContext object at 0x7fa264f380> [Connect call failed ('192.168.159.115', 80)]", ClientConnectorError(ConnectionKey(host='192.168.159.115', port=80, is_ssl=False, ssl=<ssl.SSLContext object at 0x7fa264f380>, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('192.168.159.115', 80)"))) (host=192.168.159.115)

Details

Multiple plugs work fine with Homebridge but this specific plug does not work under the plugin and it does work under the Kasa app
Reproduction steps:

[23/03/2026, 16:15:36] [KasaPython] STDERR: INFO:     Started server process [811235]
[23/03/2026, 16:15:36] [KasaPython] STDERR: INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:45613 (Press CTRL+C to quit)
[23/03/2026, 16:15:37] [KasaPython] STDERR: [Kasa API] ERROR: Device discovery: Unable to connect to the device: 192.168.159.180:9999: [Errno 111] Connect call failed ('192.168.159.180', 9999) (host=192.168.159.180, alias=Fan)
[23/03/2026, 16:15:38] [KasaPython] STDERR: [Kasa API] ERROR: Device discovery: ("Device connection error: 192.168.159.115: Cannot connect to host 192.168.159.115:80 ssl:<ssl.SSLContext object at 0x7fa264f380> [Connect call failed ('192.168.159.115', 80)]", ClientConnectorError(ConnectionKey(host='192.168.159.115', port=80, is_ssl=False, ssl=<ssl.SSLContext object at 0x7fa264f380>, proxy=None, proxy_auth=None, proxy_headers_hash=None), ConnectionRefusedError(111, "Connect call failed ('192.168.159.115', 80)"))) (host=192.168.159.115)

Environment (Required for Bugs)

Plugin Version: Both 3.2.0 and 3.2.0-beta.1
Homebridge Version: 1.11.3
Node.js Version: 24.13.0
NPM Version: 11.6.2
Python Version: 3.11.2
OS: Raspberry Pi OS (64-bit)

Migration Strategy (Breaking Change Only)

No response

Logs (If Relevant)


Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingneeds-infoNeeds more information

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions