Repository navigation
Peripherals v1: SDK 0.3.0 runtime - #14
Merged
Merged
Conversation
Also let the failed-pairing test fail after connecting again: the Hub's device lookup now comes before the connection.
# Conflicts: # majordom_esphome/controller.py # pyproject.toml # tests/test_improv.py
- Need DNS-SD, and the router for Improv, instead of the discovery services - Offer each proxy as ble/esphome-proxy, withdrawn when its node goes or the integration stops - Tell the router a proxy's free connection slots
The Hub's wifi_credentials callable is gone from the SDK's platform: read it from getattr, the node was never given a network.
The SDK needs it (type parameter defaults). CI tests 3.13 only.
Its settings are a nested model it is constructed with, its devices go through its own repository, and the package exports peripherals().
A connected node with a proxy is a BLEProxy ESPHome brings along: the runtime binds it to the router and drops it when ESPHome stops. The lending tests run ESPHome under the SDK's runtime.
Optional needs come and go without restarting ESPHome: Improv listens through the router bound now, and Thread devices need nothing here from the border router.
The controller reports through self.output, reads Wi-Fi from the platform's facts and its devices through the platform's repository; the device models are typed through Device and Parameter generics.
Discoveries carry the controller's key, so the Hub creates their devices in its scope.
stop() also ends the setups over Bluetooth at once.
The Hub deletes the device record of a failed pairing, though the node requires the key from then on.
The Hub unpairs a node before it deletes its record, so dropping the key on unpair left a hard-deleted keyless node locked out.
# Conflicts: # pyproject.toml
- Declare bleak-retry-connector (py-improv-ble-client imports it) - Gate the new cover stop_tilt and toggle commands - Refuse to start without a bound zeroconf
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.