Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
esphome::home_io_control::IoDevice Struct Reference

Runtime state of a paired IO‑Homecontrol device. More...

#include <proto_device_model.h>

Collaboration diagram for esphome::home_io_control::IoDevice:

Public Attributes

uint8_t node_id [NODE_ID_SIZE] {}
 Device's 3‑byte radio address.
DeviceType type {DeviceType::UNKNOWN}
 Device type (shutter, awning, etc.).
uint8_t subtype {0}
 Device subtype (manufacturer‑specific).
char name [DEVICE_NAME_BUFFER_SIZE] {}
 Cached UTF-8 device name decoded from Latin-1 wire payloads.
float position {UNKNOWN_POSITION}
 Current position: 0=open, 100=closed, or UNKNOWN_POSITION.
float tilt {UNKNOWN_POSITION}
 Current tilt: 0=closed, 100=open, or UNKNOWN_POSITION.
float target {UNKNOWN_POSITION}
 Target position the device is moving toward.
bool is_stopped {true}
 True if device is not moving.
bool inverted {false}
 True if open/close positions are swapped (e.g., horizontal awning).
bool optimistic_state {true}
 True if target may be set ahead of a confirming poll/response.
bool dimmable {false}
 True for a LIGHT-class device configured dimmable: true in YAML.
uint8_t last_result_code {0}
 Last CMD_ERROR_RESP result byte (0 = none recorded).
uint32_t last_result_at_ms {0}
 millis() timestamp of last_result_code, 0 when none recorded.
uint32_t last_status {0}
 millis() timestamp of last received status.
int16_t last_rssi_dbm {RSSI_UNKNOWN_DBM}
 Most recent raw RSSI sample (dBm), or RSSI_UNKNOWN_DBM.
int16_t rssi_ema_scaled {RSSI_UNKNOWN_DBM}
 Smoothed RSSI as fixed point in 1/RSSI_EMA_SCALE dBm — read through device_rssi_ema_dbm(), updated by detail::update_link_health() in hub_internal.h.
uint32_t last_seen_ms {0}
 millis() of the last frame received from this device (any command), 0 = never.
uint16_t exchange_timeout_count {0}
 Cumulative count of outbound exchanges to this device with no valid response (see detail::record_exchange_timeout() in hub_internal.h).
uint16_t exchange_attempt_count {0}
 Cumulative attempts (ExchangeEngine::DebugInfo::tries, 1-based per exchange) across those timed-out exchanges only — attempts within an ultimately successful exchange are not counted (deliberate scope limit).

Detailed Description

Runtime state of a paired IO‑Homecontrol device.

Definition at line 241 of file proto_device_model.h.

Member Data Documentation

◆ dimmable

bool esphome::home_io_control::IoDevice::dimmable {false}

True for a LIGHT-class device configured dimmable: true in YAML.

Not a protocol-level fact (the wire gives no dimmable-capability signal) — set from platform_light.cpp's YAML config via DeviceRegistry::set_dimmable(), purely for accurate profile-name logging.

Definition at line 252 of file proto_device_model.h.

◆ exchange_attempt_count

uint16_t esphome::home_io_control::IoDevice::exchange_attempt_count {0}

Cumulative attempts (ExchangeEngine::DebugInfo::tries, 1-based per exchange) across those timed-out exchanges only — attempts within an ultimately successful exchange are not counted (deliberate scope limit).

Definition at line 275 of file proto_device_model.h.

◆ exchange_timeout_count

uint16_t esphome::home_io_control::IoDevice::exchange_timeout_count {0}

Cumulative count of outbound exchanges to this device with no valid response (see detail::record_exchange_timeout() in hub_internal.h).

Definition at line 273 of file proto_device_model.h.

◆ inverted

bool esphome::home_io_control::IoDevice::inverted {false}

True if open/close positions are swapped (e.g., horizontal awning).

Definition at line 250 of file proto_device_model.h.

◆ is_stopped

bool esphome::home_io_control::IoDevice::is_stopped {true}

True if device is not moving.

Definition at line 249 of file proto_device_model.h.

◆ last_result_at_ms

uint32_t esphome::home_io_control::IoDevice::last_result_at_ms {0}

millis() timestamp of last_result_code, 0 when none recorded.

Definition at line 262 of file proto_device_model.h.

◆ last_result_code

uint8_t esphome::home_io_control::IoDevice::last_result_code {0}

Last CMD_ERROR_RESP result byte (0 = none recorded).

See command_result_name()/is_limitation_result() in proto_constants.h. Cleared by the next successful status/command reply for this device. Note: 0 is also the real RESULT_UNKNOWN_STATUS_REPLY wire value, so that specific explicit reply is indistinguishable here from "nothing recorded yet" — a known, accepted tradeoff.

Definition at line 257 of file proto_device_model.h.

◆ last_rssi_dbm

int16_t esphome::home_io_control::IoDevice::last_rssi_dbm {RSSI_UNKNOWN_DBM}

Most recent raw RSSI sample (dBm), or RSSI_UNKNOWN_DBM.

Definition at line 264 of file proto_device_model.h.

◆ last_seen_ms

uint32_t esphome::home_io_control::IoDevice::last_seen_ms {0}

millis() of the last frame received from this device (any command), 0 = never.

Definition at line 272 of file proto_device_model.h.

◆ last_status

uint32_t esphome::home_io_control::IoDevice::last_status {0}

millis() timestamp of last received status.

Definition at line 263 of file proto_device_model.h.

◆ name

char esphome::home_io_control::IoDevice::name[DEVICE_NAME_BUFFER_SIZE] {}

Cached UTF-8 device name decoded from Latin-1 wire payloads.

Definition at line 245 of file proto_device_model.h.

◆ node_id

uint8_t esphome::home_io_control::IoDevice::node_id[NODE_ID_SIZE] {}

Device's 3‑byte radio address.

Definition at line 242 of file proto_device_model.h.

◆ optimistic_state

bool esphome::home_io_control::IoDevice::optimistic_state {true}

True if target may be set ahead of a confirming poll/response.

Definition at line 251 of file proto_device_model.h.

◆ position

float esphome::home_io_control::IoDevice::position {UNKNOWN_POSITION}

Current position: 0=open, 100=closed, or UNKNOWN_POSITION.

Definition at line 246 of file proto_device_model.h.

◆ rssi_ema_scaled

int16_t esphome::home_io_control::IoDevice::rssi_ema_scaled {RSSI_UNKNOWN_DBM}

Smoothed RSSI as fixed point in 1/RSSI_EMA_SCALE dBm — read through device_rssi_ema_dbm(), updated by detail::update_link_health() in hub_internal.h.

Fixed point (rather than whole dBm) keeps sub-dBm EMA contributions from vanishing to integer truncation, so the average converges on a stable signal instead of stalling up to RSSI_EMA_SCALE−1 dBm away. RSSI_UNKNOWN_DBM before the first sample.

Definition at line 265 of file proto_device_model.h.

◆ subtype

uint8_t esphome::home_io_control::IoDevice::subtype {0}

Device subtype (manufacturer‑specific).

Definition at line 244 of file proto_device_model.h.

◆ target

float esphome::home_io_control::IoDevice::target {UNKNOWN_POSITION}

Target position the device is moving toward.

Definition at line 248 of file proto_device_model.h.

◆ tilt

float esphome::home_io_control::IoDevice::tilt {UNKNOWN_POSITION}

Current tilt: 0=closed, 100=open, or UNKNOWN_POSITION.

Definition at line 247 of file proto_device_model.h.

◆ type

DeviceType esphome::home_io_control::IoDevice::type {DeviceType::UNKNOWN}

Device type (shutter, awning, etc.).

Definition at line 243 of file proto_device_model.h.


The documentation for this struct was generated from the following file: