Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
exchange_engine.h File Reference

Self-contained authenticated exchange engine for IO-Homecontrol 2W. More...

#include "hub_exchange.h"
#include "hub_decisions.h"
#include "pairing_telemetry.h"
#include "proto_frame.h"
#include "proto_timing.h"
#include "radio_interface.h"
#include "tuning_config.h"
#include <cstdint>
#include <functional>
Include dependency graph for exchange_engine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  esphome::home_io_control::ExchangeEngine
 Authenticated exchange engine — outbound and inbound protocol flows. More...
struct  esphome::home_io_control::ExchangeEngine::DebugInfo
 Snapshot of the last exchange attempt for diagnostics. More...

Namespaces

namespace  esphome
namespace  esphome::home_io_control

Detailed Description

Self-contained authenticated exchange engine for IO-Homecontrol 2W.

ExchangeEngine encapsulates the outbound authenticated exchange state machine and the inbound challenge-response authentication path. It owns:

  • send_and_receive() — retry loop with challenge/response support.
  • authenticate_request() — verify a device-initiated command via HMAC.
  • collect_broadcast_responses() — send once, report every matching reply in a window.
  • Transmit with LBT (listen-before-talk) and frequency hopping.
  • Exchange debug snapshot captured on every attempt.

The engine holds double-pointer and raw-pointer references to its owner's state (radio driver, node/system key, tuning config) so that changes made by the hub after construction (e.g., radio driver allocation in setup(), direct member writes in unit tests) are automatically visible.

All transmit and channel-hop traffic funnels through this engine: the hub's thin transmit_frame_() / hop_frequency_() wrappers delegate here, and PairingEngine holds a direct reference for its own exchanges.

Definition in file exchange_engine.h.