|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
IO-Homecontrol device-type model, capabilities and runtime device state. More...
#include "proto_device_features.h"#include "proto_dhw.h"#include "proto_heating.h"#include "proto_sizes.h"#include <cstdint>#include <optional>#include <string>Go to the source code of this file.
Classes | |
| struct | esphome::home_io_control::OptimisticState |
| What the hub predicted ahead of confirmation, kept apart from what the device reported. More... | |
| struct | esphome::home_io_control::StopCandidate |
| The last "stopped" report a device sent away from its own target, kept to confirm the next. More... | |
| struct | esphome::home_io_control::IoDevice |
| Runtime state of a paired IO‑Homecontrol device. More... | |
Namespaces | |
| namespace | esphome |
| namespace | esphome::home_io_control |
Functions | |
| const char * | esphome::home_io_control::device_type_name (DeviceType type) |
| Convert a DeviceType to a lowercase string identifier. | |
| bool | esphome::home_io_control::is_known_device_type (uint16_t raw) |
| True when a raw 10-bit device-type value is a named DeviceType enumerator. | |
| const char * | esphome::home_io_control::yaml_device_type_name (DeviceType type) |
| Return the YAML-friendly device-type name for types exposed in the Python schema. | |
| DeviceCapabilityClass | esphome::home_io_control::device_capability_class (DeviceType type) |
| Map a raw IO‑Homecontrol type to the closest ESPHome/Home Assistant entity family. | |
| const char * | esphome::home_io_control::device_capability_class_name (DeviceType type) |
| Get a human‑readable name for a capability class. | |
| bool | esphome::home_io_control::device_supports_position_control (DeviceType type) |
| Does this device type support precise position control (0–100)? | |
| bool | esphome::home_io_control::device_supports_binary_control (DeviceType type) |
| Does this device type support binary on/off control? | |
| bool | esphome::home_io_control::device_takes_execute_position (DeviceType type) |
| Does this device type take position EXECUTEs (a percent, on / off, or stop in the main parameter)? | |
| bool | esphome::home_io_control::device_supports_status_requests (DeviceType type) |
| Does this device type support status request commands (0x03)? | |
| bool | esphome::home_io_control::device_supports_lock_control (DeviceType type) |
| Does this device type support binary lock/unlock control via execute commands? | |
| bool | esphome::home_io_control::device_supports_heat_level_control (DeviceType type) |
| Does this device take a heat level as its position (exterior heating)? | |
| bool | esphome::home_io_control::device_has_no_motion (DeviceType type, uint8_t subtype) |
| Does this device never move, so a status reply must not start the movement settle loop? | |
| bool | esphome::home_io_control::device_supports_climate_control (DeviceType type, uint8_t subtype) |
| Can a climate entity drive this device? | |
| DeviceType | esphome::home_io_control::decode_packed_device_type (uint8_t type_msb, uint8_t type_subtype) |
| Decode the 10-bit node type from two packed metadata bytes. | |
| uint8_t | esphome::home_io_control::decode_packed_device_subtype (uint8_t type_subtype) |
| Decode a protocol-packed device subtype from the second metadata byte. | |
| void | esphome::home_io_control::encode_packed_device_type (DeviceType type, uint8_t subtype, uint8_t &type_msb, uint8_t &type_subtype) |
| Encode a DeviceType/subtype pair into the two-byte packed metadata format used by discovery responses — the inverse of decode_packed_device_type()/decode_packed_device_subtype(). | |
| const char * | esphome::home_io_control::device_operation_profile_name (DeviceType type, uint8_t subtype) |
| Human‑readable operation profile name for a device kind. | |
| std::string | esphome::home_io_control::format_device_type_diagnostic (DeviceType type) |
| Human-readable device type string for diagnostics, including the raw numeric value. | |
| std::string | esphome::home_io_control::format_device_type_for_yaml (DeviceType type) |
| Build the YAML value for a device's io_device_type key. | |
| std::string | esphome::home_io_control::build_device_yaml_snippet (DeviceType type, uint8_t subtype, const std::string &device_id, bool metadata_complete, bool low_power, const std::string &system_key_hex=std::string()) |
| Build the ready-to-paste YAML block describing a device, for both a fully-decoded device and one whose type/subtype wasn't reported. | |
| const char * | esphome::home_io_control::cover_command_name (CoverCommand cmd) |
| Get a human-readable name for a CoverCommand. | |
| const char * | esphome::home_io_control::rain_sensor_state_name (RainSensorState state) |
| Get a human-readable name for a RainSensorState. | |
| const char * | esphome::home_io_control::travel_speed_name (TravelSpeed speed) |
| Get the name a travel speed is configured and published under. | |
| bool | esphome::home_io_control::parse_travel_speed (const std::string &name, TravelSpeed &speed) |
| Look up a travel speed by the name travel_speed_name() gives it. | |
| ExecutionState | esphome::home_io_control::execution_state_of (uint8_t status_byte) |
| Read the execution state out of byte 0 of a status reply. | |
| const char * | esphome::home_io_control::execution_state_name (ExecutionState state) |
| Get a human-readable name for an ExecutionState. | |
| const char * | esphome::home_io_control::battery_state_name (BatteryState state) |
| Get the name a battery level is published under. | |
| BatteryState | esphome::home_io_control::decode_battery_state (uint8_t status_byte) |
| Decode the coarse battery level from byte 1 of a status payload (CMD_PRIVATE_RESP to a status poll, or CMD_STATUS_UPDATE). | |
| void | esphome::home_io_control::resolve_device_features (IoDevice &dev) |
| Resolve a device's capability bits and inversion from its kind and its YAML overrides. | |
| void | esphome::home_io_control::note_moving_evidence (IoDevice &dev, uint32_t now_ms) |
| Record that a device is (believed to be) travelling right now. | |
| void | esphome::home_io_control::note_moving_until (IoDevice &dev, uint32_t until_ms) |
| Record when the travel the device is reporting should be over, from its own remaining time. | |
| void | esphome::home_io_control::clear_moving_evidence (IoDevice &dev) |
| Forget that a device was travelling: it reported itself stopped (including in the ack to a STOP), a linked remote was heard stopping it, or it stayed silent to an exchange sent while it was believed moving. | |
| int16_t | esphome::home_io_control::rssi_scaled_to_dbm (int16_t scaled) |
| Convert an rssi_ema_scaled fixed-point value to whole dBm (round half away from zero). | |
| int16_t | esphome::home_io_control::device_rssi_ema_dbm (const IoDevice &dev) |
| A device's smoothed RSSI in whole dBm. | |
| float | esphome::home_io_control::effective_target (const IoDevice &dev) |
| The main-position target a consumer should act on: the prediction when one stands, otherwise the device's own last reported target. | |
| float | esphome::home_io_control::effective_tilt (const IoDevice &dev) |
| The slat angle a consumer should act on, prediction first. | |
| bool | esphome::home_io_control::effective_is_stopped (const IoDevice &dev) |
| Whether a consumer should treat the device as at rest, prediction first. | |
| void | esphome::home_io_control::decode_position_report (uint16_t target_raw, uint16_t current_raw, bool is_stopped, float &target, float &position) |
| Decode target/current position values from a status frame. | |
| bool | esphome::home_io_control::has_reached_target_position (float target, float position) |
| Has the device reached its target within tolerance? | |
| float | esphome::home_io_control::decode_tilt_report (uint16_t tilt_raw) |
| Decode tilt angle from raw 16‑bit value. | |
Variables | |
| static constexpr uint16_t | esphome::home_io_control::STATUS_POS_MAX = 0xC800 |
| In status responses, position is encoded as a 16-bit value where 0x0000 = fully open (0%) and 0xC800 = fully closed (100%). | |
| static constexpr uint16_t | esphome::home_io_control::STATUS_POS_TOLERANCE_RAW = 100 |
| Target-reached tolerance expressed in raw IO-homecontrol position units. | |
| static constexpr uint8_t | esphome::home_io_control::DEVICE_METADATA_SIZE = 2 |
| Packed device metadata uses two bytes where the high 8 bits carry the upper type bits and the low byte carries both the remaining type bits and the 6-bit manufacturer subtype. | |
| static constexpr uint8_t | esphome::home_io_control::DEVICE_TYPE_LOW_BITS_SHIFT = 2 |
| static constexpr uint8_t | esphome::home_io_control::DEVICE_TYPE_HIGH_BITS_SHIFT = 6 |
| static constexpr uint16_t | esphome::home_io_control::DEVICE_TYPE_WIRE_MASK = 0x3FF |
| The node-type wire field is ten bits wide. | |
| static constexpr uint8_t | esphome::home_io_control::DEVICE_SUBTYPE_MASK = 0x3F |
| static constexpr float | esphome::home_io_control::UNKNOWN_POSITION = 212.0F |
| Sentinel value meaning "position is not known yet". | |
| static constexpr uint8_t | esphome::home_io_control::DEVICE_NAME_BUFFER_SIZE = 32 |
| Device name storage including null terminator. | |
| static constexpr int16_t | esphome::home_io_control::RSSI_UNKNOWN_DBM = INT16_MIN |
| Sentinel value meaning "no RSSI sample recorded yet" for last_rssi_dbm/rssi_ema_scaled. | |
| static constexpr int16_t | esphome::home_io_control::RSSI_EMA_SCALE = 8 |
| EMA weight denominator and fixed-point scale for IoDevice::rssi_ema_scaled. | |
IO-Homecontrol device-type model, capabilities and runtime device state.
DeviceType/DeviceCapabilityClass, the capability predicates, packed-metadata decoders, cover commands, position/tilt report decoding and the IoDevice runtime struct. The per-(type, subtype) names and flags live in the table in proto_device_types.h.
Definition in file proto_device_model.h.