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 , KEY_PUSH_NOT_ACCEPTED , KEY_TRANSFER_REFUSED , KEY_PULL_NOT_OFFERED ,
  KEY_PULL_UNPROVEN , PULLED_KEY_RECEIVED , HUB_KEY_NO_RESPONDER
}
 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 = 6
 Maximum number of advice entries a single attempt can produce (each advice source adds at most one).

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's PROG gesture was overheard.

Proves a gesture happened, not the device's state: the same frames also precede successful pairings (issue #19).

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.

KEY_PUSH_NOT_ACCEPTED 

The device does not take a pushed key: it answered 0x32 with RESULT_COMMAND_UNKNOWN, or it answered discovery as a remote controller and the push failed.

Suggests pairing_key_transfer: pull or auto.

KEY_TRANSFER_REFUSED 

The device answered the key transfer with any other CMD_ERROR_RESP.

KEY_PULL_NOT_OFFERED 

pairing_key_transfer: pull was refused with CMD_ERROR_RESP: the device does not hand out its key.

Suggests forcing pairing_key_transfer: push.

KEY_PULL_UNPROVEN 

The device answered the pull with a key, but sent no 0x3D that verifies under it; the key is not printed.

PULLED_KEY_RECEIVED 

The pull got a different key that the device proved, and a roll-call under it found no registrable device (outcome KEY_RECEIVED).

Says to put the key into the controlling entity's system_key:.

HUB_KEY_NO_RESPONDER 

The pull returned the hub's own key from a node no platform drives, and no device that holds it answered (outcome HUB_KEY_RETURNED).

Says to run Scan Paired Devices.

Definition at line 25 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 171 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 189 of file pairing_advisor.cpp.

Here is the call graph for this function:

◆ 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 217 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 = 6
staticconstexpr

Maximum number of advice entries a single attempt can produce (each advice source adds at most one).

Definition at line 63 of file pairing_advisor.h.