Skip to content

v2.0.0-b11 - New Subsystems, Expose Support & Typed Exceptions

Pre-release
Pre-release

Choose a tag to compare

@GreenGrassBlueOcean GreenGrassBlueOcean released this 21 Oct 07:46
bf65616

OWNd 2.0.0b11 Pre-release

The eleventh beta pre-release bundles every PR merged since v2.0.0-b10 (#83–#133): new WHO 3, 6/8, 14, 17, 22 and 25 subsystems, extended WHO 0, 1, 4, 13/1013, 16 and 18 support, the virtual-device expose helpers used by OpenWebNet-HA/MyHOME, a typed exception hierarchy, and PEP 621 / 639 packaging with aiohttp and defusedxml as the only runtime dependencies.

pip install --pre OWNd==2.0.0b11

Added

  • WHO 0 (OWNScenarioEvent): Decode WHAT 40–46 programming and lock states (#90).
  • WHO 1 (OWNLightingCommand, OWNLightingEvent):
    • Presets, step dimming, fixed timers, and variable timer builders (#93).
    • WHAT 19 anomaly / fault state modeling (#115).
    • Public APL normalization (normalize_where) and DALI / RGB / HSV / XY / colour-temperature accessors (#123).
  • WHO 3 (OWNLoadEvent, OWNLoadCommand): Load control parser, command builders, typed measurement properties for dimensions 1–4 (voltage, current, power, energy), and gateway profile gating (#104, #124).
  • WHO 4 (OWNHeatingEvent, OWNHeatingCommand): Consolidated firmware-validated heating support including season frames (WHAT 0 / WHAT 1), central unit status (WHAT 22–24, 30–31), holiday/vacation program handling (WHAT 115#P, 13DDD#P, 3101–3103), and F453AV / F461 live-plant conformance (#83, #97, #116, #119, #120).
  • WHO 6 & WHO 8 (OWNDoorEntryEvent, OWNDoorEntryCommand): Door entry, lock, camera, and intercom call dialects (#100).
  • WHO 13 & WHO 1013 (OWNGatewayEvent, OWNGatewayCommand):
    • Typed gateway clock, timezone, kernel_version, distribution_version, and diagnostic properties and builders (#112, closes #111).
    • H4684 / LGRH4684 / MH201 gateway identification profiles and WHO 1013 device diagnostic frame support (#118).
  • WHO 14 (OWNActuatorLockEvent, OWNActuatorLockCommand): Actuator lock and unlock (WHAT 0 / WHAT 1) event parser and command builders (#130).
  • WHO 16 (OWNSoundEvent, OWNSoundCommand): Sound system media transport commands, tuner frequency/station decoding, and L4561N source selection (#95, #123).
  • WHO 17 (OWNSceneCommand): Complete scene command factory surface (#99).
  • WHO 18 (OWNEnergyEvent, OWNEnergyCommand):
    • Dimension 1200 automatic power-update stream lifecycle properties (stream_duration, is_streaming_active, energy_type), stop_sending_instant_power, and request_active_power / get_instant_power builders (#92, #102, #107).
    • Stop&Go (F16EB) automatic reset breaker commands and status flag dimensions 212, 250, 251–263 (#113, #122).
  • WHO 22 (OWNSoundDiffusionEvent, OWNSoundDiffusionCommand): Advanced sound diffusion 2.0 events and commands (power-on, atomic off, matrix routing, paging, keypad, 100 kHz tuner frequency, presets, 8-character RDS, and MH200NProfile support) (#103, #127).
  • WHO 25 (OWNScenarioPlusEvent, OWNScenarioPlusCommand): Scenario-plus WHAT 11–15 parser and command builders (#91, #106).
  • Virtual-device expose support (#129):
    • Query and translation helpers on OWNMessage (is_status_request, is_dimension_request, is_dimension_writing, is_dimension_reply, effective_what) and per-WHO query properties (is_brightness_query, is_shutter_status_query, is_temperature_query, is_clock_query, is_dimension_query, is_auto_update_command).
    • Reply and write builders: OWNLightingCommand.report_brightness, OWNAutomationCommand.report_shutter_level, OWNHeatingCommand.report_temperature / write_temperature / encode_temperature, OWNGatewayCommand.set_* / report_* for time, date and datetime, and OWNEnergyCommand.report_* for dimensions 113, 51–54 and 1200.
    • OWNHeatingEvent.probe_temperature for 3-digit external probes.
    • GatewayProfile flags supports_dimension_response_injection, supports_who4_command_injection and supports_who18_response_injection (bool | None; None means unverified, only F461Profile sets them from live captures).
  • Typed exceptions (#132): OWNError, OWNConnectionError, OWNTimeoutError, OWNAuthError, OWNNackError and OWNProtocolError in OWNd.exceptions, re-exported from OWNd and OWNd.connection; session.last_error, opt-in raise_on_error on the connect, test and send APIs, and on_auth_error / raise_on_auth_error on OWNEventSession.
  • Firmware Oracle & Documentation Conformance:
    • Firmware oracle conformance suite across emulated gateways (#84, #117, #126).
    • Unified documentation synchronization sentinel (scripts/sync_documentation.py) verifying WHO catalog, gateway profile tables, and coverage badges (#101, #105, #108).

Changed

  • Packaging & Dependencies:
    • Normalize version string to canonical PEP 440 (2.0.0b11).
    • Migrate package metadata to PEP 621 [project] and PEP 639 license = "Apache-2.0" in pyproject.toml.
    • Drop unused pytz and python-dateutil runtime dependencies in favor of Python 3.11+ standard library datetime and zoneinfo (with tzdata included in [test] on Windows).
  • Input Validation & Connection Reliability:
    • Harden bounds and infeasible input validation across WHO subsystems and connection sessions (#121, #125, #127, #128).
    • Only retry idempotent status queries in OWNCommandSession after mid-send transport loss (#131).
    • OWNCommandSession.send() reconnects at most once, with a 2 s cooldown, instead of running the full backoff while holding the send lock; routine send logs move from INFO to DEBUG (#132). Callers that need the full 5-attempt retry, such as after closing an idle socket on a single-slot MH201, call connect() first (#133).
  • API:
    • set_datetime_to_now, set_date_to_today and set_time_to_now accept a datetime.tzinfo as well as an IANA name; transport send accepts str | OWNMessage; OWNd.connection uses static re-exports (#132).
    • OWNd.connection.gateway no longer resolves find_gateways / get_gateway / get_port through the package at call time, so tests must patch OWNd.connection.gateway.* (#133).
    • WHO 13 builders raise ValueError for UTC offsets that are not whole hours (for example Asia/Kolkata), which the 0HH / 1HH field cannot carry, instead of truncating them (#129).

Upgrade notes

  • WHO 13 builders, including set_*_to_now, raise ValueError for UTC offsets that are not whole hours (Asia/Kolkata, Asia/Kathmandu, America/St_Johns) instead of truncating them (#129).
  • OWNd.connection.gateway no longer looks up find_gateways / get_gateway / get_port through the package, so tests have to patch OWNd.connection.gateway.* (#133).
  • OWNCommandSession.send() reconnects only once. Callers that need the full 5-attempt connect window call connect() first (#132, #133).
  • The profile injection flags are None on every profile except F461Profile. Consumers must treat None as unverified, not as False (#129).

Full changelog: v2.0.0-b10...v2.0.0-b11