|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
Status: Accepted · Recorded: 2026-08
ESPHome ships generic components for two of the three radio chips this project supports — SX1276 (sx127x) and SX1262 (sx126x) — built around sending and receiving payloads through a conventional radio API. The third, LR1121, has no built-in component at all.
The protocol needs things those components do not expose, because they were never designed for this access pattern:
Option 2. Each chip gets a driver owning its SPI transport, register/opcode handling, and IRQ management, exposing only what the protocol needs through the shared RadioDriver interface (ADR 0001).
Drivers reach the bus through a small SpiAccess interface, which the hub implements by delegating to ESPHome's SPIDevice. That keeps drivers independent of ESPHome's SPI framework — and constructible in host tests against a scripted SPI double.
flowchart LR
D["Radio driver<br/>(SX1276 / SX1262 / LR1121)"]
A["SpiAccess<br/>(interface)"]
C["IOHomeControlComponent<br/>implements SpiAccess"]
H["ESPHome SPIDevice → real bus"]
T["Scripted SPI double<br/>(host unit tests)"]
D -->|"spi_transfer / read / write"| A
A -.->|production| C --> H
A -.->|tests| T