This commit is contained in:
proddy
2019-02-04 21:44:13 +01:00
parent f2556aa203
commit a0303f0704
8 changed files with 109 additions and 53 deletions

View File

@@ -82,7 +82,6 @@ command_t PROGMEM project_cmds[] = {
{"set dallas_gpio <pin>", "set the pin for the external Dallas temperature sensor (D5=14)"},
{"set thermostat_type <hex type ID>", "set the thermostat type id (e.g. 10 for 0x10)"},
{"set boiler_type <hex type ID>", "set the boiler type id (e.g. 8 for 0x08)"},
{"info", "show the values"},
{"log <n | b | t | r | v>", "set logging mode to none, basic, thermostat only, raw or verbose"},
{"publish", "publish values to MQTT"},
@@ -845,6 +844,7 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
if (type == MQTT_CONNECT_EVENT) {
myESP.mqttSubscribe(TOPIC_THERMOSTAT_CMD_TEMP);
myESP.mqttSubscribe(TOPIC_THERMOSTAT_CMD_MODE);
myESP.mqttSubscribe(TOPIC_BOILER_WWACTIVATED);
myESP.mqttSubscribe(TOPIC_SHOWER_TIMER);
myESP.mqttSubscribe(TOPIC_SHOWER_ALERT);
myESP.mqttSubscribe(TOPIC_SHOWER_COLDSHOT);
@@ -888,6 +888,16 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
}
}
// wwActivated
if (strcmp(topic, TOPIC_BOILER_WWACTIVATED) == 0) {
if (message[0] == '1') {
ems_setWarmWaterActivated(true);
} else if (message[0] == '0') {
ems_setWarmWaterActivated(false);
}
publishValues(true); // publish back immediately
}
// shower timer
if (strcmp(topic, TOPIC_SHOWER_TIMER) == 0) {
if (message[0] == '1') {