mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 01:09:51 +03:00
Add features to WW messages (0x33, 0x34) to improve WW monitoring.
This commit is contained in:
@@ -299,6 +299,18 @@ void showInfo() {
|
||||
// UBAParameterWW
|
||||
_renderBoolValue("Warm Water activated", EMS_Boiler.wWActivated);
|
||||
_renderBoolValue("Warm Water circulation pump available", EMS_Boiler.wWCircPump);
|
||||
myDebug_P(PSTR(" Warm Water circulation pump type: %s"), EMS_Boiler.wWCircPumpType ? "charge pump" : "3-way pump");
|
||||
if (EMS_Boiler.wWCircPumpMode == 7) {
|
||||
myDebug_P(PSTR(" Warm Water circulation pump freq: continuous"));
|
||||
} else {
|
||||
char s[7];
|
||||
char buffer[2];
|
||||
buffer[0] = (EMS_Boiler.wWCircPumpMode % 10) + '0';
|
||||
buffer[1] = '\0';
|
||||
strlcpy(s, buffer, 3);
|
||||
strlcat(s, "x3min", sizeof(s));
|
||||
myDebug_P(PSTR(" Warm Water circulation pump freq: %s"), s);
|
||||
}
|
||||
if (EMS_Boiler.wWComfort == EMS_VALUE_UBAParameterWW_wwComfort_Hot) {
|
||||
myDebug_P(PSTR(" Warm Water comfort setting: Hot"));
|
||||
} else if (EMS_Boiler.wWComfort == EMS_VALUE_UBAParameterWW_wwComfort_Eco) {
|
||||
@@ -309,7 +321,7 @@ void showInfo() {
|
||||
|
||||
_renderIntValue("Warm Water selected temperature", "C", EMS_Boiler.wWSelTemp);
|
||||
_renderIntValue("Warm Water desinfection temperature", "C", EMS_Boiler.wWDesinfectTemp);
|
||||
_renderBoolValue("Warm Water Circulation active", EMS_Boiler.wWCirc);
|
||||
_renderBoolValue("Warm Water circulation active", EMS_Boiler.wWCirc);
|
||||
|
||||
// UBAMonitorWWMessage
|
||||
_renderUShortValue("Warm Water current temperature", "C", EMS_Boiler.wWCurTmp);
|
||||
@@ -635,7 +647,7 @@ bool publishSensorValues() {
|
||||
|
||||
// publish Boiler data via MQTT
|
||||
bool publishEMSValues_boiler() {
|
||||
const size_t capacity = JSON_OBJECT_SIZE(41); // must recalculate if more objects addded https://arduinojson.org/v6/assistant/
|
||||
const size_t capacity = JSON_OBJECT_SIZE(47); // must recalculate if more objects addded https://arduinojson.org/v6/assistant/
|
||||
DynamicJsonDocument doc(capacity);
|
||||
JsonObject rootBoiler = doc.to<JsonObject>();
|
||||
|
||||
@@ -670,6 +682,12 @@ bool publishEMSValues_boiler() {
|
||||
if (EMS_Boiler.wWCircPump != EMS_VALUE_BOOL_NOTSET) {
|
||||
rootBoiler["wWCircPump"] = EMS_Boiler.wWCircPump;
|
||||
}
|
||||
if (EMS_Boiler.wWCircPumpType != EMS_VALUE_BOOL_NOTSET) {
|
||||
rootBoiler["wWCiPuType"] = EMS_Boiler.wWCircPumpType;
|
||||
}
|
||||
if (EMS_Boiler.wWCircPumpMode != EMS_VALUE_INT_NOTSET) {
|
||||
rootBoiler["wWCiPuMode"] = EMS_Boiler.wWCircPumpMode;
|
||||
}
|
||||
if (EMS_Boiler.extTemp > EMS_VALUE_SHORT_NOTSET) {
|
||||
rootBoiler["outdoorTemp"] = (float)EMS_Boiler.extTemp / 10;
|
||||
}
|
||||
@@ -709,6 +727,18 @@ bool publishEMSValues_boiler() {
|
||||
if (EMS_Boiler.wWActivated != EMS_VALUE_BOOL_NOTSET) {
|
||||
rootBoiler["wWOnetime"] = _bool_to_char(s, EMS_Boiler.wWOneTime);
|
||||
}
|
||||
if (EMS_Boiler.wWActivated != EMS_VALUE_BOOL_NOTSET) {
|
||||
rootBoiler["wWDesinfecting"] = _bool_to_char(s, EMS_Boiler.wWDesinfecting);
|
||||
}
|
||||
if (EMS_Boiler.wWActivated != EMS_VALUE_BOOL_NOTSET) {
|
||||
rootBoiler["wWReady"] = _bool_to_char(s, EMS_Boiler.wWReadiness);
|
||||
}
|
||||
if (EMS_Boiler.wWActivated != EMS_VALUE_BOOL_NOTSET) {
|
||||
rootBoiler["wWRecharge"] = _bool_to_char(s, EMS_Boiler.wWRecharging);
|
||||
}
|
||||
if (EMS_Boiler.wWActivated != EMS_VALUE_BOOL_NOTSET) {
|
||||
rootBoiler["wWTempOK"] = _bool_to_char(s, EMS_Boiler.wWTemperaturOK);
|
||||
}
|
||||
if (EMS_Boiler.wWCirc != EMS_VALUE_BOOL_NOTSET) {
|
||||
rootBoiler["wWCirc"] = _bool_to_char(s, EMS_Boiler.wWCirc);
|
||||
}
|
||||
@@ -846,7 +876,19 @@ bool publishEMSValues_thermostat() {
|
||||
} else if (thermoMode == EMS_THERMOSTAT_MODE_NIGHT) {
|
||||
dataThermostat[THERMOSTAT_MODE] = "night";
|
||||
}
|
||||
|
||||
// Render Thermostat Mode2, only if its in Auto mode
|
||||
if (thermoMode == EMS_THERMOSTAT_MODE_AUTO) {
|
||||
thermoMode = _getThermostatMode2(hc_v);
|
||||
if (thermoMode == EMS_THERMOSTAT_MODE_NIGHT) {
|
||||
dataThermostat[THERMOSTAT_MODETYPE] = "night";
|
||||
} else if (thermoMode == EMS_THERMOSTAT_MODE_DAY) {
|
||||
dataThermostat[THERMOSTAT_MODETYPE] = "day";
|
||||
} else if (thermoMode == EMS_THERMOSTAT_MODE_COMFORT) {
|
||||
dataThermostat[THERMOSTAT_MODETYPE] = "comfort";
|
||||
} else if (thermoMode == EMS_THERMOSTAT_MODE_ECO) {
|
||||
dataThermostat[THERMOSTAT_MODETYPE] = "eco";
|
||||
}
|
||||
}
|
||||
|
||||
// if its not nested, send immediately
|
||||
if (!myESP.mqttUseNestedJson()) {
|
||||
|
||||
15
src/ems.cpp
15
src/ems.cpp
@@ -145,6 +145,8 @@ void ems_init() {
|
||||
EMS_Boiler.wWActivated = EMS_VALUE_BOOL_NOTSET; // Warm Water activated
|
||||
EMS_Boiler.wWSelTemp = EMS_VALUE_INT_NOTSET; // Warm Water selected temperature
|
||||
EMS_Boiler.wWCircPump = EMS_VALUE_BOOL_NOTSET; // Warm Water circulation pump available
|
||||
EMS_Boiler.wWCircPumpMode = EMS_VALUE_INT_NOTSET; // Warm Water circulation pump mode
|
||||
EMS_Boiler.wWCircPumpType = EMS_VALUE_BOOL_NOTSET; // Warm Water circulation pump mode
|
||||
EMS_Boiler.wWDesinfectTemp = EMS_VALUE_INT_NOTSET; // Warm Water desinfection temperature to prevent infection
|
||||
EMS_Boiler.wWComfort = EMS_VALUE_INT_NOTSET; // WW comfort mode
|
||||
|
||||
@@ -182,6 +184,11 @@ void ems_init() {
|
||||
EMS_Boiler.wWStarts = EMS_VALUE_LONG_NOTSET; // Warm Water # starts
|
||||
EMS_Boiler.wWWorkM = EMS_VALUE_LONG_NOTSET; // Warm Water # minutes
|
||||
EMS_Boiler.wWOneTime = EMS_VALUE_INT_NOTSET; // Warm Water one time function on/off
|
||||
EMS_Boiler.wWDesinfecting = EMS_VALUE_INT_NOTSET; // Warm Water desinfection on/off
|
||||
EMS_Boiler.wWReadiness = EMS_VALUE_INT_NOTSET; // Warm Water readiness on/off
|
||||
EMS_Boiler.wWRecharging = EMS_VALUE_INT_NOTSET; // Warm Water recharge on/off
|
||||
EMS_Boiler.wWTemperaturOK = EMS_VALUE_INT_NOTSET; // Warm Water temperatur ok on/off
|
||||
|
||||
EMS_Boiler.wWCurFlow = EMS_VALUE_INT_NOTSET; // WW current flow temp
|
||||
|
||||
// UBATotalUptimeMessage
|
||||
@@ -927,7 +934,7 @@ void _removeTxQueue() {
|
||||
|
||||
/**
|
||||
* Check if hot tap water or heating is active
|
||||
* using a quick hack for checking the heating. Selected Flow Temp >= 70
|
||||
* using a quick hack for checking the heating. Selected Flow Temp >= 30
|
||||
*/
|
||||
void _checkActive() {
|
||||
// hot tap water, using flow to check instead of the burner power
|
||||
@@ -948,6 +955,8 @@ void _checkActive() {
|
||||
void _process_UBAParameterWW(_EMS_RxTelegram * EMS_RxTelegram) {
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWActivated, 1); // 0xFF means on
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWCircPump, 6); // 0xFF means on
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWCircPumpMode, 7); // 1=1x3min... 6=6x3min, 7=continuous
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWCircPumpType, 10); // 0 = charge pump, 0xff = 3-way valve
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWSelTemp, 2);
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWDesinfectTemp, 8);
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWComfort, EMS_OFFSET_UBAParameterWW_wwComfort);
|
||||
@@ -979,6 +988,10 @@ void _process_UBAMonitorWWMessage(_EMS_RxTelegram * EMS_RxTelegram) {
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWStarts, 13);
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWWorkM, 10);
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWOneTime, 5, 1);
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWDesinfecting, 5, 2);
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWReadiness, 5, 3);
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWRecharging, 5, 4);
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWTemperaturOK, 5, 5);
|
||||
_setValue(EMS_RxTelegram, &EMS_Boiler.wWCurFlow, 9);
|
||||
}
|
||||
|
||||
|
||||
@@ -286,6 +286,8 @@ typedef struct {
|
||||
uint8_t wWActivated; // Warm Water activated
|
||||
uint8_t wWSelTemp; // Warm Water selected temperature
|
||||
uint8_t wWCircPump; // Warm Water circulation pump Available
|
||||
uint8_t wWCircPumpMode; // Warm Water circulation pump mode (1 = 1x3min, ..., 6=6x3min, 7 continuous)
|
||||
uint8_t wWCircPumpType; // Warm Water circulation pump type (0 = charge pump, 0xff = 3-way pump)
|
||||
uint8_t wWDesinfectTemp; // Warm Water desinfection temperature
|
||||
uint8_t wWComfort; // Warm water comfort or ECO mode
|
||||
|
||||
@@ -323,6 +325,10 @@ typedef struct {
|
||||
uint32_t wWStarts; // Warm Water # starts
|
||||
uint32_t wWWorkM; // Warm Water # minutes
|
||||
uint8_t wWOneTime; // Warm Water one time function on/off
|
||||
uint8_t wWDesinfecting; // Warm Water desinfection on/off
|
||||
uint8_t wWReadiness; // Warm Water readiness on/off
|
||||
uint8_t wWRecharging; // Warm Water recharge on/off
|
||||
uint8_t wWTemperaturOK; // Warm Water temperatur ok on/off
|
||||
uint8_t wWCurFlow; // Warm Water current flow in l/min
|
||||
|
||||
// UBATotalUptimeMessage
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
#define THERMOSTAT_SELTEMP "seltemp" // selected temperature
|
||||
#define THERMOSTAT_HC "hc" // which heating circuit number
|
||||
#define THERMOSTAT_MODE "mode" // mode
|
||||
#define THERMOSTAT_MODETYPE "modetype" // mode type
|
||||
#define THERMOSTAT_DAYTEMP "daytemp" // RC35 specific
|
||||
#define THERMOSTAT_NIGHTTEMP "nighttemp" // RC35 specific
|
||||
#define THERMOSTAT_HOLIDAYTEMP "holidayttemp" // RC35 specific
|
||||
|
||||
Reference in New Issue
Block a user