19namespace uponor_smatrix {
22static const uint8_t UPONOR_ID_DATETIME1 = 0x08;
24static const uint8_t UPONOR_ID_DATETIME2 = 0x09;
26static const uint8_t UPONOR_ID_DATETIME3 = 0x0A;
28static const uint8_t UPONOR_ID_UNKNOWN1 = 0x0C;
30static const uint8_t UPONOR_ID_OUTDOOR_TEMP = 0x2D;
32static const uint8_t UPONOR_ID_UNKNOWN2 = 0x35;
34static const uint8_t UPONOR_ID_TARGET_TEMP_MIN = 0x37;
36static const uint8_t UPONOR_ID_TARGET_TEMP_MAX = 0x38;
38static const uint8_t UPONOR_ID_TARGET_TEMP = 0x3B;
40static const uint8_t UPONOR_ID_ECO_SETBACK = 0x3C;
42static const uint8_t UPONOR_ID_DEMAND = 0x3D;
44static const uint8_t UPONOR_ID_MODE1 = 0x3E;
46static const uint8_t UPONOR_ID_MODE2 = 0x3F;
48static const uint8_t UPONOR_ID_ROOM_TEMP = 0x40;
50static const uint8_t UPONOR_ID_EXTERNAL_TEMP = 0x41;
52static const uint8_t UPONOR_ID_HUMIDITY = 0x42;
54static const uint8_t UPONOR_ID_REQUEST = 0xFF;
57static const uint16_t UPONOR_INVALID_VALUE = 0x7FFF;
70 void setup()
override;
124 return std::isnan(celsius) ? UPONOR_INVALID_VALUE
Helper class to easily give an object a parent of type T.
UponorSmatrixComponent * parent_
The RealTimeClock class exposes common timekeeping functions via the device's local real-time clock.
void set_time_id(time::RealTimeClock *time_id)
bool send(uint16_t device_address, const UponorSmatrixData *data, size_t data_len)
bool parse_byte_(uint8_t byte)
void register_device(UponorSmatrixDevice *device)
uint16_t time_device_address_
std::vector< UponorSmatrixDevice * > devices_
UponorSmatrixComponent()=default
std::set< uint16_t > unknown_devices_
void set_system_address(uint16_t address)
void dump_config() override
time::RealTimeClock * time_id_
std::vector< uint8_t > rx_buffer_
std::queue< std::vector< uint8_t > > tx_queue_
void set_time_device_address(uint16_t address)
bool send_time_requested_
virtual void on_device_data(const UponorSmatrixData *data, size_t data_len)=0
friend UponorSmatrixComponent
bool send(const UponorSmatrixData *data, size_t data_len)
void set_device_address(uint16_t address)
uint16_t celsius_to_raw(float celsius)
float raw_to_celsius(uint16_t raw)
Providing packet encoding functions for exchanging data with a remote host.
constexpr float celsius_to_fahrenheit(float value)
Convert degrees Celsius to degrees Fahrenheit.
constexpr float fahrenheit_to_celsius(float value)
Convert degrees Fahrenheit to degrees Celsius.