Skip to content

Commit

Permalink
Ingore last three bytes of truma_message_header #25.
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Mar 10, 2024
1 parent 70aefdd commit a743ee1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/truma_inetbox/TrumaiNetBoxApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ const u_int8_t *TrumaiNetBoxApp::lin_multiframe_recieved(const u_int8_t *message
if (message_len < truma_message_header.size()) {
return nullptr;
}
for (u_int8_t i = 1; i < truma_message_header.size(); i++) {
for (u_int8_t i = 1; i < truma_message_header.size() - 3; i++) {
if (message[i] != truma_message_header[i]) {
return nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion components/truma_inetbox/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace esphome {
namespace truma_inetbox {
// First byte is service identifier and to be ignored.
// First byte is service identifier and to be ignored. Last three bytes can be `xFF` or `x00` (see <https://github.com/Fabian-Schmidt/esphome-truma_inetbox/issues/25>).
const std::array<u_int8_t, 11> truma_message_header = {0x00, 0x00, 0x1F, 0x00, 0x1E, 0x00,
0x00, 0x22, 0xFF, 0xFF, 0xFF};

Expand Down

0 comments on commit a743ee1

Please sign in to comment.