Repository navigation
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
MyHomeServer1 README: "OWnd" typo; the alarm gate, the config-flow identification and the liveness probe rows name MyHOME OpenWebNet-HA#803, OpenWebNet-HA#804, OpenWebNet-HA#806. F461 README: the "What this capture backs" table extends to MyHOME OpenWebNet-HA#800-OpenWebNet-HA#806 (OpenWebNet-HA#802 the dimension 27 wire form, OpenWebNet-HA#803 *michnovka#5*0##, OpenWebNet-HA#804 the WHO 13 / 1013 identification replies, OpenWebNet-HA#806 the *OpenWebNet-HA#13**0## echo; OpenWebNet-HA#800 / OpenWebNet-HA#801 / OpenWebNet-HA#805 have no frame in this capture); it states that f461_live_2026-10-15 holds the dimension 22 reboot behind OWNd OpenWebNet-HA#136, the *4*311*2## / *4*311*#2## pair behind OWNd OpenWebNet-HA#137 and probe_area0 behind OWNd OpenWebNet-HA#141 / MyHOME OpenWebNet-HA#798; and one sentence says reply_time_s is measured while tx.t is reconstructed from the probe log. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
3d51ace to
6e0325c
Compare
MyHomeServer1 README: "OWnd" typo; the alarm gate, the config-flow identification and the liveness probe rows name MyHOME #803, #804, #806. F461 README: the "What this capture backs" table extends to MyHOME #800-#806 (#802 the dimension 27 wire form, #803 *#5*0##, #804 the WHO 13 / 1013 identification replies, #806 the *#13**0## echo; #800 / #801 / #805 have no frame in this capture); it states that f461_live_2026-10-15 holds the dimension 22 reboot behind OWNd #136, the *4*311*2## / *4*311*#2## pair behind OWNd #137 and probe_area0 behind OWNd #141 / MyHOME #798; and one sentence says reply_time_s is measured while tx.t is reconstructed from the probe log. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
6e0325c to
9719681
Compare
…penWebNet-HA#139) A frame OWNd returns as a plain string was logged at WARNING every time, so a thermostat repeating one every few seconds flooded the log (OpenWebNet-HA#139). Collapse digit runs into a shape, warn on the first frame of a shape (64 shapes at most) and log repeats at DEBUG. The parser side of Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
9719681 to
6c984bc
Compare
|
This change is a logging rate-limit for frames that OWNd returns as plain strings (“Data received is not a message”).The root cause is in OWNd: frames such as #4#114#230*1## (WHO 4 Dimension 14 setpoint replies with a #-prefixed value) are not parsed by OWNMessage.parse because the general dimension-reply regex only accepts digits. That is exactly what OpenWebNet-HA/OWNd#138 addresses.This PR does not parse the frames and does not close #139. It only suppresses log noise while the real fix lives elsewhere.Recommendation: close this PR here and land the parser fix in OWNd (#138). Once that is released and pinned by MyHOME, these frames stop arriving as unparsed strings and the rate-limit becomes unnecessary.The logging hygiene may still be useful as a general safety net for any future unparsed frames, but it is not the fix for this issue. |
|
Agreed: the fix for #139 is the parser change in OpenWebNet-HA/OWNd#138, and this PR only quietened the symptom. Closing it as you recommend; if a general safety net for unparsed frames is wanted later it can come back as its own small PR once the OWNd pin includes the parser fix. |
Requested by A
What is the problem
Every frame OWNd hands back as a plain string is logged at WARNING by
GatewayEventDispatcher("Data received is not a message"). A device that repeats such a frame (in #139 a zone thermostat behind an MH202 pushing*#4*#1*14*#0230*1##-style frames every few seconds) fills the log with identical warnings; the message is user-visible but not user-actionable after the first occurrence. The parser side of #139 (making OWNd understand the#-prefixed dimension 14 setpoint) is OpenWebNet-HA/OWNd#138; this PR only stops the flood in MyHOME, so it does not close the issue.Refs #139.
What is the solution
gateway_events.py:frame_shape()collapses digit runs toN(*#4*#1*14*#0230*1##→*#N*#N*N*#N*N##), so frames that differ only in values share one shape. The key is the whole collapsed frame (no prefix truncation).UNPARSED_SHAPES_MAX = 64shapes are remembered per dispatcher; beyond that everything is DEBUG, so the set cannot grow without bound.tests/test_unparsed_frame_logging.py: three dimension 14 frames of one shape plus the live F461 answer to*#13**27##(*#13**27*70#52#54#49##, the model name as ASCII codes, astrin OWNd 2.0.0b11) yield exactly two WARNINGs and two DEBUG lines; the dedup key keeps the whole frame (two long frames differing past 120 characters stay apart); the 64-shape cap (patched to 2) sends the third shape to DEBUG. Fixture host192.0.2.5, MAC00:03:50:00:00:01..github/release-notes/2.0.0b16.md: one line under "Other changes", naming the 64-shape ceiling.Companion PR: OpenWebNet-HA/OWNd#138 (
fix(message): parse '#'-prefixed dimension 14 setpoint values): once it is released, the #139 frames parse and never reach this code path; the rate limit stays for any other unparsed frame.State Diagram
stateDiagram-v2 direction TB state "GatewayEventDispatcher.process_message(frame OWNd returned as str)" as Dispatch { [*] --> Shape : frame_shape, digits collapsed to N Shape --> FirstOfShape : shape not seen and fewer than 64 shapes remembered Shape --> Repeat : shape seen, or 64 shapes already remembered FirstOfShape --> Warning : WARNING Data received is not a message - `*#4*#1*14*#0230*1##` , further frames of this shape are logged at DEBUG - shape remembered Repeat --> Debug : DEBUG with the same text } state "Before this PR" as Before { [*] --> EveryFrame : WARNING for every frame , *#4*#1*14*#0230*1##, *#4*#1*14*#0231*1##, ... }Hardware Verification
strframes are the*#13**27##replies captured on request (below). The#-prefixed dimension 14 frames of Data received is not a message #139 exist only in the reporter's MH202 log; nobody on our side can put them on a bus safely (they are central-unit writes), so the rate limit is unit-test only.Data received is not a messageline in any run; the F461 produced nothing unparsed and no safe injection exists.How is it tested
tests/test_unparsed_frame_logging.py::test_unparsed_frame_warns_once_per_shape(failed before: four WARNINGs instead of two),::test_frame_shape_keeps_the_whole_frame,::test_unparsed_shapes_are_capped(new).frame_shape/UNPARSED_SHAPES_MAX); all pass after.master(f04d8aa, the behaviour of the 2.0.0b11 pin): 4421 passed, 1 skipped (basev2-phase1-architectureddc6d60: 4418 passed, 1 skipped).scripts/verify_ownd_coverage.py100 %,scripts/typing_ratchet.py0 errors (baseline 0),ruff check .,scripts/verify_ha_standards.py,scripts/sync_documentation.py --check,scripts/manage_translations.py checkall pass.Live retest (2026-10-24)
Consensus label: not exercised live (no unparsed frame on the plant, no safe injection).
Where are the traces
strtests/fixtures/traces/f461_live_2026-10-23/runrun1_oracle_replay_readonly, stepplant_reads(trace PR: #799, open)*#13**27##→*#13**27*70#52#54#49##on the command session and echoed on the event session,ownd_class: str(no decoder in OWNd 2.0.0b11; OpenWebNet-HA/OWNd#139 adds one). The test's second shape is this frame.tests/fixtures/traces/myhomeserver1_live_2026-10-24/runrun1_identify(trace PR: #799, open)*#13**27##→*#13**27*77#121#72#111#109#101#83#101#114#118#101#114#49##,ownd_class: stron the event session#-prefixed dimension 14 setpoint frames*#4*#1*14*#0230*1##(the shape the test replays)What does the Firmware Oracle / Encyclopedia say
No oracle stimulus exists for this change: the oracle records what a gateway answers, not how a client logs a reply it cannot parse. The
*#4*#1*14*#…##form itself is the subject of OpenWebNet-HA/OWNd#138.Checklist
What is the problem,What is the solution,State Diagram,How is it tested,Where are the traces,What does the Firmware Oracle / Encyclopedia say).strframe in the test is the live F461 / MyHomeServer1*#13**27##reply from test(trace): ingest live F461 2.0.11 2026-10-23 capture and MyHomeServer1 3.87.13 reads behind OWNd #136-#142 and MyHOME #791-#798 #799, the dimension 14 frames are the ones reported in Data received is not a message #139.pytest,ruff, andscripts/verify_ha_standards.pypass.🤖 Generated with Claude Code