feat(media_player): tuner entity for WHO=16 sound sources (F500) - #427
Conversation
|
@wave68runner — you are the only person we know of with a working tuner on this bus, so if you have the appetite, your captures would take this out of draft. Your earlier trace already gave us the one piece of hardware evidence in this PR: The three captures that would settle itAll passive: use your wall control or the iOS app as you normally would, with the bus monitor running. Nothing to install, nothing sent by us.
Two questions that need no capture
If you want to go furtherInstalling this branch and trying the radio entity would be the only real test of the write path: No pressure on any of it. The passive captures are the valuable part; the rest is a bonus. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
I will try to test that. I Hope that my latency problems will be over |
|
@GreenGrassBlueOcean – here's a capture from a working tuner. Setup: MH200N gateway, F500N tuner at source 101, antenna connected. Integration v2.0.0b13, OWNd 2.0.0b8. Works:
Observations:
Not tested yet: frequency write ( Happy to capture more if useful. |
A matrix input can hold a tuner such as the F500 rather than a line interface. This adds a radio entity for those inputs: stations as the source list, next and previous station as track controls, the frequency and the stored station as attributes, and the RDS text as the media title. Which inputs are tuners is declared in the options rather than detected. A source device that has not spoken is indistinguishable on the bus from one that is not there, and a tuner in standby says nothing at all, so detection would mean creating entities on a guess and removing them again. Source frames carry no zone address, so they were dropped before reaching any entity. The platform now routes them by source key, which leaves the existing zone discovery untouched. The entity asks its tuner to start reporting RDS when it is added (WHAT 101), because a tuner does not broadcast station text unless asked. Frequencies are written as six digits in kHz and refused outside the FM band; the specification calls the field Hz while every example in the same document uses kHz, and the examples are what hardware follows. The station write carries its parameter directly while the report prefixes it with a zero: that asymmetry is in the specification and is preserved rather than normalised. Scope, stated in the module and the documentation: only the RDS report shape is confirmed against real hardware, by a capture contributed on OpenWebNet-HA#422. Every other frame comes from WHO_16.pdf v1.0.1 and has not been exercised against a tuner with an antenna connected. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
40987e8 to
170d582
Compare
|
@manfredgittmaier-afk — this is tremendous! Thank you so much for testing this against live hardware with an antenna connected. Your capture settles three long-standing questions:
I have just rebased this PR cleanly onto The Final Captures to Settle PR #427 and OWNd #63 📻Since your plant is running v2.0.0b13 (where the automated 1. Direct Frequency Tuning Syntax (Dimension 6)In the current branch, we send frequency writes with a Could you test sending both of these manually (e.g. to 96.2 MHz or any strong local station):
Which one does the tuner ACK ( 2. Frequency SeekCould you test the hardware seek commands manually:
Does the tuner seek and report the new frequency ( 3. F500N Memory Presets (1–15)The basic F500 stores 5 presets, while the F500N datasheet specifies 15.
4. Manual Collective Audio Status Query (
|
…dware traces (OpenWebNet-HA#427) - Support dynamic preset expansion up to 15 stations for F500N tuners - Replay authentic hardware traces captured on MH200N + F500N with antenna - Update sound_source and media_player documentation with tested hardware boundaries - Maintain 100.0% statement coverage on sound_source.py
|
@GreenGrassBlueOcean – here are the remaining captures from the F500N (MH200N gateway, antenna connected). All frames sent via 1. Frequency write (dimension 6)
So dimension 6 is the opposite of dimension 7: the frequency write needs the leading zero – your current branch is right. 2. Seek
3. Presets above 5
Further observations from the traces
Summary of the write syntax on real hardware (F500N)
Happy to test the branch itself once it's out of draft. MyHOME Diagnostic BundleEnvironment:
Active Gateway Configuration:
Buffer Telemetry:
OpenWebNet Bus Trace[18:39:53.753] [RX] #4100198## MyHOME Diagnostic BundleEnvironment:
Active Gateway Configuration:
Buffer Telemetry:
OpenWebNet Bus Trace[18:42:45.795] [TX] #16101*#71## |
…k on live bus (OpenWebNet-HA#427) - Hardware-verify direct frequency write syntax (*OpenWebNet-HA#16*10S*OpenWebNet-HA#6*0*<KHZ>##; leading zero required) - Add async_seek_up and async_seek_down hardware seek commands (*16*5000*10S## / *16*5100*10S##) - Clear stored station preset and source when tuning frequency or when unstored frequency is reported - Add authentic MH200N + F500N seek & frequency tuning trace fixture and replay tests - Update media_player documentation to mark tuner controls fully hardware-verified
|
@manfredgittmaier-afk — this is fantastic news! Thank you so much for capturing and documenting these remaining behaviors. Your findings close the loop on every single outstanding question for the tuner implementation:
PR #427 is Now Out of Draft! 🚀I have just pushed the updates to You are warmly invited to test this branch on your system whenever convenient! The Last Piece for OWNd PR #63 (
|
|
@GreenGrassBlueOcean – great, thanks for getting #427 out of draft! Here's the capture for OWNd#63: the MH200N answers Run 1 – all amplifiers off, tuner on (reply within ~1.2 s):
Run 2 – amplifier 41 playing the tuner:
Every WHO=16 frame is followed by its WHO=22 mirror ( So the MH200N supports the general sound status query and lists every source and amplifier with its on/off state. MyHOME Diagnostic BundleEnvironment:
Active Gateway Configuration:
Buffer Telemetry:
OpenWebNet Bus Trace[19:05:08.141] [TX] #1605## MyHOME Diagnostic BundleEnvironment:
Active Gateway Configuration:
Buffer Telemetry:
OpenWebNet Bus Trace[19:07:21.720] [TX] #1605## |
|
@manfredgittmaier-afk Fantastic capture! This is a massive help — your I've already updated OWNd PR #63 with Regarding #427:
The PR is intentionally remaining in draft until we can confirm the last few open specification ambiguities on physical hardware (whenever you have a spare moment, no rush at all!):
Thank you again for all the incredible testing and traces! |
|
@GreenGrassBlueOcean – thanks, great to hear OWNd#63 is unblocked! The three open points for #427 are already answered in my earlier comment (with both traces attached), here's the short version from the F500N on the MH200N:
Happy to run anything else you need. |
|
@manfredgittmaier-afk — thank you so much! Your three answers and the PR #427 is now officially out of draft and ready for review, with all your on-wire captures committed to our test corpus. You are warmly invited to test this branch directly on your system whenever convenient! Other MH200N Hardware Blind Spots 📡Since you offered to run anything else we might need, we maintain a community Hardware Trace Availability Matrix (#466) to verify which subsystems work across each gateway model. If you have a couple of minutes and want to help us check off the last few blanks for the MH200N, here are a few quick checks: 1. Burglar Alarm (WHO 5)Do you happen to have a BTicino / Legrand burglar alarm system on this bus (e.g. 3485 / 3486 central unit or keypads)?
2. Gateway Diagnostic Object Model (WHO 1013)We use
3. CEN+ Scenario Buttons (WHO 25) or Auxiliary (WHO 9)
No pressure at all on any of these — your audio and tuner captures already solved our biggest blind spot! 🚀 |
|
@GreenGrassBlueOcean – posted the MH200N captures (WHO 5 / 1013 / 9 / 25 + trace) in #466. |
a0dc4a4
into
OpenWebNet-HA:v2-phase1-architecture
|
@GreenGrassBlueOcean – installed the merged branch (MH200N + F500N, OWNd 2.0.0b8). The radio entity sends correctly: station select and next/previous tune the tuner. But tuner reports never reach the entity. Trace attached – at 22:00:15 TX 166001101## Afterwards the entity still shows Two more things from the same trace:
|
|
i will check this tomorrow @manfredgittmaier-afk |
|
@manfredgittmaier-afk — thank you so much for the detailed bug report and trace capture! We diagnosed the exact issue and resolved it in PR #497:
Your full live trace capture ( |
…formed RDS frames Resolves issue reported in PR OpenWebNet-HA#427 comment 5849429368: - Read dimension values from _dimension_value on OWNSoundEvent instances when dimension_value property is not present - Ensure tuner frequency, station, source and media_title update from incoming bus reports - Gracefully ignore malformed RDS frames with length != 8 (e.g. transient 12-code glitch frames) - Clear media_title on frequency change - Add authentic trace capture and replay test covering rotating RDS, 12-code glitch, and preset advance sequence
|
@manfredgittmaier-afk Thank you so much for capturing and sharing this detailed trace! Diagnostics & Root Cause
We have tracked this in #498 and opened PR #497 with the fix. Your full 200-frame trace |
Adds full support for WHO=16 sound source tuner entities (F500 / F500N) on the BTicino MyHOME analog sound diffusion matrix (F441 / F441M).
What this adds
A matrix input can hold a tuner (F500 / F500N) rather than an analog line interface (L4561). Tick Source N is a tuner in the integration Options Flow and a dedicated
media_playerradio entity is registered for that input:turn_on/turn_off)*16*3*10S##/*16*13*10S##S(WHERE101–109)media_next_track/media_previous_track)*16*6001*10S##/*16*6101*10S##myhome.tuner_seek_up/myhome.tuner_seek_down)*16*5000*10S##/*16*5100*10S##select_source, Presets 1–15)*#16*10S*#7*<N>##N(strictly without leading zero)play_media, content typechannel)*#16*10S*#6*0*<kHz>##0*)play_media)*#16*10S*#7*<N>##"1"–"15"select presetNmedia_title)*#16*10S*8*<8 ASCII codes>##frequency/station)DIMENSION 6/DIMENSION 796.2) and active preset number (1–15)Architecture & Design Decisions
101–109) rather than amplifier zone addresses. The platform supplies routing keys (<source>#16) so source status and dimension events are routed directly to their sound source entity without interfering with zone discovery.myhome.tuner_seek_upandmyhome.tuner_seek_downentity actions targeting tuner sources, fully localized across all 4 supported languages (en,fr,it,nl) with icons inicons.json. Standard zone amplifier entities guard against misuse by rejecting seek calls with a descriptive translated error (seek_not_supported).source_listand dynamically expands up to 15 whenever higher presets are selected or reported on the bus.DIMENSION 7is only reported by hardware if the frequency matches an active preset. The entity automatically clears stale station presets and source attributes whenever frequency is changed without a station confirmation.*8*32*...##, eight spaces) immediately after tuning, followed by the dynamic station title. The entity correctly suppresses the blank title and updatesmedia_titleas soon as printable ASCII codes arrive.Live Hardware Verification
Fully verified against authentic live bus captures from an MH200N gateway connected to an F500N tuner with antenna, contributed by @manfredgittmaier-afk (#427 comment 5847535313 and comment 5848039616):
*#16*101*#7*<N>##), while the status report carries a leading zero (*#16*101*7*0*<N>##). Passing a leading zero in write syntax is treated as a status read by the tuner.*#16*101*#6*0*<kHz>##), while writing without zero is completely ignored by hardware.96200= 96.2 MHz,88800= 88.8 MHz,103500= 103.5 MHz).*16*5000*101##and*16*5100*101##lock onto receivable stations and trigger status reports.DIMENSION 8RDS text frames arrive spontaneously after tuning events without needing polling.5#2#1.*#16*0*5##responds with the full status of all sources and amplifiers on MH200N (#427 comment 5848181845), settling WHO 16 audio support for MH200N in OWNd (OpenWebNet-HA/OWNd#63).Authentic on-wire bus captures are committed under
tests/fixtures/traces/f500_tuner/(myhome_trace_MH200N_f500n_tuner.jsonandmyhome_trace_MH200N_f500n_tuner_seek_and_frequency.json) and replayed in continuous CI.Testing & Quality Gates
test_sound_source_trace_replay.py.docs/configuration/services.mdand tuner usage indocs/configuration/media_player.md.quality_scale.yamland verified viascripts/verify_ha_standards.py.