Skip to content

test(trace): add authentic WHO 18 Dimension 1200 energy stream trace and replay test (#466) - #664

Merged
GreenGrassBlueOcean merged 1 commit into
OpenWebNet-HA:v2-phase1-architecturefrom
GreenGrassBlueOcean:test/who18-dimension1200-customer-trace
Oct 8, 2026
Merged

GreenGrassBlueOcean merged 1 commit into
OpenWebNet-HA:v2-phase1-architecturefrom
GreenGrassBlueOcean:test/who18-dimension1200-customer-trace

Conversation

@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor

test(trace): add authentic WHO 18 Dimension 1200 energy stream trace and replay test (#466)

Summary

Adds an authentic customer on-wire bus trace and deterministic replay test suite for the complete WHO 18 Dimension 1200 automatic instant power stream lifecycle (*#18*WHERE*#1200#Type*Time## start command, meter interval confirmation, periodic active power telemetry, and zero-duration interval notification emitted upon 2-minute stream lease expiry).

This authentic on-wire capture was contributed by @xtimmy86x in PR #661 (comment 6067730589, 6067865874) from a live plant, successfully resolving the missing customer trace blocker on PR #661 and companion OWNd PR OpenWebNet-HA/OWNd#92.

Companion to:

  • OWNd PR OpenWebNet-HA/OWNd#92 (fix(energy): parse the WHO 18 dimension 1200 automatic-update reply)
  • Downstream companion PR OpenWebNet-HA/MyHOME#661 (fix(energy): align active power queries and dimension 1200 stream lifecycle)

Detailed Provenance & Sources

1. Authentic On-Wire Customer Bus Telemetry (@xtimmy86x)

  • Source Capture: tests/fixtures/traces/issue_466/myhome_trace_F454_who18_2026-10-08T19-30-16.json
  • Hardware Profile:
    • Gateway: Physical BTicino F454 (firmware 2.0, MAC prefix 00:03:50)
    • Energy Meters: Physical BTicino F520 (3-circuit single-phase electricity meters / load controllers)
    • Streamed Address: WHERE = 56
    • Background Meter Addresses: WHERE = 51, 53, 54, 55, 57, 58, 59, 510, 511
    • Environment: Home Assistant 2026.10.0.dev0, MyHOME 2.0.0b14, OWNd 2.0.0b9
    • Trace Window: 66 WHO 18 frames (1 TX, 65 RX), truncated: false. No frames synthesized or modified.

2. Sequence of Actions Recorded & Subsystems Verified

  1. Auto-Update Stream Start Command:
    • 19:27:55.541903 TX *#18*56*#1200#1*2## (Start 2-minute active power stream on meter 56)
  2. Meter Auto-Update Interval Confirmation:
    • 19:27:55.776619 RX *#18*56*1200#1*2## (Meter 56 confirms 2-minute stream lease, arrived ~235 ms after start command)
  3. Autonomous Active Power Telemetry (Dimension 113):
    • Periodic telemetry received across the capture window:
      • Meter 56: *#18*56*113*9## (9 W, arriving at ~30s cadence)
      • Meters 51, 53, 54, 55, 57, 58, 59, 510, 511 reporting active power
  4. Stream Expiry / Lease End Notification (Interval 0):
    • 19:30:01.726662 RX *#18*56*1200#1*0## (Meter 56 autonomously reports interval 0 upon expiry, arrived ~126.18 s after start command)
  5. Subsequent Interval Frame:
    • 19:30:01.870024 RX *#18*56*1200#1*255## (arrived ~143 ms after expiry). Background meter 54 also broadcasts *#18*54*1200#1*255## at 19:28:59.553859.
  6. Cumulative Energy Totalizers:
    • Dimensions 51 and 54 totalizer and partial consumption reports (*#18*51*51*35098267##, *#18*51*54*13165##, etc.)

Changes

  • tests/fixtures/traces/issue_466/myhome_trace_F454_who18_2026-10-08T19-30-16.json:
    • 66-frame authentic, untouched customer on-wire bus trace.
  • tests/fixtures/traces/issue_466/README.md:
    • Documents hardware profile, provenance, and frame-by-frame protocol verification.
  • tests/golden/frames/who18_energy.yaml & tests/golden/corpus.json:
    • Added golden frame definitions for Dimension 1200 start (#1200#1*2), confirmation (1200#1*2), stop (#1200#1*0), stop confirmation (1200#1*0), and renewal (1200#1*255).
  • tests/test_golden_conformance.py:
    • Registered OWNEnergyCommand in builder parity map for golden testing.
  • tests/test_energy_dimension1200_trace.py:
    • Replay test asserting production capture replay and full lifecycle transitions.

Verification

  • pytest tests/test_energy_dimension1200_trace.py: 3/3 passed in 1.14s.
  • pytest tests/test_golden_conformance.py -k meter56: 10/10 passed in 1.32s.
  • ruff check and verify_ha_standards.py: All checks passed with 0 violations.

Co-authored-by: xtimmy86x 76836856+xtimmy86x@users.noreply.github.com

…and replay test (OpenWebNet-HA#466)

Adds an authentic customer on-wire bus trace and deterministic replay
test suite for the complete WHO 18 Dimension 1200 automatic instant power
stream lifecycle (*OpenWebNet-HA#18*WHERE*#1200#Type*Time## start command, meter interval
confirmation, periodic active power telemetry, and zero-duration interval
notification emitted upon 2-minute stream lease expiry).

Captured and contributed by @xtimmy86x on PR OpenWebNet-HA#661 (#issuecomment-6067730589)
from a physical BTicino F454 gateway (firmware 2.0) and BTicino F520 energy
meters on a live plant.

Companion to:
- OWNd PR OpenWebNet-HA/OWNd#92
- Downstream companion PR OpenWebNet-HA#661

Co-authored-by: xtimmy86x <76836856+xtimmy86x@users.noreply.github.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 merged commit 3f9574d into OpenWebNet-HA:v2-phase1-architecture Oct 8, 2026
16 checks passed
@GreenGrassBlueOcean
GreenGrassBlueOcean deleted the test/who18-dimension1200-customer-trace branch October 8, 2026 20:40
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