Skip to content

v2.0.0rc1

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 23 May 19:20
· 171 commits to refs/heads/main since this release

What's changed

This is a pre-release version of pyOverkiz 2.0, which has many breaking changes and improved documentation.

Breaking changes

  • Minimum Python version is now Python 3.12 (#1871)
  • client.get_scenarios() replaced by client.get_action_groups() (#1864)
  • Scenario() model replaced by ActionGroup(), where creation_time and metadata are now optional fields (#1864)
  • client.execute_command() and client.execute_commands() replaced by client.execute_action_group() (#1862)
  • OverkizServer class renamed to ServerConfig with additional server and api_type (cloud/local) property (#1867)
  • generate_local_server renamed to create_local_server_config (#1867)
  • client.api_type removed and now available via ServerConfig (e.g. client.server_config.api_type) (#1867)
  • The OverkizClient constructor now requires passing a ServerConfig via server (#1867)
  • The OverkizClient constructor now requires passing a Credentials class via credentials, e.g. UsernamePasswordCredentials(USERNAME, PASSWORD) (#1867)
  • The Device class no longer includes the id property; protocol, gateway_id, device_address, and subsystem_id moved to device.identifier.{} (#1930)
  • Device.data_properties removed (was a non-existent value) (#1930)
  • Various UIClass and UIWidget enums renamed to proper UPPER_SNAKE_CASE (#1925)
  • All custom exception classes renamed from *Exception to *Error (PEP 8); NotSuchTokenException fixed to NoSuchTokenError (#1987)
  • CommandMode renamed to ExecutionMode, cancel_command() to cancel_execution(), execute_scenario() to execute_persisted_action_group(), execute_scheduled_scenario() to schedule_persisted_action_group() (#1997)
  • Execution.state is now ExecutionState instead of str; ActionGroup.id and ActionGroup.oid are now str | None; get_current_execution returns Execution | None (#2007)
  • get_diagnostic_data() return shape changed from flat setup dict to {"setup": ..., "action_groups": ...} (#2016)
  • get_action_groups() returns list[PersistedActionGroup] instead of list[ActionGroup]; ActionGroup no longer has oid, creation_time, or last_update_time fields (#2017)
  • ServerConfig.type renamed to ServerConfig.api_type (#1995)
  • Gateway.connectivity type changed to Connectivity | None (was non-optional) (#1994)
  • Gateway.id and Place.id changed from mutable fields to read-only properties (#1994)
  • States.__getitem__ now raises KeyError instead of returning None — use States.get() for old behavior (#1994)
  • CommandDefinitions.__getitem__ now raises KeyError instead of returning None — use CommandDefinitions.get() for old behavior (#1994)
  • Execution.action_group type changed from list[Action] to ActionGroup | None (#1994)
  • OverkizClient.check_response removed and replaced with module-level pyoverkiz.response_handler.check_response (#1977)
  • pyhumps dependency removed and replaced with internal _case module (#1988)
  • boto3 and warrant-lite moved from required to optional [nexity] extra (#2020)
  • event_listener_id is now a read-only property (#2025)
  • SUPPORTED_SERVERS is now immutable via MappingProxyType (#2025)
  • obfuscate_sensitive_data returns a new dict instead of mutating (#2025)
  • get_device_definition returns Definition model instead of raw dict (#2025)
  • deviceurl parameter renamed to device_url for consistency (#2025)
  • Location model uses None instead of empty string defaults (#2025)
  • Raises OverkizError instead of ValueError for API data issues (#2025)

Fixes

  • client.get_current_executions() now properly typed; Execution() model previously returned list type for action_group where it should be dict (#1864)
  • Device.data_properties removed (non-existent value) (#1930)
  • Setup.id is now None for Local API, as it doesn't support this (#1974)
  • get_current_execution no longer crashes on empty responses (cloud returns {}, local returns [] or null) (#2007)
  • Fixed boolean parsing in Cloud API; "false" is no longer mapped to True (#2015)
  • Fixed overly broad INVALID_FIELD_VALUE error mapping — now requires "Unable to determine action group setup" substring (14f13ae)
  • Removed redundant _refresh_token_if_expired() calls in fetch_events and unregister_event_listener since _post() already handles this (14f13ae)
  • Fixed obfuscate_string regex to properly handle Unicode characters (e.g. accented letters) (#2037)
  • Fixed command_to_enum_name() to treat digits as word boundaries (e.g. discover1WayControllerDISCOVER_1_WAY_CONTROLLER) (#2032)

Features

  • client.execute_action_group() supports multiple execution modes (high priority, internal, geolocated) (#1862)
  • client.execute_action_group() supports multiple device actions in same request (#1862)
  • OverkizClient constructor supports passing a Server enum directly, e.g. OverkizClient(server=Server.SOMFY_EUROPE, ...) (#1867)
  • OverkizClient now has an optional ActionQueue for batching device executions (#1866)
  • Device class has helper methods for retrieving state value, commands, and definition (#1930)
  • Device class has identifier property with protocol, gateway_id, device_address, subsystem_id, base_device_url (#1930)
  • Device class includes additional fields (data_properties, ui_profiles, ui_classifiers, attributes) under device.definition (#1930)
  • UIClass, UIWidget, and UIProfile are auto-generated from server definitions (#1925)
  • Enums with Unknown value inherit from UnknownEnumMixin to reduce repetition (#1925)
  • SDK functions to retrieve device info: controllable types, devices, ui_classes, ui_classifiers, ui_profile, ui_widgets (#1925)
  • Option to disable PII masking in get_diagnostic_data (enabled by default) (#1975)
  • boto3 is now lazy-imported in Nexity Auth Strategy (#1990)
  • start_time, execution_type, execution_sub_type fields added to Execution model (#2007)
  • NoSuchDeviceError and NoSuchActionGroupError exception types added (#2007)
  • OverkizClientSettings for RTS default duration and future extensibility (#2018)
  • structure_response helper consolidates response deserialization (PEP 695 type param syntax) (#2024)
  • Firmware management methods (get_firmware_versions, check_firmware_update, start_firmware_update) and UnsupportedOperationError exception (ef66c7a)
  • Additional sensitive states redacted: internal:CurrentInfraConfigState, core:LocalIPv4AddressState, core:IPAddress, core:MacAddress, core:SerialNumber, core:DeviceSerialNumberState (#2037)
  • lru_cache added to camelize_key for performance parity with _decamelize_key (14f13ae)
  • create_local_server_config now accepts a server parameter (#2025)

Internal / DX

  • Migrated from pyhumps to internal _case module — 8.4x faster decamelize, 94% smaller (#1988)
  • Migrated to cattrs for centralized model structuring — models are now pure @define(kw_only=True) data classes (#1994)
  • boto3 and warrant-lite are now optional [nexity] dependencies (#2020)
  • Added backoff max_time and jitter to all retry decorators (#1993)
  • Replaced magic HTTP status codes with HTTPStatus constants (b034971)
  • Migrated pre-commit to prek (Rust-based) (#1887)
  • Developer documentation on GitHub Pages: imicknl.github.io/python-overkiz-api (#1908)
  • Migration guide for upgrading from v1 to v2 (ef2277f)
  • Enabled ruff rules: PT (#2000), N (#1987), ERA (#1998 batch), FURB/PERF/RSE/RET/PIE (#2001), PYI (#2003), PTH (#2004), A (#2005), PL (#2025), W, LOG, DTZ, FLY, ISC, PGH, SLF, SLOT, TID, INP, ICN, G, BLE, TRY, Q (#1998)
  • Version bumped to 2.0.0rc1 (#2043)