Repository navigation
Peripherals v1: SDK 0.3.0 runtime - #9
Merged
Merged
Conversation
The bound link's dialect picks the zigpy library, ZigBeeSettings carry the network and transmit power, and probe() recognises sticks of every zigpy backend for the hub. Drops the env vars.
zigpy only emits connection_lost and doesn't reconnect; after the radio service restarted, the coordinator stayed dead behind a failing watchdog.
# Conflicts: # majordom_zigbee/controller.py
The SDK needs it (type parameter defaults). CI tests 3.13 only. Not relocked: the lock follows the SDK 0.3.0 release.
The package exports peripherals(platform), the settings are a nested model the constructor takes, and a lost radio fails the controller through the runtime instead of an integration error.
The runtime stops the controller from the task that reports the lost radio: stop() cancelled and gathered that task too, which hung the loop.
The runtime stops a controller whose start failed and starts the same instance again: stop() no longer assumes a radio was opened, nor closes the one of a previous run twice.
The package exports ZigpyDriver beside the controller for the runtime's USB scanner, in place of the controller's probe().
Devices and discoveries are scoped by the key. The runtime reacts to a report in its own task, so stop() no longer spares the current one.
zigpy's new() starts the radio before it returns the application, so a start that failed or was cut short left it out of stop()'s reach. Create it without the radio first, as ZHA does, then start it.
A stop the runtime abandons inside shutdown() kept the dead application and the old session's discoveries, and every later stop waited on it.
A replugged stick or a restarted service in front of the radio no longer counts as a crash: Zigbee reopens the radio with backoff and reports it lost (is_still_running=False) only once every attempt in a row failed. An unplug stops Zigbee through its lost need, which ends the attempts.
Channel, PAN ID and extended PAN ID only ever applied when a network was formed: they now show the network the radio runs, and a change to them is refused. The network key is no longer a setting.
The need accepts only exact dialects, so the aliases and auto-probe of the environment variable era were never reached.
The USB driver no longer probes for ziggurat, a server's WebSocket, and zigpy-cc, which can't be installed next to zigpy 2, is gone.
ZigpyDriver tells the baud its probe found the stick at, and tries the bauds zigpy-deconz and zigpy-blz still list the zigpy 1 way. The controller opens the radio with its endpoint's baud and flow control.
This reverts commit cc86ebf: documentation goes to the docs repo.
# Conflicts: # poetry.lock # pyproject.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the peripherals v1 wave (SDK 0.3.0): one
Peripheralprotocol for every radio, service, provider and integration, a frozen sharedPlatform, runtime-owned lifecycle and retries, and typed static keys (Need[T],SettingsExtraField,ComposeService).peripherals(platform)entry point,self.platform/self.output, typed needsNeeds
majordom-integration-sdk0.3.0 on PyPI: CI installs the released SDK, so it stays red until the SDK PR is merged and released. Merge and release order: SDK → integrations → Hub.Reviewed.