Skip to content

test(traces): ingest Issue #669 MH202 visitor doorbell call and wall control traces - #751

Merged
GreenGrassBlueOcean merged 2 commits into
v2-phase1-architecturefrom
test/issue-669-mh202-doorbell-wall-traces
Oct 18, 2026
Merged

GreenGrassBlueOcean merged 2 commits into
v2-phase1-architecturefrom
test/issue-669-mh202-doorbell-wall-traces

Conversation

@GreenGrassBlueOcean

@GreenGrassBlueOcean GreenGrassBlueOcean commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Ingests the two follow-up authentic MH202 + F441M + video intercom OpenWebNet bus captures submitted by @nicolacavallo84 in Issue #669 (comment 6248843326) and adds protocol-validated replay tests against both captures through the production PlatformDiscovery, FrameRouter, route_pseudo_zones, MyHOMESoundSource, and who22_tuner_listener pipeline.


Hardware & Topology Captured

  • Gateway: BTicino MH202 (Firmware 1.0)
  • Audio Matrix: Legrand / BTicino F441M (paired WHO=16 / WHO=22 dual-dialect emission on the bus)
  • Amplifiers: 31, 41, 51, 61, 71, 81
  • Video Intercom: External entrance panel (WHERE=4000, caller ID 20) and indoor video station (WHERE=11 / unit 1)

1. Visitor Doorbell Call & Lock Release (myhome_trace_MH202_all_2026-10-18T10-27-48.json, 61 frames)

  1. Automatic Audio Ducking (10:27:00.492Z–10:27:01.368Z):
    • The audio system ducks all 6 amplifiers (31, 61, 51, 41, 71, 81) to volume 1 via paired WHO=16 (*#16*<EA>*1*1##) and WHO=22 (*#22*3#<E>#<A>*1*1##) Dimension 1 frames.
  2. Visitor Doorbell Call Initiation (10:27:01.281Z–10:27:01.285Z):
    • *8*1#1#4#20*11##: 4-component WHO=8 call initiation (WHAT=1#1#4#20, Kind=1 Entrance Panel PE1, MMType=4 Audio+Video, Caller=20 embedded in WHAT, directed to indoor unit WHERE=11).
    • *8*9#1#4*20## (+4 ms): WHO=8 Caller Address Notification (WHAT=9#1#4, WHERE=20).
  3. Door Lock Release in Conversation (10:27:25.455Z–10:27:26.201Z):
    • *6*22*1## (WHAT=22, L4686SDK "Open lock with external unit in conversation" at unit 1) followed +26 ms later by *6*10*4000## (WHAT=10, "Open lock" at entrance panel 4000).
    • ~717 ms later, lock relay pulse release frames *6*24*1## (WHAT=24 at 1) and *6*23*4000## (WHAT=23 at 4000).
  4. Call End, Dry Contact & Volume Restoration (10:27:30.852Z–10:27:33.268Z):
    • *6*9**##: Camera OFF (WHO=6, WHAT=9, WHERE=*).
    • *25*32#1*31##: Dry-contact / IR sensor OFF event (WHO=25, WHAT=32#1 where 32 = contact OFF / IR not detected and 1 = unsolicited event, WHERE=31, OWNDryContactEvent.is_on == False).
    • Matrix restores pre-call amplifier volumes (31 -> 0, 41 -> 6, 61 -> 7, 51 -> 6; 71 and 81 remain at 1).

2. Audio Zone Wall Controls (myhome_trace_MH202_all_2026-10-18T10-34-13.json, 146 frames)

  1. Dual-Dialect Power-On & Matrix Routing (10:33:32.011Z–10:33:35.201Z):
    • Physical wall switch in Zone 41 (Area 4, Point 1) emits WHO=22 commands (*22*0#4#4*6## All Sources 6 OFF in Stereo Area 4, *22*1#4#4*2#3## Source 2#3 ON in Stereo Area 4, *22*21#4#4*5#2#3## and *22*2#4#4*5#2#3## General Source 5#2#3 activation in Area 4, *22*1#4#4*3#4#1## Speaker 3#4#1 ON in Stereo Area 4) interleaved with WHO=16 matrix routing *16*3*143## (Environment 4 -> Source 3), amplifier ON *16*3*41##, and source ON *16*3*103##.
    • Followed by WHO=22 Dimension 12 status (*#22*3#4#1*12*1*4##, *#22*2#3*12*1*4##) and full DSP status dump on 3#4#1 (Dim 1 Volume=6, Dim 2 High=30, Dim 4 Low=30, Dim 17 Balance=10, Dim 20 Loudness=1, Dim 18 3D=0, Dim 19 Preset=3).
  2. Physical Wall Rocker Volume Up & Down (10:33:34.822Z–10:33:50.997Z):
    • Wall rocker sends WHO=22 step commands *22*3#1*3#4#1## (Volume UP +1) and *22*4#1*3#4#1## (Volume DOWN -1), while the gateway broadcasts paired *#16*41*1*<vol>## and *#22*3#4#1*1*<vol>## volume reports (6 -> 15 -> 5 -> 12 -> 7).
  3. Physical Wall Power-Off (10:33:51.905Z–10:33:52.610Z):
    • *22*0#4#4*3#4#1## (WHO=22 Speaker 3#4#1 OFF), *16*13*41## (WHO=16 Amplifier 41 OFF), and *#22*3#4#1*12*0*10## (WHO=22 Dim 12 standby state 0).

Verification

  • pytest tests/test_intercom_ducking_trace_replay.py tests/test_trace_oracle_validation.py (76 passed)
    • test_mh202_visitor_doorbell_call_trace_replay: validates all 61 frames parse cleanly via OWNMessage.parse, verifies WHO=8 (*8*1#1#4#20*11##, *8*9#1#4*20##), WHO=6 (*6*22*1##, *6*10*4000##, *6*24*1##, *6*23*4000##, *6*9**##), WHO=25 (*25*32#1*31## OWNDryContactEvent.is_on is False), and WHO=9 (*9*1*6##, *9*0*6##) semantics, and confirms via PlatformDiscovery + FrameRouter that all 6 powered-off amplifiers remain strictly MediaPlayerState.OFF during ducking and restoration while an active streaming group continues undisturbed and 0 phantom entities are created.
    • test_mh202_wall_controls_trace_zone_41_lifecycle: replays all 146 frames through PlatformDiscovery, FrameRouter, route_pseudo_zones, _sound_route_keys, MyHOMESoundSource, and who22_tuner_listener, verifying that Zone 41 routes to Source 3 on *16*3*143##, wakes on *16*3*41##, wakes MyHOMESoundSource 103 on *16*3*103## while routing 2#3/5#2#3 frames via who22_tuner_listener, tracks the exact on-wire volume trajectory (6 -> 15 -> 5 -> 12 -> 7), and powers off cleanly on *16*13*41## with 0 phantom entities discovered.
  • ruff check custom_components tests scripts, scripts/verify_ha_standards.py, and scripts/sync_documentation.py --check all pass with 0 issues.

Refs #669, #667

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

…mDiscovery, FrameRouter, and who22_tuner_listener
@GreenGrassBlueOcean
GreenGrassBlueOcean merged commit 0762073 into v2-phase1-architecture Oct 18, 2026
16 checks passed
@GreenGrassBlueOcean
GreenGrassBlueOcean deleted the test/issue-669-mh202-doorbell-wall-traces branch October 18, 2026 13:28
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