Skip to content

test(traces): ingest Issue #767 MH200N pre-09W29 F414 dimmer 61 capture - #776

Merged
GreenGrassBlueOcean merged 1 commit into
v2-phase1-architecturefrom
test/issue-767-mh200n-f414-trace
Oct 22, 2026
Merged

GreenGrassBlueOcean merged 1 commit into
v2-phase1-architecturefrom
test/issue-767-mh200n-f414-trace

Conversation

@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor

Summary

Ingests the authentic MH200N OpenWebNet bus capture submitted by @wave68runner in Issue #767 ("Dimmer F414 behind MH200N only dims via coarse presets, ignores Dimension 1 writes") and adds deterministic replay and verification tests against it.


Motivation / Context

In Issue #767, @wave68runner captured a 43-frame bus trace of a BTicino F414 DIN-rail dimmer at WHERE="61" behind a BTicino MH200N gateway (firmware 1.0, who13_code = 44, MH200NProfile):

  • Physical wall buttons and iMyHome step the dimmer via WHO=1 translation frames (*1*1000#30*61## / *1*1000#31*61##) and standard coarse WHAT 2..10 preset status frames (*1*9*61##, *1*10*61##, *1*8*61##..*1*5*61##).
  • When queried for DIMENSION 1 (*#1*61*1##) or written via fine-percentage DIMENSION 1 (*#1*61*#1*<level>*0##), the pre-09W29 F414 firmware replies with SPEED = 240 (0xF0, factory unprogrammed / coarse-only speed sentinel): *#1*61*1*130*240##, *#1*61*1*178*240##, *#1*61*1*146*240##, *#1*61*1*181*240##, *#1*61*1*140*240##.
  • Companion protocol support in OpenWebNet-HA/OWNd#134 automatically detects SPEED = 240 (0xF0) on DIMENSION 1 replies and switches OWNLightingCommand.set_brightness() for that WHERE address to standard WHAT 2..10 coarse preset commands (*1*<preset>*61##).

Hardware & Topology Captured

  • Gateway: BTicino MH200N (firmware 1.0, MAC prefix 00:03:50, who13_code = "44", MH200NProfile, Home Assistant 2026.9.4, integration 2.0.0b15, OWNd 2.0.0b10)
  • Capture Window: 2026-10-21T18:11:09.762Z – 2026-10-21T18:11:48.784Z (39.0 s, 43 frames: 35 rx, 8 tx across WHO=1 and WHO=13)
  • Actuator Under Test: Pre-09W29 BTicino F414 dimmer at WHERE="61" (Area 6, PL 1)
  • Three distinct operational phases:
    1. Phase 1 (frames[0..25], 18:11:09.762–18:11:17.717): Physical / iMyHome switch ON (*1*1000#1*61## -> *1*9*61## at 90%), 7 step-up sequences (*1*1000#30*61## -> *1*10*61## at 100%), and 5 step-down sequences (*1*1000#31*61## -> *1*9*61##, *1*8*61##, *1*7*61##, *1*6*61##, *1*5*61## from 90% down to 50%).
    2. Phase 2 (frames[26..32], 18:11:32.774–18:11:40.358): WHO=13 DIMENSION 22 gateway clock broadcast (*#13**22*20*11*32*001*03*21*10*2026##), followed by Home Assistant turning 61 OFF (tx *1*0*61## -> rx *1*0*61##) and back ON (tx *1*1*61## -> rx *1*5*61## + tx *#1*61*1## -> rx *#1*61*1*130*240##).
    3. Phase 3 (frames[33..42], 18:11:41.636–18:11:48.784): Home Assistant sending four DIMENSION 1 fine-percentage writes (78%, 46%, 81%, 40%) answered by *#1*61*1*<level>*240##, followed by tx *1*0*61## -> rx *1*0*61## (OFF).

Technical Changes

  • tests/fixtures/traces/issue_767/myhome_trace_MH200N_all_2026-10-21T18-12-44.json:
    • Adds the raw 43-frame bus capture from @wave68runner's MH200N + pre-09W29 F414 installation.
  • tests/fixtures/traces/issue_767/README.md:
    • Documents the gateway hardware profile, capture metadata, and frame-by-frame breakdown across all three phases.
  • tests/test_issue_767_mh200n_f414_trace.py:
    • Validates trace schema, gateway identification metadata, rx/tx frame counts (35 rx, 8 tx), and DIMENSION 1 speed = 240 (0xF0) replies.
    • Replays the full 43-frame capture through MyHOMEGatewayHandler, FrameRouter, and MyHOMELight for WHERE="61", verifying automatic ColorMode.BRIGHTNESS promotion from *1*9*61##, coarse step-up/step-down state tracking (90% -> 100% -> 90%..50%), OFF/ON toggling, DIMENSION 1 status polling, and compatibility with both OWNd 2.0.0b11 and OpenWebNet-HA/OWNd#134.

Verification & Testing

  • pytest tests/test_issue_767_mh200n_f414_trace.py tests/test_trace_oracle_validation.py tests/test_device_health_corpus.py tests/test_trace_replay.py -q (249 passed)
  • Verified against both editable OWNd (with OWNd#134) and pinned OWNd==2.0.0b11 wheel
  • ruff check tests/test_issue_767_mh200n_f414_trace.py (0 violations)
  • python scripts/verify_ha_standards.py (PASS)
  • python scripts/sync_documentation.py --check (PASS)

Impact & Breaking Changes

  • Test & fixture addition only: No runtime integration code modified; expands the real-world hardware trace corpus and firmware-oracle validation coverage for pre-09W29 F414 dimmers behind MH200N.

Refs #767
Refs OpenWebNet-HA/OWNd#134

@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!

@GreenGrassBlueOcean
GreenGrassBlueOcean merged commit fda4628 into v2-phase1-architecture Oct 22, 2026
16 checks passed
@GreenGrassBlueOcean
GreenGrassBlueOcean deleted the test/issue-767-mh200n-f414-trace branch October 22, 2026 19:07
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