Skip to content

Peripherals v1: SDK 0.3.0 runtime - #14

Merged
MarkParker5 merged 70 commits into
developfrom
feature/sdk-runtime
Oct 29, 2026
Merged

MarkParker5 merged 70 commits into
developfrom
feature/sdk-runtime

Conversation

@MarkParker5

Copy link
Copy Markdown
Member

Part of the peripherals v1 wave (SDK 0.3.0): one Peripheral protocol for every radio, service, provider and integration, a frozen shared Platform, runtime-owned lifecycle and retries, and typed static keys (Need[T], SettingsExtraField, ComposeService).

  • Ported to the SDK 0.3.0 peripheral API: peripherals(platform) entry point, self.platform / self.output, typed needs

Needs majordom-integration-sdk 0.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.

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.
- 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
@MarkParker5
MarkParker5 merged commit 0cf97dd into develop Oct 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant