feat: Flow 2 diagnostics, discovery, and live-state improvements - #35
feat: Flow 2 diagnostics, discovery, and live-state improvements#35StratoGh0st99 wants to merge 1 commit into
Conversation
|
@Anaxagoras-bc I just created a new pr and rebuild my fork. |
|
@StratoGh0st99
|
|
@StratoGh0st99 Your PR is working quite well, the cleaning activity is more accurate. On a side note, have you figured out what the command for End "dust bag drying/disinfection" is from the app to the robot. Cannot figure out how to stop that process. |
I believe you need to be on Home Assistant 2026.3 at least for the following to work: Click on "Vacuum" (in Steuerelemente) then at the pop up that opens you should see a button called "Cleaning by area" probably translated to German for you). The first time you click it you should be given the option to assign rooms from the vacuum to the area rooms of your home assistant. I tried it once and it initiated fine, I had a weird audio glitch like the vacuum tried to communicate something to me but it cut off and repeated over and over. Lasted for a few seconds then the vacuum cleaned the mop and continued.
|
|
@saeft2003 My screenshot is from webview which is probably why it looks different but yeah I also see the old version number, even though I did remember needing to distinctly upgrade to the most recent version once it appeared as an update in HA.
|
|
@saeft2003 silly question but did you try restarting the integration and /or Home Assistant after you assigned the zones? If that doesn't work, you probably need more directed from @StratoGh0st99. Maybe best to open a new issue on his fork repo for it? |
|
Thanks for consolidating this work — it's clearly substantial (+3,806 / −313). To get it merged without a slow back-and-forth, can you split it into separate PRs by feature area? Suggested cuts:
That lets us ship the safe pieces immediately while we review the larger ones. Diagnostic entities alone would close most of the open Flow 2 feature requests. If splitting is too much effort I'll review as a monolith, but turnaround will be slower. Also flagging: PR #24 (current_room sensor) and #20 (now merged) touch overlapping areas — wherever there's overlap, the version in master wins to keep history sane. |
|
After restarting Home Assistant, regardless of which room I select in Home Assistant, a cleaning cycle for three rooms is always started. These three rooms are my first shortcut in the Narwal app. Unfortunately, I can't open an issue in the fork; it's not available there. @StratoGh0st99
|
…37) @saeft2003 reported on PR #35 that HA room cleans were ignoring the selection and always running the first Narwal-app shortcut instead. Same firmware-schema root cause as #36 — the legacy flat-room schema in _build_room_clean_payload is rejected (or ack-and-ignored) by firmware v01.07.22+, so the robot falls back to its onboard default plan. start_rooms() now: 1. Tries the legacy flat-room payload (preserves behavior on older firmware) 2. On NOT_APPLICABLE, retries with _build_clean_payload_v2 populated from the caller-selected room IDs (not all map rooms) Also adds force_v2 kwarg for firmwares that ack the legacy payload with SUCCESS but still ignore the room list — for those, the NOT_APPLICABLE detector can't fire, so callers (or a future config option) can opt straight into v2. 4 new tests cover SUCCESS (no retry), NOT_APPLICABLE (retry with same room IDs), CONFLICT (no retry), and force_v2. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@saeft2003 — I tracked your room-selection report into a separate bug at #37 and shipped a fix on master in 516ed1c. Same firmware-schema root cause as #36 (the whole-house
This is orthogonal to the rest of PR #35; my comment about splitting the PR still stands. |
|
@StratoGh0st99 — apologies for how long this has sat. Sequencing plan for all the overlapping fork work is now in #66. Where this PR lands: the room-clean and mop-humidity pieces are superseded by #49 and #50, which trace the root cause to the topic itself ( But your mDNS/DHCP discovery is not duplicated by anyone, and it's the biggest UX win still outstanding in the repo. #40 has a user who couldn't complete setup at all because the 15s wake timeout expires before the robot answers — discovery plus a longer/adaptive timeout fixes that class of failure outright. Could you split discovery out as a standalone PR against master? I'll prioritize reviewing it ahead of the rest of the queue. Same for the diagnostic entities in here that survive #52 — happy to look at those separately once the base_status audit lands. |
|
Thanks for your patience here — a lot has moved on Since the merge plan in #66 was posted, the following landed, and each overlaps a chunk of #35:
So most of #35's 3,806 lines — the sensors, binary sensors, selects, map renderer, model parsing — now have an equivalent on master, from PRs scoped one concern each. #35 currently conflicts in 27 files, and that isn't something I can resolve maintainer-side without effectively rewriting your branch and guessing at your intent. What's still uniquely yours, and still wanted: the zeroconf + DHCP discovery. Nothing has landed for it, and it's the biggest outstanding UX win in the tracker — #40 shows setup failing outright on the 15 s wake timeout, which discovery sidesteps entirely. Could you open a standalone PR against current
One note: If you'd rather not do the extraction yourself, say so and I'll cherry-pick the discovery commits with you as author. I'd much rather do that than lose the work. Leaving #35 open until you've had a chance to reply. |
Adds docs/RELEASE-NOTES-v1.0.2.md leading with three breaking changes, not two — #69's fix means whole-house vacuum.start now goes through clean/start_clean and therefore requires the dock. README: Project Status refreshed (28 commits, merge queue empty apart from #35), Features section covers the four new entity platforms, and the stale 'clean settings not exposed' / 'state can freeze' limitations are corrected.
|
@StratoGh0st99 — rather than let this sit waiting on another rebase from you, I've done the extraction I offered: #78, with you as the commit author. It's the zeroconf + DHCP discovery only, ported onto current Before merging it I browsed mDNS on my own network against a Flow (AX12), and your identifiers check out exactly: The service type, the instance-name shape, the That capture also answered something your implementation had to work around. A configured entry's Related: the Two asks:
On the rest of #35: the sensors, binary sensors, selects, map renderer and model parsing all now have equivalents on master from the PRs listed earlier in this thread, so once #78 lands there's nothing left in here that master doesn't have. I'll close #35 then — tell me if you disagree, because you'd know better than the diff does. The capture tooling still can't land in-tree ( |
…oGh0st99) Adds zeroconf (_narwal_sweeper._tcp.local.) and DHCP hostname discovery to the config flow, cherry-picked from #35 and authored to @StratoGh0st99. Field-confirmed by @DeNo64 on #81, who reported it detected their Flow 2 with the correct IP on a network the maintainer does not have. Also carries a README note on VLAN-segmented networks (#81).
|
@StratoGh0st99 — closing this, with the discovery work merged and one piece of it still owed to you. Merged: the zeroconf + DHCP discovery is on master as of #78 / Why close rather than rebase: this branch's merge base is The one genuine exception, and I want to be straight about it rather than claim full coverage: this PR contains That policy is worth revisiting, and I'd rather revisit it than quietly drop 840 lines of working capture tooling. If you're up for it, say the word and I'll take Thank you for the discovery work — it's shipped and it's yours. |
These three files were written for #35 and never merged, purely because tools/ was gitignored wholesale as "RE artifacts, kept locally". That was the wrong call: capture tooling is the one thing in that directory meant to be shared, and every open protocol question (#79 especially) is blocked on other people being able to capture easily. - tools/CAPTURE_GUIDE.md — Mac-hotspot + Wireshark setup for reading app to robot frames, which broadcasts never carry - tools/narwal_capture.py — record/dashboard/diff/replay over ha core logs - tools/coverage_probe.py — catalogues every topic and mutating field, and flags topics in const.py that never appear .gitignore now ignores tools/* with explicit exceptions rather than the whole directory, so local RE scratch files stay untracked. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgiUvv4F6Yro4nhasuPzDH
Both tools in the previous commit recover decoded payloads by scraping "DUMP <topic>: <payload>" out of `ha core logs`. The client stopped emitting that line at some point after #35 was opened, so landing the tools alone would have shipped two scripts that run fine and produce nothing. Restored at DEBUG only, next to the existing "Broadcast topic:" line. %r formats lazily, so installs without debug logging pay nothing -- which matters here because this fires on every broadcast (see #90). Adds two tests that fail if the line is removed or promoted above DEBUG. Verified by deleting the line and watching them fail, since a test that cannot fail would not have caught the original regression either. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgiUvv4F6Yro4nhasuPzDH
Discovery (#78), Narwal JX confirmed (#42), the wake/sleep log flood (#82), capture tooling published (#35), plus VLAN, automation and domain-collision docs. No breaking changes -- the first release since v1.0.1 that can say so. 270 tests, CI green, deployed to 10.0.0.5 and verified against the development Flow before tagging: 29 entities, vacuum docked, no setup failures in repairs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NgiUvv4F6Yro4nhasuPzDH
|
@StratoGh0st99 — closing out the debt I owed you here. The capture tooling is merged and shipped in v1.0.5, committed under your authorship:
I said nine days ago I'd either land these under a non-ignored path or let you open the PR, and then left it sitting. Landing it was the right call rather than making you do more work for something already written months ago. What I got wrong originally: when this PR was superseded by #78 I said "nothing else in #35 lacks a master equivalent." That was simply false — these three files had no equivalent anywhere, and the only reason they were never merged is that One change you should know about, because it would have bitten you: the client had stopped emitting the I left your Also for the record: #78 shipped as the discovery headline of this release, authored to you, and it was field-validated unprompted by @DeNo64 on a network none of us can reach. Both of your contributions to this project are now in a tagged release. The tooling matters more than it looks. #79 has four open protocol questions that have gone nowhere for two weeks, entirely because producing a capture was harder than it needed to be. I've pointed that thread at your guide. Thanks — and sorry it took a second pass to get it in. |
Extracted from sjmotew#35, which bundled discovery with 3,806 lines of work that has since landed via other PRs. Discovery was the part with no equivalent on master and the biggest outstanding setup win: sjmotew#40 showed setup failing outright because the 15s wake timeout expires before a sleeping robot answers, and a pre-filled host sidesteps the whole class of "which IP is it" failures. Declares `_narwal_sweeper._tcp.local.` in the manifest plus `NARWAL_*` / `narwal_*` DHCP hostnames, and routes both into the existing user step with the address pre-filled. The model still has to be picked by hand — it isn't in the mDNS payload. Verified against a Flow (AX12) on the local network: _app_wss_server_7bb53c._narwal_sweeper._tcp.local. server=NARWAL_7bb53c.local. addrs=['10.0.0.112'] port=9002 That capture also settled how to match a discovery against an entry the user added by hand. A configured entry's unique_id is the full device_id, read over the WebSocket, which discovery cannot see — so a manual entry would otherwise reappear as a "Discovered" card forever. The robot's device_id is 71c53f01c14f49088338863e147bb53c and it advertises as NARWAL_7bb53c: the last six hex characters. Matching on that suffix identifies the device itself, and a match at a new address repoints the existing entry instead of orphaning it. Two changes from the original sjmotew#35 implementation: - It matched on host only, and its "IP drifted" branch rewrote the entry with the same host it had just matched on — a no-op under a comment claiming otherwise. Suffix matching does what that comment intended. - The user-step schema now keeps whatever host is in hand, so a failed connect no longer clears what you typed. Adds 12 config-flow tests and the service-info stubs they need. Co-authored-by: Steve Motew <sjmotew@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YAo9szBPifvDJrsag2oW6Y










Summary
This PR expands Flow 2 support and improves the integration’s local discovery, diagnostics, and state decoding.
Highlights
Notes