62static constexpr uint8_t
OFF = 0x00;
64static constexpr uint8_t
ECO = 0x02;
68static constexpr uint8_t
BOOST = 0x07;
98static constexpr uint8_t
OFF = 0x00;
99static constexpr uint8_t
AUTO = 0x01;
109static constexpr uint16_t
ON = 0x4000;
110static constexpr uint16_t
OFF = 0x8000;
201 std::span<const HeatingModeEntry>
modes;
212 std::span<const HeatingPresetEntry>
presets{};
327 return static_cast<uint16_t
>((prefix << BITS_PER_BYTE) | low);
340const HeatingObservedState *
find_observed_state(
const HeatingProfile &profile, uint8_t wire);
Setpoint aliases (low byte of the main parameter, prefix HEATING_ALIAS_MP_PREFIX).
static constexpr uint8_t HEAT_PUMP_HALTED
Heat pump: halted.
static constexpr uint8_t COMFORT
The device's comfort setpoint.
static constexpr uint8_t HEAT_PUMP_ECO
Heat pump: the economy setpoint.
static constexpr uint8_t HEAT_PUMP_SETBACK
Heat pump: the setback setpoint.
static constexpr uint8_t THERMOSTAT_ECO
Heating temperature interface: the economy setpoint.
static constexpr uint8_t SECURED
Heating temperature interface: the secured setpoint.
Values of functional parameter 16 on the heat pump: the on/off state.
static constexpr uint16_t ON
On: sent with a setpoint alias to select it.
static constexpr uint16_t OFF
Off: sent with HEATING_OFF_MP.
Heating levels (low byte of the main parameter, prefix HEATING_LEVEL_MP_PREFIX).
static constexpr uint8_t COMFORT_MINUS_2
Comfort, two degrees lower.
static constexpr uint8_t OFF
Off.
static constexpr uint8_t BOOST
Boost.
static constexpr uint8_t COMFORT
Comfort.
static constexpr uint8_t FROST_PROTECTION
Frost protection.
static constexpr uint8_t SECURED
Secured; reported by the device, never commanded.
static constexpr uint8_t COMFORT_MINUS_1
Comfort, one degree lower.
static constexpr uint8_t ECO
Economy.
Values of functional parameter 9 on the heating temperature interface: the active mode.
static constexpr uint8_t OFF
Off.
static constexpr uint8_t AUTO
The device follows its own schedule.
static constexpr uint8_t MANUAL
The device follows the commanded setpoint.
void clear_inactive_programme_reading(const HeatingProfile &profile, HeatingReadings &readings)
Drop the temperature in force from the readings when the programme does not run.
static constexpr uint8_t HEATING_LEVEL_MP_PREFIX
Main-parameter prefix byte of a heating level: the level occupies the low byte.
HeatingActionSource
Where a register heater's "heating" / "idle" comes from.
@ REGULATOR
The regulator register (HeatingFunction::REGULATOR_STATE): heating at state 2.
const HeatingObservedState * find_observed_state(const HeatingProfile &profile, uint8_t wire)
Find what a device-reported wire value shows on the card.
bool encode_temperature_main_parameter(float celsius, float min_c, float max_c, uint16_t &main_parameter)
Encode a temperature as a main parameter over an encoding range.
HeatingFpKind
Which functional parameter, if any, accompanies a TEMPERATURE_EXECUTE command.
@ FP9
Functional parameter 9, one byte.
@ FP16
Functional parameter 16, two bytes.
@ NONE
A main-parameter-only command.
const HeatingProfile * find_heating_profile(DeviceType type, uint8_t subtype, DeviceModel model)
Look up the heating profile for a (type, subtype, model).
HeatingFunction
Registers and functions of a 2W heater, one row of the descriptor table each.
@ WORKING_RATE
Register 0x0126, read-only: share of the time the element heats, 0-100 %.
@ SET_MODE
Register 0x0100, read/write: operating mode (HeatingMode).
bool decode_temperature_main_parameter(uint16_t main_parameter, float min_c, float max_c, float &celsius)
Decode a main parameter as a temperature over an encoding range (the inverse of encode_temperature_ma...
HeatingPresetId
Presets a profile can offer. CUSTOM entries carry their own name.
@ CUSTOM
Named by HeatingPresetEntry::custom_name.
DeviceModel
A product model below a (node type, subtype): for products that report the same wire type but need di...
bool programme_period_active(const HeatingProfile &profile, const HeatingReadings &readings)
Does the heater's own programme run right now, with no timed run on top of it?
constexpr uint16_t heating_level_main_parameter(uint8_t level)
Main parameter of a heating level, as it travels in an EXECUTE and in a status reply.
DeviceType
IO-Homecontrol node types.
HeatingControlPath
How a heater is commanded and read.
@ TEMPERATURE_EXECUTE
Standard EXECUTE with a temperature or an alias as the main parameter; read with 0x03.
@ PRIVATE_REGISTERS
CMD_WRITE_PRIVATE register reads and writes (proto_heating.h).
@ HEATING_LEVEL
Standard EXECUTE with a heating level as the main parameter; read with 0x03.
static constexpr uint8_t HEATING_ALIAS_MP_PREFIX
Main-parameter prefix byte of a setpoint alias: the alias occupies the low byte.
const HeatingObservedState * find_observed_preset(const HeatingProfile &profile, uint8_t wire)
Find what a device-reported value of the preset register (preset_fn) shows on the card.
static constexpr uint16_t HEATING_TEMPERATURE_MP_SPAN
Number of main-parameter steps across the encoding range (the full position scale,...
static constexpr uint16_t HEATING_OFF_MP
Main parameter of a heat pump's off command: MAIN_PARAMETER_KEEP, which the command pairs with the of...
bool device_uses_heating_levels(DeviceType type, uint8_t subtype)
Does a climate entity drive this device with heating levels?
static constexpr uint16_t MAIN_PARAMETER_KEEP
16-bit main parameter D400 (POS_UNKNOWN in the high byte): keep the current value.
bool decode_heating_level(uint16_t main_parameter, uint8_t &level)
Read a heating level out of a main parameter.
static constexpr uint16_t HEATING_MP_FROM_TARGET
Sentinel for HeatingModeEntry::main_parameter: send the entity's target temperature,...
bool device_uses_heating_registers(DeviceType type, uint8_t subtype)
Does a climate entity drive this device over the private register protocol?
ProgrammePeriodState resolve_programme_period(const HeatingProfile &profile, const HeatingReadings &readings)
Which period of its programme a heater is in, and the temperature it heats to.
bool device_uses_heating_temperature(DeviceType type, uint8_t subtype)
Does a climate entity drive this device with a temperature or an alias in the main parameter?
bool device_accepts_register_probe(DeviceType type, uint8_t subtype)
May the diagnostic register-read probes (register_00, register_01) be sent to this device?
constexpr uint16_t heating_prefixed_main_parameter(uint8_t prefix, uint8_t low)
Main parameter of a prefixed value (a level or an alias).
HeatingHvacMode
HVAC modes a profile can offer.
IO-Homecontrol command IDs, result codes and protocol enumerations.
IO-Homecontrol device-type model, capabilities and runtime device state.
Pure codec for the private register protocol of 2W heaters (CMD_WRITE_PRIVATE 0x20).
Fundamental IO-Homecontrol frame and crypto size constants.
A functional parameter and its value.
uint16_t value
Its value (one byte for FP9, two for FP16).
HeatingFpKind kind
Which parameter; NONE sends none.
One HVAC mode the card offers and the wire value that selects it.
HeatingFp fp
TEMPERATURE_EXECUTE: the functional parameter the mode sends.
uint16_t main_parameter
TEMPERATURE_EXECUTE: the main parameter the mode sends, or HEATING_MP_FROM_TARGET.
HeatingHvacMode hvac
Mode shown on the card.
uint8_t wire
PRIVATE_REGISTERS: mode register value.
What a device-reported wire value shows on the card.
uint8_t wire
Mode register value, or level low byte, as the device reports it.
int8_t preset
Index into the profile's presets shown with it, or -1 for none.
HeatingHvacMode hvac
HVAC mode shown.
One preset the card offers.
const char * custom_name
Name of a CUSTOM preset; nullptr otherwise.
HeatingFp fp
TEMPERATURE_EXECUTE: the functional parameter sent with the alias.
uint8_t wire
Value written: register value, or the low byte of a level or alias.
HeatingPresetId id
Standard preset, or CUSTOM.
HeatingFunction write_fn
PRIVATE_REGISTERS: register the preset writes. Unused for levels.
bool commandable
False for a preset the device only reports (secured).
Companion entities and traits a profile has.
bool mode_observed
A device reading decides the card's mode; false when the mode is the last command (nothing reads it b...
bool target_temperature
The card has a setpoint.
bool action
The card shows heating / idle.
bool current_temperature
The card shows a measured temperature.
HeatingProfileFeatures features
What the card and its companions offer.
bool fixed_range
TEMPERATURE_EXECUTE: the temperature range is fixed, so the YAML min_temperature: / max_temperature: ...
uint8_t mp_prefix
High byte of a level or alias main parameter (0 for registers).
std::span< const HeatingPresetEntry > presets
Presets offered.
DeviceModel model
Model (NONE = the (type, subtype) row's own profile).
std::span< const HeatingObservedState > observed
Device-reported value -> card state.
HeatingActionSource action_source
Where features.action reads from.
std::span< const HeatingFunction > boot_registers
PRIVATE_REGISTERS: registers read once until they have been read.
DeviceType type
Node type.
std::span< const HeatingFunction > poll_registers
PRIVATE_REGISTERS: registers every poll reads, in order.
const HeatingProgrammePeriod * programme_period
PRIVATE_REGISTERS: how the heater's own programme names the comfort or eco period it is in; nullptr f...
HeatingControlPath path
How the heater is commanded and read.
float visual_max_c
Highest target temperature the card offers (0 without a setpoint).
bool experimental_writes
PRIVATE_REGISTERS: the mode and preset writes are unconfirmed on a device.
uint8_t subtype
Subtype (0 = the type's own row).
float visual_min_c
Lowest target temperature the card offers (0 without a setpoint).
HeatingFunction preset_fn
PRIVATE_REGISTERS with preset_observed: the register the card's preset is read from.
HeatingFunction mode_fn
PRIVATE_REGISTERS: the register the HVAC modes write and the card's mode is read from.
std::span< const HeatingFunction > extra_poll_registers
PRIVATE_REGISTERS: registers every poll reads after poll_registers, for a part the heater may not hav...
std::span< const HeatingObservedState > preset_observed
Device-reported value of preset_fn -> preset; empty when the mode register names the preset too (obse...
std::span< const HeatingModeEntry > modes
HVAC modes offered, with the value each writes.
HeatingFp setpoint_fp
TEMPERATURE_EXECUTE: the functional parameter sent with a setpoint.
How a heater's own weekly programme shows which period runs: the registers that tell,...
HeatingFunction in_force_fn
Register of the temperature in force.
uint8_t programme_mode
Value of HeatingProfile::mode_fn while the programme runs.
int8_t comfort_preset
Index into HeatingProfile::presets shown in a comfort period.
int8_t eco_preset
Index into HeatingProfile::presets shown in an eco period.
HeatingFunction setback_fn
Register of the eco setback, a distance below the comfort setpoint.
HeatingFunction comfort_fn
Register of the comfort setpoint.
uint8_t idle_preset_state
Value of HeatingProfile::preset_fn with no timed run on top.
What a heater's programme period resolves to, from its readings.
int8_t preset_index
Index into the profile's presets of the period, or -1 when the temperature in force fits neither peri...
bool active
The programme runs (and no timed run is on top of it).
float target_c
The temperature in force; NaN until it has been read.