diff --git a/BSB_LAN/include/pps_handling.h b/BSB_LAN/include/pps_handling.h index b5e68935..39ca2eb6 100644 --- a/BSB_LAN/include/pps_handling.h +++ b/BSB_LAN/include/pps_handling.h @@ -34,6 +34,10 @@ uint16_t pps_bus_handling(byte *msg) { tx_msg[7] = pps_values[PPS_BA]; break; case 6: + tx_msg[1] = 0x4C; // Präsenz + tx_msg[7] = pps_values[PPS_AW]; + break; + case 7: { if (pps_values[PPS_AW] == 0) { // Set destination temperature (comfort + knob for heating period, otherwise reduced temperature) pps_values[PPS_RTZ] = pps_values[PPS_RTA]; @@ -45,11 +49,11 @@ uint16_t pps_bus_handling(byte *msg) { tx_msg[7] = pps_values[PPS_RTZ] & 0xFF; break; } - case 7: + case 8: tx_msg[1] = 0x56; tx_msg[7] = 0x00; break; - case 8: + case 9: { if (pps_time_set == true) { bool found = false; @@ -97,25 +101,21 @@ uint16_t pps_bus_handling(byte *msg) { } } // break; - case 9: + case 10: tx_msg[1] = 0x08; // Raumtemperatur Soll tx_msg[6] = pps_values[PPS_RTS] >> 8; tx_msg[7] = pps_values[PPS_RTS] & 0xFF; break; - case 10: + case 11: tx_msg[1] = 0x09; // Raumtemperatur Abwesenheit Soll tx_msg[6] = pps_values[PPS_RTA] >> 8; tx_msg[7] = pps_values[PPS_RTA] & 0xFF; break; - case 11: + case 12: tx_msg[1] = 0x0B; // Trinkwassertemperatur Soll tx_msg[6] = pps_values[PPS_TWS] >> 8; tx_msg[7] = pps_values[PPS_TWS] & 0xFF; break; - case 12: - tx_msg[1] = 0x4C; // Präsenz - tx_msg[7] = pps_values[PPS_AW]; - break; case 13: tx_msg[1] = 0x1E; // Trinkwassertemperatur Reduziert Soll tx_msg[6] = pps_values[PPS_TWR] >> 8; @@ -244,7 +244,7 @@ uint16_t pps_bus_handling(byte *msg) { break; } msg_cycle++; - if (msg_cycle > 25 || (pps_values[PPS_QTP] == 0x52 && msg_cycle > 5)) { // QAA50 sends fewer parameters + if (msg_cycle > 25 || (pps_values[PPS_QTP] == 0x52 && msg_cycle > 6)) { // QAA50 sends fewer parameters printFmtToDebug("Resetting msg_cycle from %d to 0", msg_cycle); msg_cycle = 0; } @@ -286,9 +286,9 @@ printFmtToDebug("Restoring msg_cycle to %d", saved_msg_cycle); printFmtToDebug("Saving msg_cycle %d", saved_msg_cycle); } switch (msg[1]) { - case 0x08: msg_cycle = 9; break; - case 0x09: msg_cycle = 10; break; - case 0x0B: msg_cycle = 11; break; + case 0x08: msg_cycle = 10; break; + case 0x09: msg_cycle = 11; break; + case 0x0B: msg_cycle = 12; break; case 0x38: msg_cycle = 0; break; case 0x3A: msg_cycle = 27; break; case 0x48: msg_cycle = 1; break;