Skip to content

v2.0.23 — multi-subnet unicast scan for HAOS / Docker

Choose a tag to compare

@K0rb3nD4ll4S K0rb3nD4ll4S released this 12 May 14:54
· 26 commits to main since this release

Fix: HA unicast scan now finds devices when the integration runs in a container

v2.0.22's unicast scan used a single "find my IP" trick (UDP connect to 8.8.8.8 → read local end). In HAOS-in-a-VM and HA-in-Docker layouts the integration's Python often sits behind a docker-internal interface (172.x), so the trick returned an IP whose /24 has nothing to do with the user's Wemo LAN — scanning 172.30.32.0/24 finds zero Wemos no matter how long the timeout.

What changed (custom_components/dibby_wemo/wemo_client.py)

  • New _local_subnet_candidates() enumerates every /24 the host has an interface on, using three stdlib strategies (connect-trick, gethostbyname_ex, getaddrinfo)
  • Loopback (127.x) and link-local (169.254.x) bases filtered out
  • _unicast_subnet_scan_sync() now sweeps every candidate /24 in parallel with a 32–96 worker pool — a 2-subnet sweep finishes in ~5–6 seconds
  • INFO log lines report which subnets were scanned and how many Wemos were found

Diagnostics — enable to see scan results

Add to configuration.yaml and restart HA:

logger:
  default: warning
  logs:
    custom_components.dibby_wemo: info

Then retry Add Integration → Dibby Wemo. The HA log will show lines like:

Unicast scan: probing /24 base(s) ['192.168.18.', '172.30.32.'] with 10.0s budget
Unicast scan: probed 508 hosts across 2 subnet(s), found 3 Wemo URL(s)

Upgrade

  • HACS: HACS → ⋮ → Reload data → Dibby Wemo → ⋮ → Redownload → pick 2.0.23 → restart HA
  • Homebridge: npm install -g homebridge-dibby-wemo@2.0.23
  • Node-RED: npm install -g node-red-contrib-dibby-wemo@2.0.23