|
Home IO Control
ESPHome add-on for IO-Homecontrol devices
|
Pure codec for the private register protocol of 2W heaters (CMD_WRITE_PRIVATE 0x20). More...
Go to the source code of this file.
Classes | |
| struct | esphome::home_io_control::HeatingReadings |
| What the hub has read from one heater so far. More... | |
Namespaces | |
| namespace | esphome |
| namespace | esphome::home_io_control |
Functions | |
| const char * | esphome::home_io_control::heating_function_name (HeatingFunction fn) |
| Stable lowercase name for a heating function ("power_on", "set_temperature", ...). | |
| bool | esphome::home_io_control::heating_function_is_writable (HeatingFunction fn) |
| Whether the register behind a function can be written. | |
| bool | esphome::home_io_control::heating_function_is_readable (HeatingFunction fn) |
| Whether the register behind a function can be read. | |
| size_t | esphome::home_io_control::encode_heating_write (HeatingFunction fn, float value, uint8_t out[HEATING_PAYLOAD_MAX_SIZE]) |
| Encode a write ("set") of one register into a CMD_WRITE_PRIVATE (0x20) payload. | |
| size_t | esphome::home_io_control::encode_heating_read (HeatingFunction fn, uint8_t out[HEATING_PAYLOAD_MAX_SIZE]) |
| Encode a read ("get") of one register into a CMD_WRITE_PRIVATE (0x20) payload. | |
| size_t | esphome::home_io_control::encode_heating_payload (HeatingFunction fn, float value, uint8_t out[HEATING_PAYLOAD_MAX_SIZE]) |
| Encode the function the heating_control action runs: a read for a read-only register, a write for every other. | |
| bool | esphome::home_io_control::decode_heating_reply (const IoFrame &reply, HeatingFunction fn, float &value) |
| Decode the value a heater answered a register read or write with. | |
Variables | |
| constexpr float | esphome::home_io_control::HEATING_TEMP_MIN_C = 7.0F |
| Lowest setpoint this codec will encode. | |
| constexpr float | esphome::home_io_control::HEATING_TEMP_MAX_C = 28.0F |
| Highest setpoint this codec will encode. | |
| constexpr size_t | esphome::home_io_control::HEATING_PAYLOAD_MAX_SIZE = 6 |
| Largest payload any function produces: a set of a 16-bit value (4-byte header + 2 value bytes). | |
| constexpr uint8_t | esphome::home_io_control::HEATING_PAYLOAD_PREFIX = 0x0C |
| Leading payload byte, common to every function. | |
| constexpr uint8_t | esphome::home_io_control::HEATING_REGISTER_HIGH_BYTE = 0x01 |
| Payload byte at index 2: the high byte of the 16-bit register number, constant 0x01. | |
| constexpr uint8_t | esphome::home_io_control::HEATING_DIRECTION_GET = 0x60 |
| Payload byte at index 1 of a read ("get") request. | |
| constexpr uint8_t | esphome::home_io_control::HEATING_DIRECTION_SET = 0x61 |
| Payload byte at index 1 of a write ("set") request. | |
| constexpr int16_t | esphome::home_io_control::HEATING_SENSOR_FAULT_RAW = -1 |
| Measured value in a reading when the heater reports a sensor fault (raw -1). | |
| static constexpr float | esphome::home_io_control::HEATING_TEMPERATURE_RANGE_MIN_C = -40.0F |
| Default encoding range of a temperature main parameter, in degrees Celsius. | |
| static constexpr float | esphome::home_io_control::HEATING_TEMPERATURE_RANGE_MAX_C = 80.0F |
| See HEATING_TEMPERATURE_RANGE_MIN_C. | |
Pure codec for the private register protocol of 2W heaters (CMD_WRITE_PRIVATE 0x20).
A heater with an adjustable setpoint (node type 52, subtype 1) exposes its state as 16-bit registers 0x01xx, read with 0C 60 01 <reg> and written with 0C 61 01 <reg> <value>; the device answers with CMD_WRITE_PRIVATE_ACK (0x21) echoing the header, followed by the value. Values are little-endian. An Atlantic AGILIA IO radiator answers every read and write this way (tests/corpus/captures/exchange/atlantic_agilia_exchange_{status_read,setpoint_and_off_read_back,mode_read_back}.yaml, pinned by corpus_heating_test.cpp); see also tests/corpus/captures/exchange/atlantic_thermor_exchange_write_private_param.yaml.
One descriptor table (HEATING_FUNCTIONS in the .cpp) lists every register this component uses: its access (read-only, read/write, write-only) and how its value is encoded. The same row drives the get payload, the set payload and the decoder of the reply, so a register is described exactly once. This module is pure: it does not touch a device record or the radio — proto_commands.h's create_write_private() frames a payload.
Confirmed on that radiator: the setpoint, mode (all four writable values), room temperature, regulator and maximum-setpoint registers. The presence register has not been written on hardware, and the window and open-window-detection registers have only been read at rest.
Definition in file proto_heating.h.