Repository navigation
fix(media_player): do not wake amplifiers on Dimension 1 volume status reports (#669) - #670
Merged
GreenGrassBlueOcean merged 2 commits intoOct 9, 2026
Conversation
…s reports (OpenWebNet-HA#669) In BTicino systems with intercom/video door entry and sound diffusion, starting or stopping a video stream triggers audio ducking and volume restoration frames (*OpenWebNet-HA#16*WHERE*1*<volume>##). PR OpenWebNet-HA#581 previously checked (is_volume_up or (message.volume is not None and message.volume > 0)) to wake amplifiers from physical wall controls. However, Dimension 1 status frames report current amplifier volume levels (which persist even when an amplifier is off). Conflating volume reports with power-on events caused all amplifiers to wake to ON and attempt to auto-join active streams. Restrict the wake trigger to explicit power-on frames, matrix routing, and physical volume-up rocker commands (*16*1001*WHERE## .. *16*1015*WHERE##). Dimension 1 volume reports now update volume level without mutating power state.
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
GreenGrassBlueOcean
merged commit Oct 9, 2026
7443ffa
into
OpenWebNet-HA:v2-phase1-architecture
16 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolves #669.
Companion PR to audio synchronization and intercom event handling.
1. What is the problem?
In BTicino MyHOME installations where video door entry (WHO 6 / WHO 8) and sound diffusion (WHO 16 / WHO 22) coexist with an audio matrix (F441 / F441M) or gateway (MH200 / MH202), starting or stopping an intercom video stream (or camera preview) caused all audio amplifiers across the house to turn "on" in Home Assistant, even though the amplifiers were physically off.
Root Cause
BTicino Intercom Audio Ducking & Restoration:
*#16*41*1*1##,*#22*3#4#1*1*1##, etc.) so background music does not interfere with the intercom conversation.*6*9**##Camera OFF), the matrix restores the previous volume levels on the bus (e.g.*#16*41*1*6##,*#16*61*1*7##).The
2.0.0b15Regression (PR feat(audio): auto-join active streaming group and sync wall button source selection (#579) #581):*16*1001*WHERE##..*16*1015*WHERE##).MyHOMEMediaPlayer.handle_event(), the wake check evaluated:*#16*WHERE*1*<volume>##is a Dimension 1 status report (Volume Level). In OpenWebNet, amplifiers retain their configured volume levels even when switched off.message.volume > 0with a power-on event meant that incoming volume ducking (*#16*WHERE*1*1##) and volume restoration frames immediately forced all amplifiers intoMediaPlayerState.ONand attempted to auto-join active streaming groups.2. How is it solved?
Disentangle Volume Status Reports from Power State:
In
custom_components/myhome/media_player.py, the wake trigger inhandle_event()is restricted strictly to:message.is_on, e.g.*16*0*WHERE##,*16*3*WHERE##).*16*3*1ES##).is_volume_up:1001 <= int(what) <= 1015).Preserve Dimension 1 Volume Ingestion:
Dimension 1 volume reports (
message.volume is not None) continue to updateself._attr_volume_level = message.volume / 31.0(and un-mute if previously muted and volume > 0), but never mutateself._attr_statefromOFFtoON.An amplifier that is currently
OFFremainsOFFwhen receiving volume updates.3. How is it tested?
Updated Unit Test:
test_volume_status_report_when_off_updates_level_without_wakingintests/test_component_media_player.py:Asserts that receiving Dimension 1 volume status reports (
*#16*36*1*20##) whileOFFupdates the entity'svolume_levelwithout waking toONand without joining any streaming group.Added Authentic Regression Test:
test_issue_669_intercom_video_stream_volume_ducking_leaves_amplifiers_offintests/test_component_media_player.py:Replays the exact authentic frames from Nicola's MH202 trace (stream start ducking to volume 1 across 6 amplifiers, followed by stream stop restoration to volumes 0, 1, 6, 7). Asserts that all 6 amplifiers remain in
MediaPlayerState.OFF, their volume sliders update accurately, and no spurious group memberships are formed.Full Test Suite & Quality Verification:
pytest tests/test_component_media_player.py: 213 passed (100%).ruff check custom_components tests scripts: 0 violations.scripts/verify_ha_standards.py: All 54 Home Assistant Platinum architectural rules verified.scripts/sync_documentation.py --check: All documentation calibrated and in sync.4. Where are the real traces?
Customer MH202 Plant Trace (Issue Audio amplifiers appear as "on" in Home Assistant when the video intercom stream starts or stops. #669 - Nicola Cavallo, BTicino MH202 firmware 1.0, 6 audio zones):
Corroborating Customer Trace in Issue feat(cover,lock): impulse garage/gate control, multi-factor safety approval, and intercom events #667 (
tests/fixtures/traces/issue_667/myhome_trace_MH200_intercom_bell_gate_2026-10-09.json):*#16*81*1*1##..88##during entrance panel calls (*8*1#1#4*74##) and camera teardown*6*9##.