|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
Device-name, address-classification and 1W-frame codec implementations. More...
#include "proto_codecs.h"#include "proto_constants.h"#include "proto_crypto.h"#include "proto_frame.h"#include <cctype>#include <cstdio>#include <cstring>#include <string>Go to the source code of this file.
Namespaces | |
| namespace | esphome |
| namespace | esphome::home_io_control |
Functions | |
| std::string | esphome::home_io_control::trim_ascii_whitespace (const std::string &value) |
| Trim leading and trailing ASCII whitespace from a string. | |
| std::string | esphome::home_io_control::decode_device_name_payload (const uint8_t *data, uint8_t len) |
| Decode a device-name payload from IO-homecontrol's Latin-1 wire format into UTF-8. | |
| DeviceNameValidationError | esphome::home_io_control::encode_device_name_payload (const std::string &name, uint8_t payload[DEVICE_NAME_WRITE_PAYLOAD_SIZE], std::string &normalized_name) |
| Validate and encode a user-supplied UTF-8 device name into the fixed Latin-1 write payload. | |
| const char * | esphome::home_io_control::device_name_validation_error_name (DeviceNameValidationError error) |
| Return a stable symbolic name for a device-name validation result. | |
| const char * | esphome::home_io_control::device_name_validation_error_description (DeviceNameValidationError error) |
| Return a human-readable explanation for a device-name validation result. | |
| AddressClass | esphome::home_io_control::classify_address (const uint8_t addr[NODE_ID_SIZE]) |
| Classify an IO-Homecontrol 3-byte address. | |
| const char * | esphome::home_io_control::address_class_name (AddressClass address_class) |
| Get a human-readable name for an address classification. | |
| DeviceType | esphome::home_io_control::broadcast_target_type (const uint8_t addr[NODE_ID_SIZE]) |
| Extract the target device type from a typed broadcast address. | |
| DeviceType | esphome::home_io_control::discovery_target_type (const uint8_t addr[NODE_ID_SIZE]) |
| Extract the device type a discovery request is restricted to. | |
| uint8_t | esphome::home_io_control::discovery_slot_count (const uint8_t addr[NODE_ID_SIZE]) |
| Number of answer slots a discovery request opens. | |
| void | esphome::home_io_control::encode_broadcast_address (DeviceType type, uint8_t out[NODE_ID_SIZE]) |
| Encode a device type into its typed-broadcast destination address — the exact inverse of broadcast_target_type(), kept immediately beside it so the pair cannot drift apart. | |
| void | esphome::home_io_control::encode_discovery_address (DeviceType type, uint8_t out[NODE_ID_SIZE]) |
| Encode a device type into its typed discovery address, the inverse of discovery_target_type(). | |
| void | esphome::home_io_control::decode_1w_main_intent (uint8_t main0, uint8_t main1, char *out, size_t out_size) |
| Decode the "main" position/command bytes from a 1W execute payload. | |
| std::optional< float > | esphome::home_io_control::oneway_intent_to_target (uint8_t main0, uint8_t main1) |
| Resolve a 1W main-byte pair to an optimistic IO target position, if unambiguous. | |
| OneWayFrameInfo | esphome::home_io_control::decode_1w_frame (const IoFrame &frame) |
| Decode a parsed 1W frame into a structured OneWayFrameInfo. | |
| const char * | esphome::home_io_control::oneway_target_label (const OneWayFrameInfo &info) |
| The destination label a decoded 1W frame renders as in a log line. | |
| DiscoveryResponseInfo | esphome::home_io_control::decode_discovery_response (const IoFrame &frame, IoDevice &device, std::string &device_id) |
| Decode a discovery-response payload (CMD_DISCOVER_RESP 0x29 or CMD_DISCOVER_SPE_RESP 0x2B — both carry the identical DISCOVERY_RESP_FULL_SIZE layout) into device metadata. | |
| OneWayAddControllerDecodeError | esphome::home_io_control::decode_1w_add_controller (const IoFrame &frame, OneWayAdoptedKey &out) |
| Decode a CMD_ONEWAY_ADD_CONTROLLER (0x30) frame into a recovered controller identity. | |
| LastCommandRecord | esphome::home_io_control::decode_last_command_record (const IoFrame &frame, uint8_t base) |
| Decode the last-command record at base from a status-bearing payload. | |
| bool | esphome::home_io_control::decode_status_update_event (const IoFrame &frame, StatusUpdateEvent &out) |
| Decode the event header of a CMD_STATUS_UPDATE. | |
| bool | esphome::home_io_control::decode_sun_level_event (const IoFrame &frame, uint16_t &out) |
| Decode the sun value of an EVENT_LOCAL_SENSOR report. | |
| bool | esphome::home_io_control::decode_battery_level_event (const IoFrame &frame, uint8_t &out) |
| Decode the level of an EVENT_BATTERY_LEVEL_CHANGE report as a percentage. | |
| bool | esphome::home_io_control::decode_transfer_open_reply (const IoFrame &f, TransferOpenReply &out) |
| Decode a transfer-open reply (layout verified against a VELUX KLR 200 copy session). | |
| uint16_t | esphome::home_io_control::transfer_chunk_count (uint16_t length) |
| Number of CMD_UNKNOWN4A_REQ chunks that cover length bytes: ceil(length / TRANSFER_BLOCK_SIZE). | |
| bool | esphome::home_io_control::decode_transfer_block (const IoFrame &f, uint8_t handle, uint16_t chunk, const uint8_t *&out, uint8_t &out_len) |
| Decode one CMD_UNKNOWN4A_RESP data block. | |
| bool | esphome::home_io_control::decode_limitation_status (const IoFrame &f, LimitationStatus &out) |
| Decode a limitation reply (assumed layout, see LimitationStatus). | |
| bool | esphome::home_io_control::decode_limitation_request (const IoFrame &f, LimitationType &type, uint8_t ¶meter_id) |
| Decode a limitation request (assumed layout [selector] [parameter id] [00]). | |
| uint32_t | esphome::home_io_control::limitation_time_seconds (uint8_t time_raw) |
| Remaining time of a limitation in seconds. | |
Variables | |
| static constexpr uint8_t | esphome::home_io_control::ONEWAY_EXECUTE_MIN_DATA_LEN = 4 |
| Minimum data bytes for decode of execute/activate‑mode intent fields. | |
Device-name, address-classification and 1W-frame codec implementations.
Definition in file proto_codecs.cpp.