Skip to content

feat(sound): modernize sound source commands and intercept physical wall transport steps (blocked on OWNd 2.0.0b11) - #651

Merged
GreenGrassBlueOcean merged 6 commits into
OpenWebNet-HA:v2-phase1-architecturefrom
GreenGrassBlueOcean:feat/l4561n-sound-source-transport
Oct 9, 2026
Merged

GreenGrassBlueOcean merged 6 commits into
OpenWebNet-HA:v2-phase1-architecturefrom
GreenGrassBlueOcean:feat/l4561n-sound-source-transport

Conversation

@GreenGrassBlueOcean

@GreenGrassBlueOcean GreenGrassBlueOcean commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Important

Blocked on Upstream Release: OWNd 2.0.0b11
This PR depends directly on OWNd 2.0.0b11 (specifically OpenWebNet-HA/OWNd#95, which implements WHO 16 sound source factory builders and wall transport stepping event decoders).

  • Why CI shows failures right now: manifest.json pins OWNd==2.0.0b11. Because 2.0.0b11 has not yet been published to PyPI, runner environments fail at dependency installation with ERROR: No matching distribution found for OWNd==2.0.0b11.
  • Local WSL verification: When tested against an editable install of OWNd (at PR Classe EOS300 #95 / b11), the entire test suite and trace replay suite pass with 100.0% coverage and 0 lint violations.
  • Unblocking procedure: Once OpenWebNet-HA/OWNd#95 is merged and released to PyPI as v2.0.0b11, re-running the failed GitHub Actions workflows will turn all 16 matrix checks green.

Summary

Modernizes the MyHOMESoundSource entity transport and tuning commands by utilizing OWNSoundCommand factory methods and introduces real-time state tracking for physical wall control stepping telegrams, backed by ground-truth verdicts from own-firmware-oracle PR #25 and OWNd PR #95.


1. Upstream Dependency & Rollout Order

graph TD
    A["1. Merge OWNd PR #95 (WHO 16 builders & stepping decoders)"] --> B["2. Merge OWNd PR #98 (Bump version to 2.0.0-b11)"]
    B --> C["3. Publish GitHub Release v2.0.0b11 to PyPI"]
    C --> D["4. Re-run MyHOME PR #651 CI (all 16 checks turn green)"]
    D --> E["5. Merge MyHOME PR #651"]
Loading
Component Repository PR / Release Status Purpose
Core Protocol OWNd PR #95 Open Typed OWNSoundCommand factory builders (turn_on, turn_off, next_track, previous_track, seek_up, seek_down, select_track, set_frequency, start_rds, etc.) and OWNSoundEvent stepping properties (track_step_forward, track_step_backward).
Release Bump OWNd PR #98 Open Version bump to 2.0.0b11.
Integration MyHOME PR #651 (This PR) Open Consumes the b11 factories in MyHOMESoundSource and pins OWNd==2.0.0b11 in manifest.json.

2. Protocol & Empirical Grounding

Feature / Frame Protocol Specification Firmware Oracle (bt_luci / own-firmware-oracle) Authentic On-Wire Customer Trace
Next / Previous Track (*16*6001*where##, *16*6101*where##) Legrand WHO_16.pdf (Sound System), WHAT 6001..6015 / 6101..6115 F454 (020051) and MyHomeServer1 (028206) ACK and translate to SCS telegrams tests/fixtures/traces/l4561n_stereo_control/myhome_trace_MH200_l4561n_sound_source.json
Hardware Seek Up / Down (*16*5000*where##, *16*5100*where##) Legrand WHO_16.pdf, WHAT 5000 / 5100 Gateway forwards hardware tuner auto-search triggers Live L4561N tuner captures
Preset Station Selection (*#16*where*#7*N##) Legrand WHO_16.pdf, Dimension 7 Dimension 7 write ACKed Preset 1..5 switching on L4561N
Frequency Tuning (*#16*where*#6*0*F##) Legrand WHO_16.pdf, Dimension 6 (kHz, 6 digits) Dimension 6 write ACKed Exact frequency adjustment (e.g. 107.0 MHz = 107000 kHz)
RDS Telemetry Streaming (*16*101*where##, *#16*where*8##) Legrand WHO_16.pdf, WHAT 101, Dimension 8 8 ASCII decimal codes (32..126) broadcast on bus Authentic 8-byte station name decoding (RADIO 1)
Reference Client BTicino Touch Screen 10" (libqtdevices:sound_device.cpp, TS10_1_0_23) Matches TS10 opcode and transport mapping Confirms station stepping bounds [1, N]

3. Key Additions & Features

  1. MyHOMESoundSource Modernization (custom_components/myhome/sound_source.py):

    • Migrated legacy raw string command construction to typed OWNSoundCommand factory builders:
      • async_turn_on() -> OWNSoundCommand.turn_on(self._where)
      • async_turn_off() -> OWNSoundCommand.turn_off(self._where)
      • async_media_next_track() -> OWNSoundCommand.next_track(self._where)
      • async_media_previous_track() -> OWNSoundCommand.previous_track(self._where)
      • async_seek_up() -> OWNSoundCommand.seek_up(self._where)
      • async_seek_down() -> OWNSoundCommand.seek_down(self._where)
      • async_select_station(station) -> OWNSoundCommand.select_track(self._where, station)
      • async_set_frequency(megahertz) -> OWNSoundCommand.set_frequency(self._where, kilohertz)
      • async_added_to_hass() -> OWNSoundCommand.start_rds(self._where)
      • async_update() -> OWNSoundCommand.request_frequency(), request_track(), request_rds()
    • Physical Wall Transport Interception:
      • Handles incoming track_step_forward (WHAT 6001..6015) and track_step_backward (WHAT 6101..6115) telegrams emitted when users press physical wall switches (e.g., L4561N / 3488 / LN4653).
      • Synchronizes active station preset index within bounds ([1, station_count]), updating entity state immediately without waiting for a full status poll.
  2. Authentic Physical Gateway Bus Trace & Replay Suite:

    • tests/fixtures/traces/l4561n_stereo_control/myhome_trace_MH200_l4561n_sound_source.json: 44 authentic on-wire OpenWebNet frames captured from a physical MH200 gateway communicating with the BTicino L4561N Stereo Control (Source 2 / address 102) and Zone 21 amplifier.
    • tests/test_sound_source_trace_replay.py: Full trace replay and multi-step physical pulse tracking tests (+1..+5, -1..-4, boundary clamping, direct preset jumps).
  3. Empirical Firmware Oracle Fixtures & Conformance:

    • tests/golden/firmware_oracle.json: synchronized with own-firmware-oracle (380 unique inputs across 12 gateways).
    • tests/test_firmware_oracle_conformance.py: incorporates empirical F454 sound source verdicts (sound.cmd.source.on.1, sound.cmd.source.on.2) asserting on-wire forwarding semantics.

4. Verification & Testing

  • Sound component and trace replay suite: 26 passed (test_component_sound_source.py, test_sound_source_trace_replay.py) with 100.0% statement and branch coverage.
  • Firmware oracle conformance suite: 10 passed (test_firmware_oracle_conformance.py).
  • Architectural standards validator: 54/54 Platinum rules verified (scripts/verify_ha_standards.py).
  • Documentation anti-drift: Calibrated and clean (scripts/sync_documentation.py --check).
  • Linting: Clean (ruff check custom_components tests scripts).

@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 changed the title feat(sound): modernize sound source commands and intercept physical wall transport steps feat(sound): modernize sound source commands and intercept physical wall transport steps (blocked on OWNd 2.0.0b11) Oct 8, 2026
…all transport steps

- Refactor MyHOMESoundSource transport actions to use OWNSoundCommand factory methods (next_track, previous_track, seek_up, seek_down, select_track, set_frequency)
- Intercept physical wall control stepping telegrams (track_step_forward, track_step_backward from WHAT 6001..6015 / 6101..6115) to maintain real-time station synchronization
- Synchronize tests/golden/firmware_oracle.json fixture with 380 unique inputs across 12 gateways
- Update tests/test_firmware_oracle_conformance.py for empirical F454 sound source verdicts
- 100% passing tests across sound component and oracle conformance suites (34 passed), 54/54 HA Platinum rules verified
- Pin OWNd requirement to 2.0.0b11 in manifest.json and anti-drift safeguards
- Migrate sound source actions to OWNSoundCommand factory methods (next_track, previous_track, seek_up, seek_down, select_track, set_frequency, start_rds, request_frequency, request_track, request_rds)
- Drop legacy WHAT 6001..6015 manual fallback in handle_event in favor of native OWNd b11 track_step properties
@GreenGrassBlueOcean
GreenGrassBlueOcean force-pushed the feat/l4561n-sound-source-transport branch from a705806 to a39f47a Compare October 9, 2026 15:45
@GreenGrassBlueOcean
GreenGrassBlueOcean merged commit 5c75f0d into OpenWebNet-HA:v2-phase1-architecture Oct 9, 2026
17 checks passed
@GreenGrassBlueOcean
GreenGrassBlueOcean deleted the feat/l4561n-sound-source-transport branch October 9, 2026 16:24
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