Add static IP pairing support with Jest test suite#224
Add static IP pairing support with Jest test suite#224qmalexander wants to merge 5 commits intoaivus:masterfrom
Conversation
qmalexander
commented
Mar 24, 2026
- Pair UI: new "add_static_ip" view lets users enter a device IP directly instead of relying solely on UDP broadcast discovery
- Optional "skip UDP scan" checkbox for environments where UDP is blocked; uses IP as device identifier and accepts an optional custom name
- finder.js: add probe(ip) method for targeted unicast UDP scan
- device.js: connect via stored static_ip setting at runtime, bypassing the Finder when a static IP is configured
- driver.js: replace onPairListDevices with onPair; session-scoped static device list merged into list_devices results (deduped by MAC)
- driver.compose.json: add_static_ip pair view + static_ip device setting
- Jest test suite (23 tests) covering finder.probe(), driver pair handlers, and device._findDevices() static IP path
- Pair UI: new "add_static_ip" view lets users enter a device IP directly instead of relying solely on UDP broadcast discovery - Optional "skip UDP scan" checkbox for environments where UDP is blocked; uses IP as device identifier and accepts an optional custom name - finder.js: add probe(ip) method for targeted unicast UDP scan - device.js: connect via stored static_ip setting at runtime, bypassing the Finder when a static IP is configured - driver.js: replace onPairListDevices with onPair; session-scoped static device list merged into list_devices results (deduped by MAC) - driver.compose.json: add_static_ip pair view + static_ip device setting - Jest test suite (23 tests) covering finder.probe(), driver pair handlers, and device._findDevices() static IP path
|
Hello @qmalexander Thank you for the contribution. It will take some time to review and test the changes. |
|
@aivus any update on eta? Hoping to get this working so my automations can start working again 🙃 |
Disable mocha/no-mocha-arrows (crashes ESLint 7 on Jest arrow functions) and global-require for test/**/*.js overrides.
|
Hello @qmalexander I'm currently (sporadically) testing the changes. I didn't look into the code yet. Question: I've added the device using the IP address, opened the settings of this device and see no static IP address displayed in the settings. Is it expected? |
When probe(ip) succeeds, _onMessage stores the device in finder._hvacs, so it appears in the broadcast-found list without settings. The static IP was then lost because the deduplication filtered it from the manual list. Now list_devices builds a mac→staticIp lookup first and applies it to any broadcast-found device that was also added as a static device.
Hi @aivus, Thank you for testing. No the expectation was that the static IP should be visible on the device settings. I pushed a fix for it can you test it again and see if it works for you now? Br |