Home IO Control
ESPHome add-on for IO-Homecontrol devices
Loading...
Searching...
No Matches

Runtime tuning configuration for pairing and radio diagnostics. More...

#include "proto_frame.h"
#include "proto_timing.h"
#include <cstdint>
#include <optional>
#include <string>
#include <vector>
Include dependency graph for tuning_config.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  esphome::home_io_control::TuningConfig
 All runtime tunable parameters for pairing and radio diagnostics. More...

Namespaces

namespace  esphome
namespace  esphome::home_io_control

Enumerations

enum class  esphome::home_io_control::SX1262RxBandwidth : uint8_t {
  esphome::home_io_control::BW_58_6_KHZ = 0x0C , esphome::home_io_control::BW_78_2_KHZ = 0x1B , esphome::home_io_control::BW_117_3_KHZ = 0x0B , esphome::home_io_control::BW_156_2_KHZ = 0x09 ,
  esphome::home_io_control::BW_187_2_KHZ = 0x07
}
 Valid SX1262 RX bandwidth options (kHz register values). More...
enum class  esphome::home_io_control::SX1276RxBandwidth : uint8_t {
  esphome::home_io_control::BW_20_8_KHZ = 0x14 , esphome::home_io_control::BW_41_7_KHZ = 0x13 , esphome::home_io_control::BW_62_5_KHZ = 0x03 , esphome::home_io_control::BW_83_3_KHZ = 0x12 ,
  esphome::home_io_control::BW_125_0_KHZ = 0x02
}
 Valid SX1276 RX bandwidth options (RegRxBw register bytes). More...
enum class  esphome::home_io_control::LR1121RxBandwidth : uint8_t {
  esphome::home_io_control::BW_39_0_KHZ = 0x1C , esphome::home_io_control::BW_46_9_KHZ = 0x14 , esphome::home_io_control::BW_58_6_KHZ = 0x0C , esphome::home_io_control::BW_78_2_KHZ = 0x1B ,
  esphome::home_io_control::BW_117_3_KHZ = 0x0B , esphome::home_io_control::BW_156_2_KHZ = 0x1A , esphome::home_io_control::BW_187_2_KHZ = 0x12
}
 Valid LR1121 RX bandwidth options (register values). More...
enum class  esphome::home_io_control::DiscoveryCommand : uint8_t { esphome::home_io_control::DISCOVER = 0x28 , esphome::home_io_control::DISCOVER_SPE = 0x2A , esphome::home_io_control::DISCOVER_ALT = 0x2E }
 Discovery request command codes. More...

Functions

float esphome::home_io_control::sx1262_bandwidth_to_khz (SX1262RxBandwidth bw)
 Convert a bandwidth enum to the numeric kHz value used in YAML/logs.
std::string esphome::home_io_control::sx1262_bandwidth_to_string (SX1262RxBandwidth bw)
 Format a bandwidth enum as its YAML/UI option string (bare kHz number, e.g.
std::optional< SX1262RxBandwidthesphome::home_io_control::sx1262_bandwidth_from_string (const std::string &value)
 Convert a YAML bandwidth string to the enum value.
float esphome::home_io_control::sx1276_bandwidth_to_khz (SX1276RxBandwidth bw)
 Convert an SX1276 bandwidth enum to the numeric kHz value used in YAML/logs.
std::string esphome::home_io_control::sx1276_bandwidth_to_string (SX1276RxBandwidth bw)
 Format an SX1276 bandwidth enum as its YAML/UI option string (bare kHz number).
std::optional< SX1276RxBandwidthesphome::home_io_control::sx1276_bandwidth_from_string (const std::string &value)
 Convert a YAML SX1276 bandwidth string to the enum value.
float esphome::home_io_control::lr1121_bandwidth_to_khz (LR1121RxBandwidth bw)
 Convert an LR1121 bandwidth enum to the numeric kHz value used in YAML/logs.
std::string esphome::home_io_control::lr1121_bandwidth_to_string (LR1121RxBandwidth bw)
 Format an LR1121 bandwidth enum as its YAML/UI option string (bare kHz number).
std::optional< LR1121RxBandwidthesphome::home_io_control::lr1121_bandwidth_from_string (const std::string &value)
 Convert a YAML LR1121 bandwidth string to the enum value.
std::string esphome::home_io_control::tuning_config_snapshot (const TuningConfig &cfg)
 Format the current tuning configuration as a one-line YAML-compatible snapshot.
std::string esphome::home_io_control::tuning_config_full_snapshot (const TuningConfig &cfg)
 Format the current tuning configuration as a full one-line snapshot.
std::string esphome::home_io_control::tuning_update_log_line (const std::string &name, const std::string &value)
 Format a single tuning update for the log.
const uint8_t * esphome::home_io_control::resolve_discovery_destination (uint8_t command, bool destination_auto, const uint8_t destination[NODE_ID_SIZE])
 Resolve the destination address for a discovery command.
std::optional< DiscoveryCommandesphome::home_io_control::discovery_command_from_string (const std::string &value)
 Parse a discovery command string (e.g., "0x28") into the enum.
std::string esphome::home_io_control::discovery_command_to_string (DiscoveryCommand cmd)
 Format a discovery command enum for YAML/logs.
std::string esphome::home_io_control::discovery_destination_to_string (bool destination_auto, const uint8_t destination[NODE_ID_SIZE])
 Format a destination option for YAML/logs.
std::string esphome::home_io_control::discovery_payload_to_string (bool payload_enabled, uint8_t payload)
 Format a payload option for YAML/logs.
std::string esphome::home_io_control::discovery_commands_to_string (const std::vector< DiscoveryCommand > &commands)
 Format the ordered discovery command list for logs.
std::string esphome::home_io_control::discovery_commands_to_csv (const std::vector< DiscoveryCommand > &commands)
 Format the ordered discovery command list as a UI/preset option string.

Variables

static constexpr uint16_t esphome::home_io_control::SX1262_RESPONSE_PREAMBLE = 8
 SX1262-specific preamble for response/continuation frames within an exchange.
static constexpr uint16_t esphome::home_io_control::SX1262_POST_TX_SETTLE_US = 500
 SX1262-specific post-TX settling delay before re-entering RX.
static constexpr uint16_t esphome::home_io_control::SX1276_RESPONSE_PREAMBLE = 12
 SX1276 preamble for response/continuation frames within an exchange.
static constexpr uint16_t esphome::home_io_control::SX1276_DISCOVERY_HOP_SLICE_MS = 5
 Per-channel dwell while SX1276 pairing discovery hops across channels.
static constexpr uint16_t esphome::home_io_control::SX1262_DISCOVERY_HOP_SLICE_MS = 200
 Per-channel dwell while SX1262 pairing discovery hops across channels.
static constexpr uint16_t esphome::home_io_control::LR1121_RESPONSE_PREAMBLE = SX1262_RESPONSE_PREAMBLE
 LR1121-specific preamble for response/continuation frames within an exchange.
static constexpr uint16_t esphome::home_io_control::LR1121_POST_TX_SETTLE_US = SX1262_POST_TX_SETTLE_US
 LR1121-specific post-TX settling delay before re-entering RX.
static constexpr uint16_t esphome::home_io_control::LR1121_DISCOVERY_HOP_SLICE_MS = SX1262_DISCOVERY_HOP_SLICE_MS
 Per-channel dwell while LR1121 pairing discovery hops across channels.

Detailed Description

Runtime tuning configuration for pairing and radio diagnostics.

Provides a centralized, non-persistent tuning layer used by the hub and radio drivers. The TuningConfig struct carries all tunable parameters and helpers for logging and applying defaults.

Definition in file tuning_config.h.