- RC35: sets day/night/auto mode via mqtt command

- RC35: sets setpoint temperature in type 0x3D depends on current 
night/day mode
This commit is contained in:
Christian Weithe
2019-01-10 22:26:33 +01:00
parent 30deb03e58
commit cec8ced7ac
2 changed files with 6 additions and 3 deletions

View File

@@ -737,8 +737,10 @@ void MQTTCallback(unsigned int type, const char * topic, const char * message) {
myDebug("MQTT topic: thermostat mode value %s", message); myDebug("MQTT topic: thermostat mode value %s", message);
if (strcmp((char *)message, "auto") == 0) { if (strcmp((char *)message, "auto") == 0) {
ems_setThermostatMode(2); ems_setThermostatMode(2);
} else if (strcmp((char *)message, "manual") == 0) { } else if (strcmp((char *)message, "day") == 0) {
ems_setThermostatMode(1); ems_setThermostatMode(1);
} else if (strcmp((char *)message, "night") == 0) {
ems_setThermostatMode(0);
} }
} }

View File

@@ -212,6 +212,7 @@ typedef struct {
float setpoint_roomTemp; // current set temp float setpoint_roomTemp; // current set temp
float curr_roomTemp; // current room temp float curr_roomTemp; // current room temp
uint8_t mode; // 0=low, 1=manual, 2=auto uint8_t mode; // 0=low, 1=manual, 2=auto
bool day_mode; // 0=night, 1=day
uint8_t hour; uint8_t hour;
uint8_t minute; uint8_t minute;
uint8_t second; uint8_t second;