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

Outbound authenticated exchange state machine (non-pairing flows). More...

#include "hub_exchange.h"
#include "hub_decisions.h"
#include "hub_core.h"
#include "proto_commands.h"
#include "proto_crypto.h"
#include "esphome/core/application.h"
#include "esphome/core/log.h"
#include <algorithm>
#include <cstring>
Include dependency graph for hub_exchange.cpp:

Go to the source code of this file.

Namespaces

namespace  esphome
namespace  esphome::home_io_control

Variables

static const char *const esphome::home_io_control::TAG = "home_io_control.exchange"

Detailed Description

Outbound authenticated exchange state machine (non-pairing flows).

Implements IOHomeControlComponent::send_and_receive_() and its stepwise helpers: transmit_request_(), wait_for_first_response_(), handle_authentication_(), wait_for_final_response_(). These functions encapsulate the retry loop, challenge-response authentication, and final response handling for commands sent to paired devices.

The exchange logic is separated from hub_core.cpp to keep the main loop and device-management concerns distinct from the protocol state machine. Pairing flows (discovery/key exchange) live in hub_pairing.cpp.

Definition in file hub_exchange.cpp.