This commit is contained in:
proddy
2019-02-23 14:58:23 +01:00
5 changed files with 25 additions and 0 deletions

View File

@@ -240,6 +240,7 @@ These incoming MQTT topics are also handled:
| thermostat_cmd_temp | TOPIC_THERMOSTAT_CMD_TEMP | temperature as a float | sets the thermostat current setpoint |
| thermostat_cmd_mode | TOPIC_THERMOSTAT_CMD_MODE | auto, day, night | sets the thermostat mode |
| wwactivated | TOPIC_BOILER_WWACTIVATED | 0 or 1 | turns boiler warm water on/off (not tap) |
| boiler_cmd_wwtemp | TOPIC_BOILER_CMD_WWTEMP | temperature as a float | sets the boiler wwtemp current setpoint |
If MQTT is not used use 'set mqtt_host' to remove it.

View File

@@ -18,3 +18,13 @@
temp_step: 0.5
- platform: mqtt
name: boiler
min_temp: 40
max_temp: 60
temp_step: 1
current_temperature_topic: "home/ems-esp/boiler_data"
temperature_state_topic: "home/ems-esp/boiler_data"
temperature_command_topic: "home/ems-esp/boiler_cmd_wwtemp"
current_temperature_template: "{{ value_json.wWCurTmp }}"
temperature_state_template: "{{ value_json.wWSelTemp }}"

View File

@@ -57,3 +57,6 @@ views:
- sensor.dark_sky_temperature
- type: thermostat
entity: climate.thermostat
- type: thermostat
name: WarmWater
entity: climate.boiler

View File

@@ -848,6 +848,7 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
myESP.mqttSubscribe(TOPIC_THERMOSTAT_CMD_TEMP);
myESP.mqttSubscribe(TOPIC_THERMOSTAT_CMD_MODE);
myESP.mqttSubscribe(TOPIC_BOILER_WWACTIVATED);
myESP.mqttSubscribe(TOPIC_BOILER_CMD_WWTEMP);
myESP.mqttSubscribe(TOPIC_SHOWER_TIMER);
myESP.mqttSubscribe(TOPIC_SHOWER_ALERT);
myESP.mqttSubscribe(TOPIC_SHOWER_COLDSHOT);
@@ -900,6 +901,15 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
}
}
// boiler wwtemp changes
if (strcmp(topic, TOPIC_BOILER_CMD_WWTEMP) == 0) {
float f = strtof((char *)message, 0);
char s[10] = {0};
myDebug("MQTT topic: boiler warm water temperature value %s", _float_to_char(s, f));
ems_setWarmWaterTemp(f);
publishValues(true); // publish back immediately
}
// shower timer
if (strcmp(topic, TOPIC_SHOWER_TIMER) == 0) {
if (message[0] == '1') {

View File

@@ -36,6 +36,7 @@
#define TOPIC_BOILER_TAPWATER_ACTIVE "tapwater_active" // if hot tap water is running
#define TOPIC_BOILER_HEATING_ACTIVE "heating_active" // if heating is on
#define TOPIC_BOILER_WWACTIVATED "wwactivated" // for receiving MQTT message to change water on/off
#define TOPIC_BOILER_CMD_WWTEMP "boiler_cmd_wwtemp" // for received boiler wwtemp changes via MQTT
// shower time
#define TOPIC_SHOWERTIME "showertime" // for sending shower time results