ESPHome 2026.5.1
Loading...
Searching...
No Matches
hub.cpp
Go to the documentation of this file.
1#include "hub.h"
3
4#include <string>
5
6namespace esphome::opentherm {
7
8static const char *const TAG = "opentherm";
9namespace message_data {
10bool parse_flag8_lb_0(OpenthermData &data) { return read_bit(data.valueLB, 0); }
11bool parse_flag8_lb_1(OpenthermData &data) { return read_bit(data.valueLB, 1); }
12bool parse_flag8_lb_2(OpenthermData &data) { return read_bit(data.valueLB, 2); }
13bool parse_flag8_lb_3(OpenthermData &data) { return read_bit(data.valueLB, 3); }
14bool parse_flag8_lb_4(OpenthermData &data) { return read_bit(data.valueLB, 4); }
15bool parse_flag8_lb_5(OpenthermData &data) { return read_bit(data.valueLB, 5); }
16bool parse_flag8_lb_6(OpenthermData &data) { return read_bit(data.valueLB, 6); }
17bool parse_flag8_lb_7(OpenthermData &data) { return read_bit(data.valueLB, 7); }
18bool parse_flag8_hb_0(OpenthermData &data) { return read_bit(data.valueHB, 0); }
19bool parse_flag8_hb_1(OpenthermData &data) { return read_bit(data.valueHB, 1); }
20bool parse_flag8_hb_2(OpenthermData &data) { return read_bit(data.valueHB, 2); }
21bool parse_flag8_hb_3(OpenthermData &data) { return read_bit(data.valueHB, 3); }
22bool parse_flag8_hb_4(OpenthermData &data) { return read_bit(data.valueHB, 4); }
23bool parse_flag8_hb_5(OpenthermData &data) { return read_bit(data.valueHB, 5); }
24bool parse_flag8_hb_6(OpenthermData &data) { return read_bit(data.valueHB, 6); }
25bool parse_flag8_hb_7(OpenthermData &data) { return read_bit(data.valueHB, 7); }
26uint8_t parse_u8_lb(OpenthermData &data) { return data.valueLB; }
27uint8_t parse_u8_hb(OpenthermData &data) { return data.valueHB; }
28int8_t parse_s8_lb(OpenthermData &data) { return (int8_t) data.valueLB; }
29int8_t parse_s8_hb(OpenthermData &data) { return (int8_t) data.valueHB; }
30uint16_t parse_u16(OpenthermData &data) { return data.u16(); }
31uint16_t parse_u8_lb_60(OpenthermData &data) { return data.valueLB * 60; }
32uint16_t parse_u8_hb_60(OpenthermData &data) { return data.valueHB * 60; }
33int16_t parse_s16(OpenthermData &data) { return data.s16(); }
34float parse_f88(OpenthermData &data) { return data.f88(); }
35
36void write_flag8_lb_0(const bool value, OpenthermData &data) { data.valueLB = write_bit(data.valueLB, 0, value); }
37void write_flag8_lb_1(const bool value, OpenthermData &data) { data.valueLB = write_bit(data.valueLB, 1, value); }
38void write_flag8_lb_2(const bool value, OpenthermData &data) { data.valueLB = write_bit(data.valueLB, 2, value); }
39void write_flag8_lb_3(const bool value, OpenthermData &data) { data.valueLB = write_bit(data.valueLB, 3, value); }
40void write_flag8_lb_4(const bool value, OpenthermData &data) { data.valueLB = write_bit(data.valueLB, 4, value); }
41void write_flag8_lb_5(const bool value, OpenthermData &data) { data.valueLB = write_bit(data.valueLB, 5, value); }
42void write_flag8_lb_6(const bool value, OpenthermData &data) { data.valueLB = write_bit(data.valueLB, 6, value); }
43void write_flag8_lb_7(const bool value, OpenthermData &data) { data.valueLB = write_bit(data.valueLB, 7, value); }
44void write_flag8_hb_0(const bool value, OpenthermData &data) { data.valueHB = write_bit(data.valueHB, 0, value); }
45void write_flag8_hb_1(const bool value, OpenthermData &data) { data.valueHB = write_bit(data.valueHB, 1, value); }
46void write_flag8_hb_2(const bool value, OpenthermData &data) { data.valueHB = write_bit(data.valueHB, 2, value); }
47void write_flag8_hb_3(const bool value, OpenthermData &data) { data.valueHB = write_bit(data.valueHB, 3, value); }
48void write_flag8_hb_4(const bool value, OpenthermData &data) { data.valueHB = write_bit(data.valueHB, 4, value); }
49void write_flag8_hb_5(const bool value, OpenthermData &data) { data.valueHB = write_bit(data.valueHB, 5, value); }
50void write_flag8_hb_6(const bool value, OpenthermData &data) { data.valueHB = write_bit(data.valueHB, 6, value); }
51void write_flag8_hb_7(const bool value, OpenthermData &data) { data.valueHB = write_bit(data.valueHB, 7, value); }
52void write_u8_lb(const uint8_t value, OpenthermData &data) { data.valueLB = value; }
53void write_u8_hb(const uint8_t value, OpenthermData &data) { data.valueHB = value; }
54void write_s8_lb(const int8_t value, OpenthermData &data) { data.valueLB = (uint8_t) value; }
55void write_s8_hb(const int8_t value, OpenthermData &data) { data.valueHB = (uint8_t) value; }
56void write_u16(const uint16_t value, OpenthermData &data) { data.u16(value); }
57void write_s16(const int16_t value, OpenthermData &data) { data.s16(value); }
58void write_f88(const float value, OpenthermData &data) { data.f88(value); }
59
60} // namespace message_data
61
63 OpenthermData data;
64 data.type = 0;
65 data.id = request_id;
66 data.valueHB = 0;
67 data.valueLB = 0;
68
69 // We need this special logic for STATUS message because we have two options for specifying boiler modes:
70 // with static config values in the hub, or with separate switches.
71 if (request_id == MessageId::STATUS) {
72 // NOLINTBEGIN
73 bool const ch_enabled = this->ch_enable && OPENTHERM_READ_ch_enable && OPENTHERM_READ_t_set > 0.0;
74 bool const dhw_enabled = this->dhw_enable && OPENTHERM_READ_dhw_enable;
75 bool const cooling_enabled =
76 this->cooling_enable && OPENTHERM_READ_cooling_enable && OPENTHERM_READ_cooling_control > 0.0;
77 bool const otc_enabled = this->otc_active && OPENTHERM_READ_otc_active;
78 bool const ch2_enabled = this->ch2_active && OPENTHERM_READ_ch2_active && OPENTHERM_READ_t_set_ch2 > 0.0;
79 bool const summer_mode_is_active = this->summer_mode_active && OPENTHERM_READ_summer_mode_active;
80 bool const dhw_blocked = this->dhw_block && OPENTHERM_READ_dhw_block;
81 // NOLINTEND
82
83 data.type = MessageType::READ_DATA;
84 data.valueHB = ch_enabled | (dhw_enabled << 1) | (cooling_enabled << 2) | (otc_enabled << 3) | (ch2_enabled << 4) |
85 (summer_mode_is_active << 5) | (dhw_blocked << 6);
86
87 return data;
88 }
89
90 // Next, we start with write requests from switches and other inputs,
91 // because we would want to write that data if it is available, rather than
92 // request a read for that type (in the case that both read and write are
93 // supported).
94 switch (request_id) {
95 OPENTHERM_SWITCH_MESSAGE_HANDLERS(OPENTHERM_MESSAGE_WRITE_MESSAGE, OPENTHERM_MESSAGE_WRITE_ENTITY, ,
96 OPENTHERM_MESSAGE_WRITE_POSTSCRIPT, )
97 OPENTHERM_NUMBER_MESSAGE_HANDLERS(OPENTHERM_MESSAGE_WRITE_MESSAGE, OPENTHERM_MESSAGE_WRITE_ENTITY, ,
98 OPENTHERM_MESSAGE_WRITE_POSTSCRIPT, )
99 OPENTHERM_OUTPUT_MESSAGE_HANDLERS(OPENTHERM_MESSAGE_WRITE_MESSAGE, OPENTHERM_MESSAGE_WRITE_ENTITY, ,
100 OPENTHERM_MESSAGE_WRITE_POSTSCRIPT, )
101 OPENTHERM_INPUT_SENSOR_MESSAGE_HANDLERS(OPENTHERM_MESSAGE_WRITE_MESSAGE, OPENTHERM_MESSAGE_WRITE_ENTITY, ,
102 OPENTHERM_MESSAGE_WRITE_POSTSCRIPT, )
103 OPENTHERM_SETTING_MESSAGE_HANDLERS(OPENTHERM_MESSAGE_WRITE_MESSAGE, OPENTHERM_MESSAGE_WRITE_SETTING, ,
104 OPENTHERM_MESSAGE_WRITE_POSTSCRIPT, )
105 default:
106 break;
107 }
108
109 // Finally, handle the simple read requests, which only change with the message id.
110 switch (request_id) {
111 OPENTHERM_SENSOR_MESSAGE_HANDLERS(OPENTHERM_MESSAGE_READ_MESSAGE, OPENTHERM_IGNORE, , , )
112 default:
113 break;
114 }
115 switch (request_id) {
116 OPENTHERM_BINARY_SENSOR_MESSAGE_HANDLERS(OPENTHERM_MESSAGE_READ_MESSAGE, OPENTHERM_IGNORE, , , )
117 default:
118 break;
119 }
120
121 // And if we get here, a message was requested which somehow wasn't handled.
122 // This shouldn't happen due to the way the defines are configured, so we
123 // log an error and just return a 0 message.
124 ESP_LOGE(TAG, "Tried to create a request with unknown id %d. This should never happen, so please open an issue.",
125 request_id);
126 return {};
127}
128
129OpenthermHub::OpenthermHub() : Component(), in_pin_{}, out_pin_{} {}
130
132 ESP_LOGD(TAG, "Received OpenTherm response with id %d (%s)", data.id,
133 this->opentherm_->message_id_to_str((MessageId) data.id));
134 this->opentherm_->debug_data(data);
135
136 switch (data.id) {
137 OPENTHERM_SENSOR_MESSAGE_HANDLERS(OPENTHERM_MESSAGE_RESPONSE_MESSAGE, OPENTHERM_MESSAGE_RESPONSE_ENTITY, ,
138 OPENTHERM_MESSAGE_RESPONSE_POSTSCRIPT, )
139 }
140 switch (data.id) {
141 OPENTHERM_BINARY_SENSOR_MESSAGE_HANDLERS(OPENTHERM_MESSAGE_RESPONSE_MESSAGE, OPENTHERM_MESSAGE_RESPONSE_ENTITY, ,
142 OPENTHERM_MESSAGE_RESPONSE_POSTSCRIPT, )
143 }
144}
145
147 this->opentherm_ = make_unique<OpenTherm>(this->in_pin_, this->out_pin_);
148 if (!this->opentherm_->initialize()) {
149 ESP_LOGE(TAG, "Failed to initialize OpenTherm protocol. See previous log messages for details.");
150 this->mark_failed();
151 return;
152 }
153
154 // Ensure that there is at least one request, as we are required to
155 // communicate at least once every second. Sending the status request is
156 // good practice anyway.
159 this->message_iterator_ = this->messages_.begin();
160}
161
162void OpenthermHub::on_shutdown() { this->opentherm_->stop(); }
163
164// Disabling clang-tidy for this particular line since it keeps removing the trailing underscore (bug?)
165void OpenthermHub::write_initial_messages_(std::vector<MessageId> &target) { // NOLINT
166 std::vector<std::pair<MessageId, uint8_t>> sorted;
167 std::copy_if(this->configured_messages_.begin(), this->configured_messages_.end(), std::back_inserter(sorted),
168 [](const std::pair<MessageId, uint8_t> &pair) { return pair.second < REPEATING_MESSAGE_ORDER; });
169 std::sort(sorted.begin(), sorted.end(),
170 [](const std::pair<MessageId, uint8_t> &a, const std::pair<MessageId, uint8_t> &b) {
171 return a.second < b.second;
172 });
173
174 target.clear();
175 std::transform(sorted.begin(), sorted.end(), std::back_inserter(target),
176 [](const std::pair<MessageId, uint8_t> &pair) { return pair.first; });
177}
178
179// Disabling clang-tidy for this particular line since it keeps removing the trailing underscore (bug?)
180void OpenthermHub::write_repeating_messages_(std::vector<MessageId> &target) { // NOLINT
181 target.clear();
182 for (auto const &pair : this->configured_messages_) {
183 if (pair.second == REPEATING_MESSAGE_ORDER) {
184 target.push_back(pair.first);
185 }
186 }
187}
188
190 if (this->sync_mode_) {
191 this->sync_loop_();
192 return;
193 }
194
195 auto cur_time = millis();
196 auto const cur_mode = this->opentherm_->get_mode();
197
198 if (this->handle_error_(cur_mode)) {
199 return;
200 }
201
202 switch (cur_mode) {
206 break;
208 this->check_timings_(cur_time);
209 if (this->should_skip_loop_(cur_time)) {
210 break;
211 }
212 this->start_conversation_();
213 break;
215 // Message sent, now listen for the response.
216 this->opentherm_->listen();
217 break;
219 this->read_response_();
220 break;
221 default:
222 break;
223 }
224 this->last_mode_ = cur_mode;
225}
226
228 switch (mode) {
230 // Protocol error can happen only while reading boiler response.
232 return true;
234 // Timeout error might happen while we wait for device to respond.
235 this->handle_timeout_error_();
236 return true;
238 // Timer error can happen only on ESP32.
239 this->handle_timer_error_();
240 return true;
241 default:
242 return false;
243 }
244}
245
247 if (!this->opentherm_->is_idle()) {
248 ESP_LOGE(TAG, "OpenTherm is not idle at the start of the loop");
249 return;
250 }
251
252 auto cur_time = millis();
253
254 this->check_timings_(cur_time);
255
256 if (this->should_skip_loop_(cur_time)) {
257 return;
258 }
259
260 this->start_conversation_();
261 // There may be a timer error at this point
262 if (this->handle_error_(this->opentherm_->get_mode())) {
263 return;
264 }
265
266 // Spin while message is being sent to device
267 if (!this->spin_wait_(1150, [&] { return this->opentherm_->is_active(); })) {
268 ESP_LOGE(TAG, "Hub timeout triggered during send");
269 this->stop_opentherm_();
270 return;
271 }
272
273 // Check for errors and ensure we are in the right state (message sent successfully)
274 if (this->handle_error_(this->opentherm_->get_mode())) {
275 return;
276 } else if (!this->opentherm_->is_sent()) {
277 ESP_LOGW(TAG, "Unexpected state after sending request: %s",
278 this->opentherm_->operation_mode_to_str(this->opentherm_->get_mode()));
279 this->stop_opentherm_();
280 return;
281 }
282
283 // Listen for the response
284 this->opentherm_->listen();
285 // There may be a timer error at this point
286 if (this->handle_error_(this->opentherm_->get_mode())) {
287 return;
288 }
289
290 // Spin while response is being received
291 if (!this->spin_wait_(1150, [&] { return this->opentherm_->is_active(); })) {
292 ESP_LOGE(TAG, "Hub timeout triggered during receive");
293 this->stop_opentherm_();
294 return;
295 }
296
297 // Check for errors and ensure we are in the right state (message received successfully)
298 if (this->handle_error_(this->opentherm_->get_mode())) {
299 return;
300 } else if (!this->opentherm_->has_message()) {
301 ESP_LOGW(TAG, "Unexpected state after receiving response: %s",
302 this->opentherm_->operation_mode_to_str(this->opentherm_->get_mode()));
303 this->stop_opentherm_();
304 return;
305 }
306
307 this->read_response_();
308}
309
311 if (this->last_conversation_start_ > 0 && (cur_time - this->last_conversation_start_) > 1150) {
312 ESP_LOGW(TAG,
313 "%d ms elapsed since the start of the last convo, but 1150 ms are allowed at maximum. Look at other "
314 "components that might slow the loop down.",
315 (int) (cur_time - this->last_conversation_start_));
316 }
317}
318
320 if (this->last_conversation_end_ > 0 && (cur_time - this->last_conversation_end_) < 100) {
321 ESP_LOGV(TAG, "Less than 100 ms elapsed since last convo, skipping this iteration");
322 return true;
323 }
324
325 return false;
326}
327
329 if (this->message_iterator_ == this->messages_.end()) {
330 if (this->sending_initial_) {
331 this->sending_initial_ = false;
333 }
334 this->message_iterator_ = this->messages_.begin();
335 }
336
337 auto request = this->build_request_(*this->message_iterator_);
338
339 this->before_send_callback_.call(request);
340
341 ESP_LOGD(TAG, "Sending request with id %d (%s)", request.id,
342 this->opentherm_->message_id_to_str((MessageId) request.id));
343 this->opentherm_->debug_data(request);
344 // Send the request
346 this->opentherm_->send(request);
347}
348
350 OpenthermData response;
351 if (!this->opentherm_->get_message(response)) {
352 ESP_LOGW(TAG, "Couldn't get the response, but flags indicated success. This is a bug.");
353 this->stop_opentherm_();
354 return;
355 }
356
357 this->stop_opentherm_();
358
359 this->before_process_response_callback_.call(response);
360 this->process_response(response);
361
362 this->message_iterator_++;
363}
364
366 this->opentherm_->stop();
368}
369
371 OpenThermError error;
372 this->opentherm_->get_protocol_error(error);
373 ESP_LOGW(TAG, "Protocol error occured while receiving response: %s",
374 this->opentherm_->protocol_error_to_str(error.error_type));
375 this->opentherm_->debug_error(error);
376 this->stop_opentherm_();
377}
378
380 ESP_LOGW(TAG, "Timeout while waiting for response from device");
381 this->stop_opentherm_();
382}
383
385 this->opentherm_->report_and_reset_timer_error();
386 this->stop_opentherm_();
387 // Timer error is critical, there is no point in retrying.
388 this->mark_failed();
389}
390
392 std::vector<MessageId> initial_messages;
393 std::vector<MessageId> repeating_messages;
394 this->write_initial_messages_(initial_messages);
395 this->write_repeating_messages_(repeating_messages);
396
397 ESP_LOGCONFIG(TAG,
398 "OpenTherm:\n"
399 " Sync mode: %s\n"
400 " Sensors: %s\n"
401 " Binary sensors: %s\n"
402 " Switches: %s\n"
403 " Input sensors: %s\n"
404 " Outputs: %s\n"
405 " Numbers: %s",
406 YESNO(this->sync_mode_), SHOW(OPENTHERM_SENSOR_LIST(ID, )), SHOW(OPENTHERM_BINARY_SENSOR_LIST(ID, )),
407 SHOW(OPENTHERM_SWITCH_LIST(ID, )), SHOW(OPENTHERM_INPUT_SENSOR_LIST(ID, )),
408 SHOW(OPENTHERM_OUTPUT_LIST(ID, )), SHOW(OPENTHERM_NUMBER_LIST(ID, )));
409 LOG_PIN(" In: ", this->in_pin_);
410 LOG_PIN(" Out: ", this->out_pin_);
411 ESP_LOGCONFIG(TAG, " Initial requests:");
412 for (auto type : initial_messages) {
413 ESP_LOGCONFIG(TAG, " - %d (%s)", type, this->opentherm_->message_id_to_str(type));
414 }
415 ESP_LOGCONFIG(TAG, " Repeating requests:");
416 for (auto type : repeating_messages) {
417 ESP_LOGCONFIG(TAG, " - %d (%s)", type, this->opentherm_->message_id_to_str(type));
418 }
419}
420
421} // namespace esphome::opentherm
BedjetMode mode
BedJet operating mode.
void mark_failed()
Mark this component as failed.
OPENTHERM_SENSOR_LIST(OPENTHERM_DECLARE_SENSOR,) OPENTHERM_BINARY_SENSOR_LIST(OPENTHERM_DECLARE_BINARY_SENSOR
void check_timings_(uint32_t cur_time)
Definition hub.cpp:310
void dump_config() override
Definition hub.cpp:391
void on_shutdown() override
Definition hub.cpp:162
std::vector< MessageId > messages_
Definition hub.h:67
OpenthermData build_request_(MessageId request_id) const
Definition hub.cpp:62
OperationMode last_mode_
Definition hub.h:72
void add_repeating_message(MessageId message_id)
Definition hub.h:145
InternalGPIOPin * out_pin_
Definition hub.h:47
std::unordered_map< MessageId, uint8_t > configured_messages_
Definition hub.h:66
void process_response(OpenthermData &data)
Definition hub.cpp:131
OPENTHERM_SWITCH_LIST(OPENTHERM_DECLARE_SWITCH,) OPENTHERM_NUMBER_LIST(OPENTHERM_DECLARE_NUMBER
InternalGPIOPin * in_pin_
Definition hub.h:47
CallbackManager< void(OpenthermData &)> before_send_callback_
Definition hub.h:80
bool handle_error_(OperationMode mode)
Definition hub.cpp:227
CallbackManager< void(OpenthermData &)> before_process_response_callback_
Definition hub.h:81
bool spin_wait_(uint32_t timeout, F func)
Definition hub.h:99
std::vector< MessageId >::const_iterator message_iterator_
Definition hub.h:68
uint32_t last_conversation_start_
Definition hub.h:70
void write_initial_messages_(std::vector< MessageId > &target)
Definition hub.cpp:165
void write_repeating_messages_(std::vector< MessageId > &target)
Definition hub.cpp:180
bool should_skip_loop_(uint32_t cur_time) const
Definition hub.cpp:319
OPENTHERM_OUTPUT_LIST(OPENTHERM_DECLARE_OUTPUT,) OPENTHERM_INPUT_SENSOR_LIST(OPENTHERM_DECLARE_INPUT_SENSOR
std::unique_ptr< OpenTherm > opentherm_
Definition hub.h:49
uint16_t type
void write_flag8_lb_4(const bool value, OpenthermData &data)
Definition hub.cpp:40
bool parse_flag8_lb_3(OpenthermData &data)
Definition hub.cpp:13
bool parse_flag8_lb_2(OpenthermData &data)
Definition hub.cpp:12
bool parse_flag8_lb_5(OpenthermData &data)
Definition hub.cpp:15
void write_flag8_lb_7(const bool value, OpenthermData &data)
Definition hub.cpp:43
uint16_t parse_u16(OpenthermData &data)
Definition hub.cpp:30
bool parse_flag8_hb_7(OpenthermData &data)
Definition hub.cpp:25
int8_t parse_s8_hb(OpenthermData &data)
Definition hub.cpp:29
bool parse_flag8_lb_0(OpenthermData &data)
Definition hub.cpp:10
void write_flag8_lb_5(const bool value, OpenthermData &data)
Definition hub.cpp:41
bool parse_flag8_hb_3(OpenthermData &data)
Definition hub.cpp:21
void write_flag8_hb_7(const bool value, OpenthermData &data)
Definition hub.cpp:51
bool parse_flag8_lb_6(OpenthermData &data)
Definition hub.cpp:16
bool parse_flag8_hb_5(OpenthermData &data)
Definition hub.cpp:23
void write_s8_lb(const int8_t value, OpenthermData &data)
Definition hub.cpp:54
uint8_t parse_u8_hb(OpenthermData &data)
Definition hub.cpp:27
void write_flag8_lb_2(const bool value, OpenthermData &data)
Definition hub.cpp:38
void write_flag8_hb_4(const bool value, OpenthermData &data)
Definition hub.cpp:48
void write_u16(const uint16_t value, OpenthermData &data)
Definition hub.cpp:56
void write_s8_hb(const int8_t value, OpenthermData &data)
Definition hub.cpp:55
bool parse_flag8_hb_4(OpenthermData &data)
Definition hub.cpp:22
void write_flag8_hb_5(const bool value, OpenthermData &data)
Definition hub.cpp:49
void write_flag8_lb_1(const bool value, OpenthermData &data)
Definition hub.cpp:37
void write_u8_lb(const uint8_t value, OpenthermData &data)
Definition hub.cpp:52
void write_flag8_lb_3(const bool value, OpenthermData &data)
Definition hub.cpp:39
float parse_f88(OpenthermData &data)
Definition hub.cpp:34
void write_s16(const int16_t value, OpenthermData &data)
Definition hub.cpp:57
bool parse_flag8_hb_6(OpenthermData &data)
Definition hub.cpp:24
void write_flag8_hb_2(const bool value, OpenthermData &data)
Definition hub.cpp:46
bool parse_flag8_hb_1(OpenthermData &data)
Definition hub.cpp:19
int16_t parse_s16(OpenthermData &data)
Definition hub.cpp:33
void write_flag8_hb_3(const bool value, OpenthermData &data)
Definition hub.cpp:47
bool parse_flag8_lb_4(OpenthermData &data)
Definition hub.cpp:14
uint16_t parse_u8_hb_60(OpenthermData &data)
Definition hub.cpp:32
bool parse_flag8_hb_0(OpenthermData &data)
Definition hub.cpp:18
void write_flag8_lb_0(const bool value, OpenthermData &data)
Definition hub.cpp:36
uint16_t parse_u8_lb_60(OpenthermData &data)
Definition hub.cpp:31
void write_f88(const float value, OpenthermData &data)
Definition hub.cpp:58
void write_flag8_hb_6(const bool value, OpenthermData &data)
Definition hub.cpp:50
bool parse_flag8_lb_7(OpenthermData &data)
Definition hub.cpp:17
void write_u8_hb(const uint8_t value, OpenthermData &data)
Definition hub.cpp:53
void write_flag8_hb_1(const bool value, OpenthermData &data)
Definition hub.cpp:45
void write_flag8_hb_0(const bool value, OpenthermData &data)
Definition hub.cpp:44
int8_t parse_s8_lb(OpenthermData &data)
Definition hub.cpp:28
void write_flag8_lb_6(const bool value, OpenthermData &data)
Definition hub.cpp:42
uint8_t parse_u8_lb(OpenthermData &data)
Definition hub.cpp:26
bool parse_flag8_lb_1(OpenthermData &data)
Definition hub.cpp:11
bool parse_flag8_hb_2(OpenthermData &data)
Definition hub.cpp:20
constexpr T write_bit(T value, uint8_t bit, uint8_t bit_value)
Definition opentherm.h:27
constexpr T read_bit(T value, uint8_t bit)
Definition opentherm.h:21
uint32_t IRAM_ATTR HOT millis()
Definition hal.cpp:28
static void uint32_t
Structure to hold Opentherm data packet content.
Definition opentherm.h:183