pub struct BtHome {Show 13 fields
pub encrypted: bool,
pub undecryptable: bool,
pub counter: Option<u32>,
pub trigger_based: bool,
pub packet_id: Option<u8>,
pub measurements: Vec<Measurement>,
pub events: Vec<Event>,
pub text: Vec<String>,
pub raw: Vec<String>,
pub device_type: Option<u16>,
pub firmware: Option<String>,
pub unknown_object: Option<u8>,
pub truncated: bool,
}Expand description
A BTHome v2 frame.
Fields§
§encrypted: boolThe frame was encrypted.
undecryptable: boolThe frame was encrypted and could not be decrypted: no key, a wrong key, or no address to build the nonce from. Nothing else is set.
counter: Option<u32>The encryption counter, when encrypted. A receiver should reject a counter that does not increase.
trigger_based: boolThe device sends at irregular intervals (on a button press, say).
packet_id: Option<u8>The packet id (object 0x00): the same id twice is a repeat.
measurements: Vec<Measurement>Measurements and states.
events: Vec<Event>Button and dimmer events.
text: Vec<String>Text objects (0x53).
raw: Vec<String>Raw objects (0x54), hex.
device_type: Option<u16>Device type id (0xF0).
firmware: Option<String>Firmware version (0xF1 or 0xF2), dotted.
unknown_object: Option<u8>The first object id this decoder does not know; decoding stopped there.
truncated: boolThe frame ended inside an object.
Trait Implementations§
impl StructuralPartialEq for BtHome
Auto Trait Implementations§
impl Freeze for BtHome
impl RefUnwindSafe for BtHome
impl Send for BtHome
impl Sync for BtHome
impl Unpin for BtHome
impl UnsafeUnpin for BtHome
impl UnwindSafe for BtHome
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more