85 switch (power_class) {
196 switch (manufacturer) {
197 case MANUFACTURER_VELUX:
200 case MANUFACTURER_SOMFY:
336 for (
const auto &identity : this->identities_) {
337 if (identity.id ==
id)
344 [[nodiscard]]
const std::vector<OneWayControllerIdentity> &
all()
const {
return this->identities_; }
347 [[nodiscard]]
bool empty()
const {
return this->identities_.empty(); }
350 std::vector<OneWayControllerIdentity> identities_;
The configured 1W controller identities, in YAML declaration order.
void add(const OneWayControllerIdentity &identity)
Add a configured identity.
const OneWayControllerIdentity * get(const std::string &id) const
Look up an identity by its YAML handle.
bool empty() const
Whether any identity is configured.
const std::vector< OneWayControllerIdentity > & all() const
All configured identities, in declaration order.
const char * oneway_button_action_name(OneWayButtonAction action)
Human-readable name for a button action, as it appears in the diagnostic sensor.
OneWayActionEncoding encode_oneway_action(OneWayButtonAction action)
Resolve a button action to the call that sends it.
OneWayButtonAction
The command a generated 1W button sends.
@ FAVORITE
CoverCommand::FAVORITE.
@ STOP
CoverCommand::STOP.
@ VENT
CoverCommand::VENT.
@ CLOSE
Position 100 (fully closed).
@ OPEN
Position 0 (fully open).
EnrollGesture
Which 1W enrollment gesture a manufacturer's actuators expect.
OneWayPreamble
Which wake-up shape one copy of a 1W burst gets.
@ NORMAL
The runtime-tunable normal_start_preamble, CTRL1's low-power bit clear.
@ WAKE
The long wake-up preamble (LONG_PREAMBLE), paired with CTRL1_LOW_POWER set.
DeviceType
Device type identifiers reported by IO‑Homecontrol products.
@ DUAL_SHUTTER
Dual-section shutter.
@ UNKNOWN
Unknown/unspecified device.
@ ROLLER_SHUTTER
Roller shutter.
void encode_broadcast_address(DeviceType type, uint8_t out[NODE_ID_SIZE])
Encode a device type into its typed-broadcast destination address — the exact inverse of broadcast_ta...
static constexpr uint8_t ONEWAY_POSITION_FULLY_OPEN
Wire-scale position meaning "fully closed" (0 means fully open).
CoverCommand
Named device commands for cover-type actuators.
@ FAVORITE
Move to stored favorite/"My" position.
@ STOP
Stop movement immediately.
@ VENT
Move to ventilation position (window-type devices).
OneWayPowerClass effective_power_class(const OneWayControllerIdentity &identity)
The burst shape this identity actually transmits with.
std::array< DeviceType, 3 > effective_enrollment_classes(const OneWayControllerIdentity &identity)
The device classes this identity's 0x30 enrollment sweep will actually target.
uint8_t effective_execute_acei(const OneWayControllerIdentity &identity)
The ACEI byte a given identity will put on air for a 1W EXECUTE frame.
static constexpr std::array< DeviceType, 3 > VELUX_KLI_ENROLLMENT_CLASSES
The default 0x30 sweep for manufacturer: velux: the exterior-shading classes a KLI 310/313 names — ro...
OneWayPowerClass
Which preamble/CTRL1 shape a 1W identity's bursts actually go out with.
@ LOW_POWER
low_power: true: copy 1 LONG_PREAMBLE + CTRL1_LOW_POWER, repeats normal.
@ ALWAYS_ALIVE
low_power: false: normal start preamble on every copy, CTRL1 0x00.
@ LEGACY_LONG
LONG_PREAMBLE on every copy, CTRL1 0x00 everywhere.
const char * oneway_power_class_name(OneWayPowerClass power_class)
Human-readable name for a OneWayPowerClass, as it appears in the boot log.
bool has_power_class_override(const OneWayControllerIdentity &identity)
Whether this identity's burst shape comes from an explicit low_power: rather than the profile.
static constexpr uint8_t ONEWAY_POSITION_FULLY_CLOSED
OneWayWireProfile resolve_oneway_wire_profile(uint8_t manufacturer)
Resolve an identity's 1W wire profile from its manufacturer byte.
bool has_execute_acei_override(const OneWayControllerIdentity &identity)
Whether this identity's ACEI comes from an explicit execute_acei: rather than the profile.
OneWayCopyShape oneway_burst_copy_shape(OneWayPowerClass power_class, uint8_t copy_index)
Resolve which preamble/CTRL1 shape one copy of a burst gets, from the identity's power class and the ...
Device-name, address-classification and 1W-frame codecs.
IO-Homecontrol command IDs, result codes and protocol enumerations.
IO-Homecontrol device-type model, capabilities and runtime device state.
Fundamental IO-Homecontrol frame and crypto size constants.
How a OneWayButtonAction reaches the wire.
bool is_position
True when the action is sent as a numeric position.
uint8_t position
Position to send when is_position.
CoverCommand command
Named command to send otherwise.
One configured 1W controller identity.
uint8_t node_id[NODE_ID_SIZE]
Source address we transmit as (configured or derived).
std::string id
YAML handle entities reference.
bool execute_broadcast_all
When true (execute_broadcast: all), 1W EXECUTE frames go to the all-devices address 00 00 3F regardle...
bool enrollment_with_mac
Whether the enroll button's 0x30 carries a MAC trailer (enrollment_with_mac:).
uint8_t system_key[AES_KEY_SIZE]
Network key for this identity; may differ per identity.
void broadcast_address(uint8_t out[NODE_ID_SIZE]) const
Enrollment / typed-class destination address for this identity.
uint8_t execute_acei
EXECUTE ACEI override (execute_acei:).
uint16_t initial_sequence
Seed for this identity's rolling counter on first use.
bool node_id_derived
True when node_id was derived rather than configured.
std::optional< OneWayPowerClass > power_class_override
low_power: exactly as configured, or empty when the key is absent — in which case the shape comes fro...
DeviceType io_device_type
Device class this identity commands.
uint8_t manufacturer
Manufacturer ID; unused until the enrollment phase.
std::array< DeviceType, 3 > enrollment_classes
Override for the device classes a VELUX enrollment 0x30 sweep targets (enrollment_classes:).
The preamble and CTRL1 shape one copy of a 1W burst gets.
OneWayPreamble preamble
Which preamble this copy transmits with.
bool low_power_flag
Whether this copy sets CTRL1_LOW_POWER.
Vendor-divergent 1W wire settings for a controller identity.
bool profile_is_a_guess
true when manufacturer matched no known 1W wire profile.
std::array< DeviceType, 3 > enrollment_classes
Device classes a VELUX_KLI 0x30 sweep targets, UNKNOWN entries skipped.
EnrollGesture enroll_gesture
Which enrollment gesture this manufacturer's actuators expect.
uint8_t execute_acei
payload[1] of a 1W CMD_EXECUTE (0x00) frame.
OneWayPowerClass default_power_class
Burst shape for an identity that does not set low_power: at all.