static constexpr uint16_t DHW_OPERATING_MODE_AWAY_ON
FP16 that starts away (holiday) and ends a boost.
bool decode_dhw_mode(const uint8_t *value, size_t len, DhwMode &mode)
Operating mode from the value of register 0x0006.
static constexpr uint8_t DHW_REG_MODE
Register 0x0006: operating mode (DhwMode), one byte. Followed the display in every run.
constexpr size_t HEATING_PAYLOAD_MAX_SIZE
Largest payload any function produces: a set of a 16-bit value (4-byte header + 2 value bytes).
static constexpr uint8_t DHW_STATUS_MAIN_PARAMETER_OFFSET
Offset of the main parameter (MSB) in the data of a status reply (CMD_PRIVATE_RESP): the target slot ...
DhwMode
Operating mode as register 0x0006 holds it.
@ MANUAL_ECO_ON
Manual mode with ECO on (heat pump only).
@ MANUAL_ECO_OFF
Manual mode with ECO off (the electric element may help).
@ AUTO
The heater's automatic mode (its own schedule and target).
static constexpr uint8_t DHW_FP_OPERATING_MODE
Functional parameter that carries the operating-mode word (DHW_OPERATING_MODE_*).
static constexpr uint8_t DHW_REG_WATER_TEMPERATURE
Register 0x0017: water temperature, signed 16-bit big-endian tenths of a degree in the first two valu...
static constexpr uint8_t DHW_REG_BRAND
Register 0x0007: one ASCII letter naming the brand (41 = 'A' on the Calypso).
bool decode_dhw_heating_state(const uint8_t *value, size_t len, DhwHeatingState &state)
What is heating, from the value of register 0x0021.
DhwOperatingFeature
The two features the operating-mode word switches; dhw_operating_feature_wire() holds their wire fact...
static constexpr uint8_t DHW_REG_ENERGY
Register 0x0004: energy consumed since the heater was installed, 32-bit big-endian,...
static constexpr uint8_t DHW_STATUS_FPI2
Status-read FPI2 (43): FP10, FP15 and FP16.
static constexpr uint16_t DHW_OPERATING_MODE_OFF
FP16 that ends a boost and ends away: both fields off.
bool encode_dhw_target(float celsius, uint16_t &main_parameter)
Encode a target temperature as a main parameter over DHW_TARGET_MIN_C..DHW_TARGET_MAX_C.
static constexpr uint16_t DHW_CAPABILITY_AWAY
FP15 bit 2: the heater supports away (absence).
static constexpr uint8_t DHW_REG_BOOST_DURATION
Register 0x0000: boost duration, one byte.
static constexpr float DHW_TARGET_MIN_C
Lower end of the target-temperature scale: main parameter 0 is 20 C.
static constexpr uint8_t DHW_FP_ALSO_ASKED
Functional parameter 10: no decision uses it; the status read asks for it so the read is exactly the ...
static constexpr float DHW_TARGET_MAX_C
Upper end of the target-temperature scale: main parameter 0xC800 is 62 C, the highest target the Caly...
bool decode_dhw_operating_status(const IoFrame &reply, DhwOperatingStatus &status)
Capabilities and operating-mode state from the reply to the status read DHW_STATUS_FPI1 / DHW_STATUS_...
static constexpr uint8_t DHW_AWAY_UNTIL_TURNED_OFF
Duration an away start writes to register 0x0005: 255, which the heater itself holds for a holiday wi...
bool decode_dhw_water_temperature(const uint8_t *value, size_t len, float &celsius)
Water temperature from the value of register 0x0017: signed 16-bit big-endian tenths.
size_t encode_dhw_register_read(uint8_t index, uint8_t out[HEATING_PAYLOAD_MAX_SIZE])
Encode a read of one family-0x00 register: 0C 60 00 <index>.
static constexpr uint8_t DHW_BOOST_START_DURATION
Duration a boost start writes to register 0x0000: the value read during a boost started on the displa...
bool decode_dhw_energy_wh(const uint8_t *value, size_t len, uint32_t &wh)
Energy since installation from the value of register 0x0004: unsigned 32-bit big-endian,...
static constexpr uint16_t DHW_OPERATING_MODE_BOOST_ON
FP16 that starts a boost and ends away. Bit 14 is set as the heater reports it.
static constexpr uint8_t DHW_FP_CAPABILITIES
Functional parameter that carries the operating-mode capabilities (DHW_CAPABILITY_* bits).
constexpr uint8_t fp_bitmap_bit(uint8_t fp)
Bit of functional parameter fp (1-16) in its bitmap: FPI1 holds FP1-FP8 and FPI2 FP9-FP16,...
static constexpr uint8_t DHW_REGISTER_HIGH_BYTE
High byte of every register of a domestic hot water heater (family 0x00).
static constexpr uint8_t DHW_REG_AWAY_DURATION
Register 0x0005: away (holiday) duration, one byte: the days the holiday still runs.
size_t encode_dhw_duration_write(DhwOperatingFeature which, uint8_t out[HEATING_PAYLOAD_MAX_SIZE])
Encode the duration write a start of which sends before its FP16 EXECUTE: 0C 61 00 00 01 for boost (D...
bool decode_dhw_register_reply(const IoFrame &reply, uint8_t index, const uint8_t *&value, size_t &len)
The value bytes of a reply to a family-0x00 register read.
static constexpr uint8_t DHW_REG_HEATING
Register 0x0021: what is heating, eight bytes (DhwHeatingState).
static constexpr uint8_t DHW_STATUS_FPI1
Status-read FPI1 that asks for no FP1-FP8 (the heater holds none of them).
bool decode_dhw_target(uint16_t main_parameter, float &celsius)
Target temperature from a main parameter.
size_t encode_dhw_mode_write(uint8_t mode, uint8_t out[HEATING_PAYLOAD_MAX_SIZE])
Encode a write of the operating mode: 0C 61 00 06 <mode>.
const DhwOperatingFeatureWire & dhw_operating_feature_wire(DhwOperatingFeature which)
The wire facts of which: the one place each feature's FP15 bit, FP16 field and duration live.
bool decode_dhw_status_target(const IoFrame &reply, float &celsius)
Target temperature from a status reply (CMD_PRIVATE_RESP) of a domestic hot water heater.
static constexpr uint16_t DHW_CAPABILITY_BOOST
FP15 bit 3: the heater supports boost (relaunch).
bool decode_dhw_duration(const uint8_t *value, size_t len, uint8_t &duration)
A duration from the value of register 0x0000 or 0x0005: one byte.
IO-Homecontrol command IDs, result codes and protocol enumerations.
IO-Homecontrol 2W frame container: control bytes, IoFrame and (de)serialization.
Pure codec for the private register protocol of 2W heaters (CMD_WRITE_PRIVATE 0x20).
What register 0x0021 says is heating.
bool heat_pump
Bytes 3 and 4: the heat pump runs (both were always set together).
bool element
Byte 2: the electric element is on (set during boost only).
bool heating
Byte 0: the heater is heating at all (heat pump, element or both).
The wire facts of one DhwOperatingFeature: what FP15, FP16 and the duration registers say about it.
uint16_t capability
FP15 bit that says the heater supports it (DHW_CAPABILITY_*).
uint8_t start_duration
Duration a start writes before the FP16 EXECUTE.
uint8_t fp16_shift
Lowest bit of its two-bit FP16 field (0 keep, 1 on, 2 off).
uint8_t duration_register
Register that holds its duration (DHW_REG_*_DURATION).
uint16_t on_word
FP16 that starts it and ends the other (DHW_OPERATING_MODE_*_ON).
The operating-mode part of the status read DHW_STATUS_FPI1 / DHW_STATUS_FPI2 (its main parameter,...
bool boost
FP16 relaunch field (bits 8-9) is 1: a boost runs.
bool away
FP16 absence field (bits 10-11) is 1: the holiday mode is on.
uint16_t capabilities
FP15: DHW_CAPABILITY_* bits.
What the hub has read from a domestic hot water heater.
int64_t energy_wh
Energy since installation in Wh; -1 until read.
int16_t boost_duration
Register 0x0000; -1 until read. Logged, never a state.
int16_t brand
Brand letter (register 0x0007); -1 until read.
int32_t capabilities
FP15 operating-mode capabilities (DHW_CAPABILITY_*); -1 until read.
float target_c
Target temperature (status reply main parameter); NaN until read or when the main parameter is not a ...
int8_t heating
DhwHeatingState::heating as 0/1; -1 until read.
int8_t boost
Boost on (1) or off (0) as FP16 reports it; -1 until read.
int16_t mode
DhwMode value; -1 until read.
int8_t element
DhwHeatingState::element as 0/1; -1 until read.
int8_t away
Away on (1) or off (0) as FP16 reports it; -1 until read.
int8_t heat_pump
DhwHeatingState::heat_pump as 0/1; -1 until read.
int16_t away_duration
Register 0x0005; -1 until read. Logged, never a state.
float water_c
Water temperature (register 0x0017); NaN until read.