Skip to content

fix(message): parse '#'-prefixed dimension 14 setpoint values - #138

Draft
gdluck wants to merge 1 commit into
OpenWebNet-HA:masterfrom
gdluck:fix/parse-hash-setpoint-and-clock-echoes
Draft

gdluck wants to merge 1 commit into
OpenWebNet-HA:masterfrom
gdluck:fix/parse-hash-setpoint-and-clock-echoes

Conversation

@gdluck

@gdluck gdluck commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Requested by A

Summary

*#4*#1*14*#0230*1## (OpenWebNet-HA/MyHOME#139, "Data received is not a message") is a WHO 4 Dimension 14 setpoint reply whose value carries a # prefix, sent by a user's central unit every few seconds. The dimension-reply regex accepts only digits in values, so OWNMessage.parse returned None and MyHOME logged every occurrence as an unparsable event instead of using the setpoint.

Fixes OpenWebNet-HA/MyHOME#139 on the OWNd side (the MyHOME log rate limit, OpenWebNet-HA/MyHOME#802, was closed at the maintainer's request: this parser change is the fix, and the warning disappears once the OWNd pin includes it). The WHO 13 clock-echo timezone fix that this PR carried at first is now its own PR (see Companion); the two have different evidence and different reviewers' checks.

Changes

  • OWNd/message/base.py: _HASH_VALUE_REPLIES, a narrow allowlist of reply shapes that carry a # inside a value, limited here to WHO 4 Dimension 14 (*#4*WHERE*14*#TTTT*M##, one #, digits after it). _match_hash_value_reply is tried after the general reply regex, which is unchanged, and parse() routes those shapes to events. The new branch fills the same fields as the general one (_who, _where, _where_param, _dimension, _dimension_param, _dimension_value). A # value on dimension 12, on WHO 1, on the mode field, ##0230, #02#30 or a bare # still returns None.
  • OWNd/message/heating.py: the Dimension 14 decoder strips the # before who4_temperature, giving set_temperature == 23.0; dimension_value keeps ["#0230", "1"] and str(message) is the frame as received.
  • CHANGELOG.md: entry under [Unreleased] / Fixed.

State Diagram

stateDiagram-v2
    direction TB

    state "OWNMessage.parse(frame) for a dimension reply" as Parse {
        [*] --> General
        General --> Event : *#4*#1*14*0230*1## , digits only\nOWNHeatingEvent, set_temperature 23.0 , unchanged
        General --> HashAllowlist : value with a # - general regex does not match
        HashAllowlist --> Event : *#4*WHERE*14*#TTTT*M## only , new\nOWNHeatingEvent, set_temperature 23.0, dimension_value [#0230, 1]\n, before - None, MyHOME Data received is not a message
        HashAllowlist --> NoneResult : any other # value\n*#4*#1*12*#0230*1##, *#1*11*1*#5##, *#4*#1*14*0230*#1##\nNone , unchanged
    }
Loading

Where are the traces

No physical trace of ours applies: the #-prefixed setpoint is in no oracle suite and in neither of our captures. The live F461 2.0.11 and MyHomeServer1 3.87.13 (trace PR OpenWebNet-HA/MyHOME#799, merged) answer dimension 14 with plain values (*#4*2*14*T*3##, *#4*35*14*...##). The evidence for the shape is the user log in OpenWebNet-HA/MyHOME#139 (frames *#4*#1*14*#0230*1##, *#4*#1*14*#0231*1##, *#4*#2*14*#0205*1##, replayed in OpenWebNet-HA/MyHOME#802's test). OpenWebNet-HA/MyHOME#799 run 6 holds a #-prefixed dimension echo (*#4*2#1*#20*0##), a different shape that this PR does not touch.

What does the Oracle say

No oracle stimulus exists for this frame: no suite sends or emits a #-prefixed dimension 14 value.

Testing

  • tests/test_who4_hash_setpoint.py (new, 11 cases): the OpenWebNet-HA/MyHOME#139 frame parses as OWNHeatingEvent / MESSAGE_TYPE_TARGET_TEMPERATURE / 23.0 °C with the raw value kept and dimension_param == []; three zone forms (#1, 1, #0#2); the plain setpoint is unchanged; six # shapes elsewhere still give None.
  • Fail before / pass after: on master 4 fail, 7 pass (OWNMessage.parse('*#4*#1*14*#0230*1##') is None); on this branch all 11 pass.
  • Full suite: 1918 passed, 1 skipped (master: 1907 passed, 1 skipped); 100 % statement coverage, mypy clean, ruff clean, scripts/sync_documentation.py --check and scripts/verify_library_standards.py pass.

Live retest (2026-10-24)

Not exercised live: parser-only, and the F461 sends no #-prefixed setpoint (no *#4*...*14*#TTTT## on this plant).

Companion

MyHOME: none (OpenWebNet-HA/MyHOME#802 closed; the warning stops once this parser change is pinned). Related OWNd PR (split from this one): fix(gateway): WHO 13 clock echoes with timezone 0530/124 no longer raise: #144.

🤖 Generated with Claude Code

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

`*michnovka#4*michnovka#1*14*#0230*1##` (MyHOME#139, "Data received is not a message") is a
WHO 4 Dimension 14 setpoint reply whose value carries a '#' prefix. The
general dimension-reply regex accepts digits only, so OWNMessage.parse
returned None. A narrow allowlist (_HASH_VALUE_REPLIES, WHO 4 dimension
14 only) routes that shape to OWNHeatingEvent, which strips the '#'
before decoding the temperature; dimension_value keeps the raw value and
str(message) is the frame as received. A '#' in any other value still
does not parse.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@gdluck
gdluck force-pushed the fix/parse-hash-setpoint-and-clock-echoes branch from 78948c9 to c09238e Compare October 24, 2026 15:44
@gdluck gdluck changed the title fix(message): parse '#'-prefixed dimension 14 setpoints and WHO 13 clock echoes with 0530/124 timezones fix(message): parse '#'-prefixed dimension 14 setpoint values Oct 24, 2026
gdluck pushed a commit to gdluck/HomeAssistant-MyHOME that referenced this pull request Oct 25, 2026
…; drop the OWNd#138 attribution

Review of OpenWebNet-HA#815 (5644290768): the replay tests asserted the whole
_actuator_states dict including the base branch's "valve" key, which OpenWebNet-HA#792
moves to _zone_active; they now assert the per-actuator keys only. The
'OpenWebNet-HA#20' write-form echoes are not covered by OpenWebNet-HA/OWNd#138 (dimension
14 values only), so that attribution is removed from the READMEs and tests.
The F461 tx check accepts is_dimension_request beside the archived
is_status_request value, so a later OWNd classification cannot fail the
conformance gate.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants