Repository navigation
fix(energy): align active power queries and dimension 1200 stream lifecycle (#466, #629) - #661
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
PR Merging Blocked: Pending Authentic On-Wire Bus TracesIn accordance with our strict protocol conformance rules:
Therefore, this PR is strictly blocked from merging until an authentic, untouched customer on-wire bus capture of a physical energy meter (e.g. F520) streaming Dimension 1200 replies is contributed from a physical installation. |
|
Hi @GreenGrassBlueOcean Environment:
The attached original Bus Monitor export contains 66 WHO 18 frames (65 RX, 1 TX), with Relevant sequence on 2026-10-08, timestamps in UTC: The incoming reply carrying A reply carrying This documents the incoming nonzero and zero Dimension 1200 replies from a real installation over the gateway’s OpenWebNet connection. I tested expiry after requesting two minutes; I did not send an explicit stop command. Please use the unchanged JSON as a trace fixture for MyHOME #661 and OWNd #92, and reassess the missing-trace blocker. |
|
B15 is out btw see discussion |
|
Thanks for the heads-up! The captures were taken on b14 with OWNd b9. I’ll update to b15 for further testing. The original traces still document the incoming Dimension 1200 replies from my physical F520 installation through the F454, including the nonzero-duration reply and the zero-duration notification after expiry. |
|
The authentic, untouched customer on-wire bus trace contributed by @xtimmy86x in #661 (comment) has been integrated into our test corpus and submitted as trace PR #664:
Trace PR #664 provides the authentic physical evidence required to unblock this PR (#661) and companion OWNd PR OpenWebNet-HA/OWNd#92. |
…and replay test (#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 (*#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 #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 #661 Co-authored-by: xtimmy86x <76836856+xtimmy86x@users.noreply.github.com>
fedem95
left a comment
There was a problem hiding this comment.
Approving. Replacing the *#18*W*1200## poll is right: in the #629 log (F454 gateway; FW 1.0.34 per that issue's sweep) all 18 meters fail with Could not send message *#18*…*1200## and none succeeds, and *#18*<Where>*113## is the PDF's "Request active power" (WHO_18.pdf 5.2.18). The 1200 handling treats the value as minutes, which matches xtimmy86x's trace (Time = 2, the 0 reply 126.2 s later). Locally, full suite against OWNd b10: 3468 passed, 1 skipped; sensor tests also pass against OWNd#92. CI green.
Notes:
async_updatelooks upOWNEnergyCommand.get_instant_power/request_active_power, which exist in neither OWNd b10 nor #92, so it always falls back toOWNCommand.parse("*#18*…*113##").async_stop_sending_instant_power/stop_sending_instant_poweraren't registered as an HA service (onlystart_sending_instant_poweris), so users can't call the stop.- I found no capture of a client sending
*#18*W*113##. The evidence is the PDF plus the oracle (ackon F453AV, F454 2.0.51, F459, F460, F461, MH202, MyHomeServer1;nackon MH200N and F450). - In xtimmy86x's trace (filtered to WHO 18)
*#18*56*1200#1*255##arrives 143 ms after the*1200#1*0##, with no WHO 18 request from his HA in the capture (he notes the initiator is unknown). With this PR that frame marks the stream active for 255 minutes, so the sensor skips polling for that long. Throughout that capture*113*reports arrive about every 30 s, including before the start request.
84649c8
into
OpenWebNet-HA:v2-phase1-architecture
Note
Trace Gate Satisfied: Grounded in authentic on-wire customer bus capture contributed by @xtimmy86x in #664 (
tests/fixtures/traces/issue_466/myhome_trace_F454_who18_2026-10-08T19-30-16.json). Companion OWNd PR OpenWebNet-HA/OWNd#92 is approved.fix(energy): align active power queries and dimension 1200 stream lifecycle (#466, #629)
Summary
Fixes a recurring NACK defect in
MyHOMEPowerSensor.async_updateand completes the stream lifecycle handling for WHO 18 Dimension 1200 auto-updating instant power.Companion to:
fix(energy): parse the WHO 18 dimension 1200 automatic-update reply— Approved)Grounding & Defect Resolution:
*#18*WHERE*1200##):MyHOMEPowerSensor.async_updatepreviously sent*#18*{where}*1200##.bt_supervisione), Dimension 1200 is an auto-update parameter; query requests without parameters are syntactically invalid and always return*#*0##(NACK), causing recurring retry storms in production customer installations (#629).*#18*{where}*113##.handle_event:MESSAGE_TYPE_AUTO_UPDATE_INTERVAL(and fallback to raw Dimension 1200) emitted by physical energy meters (e.g.*#18*51*1200#1*125##).self._streaming_untilto track stream duration and deactivates streaming whenupdate_interval == 0(e.g.*#18*51*1200#1*0##stream stop frame).async_stop_sending_instant_power(and aliasstop_sending_instant_power) to gracefully cancel active streams via*#18*{where}*#1200#1*0##or typed OWNd builder.OWNd==2.0.0b10and upcomingOWNd 2.0.0b11.tests/test_component_sensors.pycovering all new paths and fallbacks with 100.0% coverage onMyHOMEPowerSensor.Changes
custom_components/myhome/sensor.py:MyHOMEPowerSensor.async_updateto query active power (*#18*{where}*113##).MyHOMEPowerSensor.handle_event.async_stop_sending_instant_powerandstop_sending_instant_powermethods.tests/test_component_sensors.py:test_power_sensorto assert Dimension 113 active power status requests.Verification
tests/test_component_sensors.py: 100.0% coverage onMyHOMEPowerSensor.