v2.0.0
This is the stable release of pyOverkiz 2.0, the result of a large modernization effort with many breaking changes, new capabilities, and greatly improved documentation. If you are upgrading from v1, please read the migration guide.
Highlights
- Modern, typed API surface — models are now pure
cattrs-structured data classes, exceptions follow PEP 8 (*Error), and many enums were regenerated from server definitions. - Typed events —
fetch_events()now returns strongly-typedEventsubclasses (device, execution, failure, gateway, and zone events) you can narrow withisinstance. - Rexel support — full OAuth2 PKCE authentication, externally-managed tokens, and multi-gateway discovery/selection.
- Local API tooling — endpoints for local token management, developer mode, and local pairing.
- Leaner dependencies & faster structuring —
pyhumpsreplaced by an internal_casemodule,boto3/warrant-litemade optional, and ~43% faster response structuring.
Breaking changes
Python & client construction
- Minimum Python version is now Python 3.12 (#1871)
- The
OverkizClientconstructor now requires aServerConfigviaserverand aCredentialsclass viacredentials, e.g.UsernamePasswordCredentials(USERNAME, PASSWORD)(#1867) OverkizServerclass renamed toServerConfig, with additionalserverandapi_type(cloud/local) properties (#1867)ServerConfig.typerenamed toServerConfig.api_type(#1995)generate_local_serverrenamed tocreate_local_server_config(#1867)client.api_typeremoved — now available viaclient.server_config.api_type(#1867)
Action groups & execution
client.get_scenarios()replaced byclient.get_action_groups()(#1864)Scenario()model replaced byActionGroup()(#1864)client.execute_command()/client.execute_commands()replaced byclient.execute_action_group()(#1862)CommandModerenamed toExecutionMode,cancel_command()tocancel_execution(),execute_scenario()toexecute_persisted_action_group(),execute_scheduled_scenario()toschedule_persisted_action_group()(#1997)get_action_groups()returnslist[PersistedActionGroup]instead oflist[ActionGroup];ActionGroupno longer hasoid,creation_time, orlast_update_timefields (#2017)Execution.stateis nowExecutionStateinstead ofstr;ActionGroup.id/ActionGroup.oidare nowstr | None;get_current_executionreturnsExecution | None(#2007)Execution.action_grouptype changed fromlist[Action]toActionGroup | None(#1994)
Device & models
- The
Deviceclass no longer includes theidproperty;protocol,gateway_id,device_address, andsubsystem_idmoved todevice.identifier.{}(#1930) Device.data_propertiesremoved (was a non-existent value) (#1930)Gateway.idandPlace.idchanged from mutable fields to read-only properties (#1994)States.__getitem__andCommandDefinitions.__getitem__now raiseKeyErrorinstead of returningNone— use.get()for the old behavior (#1994)Locationmodel usesNoneinstead of empty string defaults (#2025)
Events
- The
Eventbase was slimmed to universal fields;fetch_events()now returns typedEventsubclasses dispatched by name (DeviceStateChangedEvent,ExecutionStateChangedEvent,FailureEvent,GatewayEventsubtypes,ZoneEventsubtypes, device lifecycle events, …). Code that accessed event-specific fields off the baseEventshould narrow withisinstancefirst. failure_type_codewas removed fromFailureEvent(never sent by the API there); it remains onExecutionStateChangedEvent.
Enums & exceptions
- Various
UIClassandUIWidgetenums renamed to proper UPPER_SNAKE_CASE (#1925) - All custom exception classes renamed from
*Exceptionto*Error(PEP 8);NotSuchTokenExceptionfixed toNoSuchTokenError(#1987) - Raises
OverkizErrorinstead ofValueErrorfor API data issues (#2025)
Misc API surface
get_diagnostic_data()return shape changed from a flat setup dict to{"setup": ..., "action_groups": ...}(#2016)OverkizClient.check_responseremoved, replaced by module-levelpyoverkiz.response_handler.check_response(#1977)event_listener_idis now a read-only property (#2025)SUPPORTED_SERVERSis now immutable viaMappingProxyType(#2025)obfuscate_sensitive_datareturns a new dict instead of mutating (#2025)get_device_definitionreturns aDefinitionmodel instead of a raw dict (#2025)deviceurlparameter renamed todevice_urlfor consistency (#2025)
Dependencies
pyhumpsdependency removed and replaced with internal_casemodule (#1988)boto3andwarrant-litemoved from required to an optional[nexity]extra (#2020)
Features
Authentication & gateways
- Rexel authentication — OAuth2 PKCE interactive login (
RexelAuthStrategy) and externally-managed tokens (RexelTokenCredentials/RexelTokenAuthStrategy), plus gateway discovery/selection (GatewayCandidate,SupportsGatewaySelection) (#2090) - Added Rexel server data definitions and regenerated enums/docs (#2094)
- Added Rexel
Energeasy Connectgateway types and corrected the Energeasy Connect mapping with V3 variants (#2100, #2110) OverkizClientconstructor supports passing aServerenum directly, e.g.OverkizClient(server=Server.SOMFY_EUROPE, ...)(#1867)
Local API
- Local token management endpoints (
generate_local_token,activate_local_token,get_local_tokens,delete_local_token), aLocalTokenmodel, plus developer-mode and local-pairing endpoints (#2112)
Action execution
client.execute_action_group()supports multiple execution modes (high priority, internal, geolocated) (#1862)client.execute_action_group()supports multiple device actions in the same request (#1862)OverkizClienthas an optionalActionQueuefor batching device executions (#1866)Command.parametersnow acceptsdict/listvalues, which some commands require (e.g.setAbsenceStartDate) (#2089, #2091)OverkizClientSettingsfor RTS default duration and future extensibility (#2018)
Devices, events & definitions
Deviceclass has helper methods for retrieving state value, commands, and definition (#1930)Deviceclass has anidentifierproperty withprotocol,gateway_id,device_address,subsystem_id,base_device_url(#1930)Deviceclass exposes additional fields (data_properties,ui_profiles,ui_classifiers,attributes) underdevice.definition(#1930)- Typed event subclasses for device state changes, executions, failures, gateway events, zone events, and device lifecycle events, with reliable identity fields guaranteed non-
Noneafterisinstancenarrowing (#2061 and related) Eventauto-converts dicts indevice_statestoEventState, so direct construction (e.g. in tests) no longer needs manual wrapping (#2061)UIClass,UIWidget, andUIProfileare auto-generated from server definitions; enums with anUnknownvalue inherit fromUnknownEnumMixin(#1925)- SDK functions to retrieve device info: controllable types, devices, ui_classes, ui_classifiers, ui_profile, ui_widgets (#1925)
- Firmware management methods (
get_firmware_versions,check_firmware_update,start_firmware_update) andUnsupportedOperationErrorexception NoSuchDeviceErrorandNoSuchActionGroupErrorexception types added (#2007)start_time,execution_type,execution_sub_typefields added toExecutionmodel (#2007)- Added HLRR_WIFI Hitachi states and
hi_kumo_europedevice data (#2086)
Diagnostics & privacy
- Option to disable PII masking in
get_diagnostic_data(enabled by default) (#1975) - Additional sensitive states redacted: IP addresses, MAC/serial numbers, labels, and lat/long location states, among others (#2037, #2098)
Fixes
client.get_current_executions()is now properly typed;Execution.action_grouppreviously had the wrong type (#1864)Setup.idis nowNonefor the Local API, which doesn't support it (#1974)get_current_executionno longer crashes on empty responses (cloud returns{}, local returns[]ornull) (#2007)- Fixed boolean parsing in the Cloud API;
"false"is no longer mapped toTrue(#2015) - Raise typed
ServiceUnavailableErrorwhen a vendor OAuth token endpoint returns an HTTP 5xx (with HTML body) instead of leaking an aiohttpContentTypeError(#2099) - Surface gateway
subType: 0asNonerather than conflating it with an unknown sub-type (#2111) - Fixed overly broad
INVALID_FIELD_VALUEerror mapping — now requires the "Unable to determine action group setup" substring - Removed redundant
_refresh_token_if_expired()calls infetch_eventsandunregister_event_listener(already handled by_post()) - Fixed
obfuscate_stringregex to handle Unicode characters (e.g. accented letters) (#2037) - Fixed
command_to_enum_name()to treat digits as word boundaries (e.g.discover1WayController→DISCOVER_1_WAY_CONTROLLER) (#2032) - Fixed enum generation to produce
_4Tinstead of4_Tsuffixes (#2057)
Internal / DX
- ~43% faster response structuring by eliminating the recursive decamelize pre-pass in favor of single-pass cattrs rename hooks (#2062)
- Migrated to
cattrsfor centralized model structuring — models are now pure@define(kw_only=True)data classes (#1994) - Migrated from
pyhumpsto an internal_casemodule — 8.4x faster decamelize, 94% smaller;lru_cacheadded tocamelize_key(#1988) boto3andwarrant-liteare now optional[nexity]dependencies, withboto3lazy-imported in the Nexity auth strategy (#2020, #1990)- A typed
structure_response/structure_responsehelper consolidates response deserialization (PEP 695 type-param syntax) (#2024) - Harvest enum values from controllable definitions and fixtures, with improved generation workflow (#2085, #2084, #2082)
- Added
backoffmax_timeandjitterto all retry decorators (#1993) - Replaced magic HTTP status codes with
HTTPStatusconstants - Stop Dependabot from ratcheting dependency floors upward (#2121)
- Pinned all GitHub Actions to full-length commit SHAs (security hardening) (#2122)
- Migrated pre-commit to
prek(Rust-based) (#1887) - Developer documentation on GitHub Pages: imicknl.github.io/python-overkiz-api (#1908)
- Comprehensive v1 → v2 migration guide, with gaps filled and enum/auth breaking changes documented (#2119, #2102)
- Documented that
ExecutionModeis Cloud API only (#2088) - Expanded ruff rule coverage (PT, N, ERA, FURB/PERF/RSE/RET/PIE, PYI, PTH, A, PL, W, LOG, DTZ, FLY, ISC, PGH, SLF, SLOT, TID, INP, ICN, G, BLE, TRY, Q)