Add more details for Aircon packages.

This commit is contained in:
Your Name 2023-03-02 14:20:30 +01:00
parent 5a13dbee0f
commit 57917c6444
2 changed files with 76 additions and 10 deletions

View File

@ -314,13 +314,36 @@ const u_int8_t *TrumaiNetBoxApp::lin_multiframe_recieved(const u_int8_t *message
ESP_LOGI(TAG, "StatusFrameAircon");
// Example:
// SID<---------PREAMBLE---------->|<---MSG_HEAD---->|
// - ac temps form 16 - 30 C in +2 steps
// - activation and deactivation of the ac ventilating
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.AA.00.00.71.01.00.00.00.00.86.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.A5.00.00.71.01.00.00.00.00.8B.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.A5.00.00.71.01.00.00.00.00.8B.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.4B.05.00.71.01.4A.0B.00.00.8B.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.37.05.00.71.01.5E.0B.00.00.8B.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.24.05.00.71.01.72.0B.00.00.8A.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.13.05.00.71.01.86.0B.00.00.87.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.FC.05.00.71.01.9A.0B.00.00.89.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.E8.05.00.71.01.AE.0B.00.00.89.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.D5.05.00.71.01.C2.0B.00.00.88.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.C1.05.00.71.01.D6.0B.00.00.88.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.A7.00.00.71.01.00.00.00.00.89.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.C2.04.00.71.01.D6.0B.00.00.88.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.13.04.00.71.01.86.0B.00.00.88.0B.00.00.00.00.00.00.AA.0A
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.12.35.00.A8.00.00.71.01.00.00.00.00.88.0B.00.00.00.00.00.00.AA.0A
this->status_aircon_ = statusFrame->inner.aircon;
this->status_aircon_valid_ = true;
this->status_aircon_updated_ = true;
this->update_status_aircon_stale_ = false;
return response;
} else if (header->message_type == STATUS_FRAME_AIRCON_INIT &&
header->message_length == sizeof(StatusFrameAirconInit)) {
ESP_LOGI(TAG, "StatusFrameAirconInit");
// Example:
// SID<---------PREAMBLE---------->|<---MSG_HEAD---->|
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.16.3F.00.E2.00.00.71.01.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00
return response;
} else if (header->message_type == STATUS_FRAME_TIMER && header->message_length == sizeof(StatusFrameTimer)) {
ESP_LOGI(TAG, "StatusFrameTimer");
// EXAMPLE:
@ -402,6 +425,10 @@ const u_int8_t *TrumaiNetBoxApp::lin_multiframe_recieved(const u_int8_t *message
// VarioHeat Comfort w/o E-Kit
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.0C.0B.00.C2.02.00.01.00.51.00.00.05.01.00.66.10 - P5.01.00 0051.00
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.0C.0B.00.64.02.01.01.00.20.06.02.03.00.00.00.00 - H3.00.00 0620.02
// Combi6DE + Saphir Compact AC
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.0C.0B.00.C7.03.00.01.00.50.00.00.04.03.00.60.10
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.0C.0B.00.71.03.01.01.00.10.03.02.06.00.02.00.00
// BB.00.1F.00.1E.00.00.22.FF.FF.FF.54.01.0C.0B.00.7C.03.02.01.00.01.0C.00.01.02.01.00.00
auto device = statusFrame->inner.device;

View File

@ -38,8 +38,8 @@ namespace truma_inetbox {
#define STATUS_FRAME_UNKNOWN_36 0x36
#define STATUS_FRAME_TIMER_RESPONSE (STATUS_FRAME_TIMER - 1)
#define STATUS_FRAME_TIMER 0x3D
// Error response - unknown function
#define STATUS_FRAME_UNKNOWN_3E 0x3E
#define STATUS_FRAME_AIRCON_INIT_RESPONSE (STATUS_FRAME_AIRCON_INIT - 1)
#define STATUS_FRAME_AIRCON_INIT 0x3F
// Error response - unknown function
#define STATUS_FRAME_UNKNOWN_40 0x40
@ -228,27 +228,38 @@ struct StatusFrameHeaterResponse { // NOLINT(altera-struct-pack-align)
// Length 18 (0x12)
// TODO
struct StatusFrameAircon { // NOLINT(altera-struct-pack-align)
struct StatusFrameAircon { // NOLINT(altera-struct-pack-align)
// Mode? 00 - OFF, 04 - AC Ventilation, 05 - AC Cooling
u_int8_t unknown_01;
// 0x00
u_int8_t unknown_02;
// 0x71
u_int8_t unknown_03;
// 0x01
u_int8_t unknown_04;
u_int8_t unknown_05;
u_int8_t unknown_06;
u_int16_t target_temp_room;
// 0x00
u_int8_t unknown_07;
// 0x00
u_int8_t unknown_08;
u_int8_t unknown_09;
u_int8_t unknown_10;
// No idea why two current_temp
u_int16_t current_temp_aircon;
// 0x00
u_int8_t unknown_11;
// 0x00
u_int8_t unknown_12;
// 0x00
u_int8_t unknown_13;
// 0x00
u_int8_t unknown_14;
// 0x00
u_int8_t unknown_15;
// 0x00
u_int8_t unknown_16;
u_int8_t unknown_17;
u_int8_t unknown_18;
u_int16_t current_temp_room;
} __attribute__((packed));
// TODO
struct StatusFrameAirconResponse { // NOLINT(altera-struct-pack-align)
// TODO
} __attribute__((packed));
@ -366,7 +377,35 @@ struct StatusFrameDevice { // NOLINT(altera-struct-pack-align)
// 0x10, 0x12 on CPplus
// 0x00 on Combi4, Vario Heat
u_int8_t unknown_3;
} __attribute__((packed));
// Length 22 (0x16)
// TODO
struct StatusFrameAirconInit { // NOLINT(altera-struct-pack-align)
u_int8_t unknown_01; // 0x00
u_int8_t unknown_02; // 0x00
// 0x71
u_int8_t unknown_03;
// 0x01
u_int8_t unknown_04;
u_int8_t unknown_05; // 0x00
u_int8_t unknown_06; // 0x00
u_int8_t unknown_07; // 0x00
u_int8_t unknown_08; // 0x00
u_int8_t unknown_09; // 0x00
u_int8_t unknown_10; // 0x00
u_int8_t unknown_11; // 0x00
u_int8_t unknown_12; // 0x00
u_int8_t unknown_13; // 0x00
u_int8_t unknown_14; // 0x00
u_int8_t unknown_15; // 0x00
u_int8_t unknown_16; // 0x00
u_int8_t unknown_17; // 0x00
u_int8_t unknown_18; // 0x00
u_int8_t unknown_19; // 0x00
u_int8_t unknown_20; // 0x00
u_int8_t unknown_21; // 0x00
u_int8_t unknown_22; // 0x00
} __attribute__((packed));
union StatusFrame { // NOLINT(altera-struct-pack-align)
@ -383,6 +422,7 @@ union StatusFrame { // NOLINT(altera-struct-pack-align)
StatusFrameClock clock;
StatusFrameConfig config;
StatusFrameDevice device;
StatusFrameAirconInit airconInit;
} __attribute__((packed));
} inner;
} __attribute__((packed));
@ -512,7 +552,6 @@ class TrumaiNetBoxApp : public LinBusProtocol {
bool update_status_heater_stale_ = false;
StatusFrameHeaterResponse update_status_heater_;
bool update_status_aircon_stale_ = false;
// Prepared means `update_status_timer_` was copied from `status_timer_`.