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