Repository navigation
docs(changelog): describe send_to_gateway's dimension 22 refusal as it is - #148
Conversation
…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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
GreenGrassBlueOcean
left a comment
There was a problem hiding this comment.
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#Con a 4-zone central unit is1..99(01..99), not1..4. My#140review wrote#0#1..#0#4in passing (andOWNHeatingEvent.__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#Cis the 4-zone (4695) central unit's own configured zone selector, not a1..4sub-zone slot:MyHOME_SuiteOPEN.db(functional/open-db-coverage.md,ownkb:chunk:r000237) definesFour-zone control unitas Virtual#0#[ZA][ZB]and Advanced#0#[ZAZB].MHCatalogue.db(OWN-DEV-00174695andOWN-DEV-0018Object 191,ownkb:chunk:r001952/r001981) configures the unit's local zone withZA = 0..9,ZB = 0..9andZAZB_CENTRALin1..99: a4695supervises up to four zones including its own local zoneZAZB, so a unit mounted as master of zone5or12is#0#5(#0#05) or#0#12.BtExperience(BtObjects/thermalobjects.cpp:60-1015,parseControlUnit4/parseZone4,ownkb:chunk:moc-r001193) uses#0#Cfor central-unit commands and#Z#Cfor a zone controlled through 4-zone central unitC(#23#1inlibqtdevicesTS10_1_0_23, cited in_zone_address_and_name).own-firmware-oracle(results/F461/020011/checks/thermo-central-mode.tsvlines 17–31):*4*0*#0##emits$006D1000302C1F10000\r(D1 00 ...) and*4*0*#0#2##emits$006D1020302C1F10000\r(D1 02 ...) — a two-nibbleZAZBcentral address byte, not a1..4index.
CHANGELOG.mdline 17 grammar. Droppingsend_to_gatewayfrom the subject list left`OWNCommandSession.send` (and so `AsyncTcpTransport.send` and `keepalive`), `AsyncSerialTransport.send` refuses it— needsand AsyncSerialTransport.send refuse it.
Notes:
- Actuator
Z#Nvs central#Z#ConDIMENSION 20.WHO_4.pdfp. 22 specifiesZ#N(Z = 0..99,N = 1..9),Z#0and0#0(no leading#on actuator targets), andthermo-zone-requests.tsv+ liveF461 2.0.11add*#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#Cthe second token is the central selectorC(1..99), not an actuator0..9. 01vs#01. Keeping two-digit virtual01while refusing#01..#09splits the same[ZA][ZB](ZA=0, ZB=1..9) convention;#00and#0#0/#0#00are 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>
|
Thanks, you are right on the selector: The same misreading is in #137 ( |
…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
left a comment
There was a problem hiding this comment.
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.
… 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>
Requested by A
Before: the #136 CHANGELOG entry said
send_to_gatewayrefuses WHO 4 dimension 22 "with the contract above", which includes "kept inlast_error", although that method creates and discards its session, so nothing is observable there besides the ERROR log and theNone(or the raise withraise_on_error=True).After: the entry describes
send_to_gateway's refusal as it is, and the subject list reads "OWNCommandSession.send(and soAsyncTcpTransport.sendandkeepalive), andAsyncSerialTransport.sendrefuse 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.
send_to_gateway's body: it creates a session, calls_refuse_destructive_frame(which sets_last_erroron that session and logs at ERROR) and returnsNone; the session is never returned, so "kept inlast_error" is unobservable on that path. Text only; the behaviour is unchanged and already tested (test_send_to_gateway_refuses_without_connecting)._WHO4_WHERE_REGEX's#0#Cto[1-4]. That was wrong:#0#Cis the 4-zone central unit's configured zone selector,1..99(01..99), per MyHOME_SuiteOPEN.db(#0#[ZA][ZB]), MHCatalogue4695(ZAZB_CENTRAL1..99) and the oraclethermo-central-moderows (*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.mdonly;scripts/sync_documentation.py --checkin sync;ruffclean;tests/test_who4_actuators_status.py60 passed (unchanged from master).🤖 Generated with Claude Code