|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
The IO node-type and subtype table: names, entity class, platform and behaviour flags. More...
#include "proto_constants.h"#include "proto_device_features.h"#include "proto_device_model.h"#include <cstdint>#include <string>Go to the source code of this file.
Classes | |
| struct | esphome::home_io_control::DeviceTypeInfo |
| One row of the node-type / subtype table. More... | |
| struct | esphome::home_io_control::NamedPosition |
| One named position: its feature bit, its main-parameter value and the command that sends it. More... | |
Namespaces | |
| namespace | esphome |
| namespace | esphome::home_io_control |
| namespace | esphome::home_io_control::device_type_flags |
| Bit flags carried by a DeviceTypeInfo row: identity facts. Capabilities are DeviceFeatures. | |
Functions | |
| const DeviceTypeInfo * | esphome::home_io_control::find_device_type_info (DeviceType type, uint8_t subtype, DeviceModel model) |
| Look up the table row for a (type, subtype, model). | |
| const DeviceTypeInfo * | esphome::home_io_control::find_exact_device_type_info (DeviceType type, uint8_t subtype) |
| Look up the table row with exactly this (type, subtype), without falling back. | |
| const DeviceTypeInfo * | esphome::home_io_control::find_device_model_info (DeviceType type, uint8_t subtype, DeviceModel model) |
| Look up the model row with exactly this (type, subtype, model), without falling back. | |
| bool | esphome::home_io_control::device_offers_models (DeviceType type, uint8_t subtype) |
| Does this exact (type, subtype) have model rows below it? | |
| bool | esphome::home_io_control::device_has_platform (DeviceType type, uint8_t subtype) |
| Can an ESPHome platform drive this (type, subtype) today? | |
| const char * | esphome::home_io_control::device_platform_name (DeviceType type, uint8_t subtype) |
| Name of the ESPHome platform that drives this (type, subtype). | |
| bool | esphome::home_io_control::device_is_experimental (DeviceType type, uint8_t subtype) |
| Is this (type, subtype) a kind no capture or report has confirmed on a real device? | |
| DeviceCapabilityClass | esphome::home_io_control::device_capability_class (DeviceType type, uint8_t subtype) |
| Capability class of a (type, subtype), subtype-aware. | |
| DeviceFeatures | esphome::home_io_control::device_features (DeviceType type, uint8_t subtype, DeviceModel model) |
| Capability bits of a (type, subtype, model). | |
| DeviceFeatures | esphome::home_io_control::undeclared_kind_features (DeviceCapabilityClass entity_class) |
| Features of a device kind that has no table row, or that is not declared at all. | |
| std::string | esphome::home_io_control::format_device_kind (DeviceType type, uint8_t subtype) |
| Human-readable description of a (type, subtype) for logs and reports. | |
| std::string | esphome::home_io_control::format_device_ids (DeviceType type, uint8_t subtype) |
| Wire values of a (type, subtype), for logs that must stay readable without the table. | |
| constexpr DeviceFeatures | esphome::home_io_control::main_parameter_only_variant (DeviceFeatures type_features) |
| The features of a subtype-58 variant of a kind. | |
| constexpr uint16_t | esphome::home_io_control::main_parameter_of (uint8_t high, uint8_t low=0) |
| Combine the two bytes of a main parameter as the EXECUTE payload carries them. | |
| const NamedPosition * | esphome::home_io_control::find_named_position (CoverCommand command) |
| The named position a command sends. | |
| bool | esphome::home_io_control::command_main_parameter (CoverCommand command, uint16_t &main_parameter) |
| The main parameter a named command sends. | |
| constexpr bool | esphome::home_io_control::device_accepts_main_parameter (DeviceFeatures features, uint16_t main_parameter) |
| True when a device with these features accepts this main-parameter value in an EXECUTE. | |
| constexpr uint16_t | esphome::home_io_control::position_main_parameter (uint8_t position) |
| The main parameter set_device_position() sends for a percent position or the POS_STOP sentinel. | |
Variables | |
| static constexpr uint8_t | esphome::home_io_control::SUBTYPE_MAIN_PARAMETER_ONLY = 58 |
| Subtype value that marks a device taking the main parameter only, on any node type. | |
| static constexpr uint8_t | esphome::home_io_control::SUBTYPE_HEATER_WITH_SETPOINT = 1 |
| Subtype of the electrical heater (node type 52) with an adjustable setpoint, the one driven over the private register protocol (proto_heating.h). | |
| static constexpr uint8_t | esphome::home_io_control::device_type_flags::YAML_SELECTABLE = 1U << 0U |
| Type rows only: the type's identifier is accepted by the YAML io_device_type key (hub_validators.py DEVICE_TYPE_OPTIONS lists exactly these). | |
| static constexpr uint8_t | esphome::home_io_control::device_type_flags::HAS_PLATFORM = 1U << 1U |
| An ESPHome platform of the row's capability class can drive this (type, subtype). | |
| static constexpr uint8_t | esphome::home_io_control::device_type_flags::STANDALONE_NAME = 1U << 2U |
| Subtype rows only: name already is the complete description ("window lock") and is printed alone, instead of being appended to the type's name ("roller shutter, with projection"). | |
| static constexpr uint8_t | esphome::home_io_control::device_type_flags::EXPERIMENTAL = 1U << 3U |
| Subtype rows only: no capture or report has confirmed this kind on a real device, so what the row says is inferred. | |
| static constexpr uint16_t | esphome::home_io_control::MAIN_PARAMETER_OPEN = 0x0000 |
| Main parameter that opens (or switches off) a device: percent 0. | |
| static constexpr uint16_t | esphome::home_io_control::MAIN_PARAMETER_CLOSED = STATUS_POS_MAX |
| Main parameter that closes (or switches on) a device: 100 percent, the top of the position scale. | |
| static constexpr uint16_t | esphome::home_io_control::MAIN_PARAMETER_STOP = main_parameter_of(POS_STOP) |
| Main parameter that stops a movement. | |
| static constexpr uint16_t | esphome::home_io_control::MAIN_PARAMETER_INVALID = 0xFFFF |
| What position_main_parameter() returns for a value that is no position; no device accepts it. | |
| constexpr NamedPosition | esphome::home_io_control::NAMED_POSITIONS [] |
| The named positions. | |
The IO node-type and subtype table: names, entity class, platform and behaviour flags.
One row per (node type, subtype) the project knows by name. Every per-type fact that is not a bare number — the lowercase identifier, the YAML selectability, the capability class, whether a platform can drive the device yet, and the capability bits — is read from that table, so there is exactly one place to add a type or a subtype. A lookup falls back from (type, subtype) to (type, 0) to "not in the table".
Subtype names agree across manufacturers, so rows are keyed on (type, subtype). A row names a wire type, not a product: products that share a (type, subtype) are told apart by data the wire does not carry, which is why the names stay generic. Where two such products need different handling, the (type, subtype) row has model rows below it (DeviceModel, YAML io_model:): a model row states its own whole capability word, exactly like a subtype row, and keeps the class and platform of the row above it. A model is declared, never learned, so a lookup takes it as an explicit argument and DeviceModel::NONE is the (type, subtype) row itself (ADR 0067).
Definition in file proto_device_types.h.