|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
Status: Accepted · Recorded: 2026-08
The protocol — frames, cryptography, command building — must behave identically on every radio chip. The hub — exchanges, pairing, poll scheduling — must not know register layouts or IRQ semantics.
Without an enforced separation, a quirk fixed for one radio leaks into shared code, and adding a chip means auditing every layer for hidden assumptions instead of touching one seam.
Three layers, each with a narrow contract to the one above it.
flowchart TB
subgraph ESPHome["ESPHome integration layer"]
E["Cover · Light · Switch · Lock · Button<br/>+ Python schema & codegen"]
end
subgraph Hub["Controller layer — chip-agnostic"]
H["IOHomeControlComponent<br/>+ collaborators (ADR 0004)"]
end
subgraph Radio["Radio driver layer — one per chip"]
RD["RadioDriver (abstract)"]
S76["RadioSX1276"]
S62["RadioSX1262"]
LR["RadioLR1121"]
RD -.->|"implemented by"| S76
RD -.-> S62
RD -.-> LR
end
subgraph Proto["Protocol layer — radio-agnostic"]
P["Frames · crypto · codecs · command builders"]
end
E --> H
H -->|"only through RadioDriver virtuals"| RD
H --> P
S76 --> P
S62 --> P
LR --> P
setup() is the single composition root: its select_and_construct_radio_() is the only function in the codebase that names a concrete driver class.