mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
RC20RF tap water one time loading function
This commit is contained in:
@@ -592,6 +592,9 @@ void publishValues(bool force) {
|
||||
|
||||
if (EMS_Boiler.wWActivated != EMS_VALUE_INT_NOTSET)
|
||||
rootBoiler["wWActivated"] = _bool_to_char(s, EMS_Boiler.wWActivated);
|
||||
|
||||
if (EMS_Boiler.wWActivated != EMS_VALUE_INT_NOTSET)
|
||||
rootBoiler["wWOnetime"] = _bool_to_char(s, EMS_Boiler.wWOneTime);
|
||||
|
||||
if (EMS_Boiler.burnGas != EMS_VALUE_INT_NOTSET)
|
||||
rootBoiler["burnGas"] = _bool_to_char(s, EMS_Boiler.burnGas);
|
||||
@@ -1506,8 +1509,9 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
|
||||
// this is used for example for comfort, flowtemp
|
||||
myESP.mqttSubscribe(TOPIC_BOILER_CMD);
|
||||
|
||||
// these two need to be unqiue topics
|
||||
// these three need to be unqiue topics
|
||||
myESP.mqttSubscribe(TOPIC_BOILER_CMD_WWACTIVATED);
|
||||
myESP.mqttSubscribe(TOPIC_BOILER_CMD_WWONETIME);
|
||||
myESP.mqttSubscribe(TOPIC_BOILER_CMD_WWTEMP);
|
||||
|
||||
// generic incoming MQTT command for EMS-ESP
|
||||
@@ -1621,6 +1625,16 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
|
||||
return;
|
||||
}
|
||||
|
||||
// wwOneTime
|
||||
if (strcmp(topic, TOPIC_BOILER_CMD_WWONETIME) == 0) {
|
||||
if (message[0] == '1' || strcmp(message, "on") == 0) {
|
||||
ems_setWarmWaterOnetime(true);
|
||||
} else if (message[0] == '0' || strcmp(message, "off") == 0) {
|
||||
ems_setWarmWaterOnetime(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// boiler wwtemp changes
|
||||
if (strcmp(topic, TOPIC_BOILER_CMD_WWTEMP) == 0) {
|
||||
uint8_t t = atoi((char *)message);
|
||||
|
||||
Reference in New Issue
Block a user