22#include "esphome/core/hal.h"
111 [[nodiscard]] uint32_t
session_freq()
const {
return this->session_freq_; }
118 return this->
awaiting_reply() && (millis() - this->session_rx_ms_) < this->session_window_ms_;
126 return this->discover_reply_pending_ &&
135 const auto remaining =
static_cast<int32_t
>(this->discover_reply_due_ms_ - millis());
136 return remaining > 0 ?
static_cast<uint32_t
>(remaining) : 0;
200 void handle_discover_(
const IoFrame &frame);
202 void set_configured_type_();
204 void handle_discover_confirm_(
const IoFrame &frame);
206 void handle_key_init_(
const IoFrame &frame);
208 void handle_key_transfer_(
const IoFrame &frame);
212 void handle_node_verify_req_(
const IoFrame &frame);
217 void handle_node_verify_challenge_(
const IoFrame &frame);
221 void send_reply_(
const IoFrame &frame);
229 void schedule_discover_reply_(
const IoFrame &search,
const IoFrame &resp);
234 const uint8_t *node_id_;
239 uint32_t rx_freq_hz_{FREQ_CH2};
243 uint32_t session_freq_{FREQ_CH2};
245 uint32_t session_rx_ms_{0};
249 IoFrame pending_discover_resp_{};
251 bool discover_reply_pending_{
false};
253 uint32_t discover_reply_due_ms_{0};
254 DeviceRegistry ®istry_;
257 std::function<void(
bool)> armed_callback_;
Owns the per-hub device table, update callbacks, and linked-remote associations.
Abstract radio driver for IO-Homecontrol.
Injected-capability callback aliases shared by the hub's collaborator objects.
std::string build_key_extraction_report(const uint8_t node_id[NODE_ID_SIZE], const uint8_t key[AES_KEY_SIZE])
Build the ready-to-paste 2W system-key-extraction report: node_id:/system_key: as a home_io_control: ...
@ ARMED_IDLE
Armed, listening for a discovery request (0x28).
@ SENT_DISCOVER_RESP
Replied to discovery (0x29); waiting for discovery-confirm (0x2C) or key-init (0x31).
@ DISARMED
Not armed; 0x28/0x2C/0x31/0x32 traffic is ignored.
constexpr uint8_t discovery_att_class(uint8_t flags)
Extract the ATT class field from a discovery response's Multi Information Byte.
static constexpr uint32_t key_extraction_session_window_ms(uint8_t multi_info)
How long after receiving a frame it answers the responder stays on that frame's channel (SESSION_HOLD...
static constexpr uint32_t KEY_EXTRACTION_SESSION_WINDOW_MS
The session window for the default Multi Information Byte (KEY_EXTRACTION_DISCOVER_RESP_FLAGS).
std::function< bool(const IoFrame &frame, uint32_t freq_hz, uint16_t preamble)> TransmitFrameFn
Puts a frame on air on a given channel via the hub's protected transmit_frame_().
constexpr uint32_t att_class_ms(uint8_t att_class)
Turnaround time of an ATT class in milliseconds: 5, 10, 20 or 40 (each class doubles it).
std::function< void(const char *name, uint32_t delay_ms, std::function< void()> callback)> NamedTimeoutFn
Schedules a named, replace-on-same-name timeout on the hub's ESPHome scheduler.
Pure decision logic for the device-role "Accept Foreign Pairing" (system-key extraction) responder.
Command builders for the IO‑Homecontrol protocol.
IO-Homecontrol command IDs, result codes and protocol enumerations.
IO-Homecontrol 2W frame container: control bytes, IoFrame and (de)serialization.
Fundamental IO-Homecontrol frame and crypto size constants.
Physical-layer radio and timing parameters for the IO-Homecontrol protocol.
Parsed IO‑Homecontrol frame (CTRL0/1 + addresses + command + data).
All runtime tunable parameters for pairing and radio diagnostics.
Context for one key-extraction arm cycle.
ResponderState state
Current state.