mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
add mqtt-subscription for WWcirculation
This commit is contained in:
@@ -1423,6 +1423,7 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
|
||||
// these three need to be unique topics
|
||||
myESP.mqttSubscribe(TOPIC_BOILER_CMD_WWACTIVATED);
|
||||
myESP.mqttSubscribe(TOPIC_BOILER_CMD_WWONETIME);
|
||||
myESP.mqttSubscribe(TOPIC_BOILER_CMD_WWCIRCULATION);
|
||||
myESP.mqttSubscribe(TOPIC_BOILER_CMD_WWTEMP);
|
||||
|
||||
// generic incoming MQTT command for EMS-ESP
|
||||
@@ -1552,6 +1553,16 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
|
||||
return;
|
||||
}
|
||||
|
||||
// wwCirculation
|
||||
if (strcmp(topic, TOPIC_BOILER_CMD_WWCIRCULATION) == 0) {
|
||||
if (message[0] == '1' || strcmp(message, "on") == 0) {
|
||||
ems_setWarmWaterCirculation(true);
|
||||
} else if (message[0] == '0' || strcmp(message, "off") == 0) {
|
||||
ems_setWarmWaterCirculation(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