Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches
esphome::home_io_control::advisor Namespace Reference

Classes

struct  PairingAdvice
 One piece of advice, with the node/RSSI it pertains to (if any). More...

Enumerations

enum class  PairingAdviceCode : uint8_t {
  NONE , ONE_WAY_PAIRING_TRAFFIC , CHANNEL_BUSY_LBT_DELAYED , FOREIGN_CONTROLLER_PAIRING ,
  RF_SILENT
}
 Actionable diagnosis derived from a completed pairing attempt's telemetry. More...

Functions

uint8_t analyze_pairing_telemetry (const PairingTelemetry &telemetry, const uint8_t own_node_id[NODE_ID_SIZE], PairingAdvice out[PAIRING_ADVICE_MAX])
 Inspect a completed pairing attempt's telemetry and produce actionable advice.
const char * pairing_advice_code_name (PairingAdviceCode code)
std::string pairing_advice_message (const PairingAdvice &advice)

Variables

static constexpr uint8_t PAIRING_ADVICE_MAX = 4
 Maximum number of advice entries a single attempt can produce (one slot per non-NONE code).

Enumeration Type Documentation

◆ PairingAdviceCode

Actionable diagnosis derived from a completed pairing attempt's telemetry.

Enumerator
NONE 

Nothing actionable to report.

ONE_WAY_PAIRING_TRAFFIC 

A 1W remote is pairing to the target — not 2W learning mode.

CHANNEL_BUSY_LBT_DELAYED 

LBT retries were consumed while a source kept repeating; the reported subject_node is a best-effort correlation (LBT's carrier-sense doesn't parse frames, so the actual jammer may not be among the parsed events attributed here).

FOREIGN_CONTROLLER_PAIRING 

A discovery response was seen addressed to another controller.

RF_SILENT 

Nothing at all was heard during the whole window.

Definition at line 24 of file pairing_advisor.h.

Function Documentation

◆ analyze_pairing_telemetry()

uint8_t esphome::home_io_control::advisor::analyze_pairing_telemetry ( const PairingTelemetry & telemetry,
const uint8_t own_node_id[NODE_ID_SIZE],
PairingAdvice out[PAIRING_ADVICE_MAX] )

Inspect a completed pairing attempt's telemetry and produce actionable advice.

Read-only: never mutates telemetry, never touches the radio or pairing state machine.

Parameters
telemetryCompleted (or in-progress) telemetry for one pairing attempt.
own_node_idThis controller's node ID, used to detect discovery responses addressed to a different controller.
outOutput buffer, must hold at least PAIRING_ADVICE_MAX entries.
Returns
Number of advice entries written to out (0 if nothing actionable was found).

Definition at line 104 of file pairing_advisor.cpp.

Here is the call graph for this function:

◆ pairing_advice_code_name()

const char * esphome::home_io_control::advisor::pairing_advice_code_name ( PairingAdviceCode code)
Returns
Short, stable code string for the ;advice= result-sensor field (e.g. "1w_traffic").

Definition at line 121 of file pairing_advisor.cpp.

◆ pairing_advice_message()

std::string esphome::home_io_control::advisor::pairing_advice_message ( const PairingAdvice & advice)
Returns
The full actionable, human-readable WARN message for one piece of advice.

Definition at line 137 of file pairing_advisor.cpp.

Here is the call graph for this function:

Variable Documentation

◆ PAIRING_ADVICE_MAX

uint8_t esphome::home_io_control::advisor::PAIRING_ADVICE_MAX = 4
staticconstexpr

Maximum number of advice entries a single attempt can produce (one slot per non-NONE code).

Definition at line 43 of file pairing_advisor.h.