mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
Merge pull request #197 from Neonox31:1-feat-thermostats-display-mode-for-fw100-and-fw120-thermostats
feat(thermostats): display mode for FW100 and FW120 thermostats
This commit is contained in:
@@ -409,7 +409,16 @@ uint8_t _getThermostatMode(uint8_t hc_num) {
|
||||
} else if (mode == 1) {
|
||||
thermoMode = 2; // auto
|
||||
}
|
||||
} else { // default for all other thermostats
|
||||
} else if (model == EMS_MODEL_FW100 || model == EMS_MODEL_FW120) {
|
||||
if (mode == 3) {
|
||||
thermoMode = 4;
|
||||
} else if (mode == 2) {
|
||||
thermoMode = 3;
|
||||
} else if (mode == 1) {
|
||||
thermoMode = 0;
|
||||
}
|
||||
}
|
||||
else { // default for all other thermostats
|
||||
if (mode == 0) {
|
||||
thermoMode = 3; // night
|
||||
} else if (mode == 1) {
|
||||
|
||||
@@ -1521,14 +1521,17 @@ void _process_RCPLUSStatusMode(_EMS_RxTelegram * EMS_RxTelegram) {
|
||||
* FR10 Junkers - type x006F
|
||||
*/
|
||||
void _process_JunkersStatusMessage(_EMS_RxTelegram * EMS_RxTelegram) {
|
||||
if (EMS_RxTelegram->offset == 0) {
|
||||
if (EMS_RxTelegram->offset == 0 && EMS_RxTelegram->data_length > 1) {
|
||||
uint8_t hc = EMS_THERMOSTAT_DEFAULTHC - 1; // use HC1
|
||||
EMS_Thermostat.hc[hc].active = true;
|
||||
|
||||
// e.g. for FR10: 90 00 FF 00 00 6F 03 01 00 BE 00 BF
|
||||
// e.g. for FW100: 90 00 FF 00 00 6F 03 02 00 D7 00 DA F3 34 00 C4
|
||||
|
||||
EMS_Thermostat.hc[hc].curr_roomTemp = _toShort(EMS_OFFSET_JunkersStatusMessage_curr); // value is * 10
|
||||
EMS_Thermostat.hc[hc].setpoint_roomTemp = _toShort(EMS_OFFSET_JunkersStatusMessage_setpoint); // value is * 10
|
||||
EMS_Thermostat.hc[hc].mode = _toByte(EMS_OFFSET_JunkersStatusMessage_mode);
|
||||
EMS_Sys_Status.emsRefreshed = true; // triggers a send the values back via MQTT
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -140,6 +140,7 @@
|
||||
|
||||
// Junkers FR10, FW100 (EMS Plus)
|
||||
#define EMS_TYPE_JunkersStatusMessage 0x6F // is an automatic thermostat broadcast giving us temps
|
||||
#define EMS_OFFSET_JunkersStatusMessage_mode 0 // current mode
|
||||
#define EMS_OFFSET_JunkersStatusMessage_setpoint 2 // setpoint temp
|
||||
#define EMS_OFFSET_JunkersStatusMessage_curr 4 // current temp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user