|
@@ -411,6 +411,8 @@ void printConfig2() {
|
|
|
Serial.println(setTempMin);
|
|
|
Serial.print("tempMax: ");
|
|
|
Serial.println(setTempMax);
|
|
|
+ Serial.print("tempLow: ");
|
|
|
+ Serial.print(setTempLow);
|
|
|
Serial.print("hyst: ");
|
|
|
Serial.println(hysteresis);
|
|
|
Serial.print("tempCorr: ");
|
|
@@ -546,6 +548,25 @@ bool loadConfig2() {
|
|
|
domoticzIdx_ThermostatMode = atoi(json["domIdxMode"] | "");
|
|
|
domoticzIdx_TempHumSensor = atoi(json["domIdxTempHum"] | "");
|
|
|
domoticzIdx_PIR = atoi(json["domIdxPIR"] | "");
|
|
|
+ strlcpy(outTemp_topic_in, json["outTempTop"] | "", 51);
|
|
|
+ strlcpy(outHum_topic_in, json["outHumTop"] | "", 51);
|
|
|
+
|
|
|
+ if (atoi(json["autoSaveTemp"] | "") == 1) autoSaveSetTemp = true;
|
|
|
+ else autoSaveSetTemp = false;
|
|
|
+
|
|
|
+ if (atoi(json["autoSaveMode"] | "") == 1) autoSaveHeatingMode = true;
|
|
|
+ else autoSaveHeatingMode = false;
|
|
|
+
|
|
|
+ heatingMinOffTime = atoi(json["minOffTime"] | "");
|
|
|
+ setTempMin = atof(json["tempMin"] | "");
|
|
|
+ setTempMax = atof(json["tempMax"] | "");
|
|
|
+ setTempLow = atof(json["tempLow"] | "");
|
|
|
+ hysteresis = atof(json["hyst"] | "");
|
|
|
+ tempCorrVal = atof(json["tempCorr"] | "");
|
|
|
+ humCorrVal = atoi(json["humCorr"] | "");
|
|
|
+ measureInterval = atoi(json["measInt"] | "");
|
|
|
+ displayInterval = atoi(json["dispInt"] | "");
|
|
|
+ displayTimeout = atoi(json["dispTout"] | "");
|
|
|
|
|
|
Serial.println("Loaded config values:");
|
|
|
printConfig2();
|
|
@@ -606,10 +627,16 @@ bool saveConfig() { // safeConfig
|
|
|
json["mqttPass"] = mqtt_pass;
|
|
|
json["inTop"] = mqtt_topic_in;
|
|
|
json["outTop"] = mqtt_topic_out;
|
|
|
- json["outRet"] = mqtt_outRetain;
|
|
|
+
|
|
|
+ if(mqtt_outRetain) json["outRet"] = 1;
|
|
|
+ else json["outRet"] = 0;
|
|
|
+
|
|
|
json["willTop"] = mqtt_willTopic;
|
|
|
json["willQos"] = mqtt_willQos;
|
|
|
- json["willRet"] = mqtt_willRetain;
|
|
|
+
|
|
|
+ if(mqtt_willRetain) json["willRet"] = 1;
|
|
|
+ else json["willRet"] = 0;
|
|
|
+
|
|
|
json["willMsg"] = mqtt_willMsg;
|
|
|
json["domOutTop"] = domoticz_out_topic;
|
|
|
|
|
@@ -635,6 +662,25 @@ bool saveConfig2() { // safeConfig2
|
|
|
json["domIdxMode"] = domoticzIdx_ThermostatMode;
|
|
|
json["domIdxTempHum"] = domoticzIdx_TempHumSensor;
|
|
|
json["domIdxPIR"] = domoticzIdx_PIR;
|
|
|
+ json["outTempTop"] = outTemp_topic_in;
|
|
|
+ json["outHumTop"] = outHum_topic_in;
|
|
|
+
|
|
|
+ if(autoSaveSetTemp) json["autoSaveTemp"] = 1;
|
|
|
+ else json["autoSaveTemp"] = 0;
|
|
|
+
|
|
|
+ if(autoSaveHeatingMode) json["autoSaveMode"] = 1;
|
|
|
+ else json["autoSaveMode"] = 0;
|
|
|
+
|
|
|
+ json["minOffTime"] = heatingMinOffTime;
|
|
|
+ json["tempMin"] = setTempMin;
|
|
|
+ json["tempMax"] = setTempMax;
|
|
|
+ json["tempLow"] = setTempLow;
|
|
|
+ json["hyst"] = hysteresis;
|
|
|
+ json["tempCorr"] = tempCorrVal;
|
|
|
+ json["humCorr"] = humCorrVal;
|
|
|
+ json["measInt"] = measureInterval;
|
|
|
+ json["dispInt"] = displayInterval;
|
|
|
+ json["dispTout"] = displayTimeout;
|
|
|
|
|
|
yield();
|
|
|
|