The identity of the device behind a serial proxy port (API 1.18).
Clients that subscribe with SubscribeSerialProxyIdentityRequest get
one SerialProxyIdentity per advertised port, then another whenever a
port's identity changes. Home Assistant uses it to tell physical
devices of the same kind apart, for example two identical Zigbee
sticks. It matches on manufacturer and product whatever the
source.
An adapter reports identities through the optional
Espex.SerialProxy.identity/1 callback and pushes changes with
Espex.push_serial_proxy_identity/2. See "Identity" in
Espex.SerialProxy.
Fields
instance— theEspex.SerialProxy.Infoinstance this describessource—:nonewhen the port carries no identity (the default),:usbwhen it is read from the descriptors of the USB device behind the portconnected?— the device is present and usable on this porterror?— the USB host stack refused the descriptor query; leave the strings andusbids emptymanufacturer,product,serial_number— descriptor strings,""for:noneand for:usbwhile nothing is connectedusb— a map of the USB descriptor ids, sent only for:usb::vendor_id,:product_id,:bcd_device,:interface_number(thebInterfaceNumberthe port is bound through),:interface_classand:port_number(the port's index among those a vendor driver exposes on the interface). Missing keys are 0.
Summary
Functions
Build an %Identity{} from keyword options.
Convert to the SerialProxyIdentity protobuf message.
Types
@type source() :: :none | :usb
@type usb() :: %{ optional(:vendor_id) => non_neg_integer(), optional(:product_id) => non_neg_integer(), optional(:bcd_device) => non_neg_integer(), optional(:interface_number) => non_neg_integer(), optional(:interface_class) => non_neg_integer(), optional(:port_number) => non_neg_integer() }