Skip to content

v2.0.3 - WHO 4 bt_termo P0–P2, 19 Gateway Profiles & Session Hardening

Latest

Choose a tag to compare

@GreenGrassBlueOcean GreenGrassBlueOcean released this 30 Nov 19:51
c01b35a

OWNd 2.0.3

WHO 4 bt_termo P0–P2 protocol support, backtrace-verified gateway profiles across all 19 canonical gateways, session/transport race hardening, and 100.0% statement + branch coverage since 2.0.2 (#188, #189, #190, #192, #193, #194, #195, #196). No breaking API changes.

pip install OWNd==2.0.3

Added

  • WHO 4 (OWNHeatingEvent, OWNHeatingCommand) (#190): Decode circulation-pump demand calls (4001/4002, MESSAGE_TYPE_PUMP_CALL with pump_call_active, calling_zone, pump), local offset release (WHAT 40, MESSAGE_TYPE_LOCAL_OFFSET_RELEASE and OWNHeatingCommand.release_local_offset), undocumented DIM 13 codes 7/8 as LOCAL_CONTROL_UNKNOWN, and DIM 15 4-bit probe status mask (probe_status_raw, probe_status_mask).
  • Profiles (F450Profile, F459Profile, F460Profile, H4684Profile, L4686SDKProfile) & Gateway Identity (#193): Added dedicated backtrace-verified profiles across all 19 canonical gateways (bringing F450, F459, F460, firmware-aware H4684 WHO 22 >= 6.0.0, and serial L4686SDK alongside 3488), new declarative capability fields & helpers (hmac_algorithm, forces_hmac, emits_cover_pre_move_stop, rx_only_who, remote_blocked_who, supports_who18_response_injection, default_baudrate, supports_who_tx(), supports_who_rx()), and expanded WHO 13 / WHO 1013 model tables aligned with firmware disassembly.
  • Profiles (Bticino3488Profile) (#189): Dedicated hardware profile for the BTicino 3488 HOMETOUCH / Legrand 067259 gateway (HMAC-SHA256, native transitions, extended frames, up to 2 command sessions, Gen D bt_termo WHO 4 capabilities, WHO 1013 object model 128).
  • WHO 4 (OWNHeatingEvent, who4_bt_termo_crash_reason) (#189): Decode bt_termo comfort/eco/timed-manual/extended WHAT modes (104/204/304, 107/108/207/208, 402/407/408/410, 502/507/508/510, 1100/2100/1200/2200 and symmetric 1..16 program ranges), timed_manual_hours from 112/212/312#TTTT#HH, DIM 7 manual/extended states (0, 31, 32), single-side empty DIM 19 valve status frames (QUIRK-03), Gen A sub-10 °C 2/3-digit temperatures (QUIRK-11), non-colliding unique_id for external probes 100..900, and pre-send crash guards (CRASH-01, CRASH-03, CRASH-04) across all send paths.

Changed

  • Profiles (Gen B F453, F453AV, MH200N) (#189): Set supports_general_heating_status=False (QUIRK-15: *#4*0## polls non-existent zone 0 and stalls on physical plants).
  • Governance & CI (#194): Added .github/CODEOWNERS (@OpenWebNet-HA/owners) and CONTRIBUTING.md documenting compulsory non-author owner review and four-eyes PyPI publishing, hardened .github/workflows/release.yml with origin/master ancestry validation on refs/tags/v*, SHA-pinned all GitHub Actions workflows, and added .github/workflows/workflow-lint.yml (zizmor + actionlint) and .github/dependabot.yml for GitHub Actions updates.

Fixed

  • WHO 4 (OWNHeatingCommand.get_temperature) (#190): Strip accidental 2-digit leading zeros ("01".."09", optionally behind #4#II or surrounding whitespace) on DIM 0 temperature reads so bt_termo does not trigger its 8-probe slave scan (QUIRK-05), while keeping 3-digit "001".."099" all-probes queries unchanged.
  • Sessions & Transport (OWNSession, OWNCommandSession, OWNEventSession, AsyncTcpTransport) (#188, #192, #195, #196):
    • Bind each negotiation attempt's (reader, writer, close_is_routine) to task-local _NEGOTIATE_STREAMS ContextVar, track in-flight unnegotiated writers, advance attempt sequence counters in close(), abort closed/superseded connect() attempts cleanly, keep test_connection() strictly local, gate OWNCommandSession.send() on _stream_unnegotiated, guard OWNEventSession keepalive/teardown on stream/writer ownership, and guard AsyncTcpTransport.connect() against concurrent disconnect()/connect().
    • Tear down unnegotiated sockets when await _negotiate() exits via CancelledError or any non-OSError BaseException.
    • Reference-count active handshakes (_negotiating_count) to close the mid-negotiation send() window, snapshot (host, port) and password per attempt inside _ACTIVE_CONNECT, guard failure teardown across await _close_streams(), and enforce PytestUnraisableExceptionWarning as an error.
    • Arm SEND_AUTH_COOLDOWN synchronously on negotiation_error before stream close, scope single-attempt connect caps via _CONNECT_MAX_ATTEMPTS ContextVar, and guard connect()/_reconnect() results with isinstance(..., Mapping).
  • Coverage & CI (#188): Closed all remaining partial branches (100.0% statement and 100.0% branch coverage across all 28 modules), upgraded scripts/verify_coverage.py and CI to enforce 100.0% branch coverage, and added codecov.yml locking project/patch coverage at 100%.

Full changelog: v2.0.2...v2.0.3