mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
Merge branch 'dev' of https://github.com/proddy/EMS-ESP-Boiler into dev
This commit is contained in:
@@ -476,50 +476,53 @@ void showInfo() {
|
||||
myDebug_P(PSTR("")); // newline
|
||||
myDebug_P(PSTR("%sThermostat stats:%s"), COLOR_BOLD_ON, COLOR_BOLD_OFF);
|
||||
myDebug_P(PSTR(" Thermostat: %s"), ems_getThermostatDescription(buffer_type));
|
||||
if ((ems_getThermostatModel() == EMS_MODEL_EASY) || (ems_getThermostatModel() == EMS_MODEL_BOSCHEASY)) {
|
||||
// for easy temps are * 100, also we don't have the time or mode
|
||||
|
||||
// Render Current & Setpoint Room Temperature
|
||||
if ( (ems_getThermostatModel() == EMS_MODEL_EASY)
|
||||
|| (ems_getThermostatModel() == EMS_MODEL_BOSCHEASY)
|
||||
|| (ems_getThermostatModel() == EMS_MODEL_FR10)
|
||||
|| (ems_getThermostatModel() == EMS_MODEL_FW100)) {
|
||||
// Temperatures are *10
|
||||
_renderShortValue("Set room temperature", "C", EMS_Thermostat.setpoint_roomTemp, 10); // *100
|
||||
_renderShortValue("Current room temperature", "C", EMS_Thermostat.curr_roomTemp, 10); // *100
|
||||
} else if (ems_getThermostatModel() == EMS_MODEL_FR10) {
|
||||
// Junkers are *10
|
||||
_renderIntValue("Set room temperature", "C", EMS_Thermostat.setpoint_roomTemp, 10); // *10
|
||||
_renderIntValue("Current room temperature", "C", EMS_Thermostat.curr_roomTemp, 10); // *10
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
// because we store in 2 bytes short, when converting to a single byte we'll loose the negative value if its unset
|
||||
if (EMS_Thermostat.setpoint_roomTemp <= 0) {
|
||||
if (EMS_Thermostat.setpoint_roomTemp <= 0) {
|
||||
EMS_Thermostat.setpoint_roomTemp = EMS_VALUE_INT_NOTSET;
|
||||
}
|
||||
|
||||
if (EMS_Thermostat.curr_roomTemp <= 0) {
|
||||
EMS_Thermostat.curr_roomTemp = EMS_VALUE_INT_NOTSET;
|
||||
}
|
||||
|
||||
_renderIntValue("Setpoint room temperature", "C", EMS_Thermostat.setpoint_roomTemp, 2); // convert to a single byte * 2
|
||||
_renderIntValue("Current room temperature", "C", EMS_Thermostat.curr_roomTemp, 10); // is *10
|
||||
}
|
||||
|
||||
if ((EMS_Thermostat.holidaytemp > 0) && (EMSESP_Status.heating_circuit == 2)) { // only if we are on a RC35 we show more info
|
||||
_renderIntValue("Day temperature", "C", EMS_Thermostat.daytemp, 2); // convert to a single byte * 2
|
||||
_renderIntValue("Night temperature", "C", EMS_Thermostat.nighttemp, 2); // convert to a single byte * 2
|
||||
_renderIntValue("Vacation temperature", "C", EMS_Thermostat.holidaytemp, 2); // convert to a single byte * 2
|
||||
}
|
||||
// Render Day/Night/Holiday Temperature
|
||||
if ((EMS_Thermostat.holidaytemp > 0) && (EMSESP_Status.heating_circuit == 2)) { // only if we are on a RC35 we show more info
|
||||
_renderIntValue("Day temperature", "C", EMS_Thermostat.daytemp, 2); // convert to a single byte * 2
|
||||
_renderIntValue("Night temperature", "C", EMS_Thermostat.nighttemp, 2); // convert to a single byte * 2
|
||||
_renderIntValue("Vacation temperature", "C", EMS_Thermostat.holidaytemp, 2); // convert to a single byte * 2
|
||||
}
|
||||
|
||||
myDebug_P(PSTR(" Thermostat time is %02d:%02d:%02d %d/%d/%d"),
|
||||
EMS_Thermostat.hour,
|
||||
EMS_Thermostat.minute,
|
||||
EMS_Thermostat.second,
|
||||
EMS_Thermostat.day,
|
||||
EMS_Thermostat.month,
|
||||
EMS_Thermostat.year + 2000);
|
||||
|
||||
if (EMS_Thermostat.mode == 0) {
|
||||
myDebug_P(PSTR(" Mode is set to low"));
|
||||
} else if (EMS_Thermostat.mode == 1) {
|
||||
myDebug_P(PSTR(" Mode is set to manual"));
|
||||
} else if (EMS_Thermostat.mode == 2) {
|
||||
myDebug_P(PSTR(" Mode is set to auto"));
|
||||
} else {
|
||||
myDebug_P(PSTR(" Mode is set to ?"));
|
||||
}
|
||||
// Render Thermostat Date & Time
|
||||
myDebug_P(PSTR(" Thermostat time is %02d:%02d:%02d %d/%d/%d"),
|
||||
EMS_Thermostat.hour,
|
||||
EMS_Thermostat.minute,
|
||||
EMS_Thermostat.second,
|
||||
EMS_Thermostat.day,
|
||||
EMS_Thermostat.month,
|
||||
EMS_Thermostat.year + 2000);
|
||||
|
||||
// Render Termostat Mode
|
||||
if (EMS_Thermostat.mode == 0) {
|
||||
myDebug_P(PSTR(" Mode is set to low"));
|
||||
} else if (EMS_Thermostat.mode == 1) {
|
||||
myDebug_P(PSTR(" Mode is set to manual"));
|
||||
} else if (EMS_Thermostat.mode == 2) {
|
||||
myDebug_P(PSTR(" Mode is set to auto"));
|
||||
} else {
|
||||
myDebug_P(PSTR(" Mode is set to ?"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -695,13 +698,7 @@ void publishValues(bool force) {
|
||||
rootThermostat[THERMOSTAT_HC] = _int_to_char(s, EMSESP_Status.heating_circuit);
|
||||
|
||||
// different logic depending on thermostat types
|
||||
if ((ems_getThermostatModel() == EMS_MODEL_EASY) || (ems_getThermostatModel() == EMS_MODEL_BOSCHEASY)) {
|
||||
if (abs(EMS_Thermostat.setpoint_roomTemp) < EMS_VALUE_SHORT_NOTSET)
|
||||
rootThermostat[THERMOSTAT_SELTEMP] = (double)EMS_Thermostat.setpoint_roomTemp / 10;
|
||||
if (abs(EMS_Thermostat.curr_roomTemp) < EMS_VALUE_SHORT_NOTSET)
|
||||
rootThermostat[THERMOSTAT_CURRTEMP] = (double)EMS_Thermostat.curr_roomTemp / 10;
|
||||
|
||||
} else if (ems_getThermostatModel() == EMS_MODEL_FR10) {
|
||||
if ((ems_getThermostatModel() == EMS_MODEL_EASY) || (ems_getThermostatModel() == EMS_MODEL_BOSCHEASY) || (ems_getThermostatModel() == EMS_MODEL_FR10) || (ems_getThermostatModel() == EMS_MODEL_FW100)) {
|
||||
if (abs(EMS_Thermostat.setpoint_roomTemp) < EMS_VALUE_SHORT_NOTSET)
|
||||
rootThermostat[THERMOSTAT_SELTEMP] = (double)EMS_Thermostat.setpoint_roomTemp / 10;
|
||||
if (abs(EMS_Thermostat.curr_roomTemp) < EMS_VALUE_SHORT_NOTSET)
|
||||
|
||||
17
src/ems.cpp
17
src/ems.cpp
@@ -95,8 +95,8 @@ void _process_RCPLUSStatusHeating(_EMS_RxTelegram * EMS_RxTelegram);
|
||||
void _process_RCPLUSStatusHeating(_EMS_RxTelegram * EMS_RxTelegram);
|
||||
void _process_RCPLUSStatusMode(_EMS_RxTelegram * EMS_RxTelegram);
|
||||
|
||||
// Junkers FR10
|
||||
void _process_FR10StatusMessage(_EMS_RxTelegram * EMS_RxTelegram);
|
||||
// Junkers FR10 & FW100
|
||||
void _process_JunkersStatusMessage(_EMS_RxTelegram * EMS_RxTelegram);
|
||||
|
||||
/**
|
||||
* Recognized EMS types and the functions they call to process the telegrams
|
||||
@@ -173,7 +173,7 @@ const _EMS_Type EMS_Types[] = {
|
||||
{EMS_MODEL_ALL, EMS_TYPE_RCPLUSStatusMode, "RCPLUSStatusMode", _process_RCPLUSStatusMode},
|
||||
|
||||
// Junkers FR10
|
||||
{EMS_MODEL_ALL, EMS_TYPE_FR10StatusMessage, "FR10StatusMessage", _process_FR10StatusMessage}
|
||||
{EMS_MODEL_ALL, EMS_TYPE_JunkersStatusMessage, "JunkersStatusMessage", _process_JunkersStatusMessage}
|
||||
|
||||
|
||||
};
|
||||
@@ -1312,12 +1312,11 @@ void _process_RCPLUSStatusMode(_EMS_RxTelegram * EMS_RxTelegram) {
|
||||
/**
|
||||
* FR10 Junkers - type x6F01
|
||||
*/
|
||||
void _process_FR10StatusMessage(_EMS_RxTelegram * EMS_RxTelegram) {
|
||||
if (EMS_RxTelegram->data_length == 6) {
|
||||
// e.g. 90 00 FF 00 00 6F 03 01 00 BE 00 BF
|
||||
EMS_Thermostat.curr_roomTemp = _toByte(EMS_OFFSET_FR10StatusMessage_curr); // value is * 10
|
||||
EMS_Thermostat.setpoint_roomTemp = _toByte(EMS_OFFSET_FR10StatusMessage_setpoint); // value is * 10, which is different from other EMS+ devices
|
||||
}
|
||||
void _process_JunkersStatusMessage(_EMS_RxTelegram * EMS_RxTelegram) {
|
||||
// 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.curr_roomTemp = _toShort(EMS_OFFSET_JunkersStatusMessage_curr); // value is * 10
|
||||
EMS_Thermostat.setpoint_roomTemp = _toShort(EMS_OFFSET_JunkersStatusMessage_setpoint); // value is * 10
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -109,10 +109,10 @@
|
||||
#define EMS_OFFSET_RCPLUSStatusMessage_curr 0 // current temp
|
||||
#define EMS_OFFSET_RCPLUSGet_mode_day 8 // day/night mode
|
||||
|
||||
// Junkers FR10 (EMS Plus)
|
||||
#define EMS_TYPE_FR10StatusMessage 0x6F // is an automatic thermostat broadcast giving us temps
|
||||
#define EMS_OFFSET_FR10StatusMessage_setpoint 3 // setpoint temp
|
||||
#define EMS_OFFSET_FR10StatusMessage_curr 5 // current temp
|
||||
// Junkers FR10, FW100 (EMS Plus)
|
||||
#define EMS_TYPE_JunkersStatusMessage 0x6F // is an automatic thermostat broadcast giving us temps
|
||||
#define EMS_OFFSET_JunkersStatusMessage_setpoint 2 // setpoint temp
|
||||
#define EMS_OFFSET_JunkersStatusMessage_curr 4 // current temp
|
||||
|
||||
|
||||
// Known EMS types
|
||||
@@ -139,6 +139,7 @@ typedef enum {
|
||||
EMS_MODEL_CW100,
|
||||
EMS_MODEL_1010,
|
||||
EMS_MODEL_OT,
|
||||
EMS_MODEL_FW100,
|
||||
EMS_MODEL_FR10,
|
||||
EMS_MODEL_FR100,
|
||||
EMS_MODEL_FR110,
|
||||
@@ -208,6 +209,7 @@ const _Thermostat_Type Thermostat_Types[] = {
|
||||
{EMS_MODEL_ES73, 76, 0x10, "Sieger ES73", EMS_THERMOSTAT_WRITE_YES},
|
||||
|
||||
// Junkers
|
||||
{EMS_MODEL_FW100, 105, 0x10, "Junkers FW100", EMS_THERMOSTAT_WRITE_NO},
|
||||
{EMS_MODEL_FR10, 111, 0x18, "Junkers FR10", EMS_THERMOSTAT_WRITE_NO},
|
||||
{EMS_MODEL_FR100, 105, 0x18, "Junkers FR100", EMS_THERMOSTAT_WRITE_NO},
|
||||
{EMS_MODEL_FR110, 108, 0x18, "Junkers FR110", EMS_THERMOSTAT_WRITE_NO},
|
||||
|
||||
Reference in New Issue
Block a user