43 uint8_t
src[NODE_ID_SIZE];
120 "a broadcast roll-call pass has no pinned conversation to hold the request channel for");
163 int16_t rssi_dbm, uint8_t key_slot,
const ScanResponder *&entry);
181 uint8_t key_slot,
const TuningConfig &tuning, ScanState &state,
182 uint8_t &attempt, uint8_t total_attempts);
216 const IoDevice *registered,
const RollCallReplyKeys &keys,
Owns the per-hub device table, update callbacks, and linked-remote associations.
Per-hub device table, update-callback fan-out, and linked-remote map.
Self-contained authenticated exchange engine for IO-Homecontrol 2W.
RollCallAttemptResult run_roll_call_sweep(ExchangeEngine &engine, const uint8_t *node_id, const uint8_t *key, uint8_t key_slot, const TuningConfig &tuning, ScanState &state, uint8_t &attempt, uint8_t total_attempts)
Run the full roll-call sweep under one key: every enabled pass on every channel.
ScanAddResult add_scan_responder(ScanResponder *responders, uint8_t &count, uint8_t capacity, const IoFrame &frame, int16_t rssi_dbm, uint8_t key_slot, const ScanResponder *&entry)
Record a responder unless its address is already present.
uint8_t count_enabled_passes(ScanPowerClasses selection)
How many of ROLL_CALL_PASSES selection actually calls.
ScanAddResult
Outcome of add_scan_responder(), so callers can tell a harmless repeat from real loss.
@ ADDED
New responder recorded.
@ DUPLICATE
Already recorded from an earlier reply; nothing changed.
@ FULL
Dropped: SCAN_MAX_REPLIES distinct responders already recorded.
static constexpr uint32_t FREQ_CH1
The protocol uses 3 frequency channels in the 868 MHz ISM band.
static constexpr uint32_t FREQ_CH3
Channel 3: 869.85 MHz (2W only).
constexpr uint8_t SCAN_CHANNEL_COUNT
DeviceType
IO-Homecontrol node types.
constexpr RollCallPass ROLL_CALL_PASSES[]
The roll-call's two fixed frame shapes, low-power first.
ScanPowerClasses
Which power classes scan_paired_devices() calls.
std::string format_roll_call_responder(const ScanResponder &responder, const std::string &device_id, const IoDevice *registered, const RollCallReplyKeys &keys, RollCallKeyDisplay display)
Format one roll-call responder's report line(s).
RollCallAttemptResult
Outcome of one roll-call attempt or sweep, so the caller can surface a build failure.
@ BUILD_FAILED
create_discovery_request() failed; the caller should abort the whole scan.
@ OK
Request built and transmitted (with or without replies).
ListenPolicy
Which channels a listen covers.
@ ROTATE_SKIPPING_REQUEST
The two channels that are not the request channel.
@ ROTATE_ALL_CHANNELS
CH1->CH2->CH3->CH1.
@ HOLD_REQUEST_CHANNEL
Never retunes, never slices. Unicast replies.
static constexpr uint32_t FREQ_CH2
Channel 2: 868.95 MHz (1W and 2W, TX channel).
constexpr bool no_roll_call_pass_holds_request_channel()
A broadcast has no pinned conversation to hold a channel for, so HOLD_REQUEST_CHANNEL can never be a ...
std::string build_hub_key_pull_report(const PulledKeyReportInfo &info, const ScanState &state, DeviceRegistry ®istry)
Build the report for a pull that returned the hub's own key from a node no platform drives.
constexpr uint8_t SCAN_MAX_REPLIES
Maximum distinct responders reported by one scan_paired_devices() call.
std::string build_pulled_key_report(const PulledKeyReportInfo &info, const ScanState &state, DeviceRegistry ®istry)
Build the one report a proven key pull prints after looking for the devices that hold the key.
RollCallKeyDisplay
How a responder line shows the key it answered under.
@ HIDDEN
Never print the key: its check value only. For anything Home Assistant records.
@ BANNERED
Print the key in a snippet, wrapped in the line's own DO-NOT-SHARE block.
@ PLAIN
Print the key in a snippet with no framing: the caller's report supplies one banner.
constexpr uint32_t SCAN_CHANNELS[]
Channels scan_paired_devices() transmits its roll-call request on, one attempt per channel,...
Command builders for the IO‑Homecontrol protocol.
The IO node-type and subtype table: names, entity class, platform and behaviour flags.
What build_pulled_key_report() says about the device that handed over a key.
std::string pairing_device_id
Hex node ID of the device that sent the key.
const uint8_t * hub_key
The hub's own key.
uint8_t subtype
Its subtype from discovery.
const uint8_t * key
The pulled key (AES_KEY_SIZE bytes) it proved it holds.
DeviceType type
Its node type from discovery.
One roll-call frame shape, and how to listen for its replies.
ListenPolicy listen_policy
Channel policy for this pass's reply windows.
uint8_t power_save_mode
POWER_SAVE_LOW_POWER or POWER_SAVE_ALWAYS_ALIVE: the class this pass calls.
bool ack_capable
Set CTRL1_ACK on the 0x2A.
The keys a responder line needs: the one a responder answered under, and the hub's.
bool per_device
True when answered is a per-device key, not the hub's.
const uint8_t * hub
The hub key (slot 0).
const uint8_t * answered
The key of the sweep the responder answered in (always set).
One roll-call responder, decoded on arrival.
uint8_t src[NODE_ID_SIZE]
Responder's node ID; also the dedup key.
uint8_t manufacturer
Raw manufacturer ID; name via manufacturer_name().
bool inverted
Decoded position-inversion flag.
DeviceType type
Decoded device type.
bool has_extended
Whether manufacturer/flags above are present.
int16_t rssi_dbm
RSSI of the reply that produced this entry.
bool metadata_complete
Whether type/subtype were present in the payload.
uint8_t key_slot
Which key of the sweep it answered under: 0 is the hub key, n the n-th per-device key (RollCallKeys).
uint8_t flags
Multi Information Byte; decode with DISCOVERY_FLAGS_* masks.
uint8_t subtype
Decoded device subtype.
Accumulated state of one scan, threaded through every sweep.
uint8_t count
Entries in use.
bool truncated
A responder was dropped because the array was full.
ScanResponder responders[SCAN_MAX_REPLIES]
Distinct responders, in arrival order.
Runtime tuning configuration for pairing and radio diagnostics.