Repository navigation
Conversation
normalize_where("0004") returned "0004", an address no gateway accepts:
own-firmware-oracle lights-area0 records `*michnovka#1*0001##` and `*1*1*0001##`
as nack/silent on 11 of the 12 emulated gateways (F450, F453, F453AV,
F454, F459, F460, F461, H4684, MH200, MH200N, MyHomeServer1), and the
MH202, the only one that ACKs them, reports the light as `01`
(`*1*1000#1*01##`) while it echoes a real 4-digit `0010` as `0010`. The
live F461 2.0.11 NACKs `*michnovka#1*0001##` and `*1*1*0001##` within 10 ms and
ACKs `*michnovka#1*01##` / `*1*1*01##`. The same rule is what the MyHOME#147
thread gives users by hand (A=0 PL=3 is "03", A=0 PL=12 is "0012").
A 4-digit base with area 00 and point 1..9 (`000N`) now normalises to
`0N`, keeping any interface suffix (`0007#4#01` -> `07#4#01`). Every
other 4-digit input (`0109`, `0010`, `0112`, `1001`) is left as typed,
as decided in OpenWebNet-HA#123.
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! |
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.
Requested by A
What is the problem
normalize_where("0004")returned"0004", a WHERE that no gateway accepts and none reports. Area 0 points 1..9 are01..09on the wire: writing them with four digits (0001) is refused by eleven of the twelve emulated gateways and by the physical F461, and the one gateway that accepts it (MH202) still reports the light as01. A user who typeswhere: "0004"(the "A=0, PL=4" spelling the configurator shows) got a light that never matched a bus frame; theMyHOME#147thread resolves it by hand ("A=0 PL=3 will be03; A=0 PL=12 will be0012").#123 decided that
normalize_whereleaves0109as typed (only non-APL numeric IDs> 15have their00stripped). This PR does not change that; it only adds the area-0 case the oracle measures.How is it solved
OWNd/message/lighting.py,normalize_where: a 4-digit base000NwithNin1..9becomes0N, keeping any interface suffix (0007#4#01→07#4#01). Everything else is unchanged:0109,0209,0010,0015,0112,1015,1001,0000,0900,00,0,#0004all stay as typed (0021→21as before). Callers: OWNd usesnormalize_whereonly for the coarse-dimmer registry keys, which now match the addresses bus frames carry; nothing in OWNd sends the normalised value.CHANGELOG.md: entry under[Unreleased]/Fixed.How is it tested
tests/test_who1_ts10_builders.py: newtest_normalize_where_canonicalises_area_0_four_digit_points(19 cases: 3 rewritten, 4 four-digit non-area-0 inputs kept as typed per feat(message): protocol boundary cleanup APIs for MyHOME #736 #123, 5 real 4-digit addresses kept, 7 non-point or already canonical inputs kept). The existingtest_apl_addressing_helpers(normalize_where("0109") == "0109") is untouched and still passes.master3 of the 19 fail (0004,0001,0007#4#01), the other 16 andtest_apl_addressing_helperspass; on this branch all pass.1926 passed, 1 skipped(master:1907 passed, 1 skipped); 100 % statement coverage,mypyclean,ruffclean,sync_documentation.py --checkandverify_library_standards.pypass.probe_area0, 2026-10):*#1*0001##,*1*1*0001##,*#1*0004##NACK within 10 ms;*#1*01##,*1*1*01##ACK;*1*1*1##addresses area 1 and has no effect on the point.What does the Oracle say
Suite
lights-area0,results/<P>/<V>/oracle/full/lights-area0.tsv:nack/silentack/out*#1*0001##020010, F453010100, F453AV030014, F454020051, F459020105, F460020012, F461020011, H4684020054, MH200020102, MH200N010108, MyHomeServer1028206(11)010024(bus:$0301001500)*1*1*0001##010024(bus:$0301001200, thenown:*1*1000#1*01##)*1*1*0010##(real 4-digit address)own:*1*1000#1*0010##So the only gateway that forwards
0001reports the point as01, while it echoes a real 4-digit address (0010) unchanged. The oracle exercises area 0 only; this PR changes nothing for areas 1..9.Companion
MyHOME: OpenWebNet-HA/MyHOME#798 (the yaml validator currently accepts
0004and the registry id keeps the 4-digit spelling; the MyHOME half warns and migrates,reports/09F-05). Related:MyHOME#147.Live MyHomeServer1 3.87.13 confirmation (2026-10-24)
Status reads on a second physical plant, a MyHomeServer1 running firmware
3.87.13(*#13**16*3*87*13##, WHO 1013 model67), captured in OpenWebNet-HA/MyHOME#799 (myhomeserver1_live_2026-10-24). The oracle emulates MyHomeServer12.82.06, so this is a newer firmware than the emulated one.*#1*0001##NACK in 8 ms and*#1*0004##NACK in 14 ms (immediate firmware refusal), while*#1*01##/*#1*04##NACK after 2.0 s (forwarded, no device).*#1*0010##ACK (*1*0*0010##) and*#1*0014##ACK (*1*0*0014##) while*#1*10##NACKs after 2.0 s and*#1*14##answers*1*0*14##: 4-digit area-0 points 10-15 are real, distinct addresses that must stay as typed, exactly the boundary this PR implements (000N->0N, everything else untouched).🤖 Generated with Claude Code