Skip to content

feat(trace): add MH202 burglar alarm golden trace fixture and adapt profile tests (#564) - #576

Merged
GreenGrassBlueOcean merged 3 commits into
OpenWebNet-HA:v2-phase1-architecturefrom
GreenGrassBlueOcean:feat/issue-564-mh202-alarm-profile
Sep 30, 2026
Merged

GreenGrassBlueOcean merged 3 commits into
OpenWebNet-HA:v2-phase1-architecturefrom
GreenGrassBlueOcean:feat/issue-564-mh202-alarm-profile

Conversation

@GreenGrassBlueOcean

@GreenGrassBlueOcean GreenGrassBlueOcean commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Addresses issue #564 (remarks comment 5917195080 and comment 5917278868) by adding the on-wire MH202 burglar alarm trace as a golden fixture and adapting the topology and profile tests to OWNd's WHO 5 changes.

Companion to OpenWebNet-HA/OWNd#66. Merge this first, then OWNd#66. The tests accept both the pinned OWNd==2.0.0b9 and the #66 behaviour.

What changes for a shared bus (F454 + MH202)

 F454   WHO {..}     \
                      >--> who does each gateway own?
 MH202  WHO {..,5}   /
                                   |
                                   v
            does the MH202 uniquely carry a WHO the F454 lacks (WHO 5)?
                    |                                   |
                    | no (OWNd <= b9)                   | yes (OWNd#66)
                    v                                   v
            warm STANDBY                        SECONDARY that carries the alarm
            (repeats the primary)               (delegated WHOs now include 5,
                                                 repair copy names WHO 5)

How a WHO 5 frame reaches the panel

 WHO 5 frame on the bus
      |
      v
 WHERE starts with "#" (zone)?  --yes-->  not discovered as a panel; zone state only
      | no
      v
 WHERE == "" (empty spelling)?  --yes-->  no address, dropped (a gateway WITHOUT a
      | no                                panel dumps these on the *#5*0## poll)
      v
 alarm_control_panel at WHERE 0
      |
      v
 *5*1*0##            -> armed_away
 *5*2*0## / *5*9*0## -> disarmed
 *5*11*0##           -> armed_home on OWNd <= b9, state unchanged on OWNd#66
                        (no capture shows a system-level WHAT 11)

Changes

  1. Golden trace fixture & provenance: myhome_trace_MH202_who5_alarm_2026-09-30T18-13-13.json with 18 on-wire frames from a physical MH202 acting as a secondary next to MyHomeServer1 (contributed by @nicolacavallo84), plus a README with the capture provenance.
  2. Trace replay: tests/test_issue_564_mh202_alarm_trace.py replays all 18 frames (*5*1*0##, *5*9*0##, *5*11*#1##, *5*18*#5##) through Home Assistant and checks the panel transitions (arm away, disarm, zone status does not pollute).
  3. Topology: gateway_tier() keeps to the measured names (MH201, MH202, H4890, AM4890, LN4890). Other touch screens are unmeasured and stay tier 3, matching OWNd#66's narrowed aliases.
  4. Shared-bus tests: tests/test_multi_gateway.py and tests/test_shared_bus_onboarding.py accept the WHO 5 capability delta for F454 (primary) + MH202 (secondary) in both directions.
  5. Alarm tests: a system-level *5*11*0## accepts both armed_home (OWNd <= b9) and unchanged state (OWNd#66).
  6. Docs: README and docs/trace-availability.md trace matrix updated via scripts/sync_documentation.py; edge-case assertions adapted in tests/test_issue_466_mh200_trace.py and tests/test_message_edges.py.

Verification

Full suite passes against the local OWNd#66 checkout (2963); the alarm tests also pass against OWNd==2.0.0b9; ruff clean.

…rofile tests (OpenWebNet-HA#564)

- Add authentic MH202 on-wire burglar alarm (WHO 5) trace fixture and README documentation from community plant capture (issue OpenWebNet-HA#564 comment 5917195080)
- Add deterministic trace replay and MyHOMEAlarmControlPanel state transition tests in test_issue_564_mh202_alarm_trace.py
- Expand gateway_tier in topology.py to classify touchscreen models (HC4890, HS4890, L4890, HW4890, MH4892, MH4893, 3488, MyHomeTouch) as Tier 2
- Dynamically adapt shared-bus onboarding, delegation, and repair test assertions for MH202 when WHO 5 is supported in OWNd
- Update README.md and docs/trace-availability.md trace matrix with MH202 burglar alarm coverage
- Ensure backward/forward compatibility across parser variants in test_issue_466_mh200_trace.py and test_message_edges.py
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

…et-HA#564)

OWNd narrows the H4890 profile aliases to the 3.5in 4890 family; larger
MyHome Touch and 3488 models are not measured, so they stay tier 3.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor Author

Pushed topology.py trim: gateway_tier() is back to MH201 / MH202 / H4890 / AM4890 / LN4890, matching OWNd#66's narrowed aliases (other touch screens are unmeasured and stay tier 3).

Verified against OWNd#66 at 1445b39 (editable install): full suite 2963 passed, ruff clean.

Finding from the audit round: do not map the empty-WHERE WHO 5 spelling to 0 in OWNd. The MH200N trace in this repo (no panel) gets *5*9*## etc. as poll replies, and normalising them created a phantom alarm_control_panel.alarm_0 (test_mh200n_alarm_diagnostic_and_timed_turn_on_trace_replay failed). OWNd#66 now keeps empty as '' and only maps * to 0. Merge order stays: this PR first, then OWNd#66.

@GreenGrassBlueOcean
GreenGrassBlueOcean merged commit a645e7e into OpenWebNet-HA:v2-phase1-architecture Sep 30, 2026
16 checks passed
@GreenGrassBlueOcean
GreenGrassBlueOcean deleted the feat/issue-564-mh202-alarm-profile branch September 30, 2026 20:35
@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor Author

Pushed a test update: with OWNd#66 at e6cfe52, a system-level *5*11*0## no longer maps to armed_home (is_armed_home is always False; no capture shows it). The panel keeps its last armed state. Full suite passed against it (2962 + this fix), ruff clean.

GreenGrassBlueOcean added a commit that referenced this pull request Oct 1, 2026
…ne event (#564) (#583)

Completes the test tolerance described in item 5 of PR #576, unblocking CI conformance in OWNd#66.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants