Live-tested against the real unit (10.4.2.6, 2026-08-25): a full-subnet sweep came
back with 0 units found despite the device being reachable and fast (~150ms). Root
cause isolated via a series of in-container diagnostics, not a timeout or CIDR-math
bug — Node's fetch() (undici) reliably read a 0-byte body from this adapter's
embedded webserver, which sends a connection-close-delimited response (no
Content-Length, HTTP/1.0-style) rather than a Content-Length/chunked body. wget,
curl, and node:http all read the real ~400-byte body fine; fetch() alone did not.
Switched every request in lib/drivers/daikin.js (probe, get_control_info,
get_sensor_info, set_control_info) from fetch() to a small node:http-based
httpGet() helper with Connection: close, and left a comment warning not to
"simplify" this back to fetch(). Bumped SWEEP_TIMEOUT_MS 500ms -> 800ms for
headroom (confirmed real round-trip is ~150-180ms, so this was never the actual
problem, but a little slack is cheap).
node --check clean.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>