fix(gateway): suppress ERROR logs on startup discovery status request NACKs (#406) - #407
Merged
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
GreenGrassBlueOcean
marked this pull request as draft
September 18, 2026 13:11
Contributor
Author
|
🔒 Merge Lock Applied: Conditions for unlocking and merging:
|
Contributor
Author
|
ℹ️ Update: This PR's merge lock now targets |
GreenGrassBlueOcean
force-pushed
the
fix/issue-406-status-request-nack-logging
branch
from
September 18, 2026 20:47
1dff5ea to
7f53d5e
Compare
GreenGrassBlueOcean
marked this pull request as ready for review
September 18, 2026 20:48
xtimmy86x
merged commit Sep 18, 2026
f638f44
into
OpenWebNet-HA:v2-phase1-architecture
16 checks passed
GreenGrassBlueOcean
deleted the
fix/issue-406-status-request-nack-logging
branch
September 18, 2026 21:03
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 #406. Follows up on feedback from @TheDarkWizard in #402 and coordinates with upstream OWNd fix OpenWebNet-HA/OWNd#44.
Root Cause
During startup discovery (
initial_discovery()), general status requests (*#2*0##,*#4*0##,*#16*0##) probe the SCS bus for optional or unconfigured subsystems. When subsystems are not installed (e.g., no audio matrix, or standalone thermostats with no central heating unit 0), the gateway returns NACK (*#*0##).Prior to
OWNd 2.0.0b9, intermediate retries on status requests were logged atERRORbefore concluding cleanly atDEBUGon attempt 2 ("Subsystem or device may not be present"). This produced alarming red[ERROR]logs in Home Assistant on every reboot.Defense-in-Depth Solution
This PR provides immediate protection in Home Assistant while coordinating with the upstream protocol library:
custom_components/myhome/gateway.py:_StatusRequestLogFiltertoLOGGER. Intermediate retry logs for status requests (*#...##) are safely downgraded fromERRORtoDEBUG.*WHO*WHAT*WHERE##) and unexpected exceptions remain completely unaffected atERROR.tests/test_gateway.py:test_status_request_log_filterasserting status-request retry errors are downgraded toDEBUGwhile command errors and other exceptions remainERROR.tests/test_phase1_architecture.py:test_harness_nack_simulationto verify status request NACK error suppression.Verification
test_gateway.pyandtest_phase1_architecture.py: 90 passed.verify_ha_standards.py: All 18 checks passed, Platinum Quality Scale clean.ruff check: 0 violations.