Skip to content

docs(changelog): describe send_to_gateway's dimension 22 refusal as it is - #148

Merged
GreenGrassBlueOcean merged 2 commits into
OpenWebNet-HA:masterfrom
gdluck:chore/who4-address-bounds-and-send-to-gateway-text
Oct 26, 2026
Merged

GreenGrassBlueOcean merged 2 commits into
OpenWebNet-HA:masterfrom
gdluck:chore/who4-address-bounds-and-send-to-gateway-text

Conversation

@gdluck

@gdluck gdluck commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Requested by A

Before: the #136 CHANGELOG entry said send_to_gateway refuses WHO 4 dimension 22 "with the contract above", which includes "kept in last_error", although that method creates and discards its session, so nothing is observable there besides the ERROR log and the None (or the raise with raise_on_error=True).

After: the entry describes send_to_gateway's refusal as it is, and the subject list reads "OWNCommandSession.send (and so AsyncTcpTransport.send and keepalive), and AsyncSerialTransport.send refuse it".

Why this PR

@GreenGrassBlueOcean after your #140 review found four defects our own verification had missed, we re-read every PR of ours against its neighbours rather than against its own claims. This is the remaining leftover on a merged PR.

  • fix(connection): refuse WHO 4 dimension 22 in every send path #136 CHANGELOG, how it was found. Reading the sentence against send_to_gateway's body: it creates a session, calls _refuse_destructive_frame (which sets _last_error on that session and logs at ERROR) and returns None; the session is never returned, so "kept in last_error" is unobservable on that path. Text only; the behaviour is unchanged and already tested (test_send_to_gateway_refuses_without_connecting).
  • Dropped after review (4f82518): the first revision also bounded _WHO4_WHERE_REGEX's #0#C to [1-4]. That was wrong: #0#C is the 4-zone central unit's configured zone selector, 1..99 (01..99), per MyHOME_Suite OPEN.db (#0#[ZA][ZB]), MHCatalogue 4695 (ZAZB_CENTRAL 1..99) and the oracle thermo-central-mode rows (*4*0*#0#2## → D1 02 …). The merged feat(heating): OWNHeatingCommand.actuators_status(where) builder for *#4*WHERE*20## #140 regex stays as it is.

Testing

  • CHANGELOG.md only; scripts/sync_documentation.py --check in sync; ruff clean; tests/test_who4_actuators_status.py 60 passed (unchanged from master).

🤖 Generated with Claude Code

…GELOG wording for send_to_gateway

Follow-up to OpenWebNet-HA#140 and OpenWebNet-HA#136 found by an adversarial read of both merged PRs.

- `_WHO4_WHERE_REGEX` accepted `#0#0` and `#0#5..#0#9` although a 4-zone
  central unit has zones `#0#1..#0#4` (the WHO 4 WHERE table, and what the
  OpenWebNet-HA#140 review listed as valid). The alternation now spells the three
  address families out: `#0` / `#0#1..4`, `#Z` / `#Z#N` with Z 1..99, and
  plain `Z` / `Z#N` (a leading zero on a plain zone is kept, the parser
  reads it). `michnovka#1` and `#00` are refused with the central forms. Tests add
  the refused rows and `OpenWebNet-HA#99#9` / `01` as accepted.
- The OpenWebNet-HA#136 CHANGELOG entry said `send_to_gateway` refuses dimension 22
  "with the contract above", which includes "kept in `last_error`"; the
  refusal is recorded on the throwaway session that method creates and
  discards, so nothing is observable there besides the ERROR log and the
  `None` (or the raise with `raise_on_error=True`). The entry now says
  that.

Suite 2111 passed on master 247f86e; MyHOME v2-phase1-architecture
f4a5a907 suite 4991 passed against this head.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@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!

@GreenGrassBlueOcean GreenGrassBlueOcean left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. Checked against Legrand's WHO_4.pdf (p. 22), MyHOME_Suite OPEN.db, MHCatalogue.db (4695 / Object 191), BtExperience (BtObjects/thermalobjects.cpp:60-1015), and own-firmware-oracle (thermo-central-mode.tsv, thermo-zone-requests.tsv). The CHANGELOG.md correction on OWNCommandSession.send_to_gateway is right — connection = cls(gateway) is local and discarded on return None, so last_error is not observable on that path unless raise_on_error=True raises OWNProtocolError — and refusing #0#0 / #00 makes sense. Bounding #0#... to #0(?:#[1-4])?, however, rejects valid 4-zone central-unit addresses #0#5..#0#99 (#0#05..#0#99). CI 8/8 is green and the branch merges cleanly onto master (247f86e).

Blockers:

  • #0#C on a 4-zone central unit is 1..99 (01..99), not 1..4. My #140 review wrote #0#1..#0#4 in passing (and OWNHeatingEvent.__init__ line 210 has an older comment calling #0#N "zone N of a 4-zone central unit"), which misled this bound. In the primary sources, #0#C is the 4-zone (4695) central unit's own configured zone selector, not a 1..4 sub-zone slot:
    • MyHOME_Suite OPEN.db (functional/open-db-coverage.md, ownkb:chunk:r000237) defines Four-zone control unit as Virtual #0#[ZA][ZB] and Advanced #0#[ZAZB].
    • MHCatalogue.db (OWN-DEV-0017 4695 and OWN-DEV-0018 Object 191, ownkb:chunk:r001952 / r001981) configures the unit's local zone with ZA = 0..9, ZB = 0..9 and ZAZB_CENTRAL in 1..99: a 4695 supervises up to four zones including its own local zone ZAZB, so a unit mounted as master of zone 5 or 12 is #0#5 (#0#05) or #0#12.
    • BtExperience (BtObjects/thermalobjects.cpp:60-1015, parseControlUnit4 / parseZone4, ownkb:chunk:moc-r001193) uses #0#C for central-unit commands and #Z#C for a zone controlled through 4-zone central unit C (#23#1 in libqtdevices TS10_1_0_23, cited in _zone_address_and_name).
    • own-firmware-oracle (results/F461/020011/checks/thermo-central-mode.tsv lines 17–31): *4*0*#0## emits $006D1000302C1F10000\r (D1 00 ...) and *4*0*#0#2## emits $006D1020302C1F10000\r (D1 02 ...) — a two-nibble ZAZB central address byte, not a 1..4 index.
  • CHANGELOG.md line 17 grammar. Dropping send_to_gateway from the subject list left `OWNCommandSession.send` (and so `AsyncTcpTransport.send` and `keepalive`), `AsyncSerialTransport.send` refuses it — needs and AsyncSerialTransport.send refuse it.

Notes:

  • Actuator Z#N vs central #Z#C on DIMENSION 20. WHO_4.pdf p. 22 specifies Z#N (Z = 0..99, N = 1..9), Z#0 and 0#0 (no leading # on actuator targets), and thermo-zone-requests.tsv + live F461 2.0.11 add *#4*Z*20## and *#4*#0*20##. Neither *#4*#0#C*20## nor *#4*#Z#C*20## has been replayed in the oracle yet, and in #Z#C the second token is the central selector C (1..99), not an actuator 0..9.
  • 01 vs #01. Keeping two-digit virtual 01 while refusing #01..#09 splits the same [ZA][ZB] (ZA=0, ZB=1..9) convention; #00 and #0#0 / #0#00 are the only zero forms that name no valid zone or central unit.

Either dropping the heating.py / regex hunk (keeping #140 as-is and landing only the CHANGELOG.md send_to_gateway fix with the and ... refuse tweak) or bounding C in #0#C / #Z#C to 1..99 (01..99, rejecting #00 and #0#0 / #0#00) works for me.

Drops the `_WHO4_WHERE_REGEX` hunk and its tests: `#0#C` on a 4-zone
central unit is the unit's configured zone selector, 1..99 (01..99), not
a 1..4 slot (MyHOME_Suite OPEN.db `#0#[ZA][ZB]`, MHCatalogue 4695
`ZAZB_CENTRAL` 1..99, oracle thermo-central-mode `*4*0*#0#2##` ->
`D1 02 ...`), so bounding it to `[1-4]` rejected valid addresses. The
merged OpenWebNet-HA#140 regex stays as it is. The CHANGELOG keeps the
`send_to_gateway` correction, now with the subject list reading
"... `AsyncSerialTransport.send` refuse it".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@gdluck gdluck changed the title fix(heating): bound the 4-zone central form in actuators_status; CHANGELOG wording for send_to_gateway docs(changelog): describe send_to_gateway's dimension 22 refusal as it is Oct 26, 2026
@gdluck

gdluck commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, you are right on the selector: #0#C is the 4-zone unit's configured zone (ZAZB, 1..99), not a 1..4 slot, and the D1 02 … byte in thermo-central-mode settles it. Took option one in 4f82518: heating.py and its tests are back to master (the merged #140 regex stays), only the CHANGELOG correction remains, with the subject list now "OWNCommandSession.send (and so AsyncTcpTransport.send and keepalive), and AsyncSerialTransport.send refuse it". Title and body updated accordingly.

The same misreading is in #137 (set_central_mode bounded #0#C to 1..4 and #Z#C to 1..9); I am correcting it there to the 1..99 / 01..99 selector, rejecting only #00, #0#0 and #0#00, and will note it on that PR.

gdluck pushed a commit to gdluck/OWNd that referenced this pull request Oct 26, 2026
…review of OpenWebNet-HA#148)

The previous revision bounded `#0#C` to 1..4 and `#Z#C` to 1..9, reading
`#0#N` as "zone N of a 4-zone central unit". `#0#C` is the 4-zone unit's
configured zone selector, 1..99 (01..99): MyHOME_Suite OPEN.db
`#0#[ZA][ZB]`, MHCatalogue 4695 `ZAZB_CENTRAL` 1..99, and the oracle
`thermo-central-mode` rows (`*4*0*#0#2##` -> `D1 02 ...`, a two-nibble
central address byte); `#Z#C` is zone Z controlled through 4-zone central
unit C, also 1..99 (BtExperience parseControlUnit4 / parseZone4). Two-digit
virtual spellings (`michnovka#1`, `#0#05`) are the same `[ZA][ZB]` convention as
the plain `01` and are accepted. Only `#00`, `#0#0`, `#0#00` and
three-digit values are refused.

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

@GreenGrassBlueOcean GreenGrassBlueOcean left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. Both points from the review are addressed in 4f82518: heating.py and its tests are back to master (#140 untouched), and CHANGELOG.md accurately describes send_to_gateway's Dimension 22 refusal with the updated subject list. Good catch spotting the same #0#C / #Z#C selector bound in #137 as well. CI 8/8 green.

@GreenGrassBlueOcean
GreenGrassBlueOcean merged commit 050dc1d into OpenWebNet-HA:master Oct 26, 2026
8 checks passed
gdluck pushed a commit to gdluck/OWNd that referenced this pull request Oct 26, 2026
… 0 WHERE, fixtures cited (review follow-up)

Review of 2026-10-26 20:32 on OpenWebNet-HA#145:

- DIMENSION 7 (`BITMASK_DIA_A`, OPEN.db) carries the same 24-bit mask as
  DIMENSION 11: MyHOME's device_health pairs (7, 11) and the MyHomeServer1
  cover diagnostic in MyHOME issue_466 sends `*#1001*0*7*1111…0111##` with
  the same bits as the live DIMENSION 11 reads. The decoder accepts both.
- WHO 1001 joins the WHOs whose WHERE may carry `michnovka#4#II` in
  `OWNMessage.interface`, so `interface`, `unique_id` (`1001-74#4#01`)
  and the log line cover an actuator behind an F422, as for WHO 1 / 2.
- The log subject handles an empty WHERE (the gateway's own diagnostic)
  without a double space; `cleared_bits` is stored once in `__init__`.
- Docstring, README catalog row and CHANGELOG: WHO 1001 is the diagnostic
  WHO of lighting and automation actuators alike; the mask is pushed after
  `*1*19*WHERE##` (oracle what19; MyHOME fixtures issue_619 F453AV,
  issue_466 / issue_733 MH200), pushed alongside normal `*1*0/1*WHERE##`
  sweep replies on an MH200N (issue_434, issue_746), answered on a direct
  read (live F461 / MyHomeServer1, 2026-10-24) and sent as DIMENSION 7 on
  WHERE 0 (issue_466).
- Tests: WHERE `0`, `0014`, routed `74#4#01`, empty, the status-shaped
  `*1001*4*0##`, DIMENSION 7 shapes, `is_general False` pinned; the
  firmware-oracle conformance block asserts the class, mask and cleared
  bits.
- Merged origin/master (050dc1d) into the branch (CHANGELOG conflict with
  OpenWebNet-HA#136 / OpenWebNet-HA#140 / OpenWebNet-HA#148 resolved, the WHO 1001 entry under "Added").

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.

3 participants