espex 0.10.0 advertises API 1.15 and later. This page covers what 1.15 added.

What's new

API 1.15 adds DeviceCapabilitiesRequest. A client on 1.15 or later asks for the device's optional features with it and reads them from DeviceCapabilitiesResponse, ignoring the matching DeviceInfoResponse fields:

DeviceCapabilitiesResponseReplaces in DeviceInfoResponse
bluetooth_proxy.feature_flagsbluetooth_proxy_feature_flags
zwave_proxy.feature_flags, zwave_proxy.home_idzwave_proxy_feature_flags, zwave_home_id
serial_proxiesserial_proxies

What espex implements

espex answers the request from the same state it builds DeviceInfoResponse from (Espex.DeviceConfig.to_device_capabilities_response/2), so the two answers on one connection always agree:

espex reports no voice assistant features and no Bluetooth MAC address. Later versions add fields to this message: Sendspin and the device wizard in API 1.18.

Usage

Nothing to configure: the answer follows the adapters you start espex with.

Espex.start_link(
  device_config: [name: "my-device"],
  bluetooth_proxy: MyApp.BLEProxy,
  serial_proxy: MyApp.SerialPorts
)

Like DeviceInfoResponse, the answer is fixed when the connection is accepted. After Espex.update_adapters/2, call Espex.disconnect_clients/1 so clients reconnect and ask again.

Upgrade notes

None for adapters: the message is built from what they already report.