|
@@ -1084,6 +1084,107 @@ void setConfig(char *param, char *value)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ // DISPLAY
|
|
|
+ else if (strcmp(param, "dispint") == 0)
|
|
|
+ {
|
|
|
+ int valueInt = atoi(value);
|
|
|
+ if (valueInt != confDisplay.displayInterval)
|
|
|
+ {
|
|
|
+ if (valueInt >= 1 && valueInt <= 60)
|
|
|
+ {
|
|
|
+ confDisplay.displayInterval = valueInt;
|
|
|
+ confDisplay_wasChanged = true;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ sprintf_P(logBuf, PGMStr_conf_invalidValue, param);
|
|
|
+ sendLog(logBuf, LOGLEVEL_ERROR);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ else if (strcmp(param, "disptout") == 0)
|
|
|
+ {
|
|
|
+ int valueInt = atoi(value);
|
|
|
+ if (valueInt != confDisplay.displayTimeout)
|
|
|
+ {
|
|
|
+ if (valueInt >= 2 && valueInt <= 3600)
|
|
|
+ {
|
|
|
+ confDisplay.displayTimeout = valueInt;
|
|
|
+ confDisplay_wasChanged = true;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ sprintf_P(logBuf, PGMStr_conf_invalidValue, param);
|
|
|
+ sendLog(logBuf, LOGLEVEL_ERROR);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ else if (strcmp(param, "pirendisp") == 0)
|
|
|
+ {
|
|
|
+ bool tmpval;
|
|
|
+ if (atoi(value) == 1)
|
|
|
+ tmpval = true;
|
|
|
+ else
|
|
|
+ tmpval = false;
|
|
|
+
|
|
|
+ if (tmpval != confDisplay.PIRenablesDisplay)
|
|
|
+ {
|
|
|
+ confDisplay.PIRenablesDisplay = tmpval;
|
|
|
+ confDisplay_wasChanged = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // /DISPLAY
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // SENSORS
|
|
|
+ else if (strcmp(param, "measint") == 0)
|
|
|
+ {
|
|
|
+ int valueInt = atoi(value);
|
|
|
+ if (valueInt != confSens.measureInterval)
|
|
|
+ {
|
|
|
+ if (valueInt >= 5 && valueInt <= 60)
|
|
|
+ {
|
|
|
+ confSens.measureInterval = valueInt;
|
|
|
+ confSens_wasChanged = true;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ sprintf_P(logBuf, PGMStr_conf_invalidValue, param);
|
|
|
+ sendLog(logBuf, LOGLEVEL_ERROR);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #ifdef ENABLE_SENSOR_DHT22
|
|
|
+ else if (strcmp(param, "dht_tempcorr") == 0)
|
|
|
+ {
|
|
|
+ float valueFloat = atof(value);
|
|
|
+ if (valueFloat != confSens.DHT_tempCorrVal)
|
|
|
+ {
|
|
|
+ if (valueFloat >= -5.0 && valueFloat <= 5.0)
|
|
|
+ {
|
|
|
+ confSens.DHT_tempCorrVal = valueFloat;
|
|
|
+ confSens_wasChanged = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ else if (strcmp(param, "dht_humcorr") == 0)
|
|
|
+ {
|
|
|
+ int valueInt = atoi(value);
|
|
|
+ if (valueInt != confSens.DHT_humCorrVal)
|
|
|
+ {
|
|
|
+ if (valueInt >= -40 && valueInt <= 40)
|
|
|
+ {
|
|
|
+ confSens.DHT_humCorrVal = valueInt;
|
|
|
+ confSens_wasChanged = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endif //ENABLE_SENSOR_DHT22
|
|
|
+
|
|
|
#ifdef ENABLE_SENSORS_ONEWIRE
|
|
|
// assign sensors - console commands
|
|
|
else if (strcmp(param, "sens_feed") == 0)
|
|
@@ -1170,10 +1271,12 @@ void setConfig(char *param, char *value)
|
|
|
sendLog(logBuf, LOGLEVEL_ERROR);
|
|
|
}
|
|
|
}
|
|
|
- #endif
|
|
|
+ #endif // ENABLE_SENSORS_ONEWIRE
|
|
|
+ // /SENSORS - confSens
|
|
|
|
|
|
+
|
|
|
|
|
|
- // confTherm
|
|
|
+ // THERMOSTAT - confTherm
|
|
|
#ifdef FIRMWARE_VARIANT_THERMOSTAT
|
|
|
else if (strcmp(param, "autosavetemp") == 0)
|
|
|
{
|
|
@@ -1258,72 +1361,6 @@ void setConfig(char *param, char *value)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- else if (strcmp(param, "measint") == 0)
|
|
|
- {
|
|
|
- int valueInt = atoi(value);
|
|
|
- if (valueInt != confSens.measureInterval)
|
|
|
- {
|
|
|
- if (valueInt >= 5 && valueInt <= 60)
|
|
|
- {
|
|
|
- confSens.measureInterval = valueInt;
|
|
|
- confSens_wasChanged = true;
|
|
|
- }
|
|
|
- else {
|
|
|
- sprintf_P(logBuf, PGMStr_conf_invalidValue, param);
|
|
|
- sendLog(logBuf, LOGLEVEL_ERROR);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- else if (strcmp(param, "dispint") == 0)
|
|
|
- {
|
|
|
- int valueInt = atoi(value);
|
|
|
- if (valueInt != confDisplay.displayInterval)
|
|
|
- {
|
|
|
- if (valueInt >= 1 && valueInt <= 60)
|
|
|
- {
|
|
|
- confDisplay.displayInterval = valueInt;
|
|
|
- confDisplay_wasChanged = true;
|
|
|
- }
|
|
|
- else {
|
|
|
- sprintf_P(logBuf, PGMStr_conf_invalidValue, param);
|
|
|
- sendLog(logBuf, LOGLEVEL_ERROR);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- else if (strcmp(param, "disptout") == 0)
|
|
|
- {
|
|
|
- int valueInt = atoi(value);
|
|
|
- if (valueInt != confDisplay.displayTimeout)
|
|
|
- {
|
|
|
- if (valueInt >= 2 && valueInt <= 3600)
|
|
|
- {
|
|
|
- confDisplay.displayTimeout = valueInt;
|
|
|
- confDisplay_wasChanged = true;
|
|
|
- }
|
|
|
- else {
|
|
|
- sprintf_P(logBuf, PGMStr_conf_invalidValue, param);
|
|
|
- sendLog(logBuf, LOGLEVEL_ERROR);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- else if (strcmp(param, "pirendisp") == 0)
|
|
|
- {
|
|
|
- bool tmpval;
|
|
|
- if (atoi(value) == 1)
|
|
|
- tmpval = true;
|
|
|
- else
|
|
|
- tmpval = false;
|
|
|
-
|
|
|
- if (tmpval != confDisplay.PIRenablesDisplay)
|
|
|
- {
|
|
|
- confDisplay.PIRenablesDisplay = tmpval;
|
|
|
- confDisplay_wasChanged = true;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
else if (strcmp(param, "pirendispps0") == 0)
|
|
|
{
|
|
|
bool tmpval;
|
|
@@ -1597,10 +1634,11 @@ void setConfig(char *param, char *value)
|
|
|
}
|
|
|
}
|
|
|
#endif // FIRMWARE_VARIANT_THERMOSTAT
|
|
|
-
|
|
|
+ // /THERMOSTAT
|
|
|
|
|
|
|
|
|
- // confHeatc
|
|
|
+
|
|
|
+ // HEAT CONTROL - confHeatc
|
|
|
#ifdef FIRMWARE_VARIANT_HEATCONTROL
|
|
|
else if (strcmp(param, "heatcm20") == 0)
|
|
|
{
|
|
@@ -2028,38 +2066,9 @@ void setConfig(char *param, char *value)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- #endif
|
|
|
-
|
|
|
-
|
|
|
+ #endif //FIRMWARE_VARIANT_HEATCONTROL
|
|
|
|
|
|
|
|
|
- // sensors
|
|
|
-
|
|
|
- else if (strcmp(param, "dhtcorrt") == 0)
|
|
|
- {
|
|
|
- float valueFloat = atof(value);
|
|
|
- if (valueFloat != confSens.DHT_tempCorrVal)
|
|
|
- {
|
|
|
- if (valueFloat >= -5.0 && valueFloat <= 5.0)
|
|
|
- {
|
|
|
- confSens.DHT_tempCorrVal = valueFloat;
|
|
|
- confSens_wasChanged = true;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- else if (strcmp(param, "dhtcorrh") == 0)
|
|
|
- {
|
|
|
- int valueInt = atoi(value);
|
|
|
- if (valueInt != confSens.DHT_humCorrVal)
|
|
|
- {
|
|
|
- if (valueInt >= -40 && valueInt <= 40)
|
|
|
- {
|
|
|
- confSens.DHT_humCorrVal = valueInt;
|
|
|
- confSens_wasChanged = true;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
else {
|
|
|
snprintf_P(logBuf, LOG_BUFFER_SIZE, PGMStr_conf_setConf_unknownParamName, param);
|