Repository navigation
feat(gateway): include kernel and distribution queries in diagnostic sweep (#466, #709) - #711
Merged
GreenGrassBlueOcean merged 1 commit intoOct 14, 2026
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…sweep (#466, #709) - Query WHO=13 dimensions 23 (kernel version) and 24 (distribution version) in sweep_bus diagnostic action - Calibrate test plant issue_466_f461 fixture with physical F461 kernel (5.10.35) and distribution (2.26.4) frames - Assert kernel and distribution frames in trace, golden, services, and multi-gateway tests - Update gateway identification documentation to reflect verified F461 physical plant trace - Exempt F461 (model 134) from timezone 999 unconfigured warning checking both canonical model and WHO=1013 code 134 (#709)
GreenGrassBlueOcean
force-pushed
the
feat/gateway-kernel-distribution-diagnostics
branch
from
October 14, 2026 14:52
9408814 to
a91d1ef
Compare
GreenGrassBlueOcean
deleted the
feat/gateway-kernel-distribution-diagnostics
branch
October 14, 2026 21:13
This was referenced Oct 21, 2026
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.
What is the problem?
Limited Gateway Diagnostic Visibility:
During
myhome.sweep_busdiagnostic executions, MyHOME historically queried WHO=13 dimensions0(Real-time clock / time & timezone),15(Device model/type), and16(Firmware version). Modern Linux-based OpenWebNet gateways such as the Legrand/BTicino F461 (and MyHomeServer1) additionally support dimension23(OS kernel version) and dimension24(Distribution version). Without querying these dimensions during bus sweeps, diagnostic bundles lack critical underlying OS build metadata needed to triage firmware variations, regressions, and feature support across releases.Spurious Timezone Repair Warning on F461 (Unconfigured timezone on MyHOME gateway (F461 Gateway) #709):
The Legrand F461 gateway (firmware
2.26.4) manages its system clock via NTP and reports timezone code999in dimension 0/22 clock frames (*#13**0*H*M*S*999##). MyHOME previously treated999universally as an unconfigured timezone, raising a spurious Home Assistant repair issue ("Gateway timezone unconfigured") on properly functioning F461 installations.Uncalibrated F461 Test Fixture (Community Call for Real-World Gateway Traces: Help Us Eliminate Hardware Blind Spots! 📡 #466):
The test plant fixture for
issue_466_f461lacked the actual physical kernel and distribution response frames, leaving a gap between synthetic test fixtures and physical hardware behavior.How is it solved?
Include Kernel and Distribution Dimensions in Bus Sweep:
*#13**23##(Gateway kernel version) and*#13**24##(Gateway distribution version) togateway_queriesincustom_components/myhome/services.py:async_sweep_bus().*#13**0##— Real-time clock (time and timezone)*#13**15##— Device model / type*#13**16##— Firmware version*#13**23##— OS kernel version*#13**24##— OS distribution version_who13(who13_kernel,who13_distribution), with tests gracefully supporting both public and private version properties.F461 Timezone 999 Repair Issue Exemption (Unconfigured timezone on MyHOME gateway (F461 Gateway) #709):
custom_components/myhome/gateway.py:_handle_gateway_diagnostics(handling dims 0 and 22): whendim_val[3] == "999", if the gateway is recognized as F461 (via either canonical model name"F461"or resolved WHO=1013 object model code"134"), deletes/suppresses the repair issue rather than creating it._resolve_identity: when the resolved gateway model becomes"F461"or object model code is"134", proactively cleans up any existing timezone repair issue to eliminate timing/ordering races during startup.docs/configuration/gateways.mdanddocs/diagnostics/repair-issues.md.Plant Calibration & Documentation:
tests/fixtures/plants/issue_466_f461/diagnostic_summary.jsonwith physical frames*#13**23*5*10*35##and*#13**24*2*26*4##, populatingwho13_kernel: "5.10.35"andwho13_distribution: "2.26.4".docs/configuration/gateway-identification.mdto document verified physical hardware status for F461.How is it tested?
Unit & Gateway Logic Tests:
tests/test_gateway.py:self.model == "F461", dimension 0/22 replies with timezone999do not raise a repair issue.gateway.model_name == "Generic"but_who1013["code"] == "134", the F461 exemption applies identically."Generic"to"134"/"F461"after an issue was created, the issue is proactively deleted.999continue to create the repair issue as expected.tests/test_services.py: Updatedtest_sweep_bus_energy_queriesandtest_sweep_bus_follower_delegated_who1to assert the 5-frame prefix sequence.tests/test_multi_gateway.py: Updatedtest_services_multi_gatewayensuring multi-gateway sweeps propagate all 5 gateway query frames across primary and secondary gateways (45 status requests).Hardware Trace & Golden Playback Tests:
tests/test_issue_466_f461_trace.py: Added assertions verifying kernel (5.10.35) and distribution (2.26.4) frame extraction and event handling during trace replay, supporting both public and private version properties.tests/test_gateway_identification.py: Assertedissue_466_f461intest_golden_who1013_exchange().pytest tests -q).Standards & Architectural Validation:
ruff check custom_components tests scripts: 0 violations.python scripts/verify_ha_standards.py: All 54/54 quality scale rules satisfied/exempt.python scripts/sync_documentation.py --check: All documentation tables, anchors, and links synchronized.Where are the traces?
Physical F461 Plant Fixture:
tests/fixtures/plants/issue_466_f461/diagnostic_summary.json*#1013**1*134*15*5*0##(WHO=1013OBJECT_MODEL134 = F461)*#13**0*12*30*00*999##(reports999due to NTP-managed clock)*#13**23*5*10*35##(Linux Kernel5.10.35)*#13**24*2*26*4##(Firmware Distribution2.26.4)Replay & Trace Harness:
tests/test_issue_466_f461_trace.py: Exercises mock bus playback using recorded frames from the physical plant.tests/golden/corpus.json: Contains reference OpenWebNet frame corpus for regression testing.