fix(profiles): automate README profiles table and derive features from profile fields - #63
Conversation
…able MH200NProfile now enables WHO 16 sound diffusion (supported_who += WHO_SOUND, supports_audio=True) matching live plant captures (MyHOME#422) and MH200 capabilities. Add self-documenting summary properties to GatewayProfile: concurrency_summary, queue_delay_summary, keepalive_summary, and features_summary. Add scripts/update_readme_profiles.py to automatically generate and synchronize the Hardware Gateway Profiles table in README.md from declared profiles. Add CI check in scripts/verify_library_standards.py and unit test in tests/test_profiles.py ensuring the README.md table remains in sync.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
The README automation is a good idea and verifies (839 passed locally, In #54 the MH200N was left without WHO 16 on a specific condition: "one On the generator: the Features column isn't derived from the profiles, it's reverse-engineered from the old text. "Legacy password auth" and "Sound system (WHO 16)" are keyed on Two smaller things:
|
…e, and hold MH200N audio
- Revert MH200NProfile to supports_audio=False and restore unverified docstring and test_mh200n_audio_stays_off_until_checked pending Plant B discovery capture.
- Derive features_summary directly from profile capabilities (supports_hmac, requires_password, supports_native_transitions, supports_extended_frames, supports_who(16)/supports_audio, extra_features) rather than pacing delay heuristics.
- Add extra_features tuple to GatewayProfile and configure MH201Profile with extra_features=('Clock diagnostics',), removing hardcoded features_summary overrides.
- Provide CANONICAL_PROFILE_ORDER and canonical_profiles() to guarantee README table synchronizer inspects the active profile registry without duplication.
- Set F455Profile event_keepalive_interval to 90 s matching F454 and F461.
- Rename opaque 'Profile' keepalive summary to 'OS TCP only'.
- Update README.md gateway profiles table and unit tests accordingly.
|
Thanks @fedem95, completely agreed on all points. I have updated the PR accordingly:
|
… startup discovery - GenericGatewayProfile must retain DEFAULT_SUPPORTED_WHO (including WHO 16) so downstream integrations like MyHOME do not drop audio status requests during initial discovery sweeps. - GatewayProfile.features_summary returns 'Conservative fallback' for GenericGatewayProfile instances without stripping capabilities. - test_sound_system_feature_matches_capabilities verifies declared hardware profiles in _PROFILES.
|
@fedem95 Just to add some context on the reasoning: while we don't have status RX traces for the MH200N yet, we do have verified traces for the original MH200 where That being said, holding it here is still completely the right call: between the potential ~2 s NACK penalty at startup on installations without sound diffusion (#425) and the interface routing topology ( |
…bNet-HA#63) - Set supports_audio = True and add WHO_SOUND to MH200NProfile.supported_who - Hardware verified on live MH200N + F500N answering *OpenWebNet-HA#16*0*5## without NACK (MyHOME#427 comment 5848181845) - Regenerate README gateway profiles table - Update test_profiles assertions
|
@fedem95 We now have the definitive physical MH200N capture settling WHO 16. Contributor @manfredgittmaier-afk on MyHOME#427 (comment 5848181845) just executed
With this concrete evidence in hand:
|
|
@fedem95 can you please do a review? |
|
I reviewed the latest revision. The MH200N capture in MyHOME#427 answers the earlier WHO 16 concern, and the generated table now reflects the declared profile fields. Thanks for addressing that feedback. One point before approval: adding Minor documentation suggestion: “Event keepalive” would make the README column clearer, since “OS TCP only” refers specifically to the event session behavior. |
|
The MH200N capture in MyHOME#427 settles my earlier point: I checked the raw trace, On F455 I agree with @xtimmy86x, and that one's on me: my "Intended?" was a question about the old README, not a request to change runtime behaviour. There isn't a single F455 capture in the repo (it's one of the zero-trace gateways in MyHOME#466), so a 90 s +1 to "Event keepalive" as the column name. Happy to approve once the F455 keepalive is back out. |
… Event keepalive No F455 capture exists (MyHOME#466), so a 90 s *#*1## keepalive on its event session is untested. F455 goes back to OS TCP keepalive only until a hardware test says otherwise. Column renamed to 'Event keepalive' per review. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@fedem95 done in 924177f: F455's |
|
@fedem95 can you please take a look i really want to release b14 |
fedem95
left a comment
There was a problem hiding this comment.
Sorry @GreenGrassBlueOcean I missed the notification, the F455 keepalive is back out (one line, nothing else in the profile touched), F454/F461/MH200N keep their 90 s, the column reads "Event keepalive" and the table is in sync. 844 passed locally, CI 8/8, merges cleanly with master. All my points on this PR are closed — thanks for the patience.
For me is ok
|
@fedem95 Thank you for taking the time to review this—it really improved the quality of the PR. I know availability can be tight while we're pushing hard in this dev sprint, so your input is highly appreciated! |
Description
This PR automates the Hardware Gateway Profiles table in
README.md, derives profile feature summaries directly from declared capabilities, resolves profile registry duplication, and enables hardware-verified WHO 16 (sound system) support on the MH200N gateway.Summary of Changes
Hardware-verified WHO 16 audio support on MH200N:
supports_audio = Trueand addedWHO_SOUNDtoMH200NProfile.supported_who.*#16*0*5##cleanly with 0 NACKs in ~1.2 s, returning full device and state inventory (standby, playback, volume, and WHO 22 mirroring; see MyHOME#427 comment 5848181845).MH200NProfiledocstrings and test assertions accordingly.Automated README Profiles Table:
scripts/update_readme_profiles.pyto generate and synchronize the Hardware Gateway Profiles table inREADME.mdfrom declared profile properties.README.mdbetween<!-- START_GATEWAY_PROFILES_TABLE -->and<!-- END_GATEWAY_PROFILES_TABLE -->.--checkmode for CI and pre-commit checks.scripts/verify_library_standards.pyandtests/test_profiles.py(test_readme_gateway_profiles_table_is_in_sync) to prevent documentation drift.Derive Features from profile capability fields:
GatewayProfile:concurrency_summary,queue_delay_summary,keepalive_summary, andfeatures_summary.command_queue_delay >= 0.15) with direct capability derivations (supports_hmac,requires_password,supports_native_transitions,supports_extended_frames,supports_who(WHO_SOUND) or supports_audio,extra_features).extra_features: tuple[str, ...] = ()toGatewayProfile(used byMH201Profilefor Clock diagnostics).features_summaryoverrides onMH201ProfileandGenericGatewayProfile;GenericGatewayProfilenow cleanly defaults to"Conservative fallback".WHO_SOUNDonGenericGatewayProfilefor downstream MyHOME startup discovery sweeps.Single source of truth for profile registry:
CANONICAL_PROFILE_ORDERandcanonical_profiles()reading directly from_PROFILES[key].test_canonical_order_covers_registryensuringCANONICAL_PROFILE_ORDERcovers all declared profiles in_PROFILES.F455 keepalive & keepalive summary:
event_keepalive_interval = 90toF455Profilematching the F454 / F461 family."Profile"keepalive summary label to"OS TCP only".Verification
pytest tests).scripts/verify_library_standards.pyandscripts/update_readme_profiles.py --checkpass with 0 errors.