Skip to content

feat(message): protocol boundary cleanup APIs for MyHOME #736 - #123

Merged
GreenGrassBlueOcean merged 4 commits into
masterfrom
feat/protocol-boundary-issue-736
Oct 16, 2026
Merged

GreenGrassBlueOcean merged 4 commits into
masterfrom
feat/protocol-boundary-issue-736

Conversation

@GreenGrassBlueOcean

@GreenGrassBlueOcean GreenGrassBlueOcean commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Companion PR for OpenWebNet-HA/MyHOME#736 (OpenWebNet-HA/MyHOME#737).

Note: The 2.0.0-b11 version bump is handled separately by #98 (chore/release-2.0.0-b11), so OWNd/__init__.py is not modified in this PR.

Summary

  • Public OWNMessage parameter properties: Exposes what, what_param, where_param, dimension_param, and dimension_value publicly on OWNMessage so downstream consumers do not reach into _what, _where, _dimension, or _dimension_value.
  • WHO=1 WHERE address grammar helpers: Exports is_apl_address, area_of_where, and normalize_where from OWNd.message.lighting (and OWNd.message).
  • First-class Kelvin and HS color properties: Adds color_temp_kelvin and hs_color on OWNLightingEvent and brightness, color_temp, color_temp_kelvin, hs, and hs_color on OWNLightingCommand.
  • WHO=16 stepped volume decoding: Decodes WHAT=1001..1015 (+1..+15) and WHAT=1101..1115 (-1..-15) on OWNSoundEvent.volume_step_delta.

@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 changed the title feat(message): expose public dimension/lighting/sound accessors & APL helpers (2.0.0b11) feat(message): protocol boundary cleanup APIs for MyHOME #736 Oct 16, 2026

@fedem95 fedem95 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.

Tested c31b0c6: 1554 passed locally, CI green. I ran the new command accessors on frames built by OWNd's own builders: set_brightness("21", 50) → brightness 50; set_color_temperature("21", 250) → 250 mired / 4000 K, same as the event side for *#1*21*14*250##; set_hsv_color("21", 120, 50, 80) → hs (120, 50). area_of_where("1015") → "100" matches is_area in base.py, and 1001/1101 match the existing volume_up/volume_down builders. Approving, with one thing to do before merge:

  • It conflicts with master in tests/test_who18_stop_and_go.py: #122 rewrote test_stop_and_go_firmware_oracle_conformance (exact product set, NACK asserted for F460/F461/MyHomeServer1), so on rebase please keep master's version and drop this hunk.

Non-blocking:

  • normalize_where("0109") returns "109": is_apl_address("0109") is False (area 01-09 needs PL 10-15, per the docstring), so it falls through to int(). Maybe leave such input unchanged, or reject it.
  • The description lost a few characters to escapes: a newline where \n was ("ormalize_where") and a backspace where \b was ("rightness").

@GreenGrassBlueOcean
GreenGrassBlueOcean force-pushed the feat/protocol-boundary-issue-736 branch from c31b0c6 to 746d52f Compare October 16, 2026 21:50
@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor Author

Thanks @fedem95! Addressed all points in 746d52f:

  1. Rebase (tests/test_who18_stop_and_go.py): Rebased onto master (0596895) and dropped the hunk in tests/test_who18_stop_and_go.py, keeping fix(tests): align Stop&Go oracle conformance with synced firmware_oracle.json #122's version intact.
  2. normalize_where("0109"): Tightened the leading-zero stripping branch to only strip "00" on non-APL numeric IDs > 15 (e.g. "0021" → "21"), leaving non-APL inputs like "0109" unchanged (normalize_where("0109") == "0109").
  3. PR Description: Fixed the escaped characters (area_of_where, normalize_where, brightness).

@fedem95 fedem95 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.

Thanks, the follow-up changes address my previous notes. The rebase, normalize_where("0109") behavior, and PR description look good. Approving.
Non-blocking note: hs checks that hue is at most 360, but doesn’t reject negative hue or out-of-range saturation values. It may be worth tightening that validation.

@GreenGrassBlueOcean
GreenGrassBlueOcean merged commit bc38b8f into master Oct 16, 2026
16 checks passed
@GreenGrassBlueOcean
GreenGrassBlueOcean deleted the feat/protocol-boundary-issue-736 branch October 16, 2026 22:04
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