Skip to content

feat(message): add native parsers and command builders for WHO 8, WHO 3, WHO 18, and WHO 22 verified dialects - #85

Closed
GreenGrassBlueOcean wants to merge 4 commits into
OpenWebNet-HA:masterfrom
GreenGrassBlueOcean:feat/native-parsers-verified-dialects
Closed

GreenGrassBlueOcean wants to merge 4 commits into
OpenWebNet-HA:masterfrom
GreenGrassBlueOcean:feat/native-parsers-verified-dialects

Conversation

@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor

Summary

Adds native protocol message parsers and command builders in OWNd for empirical frame dialects verified in own-firmware-oracle and openwebnet-mcp:

  1. WHO 8 (Video Door Entry & Advanced Intercom):

    • Implemented OWNIntercomEvent and OWNIntercomCommand in OWNd/message/intercom.py.
    • Supports door locks (*8*19*WHERE##, *8*20*WHERE##), staircase lighting (*8*21*WHERE##, *8*22*WHERE##), camera switching/cycling (*8*4#CALLER*CAM##, *8*6#CALLER*MASTER##), PTZ movements (up, down, left, right with press/release), internal/external/pager calling (*8*1#KIND#MM#CALLER*CALLEE##), call answering, termination, stop video feed, VCT init (*8*37#MODE*WHERE##), teleloops (*8*76..79##), amplifier mute (*8*63/64##), and status requests.
  2. WHO 3 (Load Control & Shedding):

    • Implemented OWNLoadEvent and OWNLoadCommand in OWNd/message/load.py.
    • Supports priority line shedding (*3*0*#PRIORITY##), enable/automatic (*3*1*#PRIORITY##), force reconnect (*3*2*#PRIORITY##), and remove forcing (*3*3*#PRIORITY##).
    • Supports central unit F421 multi-dimension measurements (*#3*10*0..4##: all, voltage, current, power, energy) and priority line status queries.
  3. WHO 18 (Energy Management Expansion):

    • Expanded OWNEnergyEvent and OWNEnergyCommand in OWNd/message/energy.py.
    • Added Stop&Go breaker commands (WHAT 21 open, 22 close, 23/24 differential test, 26/27 auto-reset, 28/29 line tracking) and dimensions (212 self-test interval, 250 status mask, 251 line state, 258 failure counter).
    • Added TS10 historical graph series requests (WHAT 52..510).
    • Added Energy Actuator management (WHAT 71 enable, 73 timed/indefinite force off, 74 end force, 75 reset totalizer; dimension 73 differential current level).
    • Added dimension 516 totalizer queries and dimension 1200 periodic reporting control.
  4. WHO 22 (Sound / Multi-Room Audio):

    • Implemented _OWNMultiroomMixin, OWNMultiroomEvent, and OWNMultiroomCommand in OWNd/message/sound.py.
    • Supports structured addressing (2#S source, 3#A#P speaker point, 4#A area, 5#... general prefix, 6 all sources).
    • Supports power ON/OFF, volume steps (3, 4) and levels (dim 1, 0..31), Follow Me routing (34#MM#A), Source Select (35#MM#A#S), tuner search UP/DOWN, track/station next/prev/store, tone controls (high, mid, low 1..63), balance (1..63), presets (1..63), loudness ON/OFF, device state (dim 12), active areas mask (dim 13), and RDS reporting (31, 32).
  5. Exports & Dispatcher Integration:

    • Added "intercom" and "load" to _WHO_SUBMODULES in OWNd/message/base.py.
    • Re-exported classes and constants in OWNd/message/__init__.py.
  6. Conformance Testing & Quality Gates:

    • Added test_oracle_empirical_dialects_parse_into_specialized_classes in tests/test_firmware_oracle_conformance.py.
    • 1,286 unit tests passing (100%).
    • 100.0% statement coverage across all 26 modules (5,146 / 5,146 statements) via scripts/verify_coverage.py.
    • Strict library decoupling (0 Home Assistant imports via scripts/verify_library_standards.py).
    • Clean ruff and mypy typing checks (28 source files).
    • Standard LF line endings verified.

Note

This PR is opened as Draft and stacks on PR #84 (which will be merged once all queued gateways complete emulation).

- verify actual verdict hash 53df92a0 and row counts (MH200N 84 rows/78 inputs, MHS1 51 rows/46 inputs, 135 total)
- add semantic validation for WHO 1001 diagnostic mask frame
- add dedicated test for the 17 empirical NACK-with-bus-forwarding verdict rows
- cross-validate golden corpus intersecting fixtures using mcp_valid and known discrepancies
- drive gateway profile parity dynamically from gateways fixture metadata
- parameterize rejection frames with explicit expected_gateways
- fix LF line endings in firmware_oracle.json
- make README corpus validator invocation portable
@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 added a commit to GreenGrassBlueOcean/OWNd that referenced this pull request Oct 9, 2026
…ercom dialects

- Register WHO 8 event and command parsers (OWNLockEvent / OWNLockCommand)
- Expose public is_camera_on and is_camera_off properties on OWNDoorEntryEvent
- Expand WHO 8 support with full TS10/oracle and trace dialects from draft PR OpenWebNet-HA#85 (calls, session actions, cameras, PTZ, amplifier mute, teleloops, and command builders)
- Add OWNIntercomEvent and OWNIntercomCommand aliases and export constants in OWNd.message
- Clean up stale WHO 6 from OWNCommand.parse fallback dispatch
- Add WHO_DOOR_ENTRY and WHO_LOCK to MH200 and MH200N supported profiles
- Add comprehensive test coverage asserting WHO 8 registry parsing and 100% statement/branch coverage
@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor Author

Superseded. This draft bundled four WHO families, and each has since moved on in its own PR, built against current master and backed by traces or firmware evidence:

Part of this PR Now handled in
WHO 3 load control (OWNLoadEvent / OWNLoadCommand) #104, which keeps only the frames the firmware oracle shows reaching the bus, and keeps measurement replies raw until a plant capture confirms them
WHO 8 door locks and intercom #100
WHO 18 energy expansion #92 (merged) and #102
WHO 22 sound diffusion #103

This branch is far behind master (based on c7c3a7b6, currently conflicting), so closing it rather than rebasing. Anything still missing from the list above should come back as a focused PR with its own evidence.

🤖 Generated with Claude Code

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