mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
add functionality to get and set the tapwater eco/comfort mode
This commit is contained in:
@@ -299,6 +299,7 @@ void showInfo() {
|
||||
// UBAParameterWW
|
||||
_renderBoolValue("Warm Water activated", EMS_Boiler.wWActivated);
|
||||
_renderBoolValue("Warm Water circulation pump available", EMS_Boiler.wWCircPump);
|
||||
myDebug(" Warm Water is set to %s\n", (EMS_Boiler.wWComfort ? "Comfort" : "ECO"));
|
||||
_renderIntValue("Warm Water selected temperature", "C", EMS_Boiler.wWSelTemp);
|
||||
_renderIntValue("Warm Water desired temperature", "C", EMS_Boiler.wWDesiredTemp);
|
||||
|
||||
@@ -396,6 +397,8 @@ void publishValues(bool force) {
|
||||
|
||||
rootBoiler["wWSelTemp"] = _int_to_char(s, EMS_Boiler.wWSelTemp);
|
||||
rootBoiler["wWActivated"] = _bool_to_char(s, EMS_Boiler.wWActivated);
|
||||
sprintf(s, "%s", (EMS_Boiler.wWComfort ? "Comfort" : "ECO"));
|
||||
rootBoiler["wWComfort"] = s;
|
||||
rootBoiler["wWCurTmp"] = _float_to_char(s, EMS_Boiler.wWCurTmp);
|
||||
|
||||
sprintf(s, "%i.%i", EMS_Boiler.wWCurFlow/10, EMS_Boiler.wWCurFlow%10);
|
||||
|
||||
16
src/ems.cpp
16
src/ems.cpp
@@ -161,6 +161,7 @@ void ems_init() {
|
||||
EMS_Boiler.wWSelTemp = EMS_VALUE_INT_NOTSET; // Warm Water selected temperature
|
||||
EMS_Boiler.wWCircPump = EMS_VALUE_INT_NOTSET; // Warm Water circulation pump available
|
||||
EMS_Boiler.wWDesiredTemp = EMS_VALUE_INT_NOTSET; // Warm Water desired temperature to prevent infection
|
||||
EMS_Boiler.wWComfort = EMS_VALUE_INT_NOTSET;
|
||||
|
||||
// UBAMonitorFast
|
||||
EMS_Boiler.selFlowTemp = EMS_VALUE_INT_NOTSET; // Selected flow temperature
|
||||
@@ -743,6 +744,7 @@ void _process_UBAParameterWW(uint8_t * data, uint8_t length) {
|
||||
EMS_Boiler.wWSelTemp = data[2];
|
||||
EMS_Boiler.wWCircPump = (data[6] == 0xFF); // 0xFF means on
|
||||
EMS_Boiler.wWDesiredTemp = data[8];
|
||||
EMS_Boiler.wWComfort = (data[EMS_OFFSET_UBAParameterWW_wwComfort] == 0x00);
|
||||
|
||||
// when we receieve this, lets force an MQTT publish
|
||||
EMS_Sys_Status.emsRefreshed = true;
|
||||
@@ -1238,6 +1240,20 @@ void ems_setWarmWaterActivated(bool activated) {
|
||||
EMS_TxQueue.push(EMS_TxTelegram);
|
||||
}
|
||||
|
||||
void ems_setWarmWaterModeComfort(bool comfort) {
|
||||
myDebug("Setting boiler warm water to comfort mode %s\n", comfort ? "Comfort" : "Eco");
|
||||
|
||||
_EMS_TxTelegram EMS_TxTelegram = EMS_TX_TELEGRAM_NEW; // create new Tx
|
||||
|
||||
EMS_TxTelegram.action = EMS_TX_TELEGRAM_WRITE;
|
||||
EMS_TxTelegram.dest = EMS_ID_BOILER;
|
||||
EMS_TxTelegram.type = EMS_TYPE_UBAParameterWW;
|
||||
EMS_TxTelegram.offset = EMS_OFFSET_UBAParameterWW_wwComfort;
|
||||
EMS_TxTelegram.length = EMS_MIN_TELEGRAM_LENGTH;
|
||||
EMS_TxTelegram.type_validate = EMS_ID_NONE; // don't validate
|
||||
EMS_TxTelegram.dataValue = (comfort ? EMS_VALUE_UBAParameterWW_wwComfort_Comfort : EMS_VALUE_UBAParameterWW_wwComfort_Eco); // 0x00 is on, 0xD8 is off
|
||||
EMS_TxQueue.push(EMS_TxTelegram);
|
||||
}
|
||||
/**
|
||||
* Activate / De-activate the Warm Tap Water
|
||||
* true = on, false = off
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
#define EMS_OFFSET_UBAParameterWW_wwtemp 2 // WW Temperature
|
||||
#define EMS_OFFSET_UBAParameterWW_wwactivated 1 // WW Activated
|
||||
|
||||
#define EMS_OFFSET_UBAParameterWW_wwComfort 9 // WW is in comfort or eco mode
|
||||
#define EMS_VALUE_UBAParameterWW_wwComfort_Comfort 0x00 // the value for comfort
|
||||
#define EMS_VALUE_UBAParameterWW_wwComfort_Eco 0xD8 // the value for eco
|
||||
|
||||
/*
|
||||
* Thermostat...
|
||||
*/
|
||||
@@ -160,6 +164,7 @@ typedef struct { // UBAParameterWW
|
||||
uint8_t wWSelTemp; // Warm Water selected temperature
|
||||
uint8_t wWCircPump; // Warm Water circulation pump Available
|
||||
uint8_t wWDesiredTemp; // Warm Water desired temperature
|
||||
uint8_t wWComfort; // Warm water comfort or ECO mode
|
||||
|
||||
// UBAMonitorFast
|
||||
uint8_t selFlowTemp; // Selected flow temperature
|
||||
@@ -253,6 +258,7 @@ void ems_setThermostatTemp(float temp);
|
||||
void ems_setThermostatMode(uint8_t mode);
|
||||
void ems_setWarmWaterTemp(uint8_t temperature);
|
||||
void ems_setWarmWaterActivated(bool activated);
|
||||
void ems_setWarmWaterModeComfort(bool comfort);
|
||||
void ems_setWarmTapWaterActivated(bool activated);
|
||||
void ems_setExperimental(uint8_t value);
|
||||
void ems_setPoll(bool b);
|
||||
|
||||
Reference in New Issue
Block a user