Command defines moved from i18n.h into the driver, driver name changed to thermostat

This commit is contained in:
Javier Arigita 2020-04-20 22:50:53 +02:00
parent c5b7109704
commit 4cac6deb3d
5 changed files with 1178 additions and 64 deletions

View File

@ -577,40 +577,6 @@
#define D_CMND_PING "Ping" #define D_CMND_PING "Ping"
#define D_JSON_PING "Ping" #define D_JSON_PING "Ping"
// Commands xdrv_39_heating.ino
#define D_CMND_HEATINGMODESET "HeatingModeSet"
#define D_CMND_TEMPFROSTPROTECTSET "TempFrostProtectSet"
#define D_CMND_CONTROLLERMODESET "ControllerModeSet"
#define D_CMND_INPUTSWITCHSET "InputSwitchSet"
#define D_CMND_OUTPUTRELAYSET "OutputRelaySet"
#define D_CMND_TIMEALLOWRAMPUPSET "TimeAllowRampupSet"
#define D_CMND_TEMPMEASUREDSET "TempMeasuredSet"
#define D_CMND_TEMPTARGETSET "TempTargetSet"
#define D_CMND_TEMPTARGETREAD "TempTargetRead"
#define D_CMND_TEMPMEASUREDREAD "TempMeasuredRead"
#define D_CMND_TEMPMEASUREDGRDREAD "TempMeasuredGrdRead"
#define D_CMND_TEMPSENSNUMBERSET "TempSensNumberSet"
#define D_CMND_STATEEMERGENCYSET "StateEmergencySet"
#define D_CMND_POWERMAXSET "PowerMaxSet"
#define D_CMND_TIMEMANUALTOAUTOSET "TimeManualToAutoSet"
#define D_CMND_TIMEONLIMITSET "TimeOnLimitSet"
#define D_CMND_PROPBANDSET "PropBandSet"
#define D_CMND_TIMERESETSET "TimeResetSet"
#define D_CMND_TIMEPICYCLESET "TimePiCycleSet"
#define D_CMND_TEMPANTIWINDUPRESETSET "TempAntiWindupResetSet"
#define D_CMND_TEMPHYSTSET "TempHystSet"
#define D_CMND_TIMEMAXACTIONSET "TimeMaxActionSet"
#define D_CMND_TIMEMINACTIONSET "TimeMinActionSet"
#define D_CMND_TIMEMINTURNOFFACTIONSET "TimeMinTurnoffActionSet"
#define D_CMND_TEMPRUPDELTINSET "TempRupDeltInSet"
#define D_CMND_TEMPRUPDELTOUTSET "TempRupDeltOutSet"
#define D_CMND_TIMERAMPUPMAXSET "TimeRampupMaxSet"
#define D_CMND_TIMERAMPUPCYCLESET "TimeRampupCycleSet"
#define D_CMND_TEMPRAMPUPPIACCERRSET "TempRampupPiAccErrSet"
#define D_CMND_TIMEPIPROPORTREAD "TimePiProportRead"
#define D_CMND_TIMEPIINTEGRREAD "TimePiIntegrRead"
#define D_CMND_TIMESENSLOSTSET "TimeSensLostSet"
// Commands xsns_02_analog.ino // Commands xsns_02_analog.ino
#define D_CMND_ADCPARAM "AdcParam" #define D_CMND_ADCPARAM "AdcParam"

View File

@ -657,36 +657,36 @@
#define USE_TASMOTA_SLAVE_SERIAL_SPEED 57600 // Depends on the sketch that is running on the Uno/Pro Mini #define USE_TASMOTA_SLAVE_SERIAL_SPEED 57600 // Depends on the sketch that is running on the Uno/Pro Mini
/*********************************************************************************************\ /*********************************************************************************************\
* HEATING CONTROLLER * THERMOSTAT CONTROLLER
\*********************************************************************************************/ \*********************************************************************************************/
#define USE_HEATING #define USE_THERMOSTAT
#define HEATING_RELAY_NUMBER 1 // Default output relay number #define THERMOSTAT_RELAY_NUMBER 1 // Default output relay number
#define HEATING_SWITCH_NUMBER 1 // Default input switch number #define THERMOSTAT_SWITCH_NUMBER 1 // Default input switch number
#define HEATING_TIME_ALLOW_RAMPUP 300 // Default time in seconds after last target update to allow ramp-up controller phase in minutes #define THERMOSTAT_TIME_ALLOW_RAMPUP 300 // Default time in seconds after last target update to allow ramp-up controller phase in minutes
#define HEATING_TIME_RAMPUP_MAX 960 // Default time maximum ramp-up controller duration in minutes #define THERMOSTAT_TIME_RAMPUP_MAX 960 // Default time maximum ramp-up controller duration in minutes
#define HEATING_TIME_RAMPUP_CYCLE 1800 // Default time ramp-up cycle in seconds #define THERMOSTAT_TIME_RAMPUP_CYCLE 1800 // Default time ramp-up cycle in seconds
#define HEAT_TIME_SENS_LOST 30 // Maximum time w/o sensor update to set it as lost in minutes #define THERMOSTAT_TIME_SENS_LOST 30 // Maximum time w/o sensor update to set it as lost in minutes
#define HEAT_TEMP_SENS_NUMBER 1 // Default temperature sensor number #define THERMOSTAT_TEMP_SENS_NUMBER 1 // Default temperature sensor number
#define HEAT_POWER_MAX 60 // Default maximum output power in Watt #define THERMOSTAT_POWER_MAX 60 // Default maximum output power in Watt
#define HEAT_TIME_MANUAL_TO_AUTO 60 // Default time without input switch active to change from manual to automatic in minutes #define THERMOSTAT_TIME_MANUAL_TO_AUTO 60 // Default time without input switch active to change from manual to automatic in minutes
#define HEAT_TIME_ON_LIMIT 120 // Default maximum time with output active in minutes #define THERMOSTAT_TIME_ON_LIMIT 120 // Default maximum time with output active in minutes
#define HEAT_TIME_RESET 12000 // Default reset time of the PI controller in seconds #define THERMOSTAT_TIME_RESET 12000 // Default reset time of the PI controller in seconds
#define HEAT_TIME_PI_CYCLE 30 // Default cycle time for the heating controller in minutes #define THERMOSTAT_TIME_PI_CYCLE 30 // Default cycle time for the thermostat controller in minutes
#define HEAT_TIME_MAX_ACTION 20 // Default maximum heating time per cycle in minutes #define THERMOSTAT_TIME_MAX_ACTION 20 // Default maximum thermostat time per cycle in minutes
#define HEAT_TIME_MIN_ACTION 4 // Default minimum heating time per cycle in minutes #define THERMOSTAT_TIME_MIN_ACTION 4 // Default minimum thermostat time per cycle in minutes
#define HEAT_TIME_MIN_TURNOFF_ACTION 3 // Default minimum turnoff time in minutes, below it the heating will be held on #define THERMOSTAT_TIME_MIN_TURNOFF_ACTION 3 // Default minimum turnoff time in minutes, below it the thermostat will be held on
#define HEAT_PROP_BAND 4 // Default proportional band of the PI controller in degrees celsius #define THERMOSTAT_PROP_BAND 4 // Default proportional band of the PI controller in degrees celsius
#define HEAT_TEMP_RESET_ANTI_WINDUP 8 // Default range where reset antiwindup is disabled, in tenths of degrees celsius #define THERMOSTAT_TEMP_RESET_ANTI_WINDUP 8 // Default range where reset antiwindup is disabled, in tenths of degrees celsius
#define HEAT_TEMP_HYSTERESIS 1 // Default range hysteresis for temperature PI controller, in tenths of degrees celsius #define THERMOSTAT_TEMP_HYSTERESIS 1 // Default range hysteresis for temperature PI controller, in tenths of degrees celsius
#define HEAT_TEMP_FROST_PROTECT 40 // Default minimum temperature for frost protection, in tenths of degrees celsius #define THERMOSTAT_TEMP_FROST_PROTECT 40 // Default minimum temperature for frost protection, in tenths of degrees celsius
#define HEATING_TEMP_RAMPUP_DELTA_IN 4 // Default minimum delta temperature to target to get into rampup mode, in tenths of degrees celsius #define THERMOSTAT_TEMP_RAMPUP_DELTA_IN 4 // Default minimum delta temperature to target to get into rampup mode, in tenths of degrees celsius
#define HEATING_TEMP_RAMPUP_DELTA_OUT 2 // Default minimum delta temperature to target to get out of the rampup mode, in tenths of degrees celsius #define THERMOSTAT_TEMP_RAMPUP_DELTA_OUT 2 // Default minimum delta temperature to target to get out of the rampup mode, in tenths of degrees celsius
#define HEATING_TEMP_PI_RAMPUP_ACC_E 20 // Default accumulated error when switching from ramp-up controller to PI #define THERMOSTAT_TEMP_PI_RAMPUP_ACC_E 20 // Default accumulated error when switching from ramp-up controller to PI
#define HEATING_ENERGY_OUTPUT_MAX 10 // Default maximum allowed energy output for heating valve in Watts #define THERMOSTAT_ENERGY_OUTPUT_MAX 10 // Default maximum allowed energy output for thermostat valve in Watts
#define HEATING_TIME_OUTPUT_DELAY 180 // Default output delay between state change and real actuation event (f.i. valve open/closed) #define THERMOSTAT_TIME_OUTPUT_DELAY 180 // Default output delay between state change and real actuation event (f.i. valve open/closed)
#define HEATING_TEMP_INIT 180 // Default init target temperature for the heating controller #define THERMOSTAT_TEMP_INIT 180 // Default init target temperature for the thermostat controller
// -- End of general directives ------------------- // -- End of general directives -------------------

View File

@ -554,7 +554,7 @@ void GetFeatures(void)
#ifdef USE_PING #ifdef USE_PING
feature6 |= 0x00000080; // xdrv_38_ping.ino feature6 |= 0x00000080; // xdrv_38_ping.ino
#endif #endif
#ifdef USE_HEATING #ifdef USE_THERMOSTAT
feature6 |= 0x00000100; // xdrv_39_heating.ino feature6 |= 0x00000100; // xdrv_39_heating.ino
#endif #endif
// feature6 |= 0x00000200; // feature6 |= 0x00000200;

View File

@ -324,9 +324,9 @@ enum DevGroupShareItem { DGR_SHARE_POWER = 1, DGR_SHARE_LIGHT_BRI = 2, DGR_SHARE
enum CommandSource { SRC_IGNORE, SRC_MQTT, SRC_RESTART, SRC_BUTTON, SRC_SWITCH, SRC_BACKLOG, SRC_SERIAL, SRC_WEBGUI, SRC_WEBCOMMAND, SRC_WEBCONSOLE, SRC_PULSETIMER, enum CommandSource { SRC_IGNORE, SRC_MQTT, SRC_RESTART, SRC_BUTTON, SRC_SWITCH, SRC_BACKLOG, SRC_SERIAL, SRC_WEBGUI, SRC_WEBCOMMAND, SRC_WEBCONSOLE, SRC_PULSETIMER,
SRC_TIMER, SRC_RULE, SRC_MAXPOWER, SRC_MAXENERGY, SRC_OVERTEMP, SRC_LIGHT, SRC_KNX, SRC_DISPLAY, SRC_WEMO, SRC_HUE, SRC_RETRY, SRC_REMOTE, SRC_SHUTTER, SRC_TIMER, SRC_RULE, SRC_MAXPOWER, SRC_MAXENERGY, SRC_OVERTEMP, SRC_LIGHT, SRC_KNX, SRC_DISPLAY, SRC_WEMO, SRC_HUE, SRC_RETRY, SRC_REMOTE, SRC_SHUTTER,
SRC_HEATING, SRC_MAX }; SRC_THERMOSTAT, SRC_MAX };
const char kCommandSource[] PROGMEM = "I|MQTT|Restart|Button|Switch|Backlog|Serial|WebGui|WebCommand|WebConsole|PulseTimer|" const char kCommandSource[] PROGMEM = "I|MQTT|Restart|Button|Switch|Backlog|Serial|WebGui|WebCommand|WebConsole|PulseTimer|"
"Timer|Rule|MaxPower|MaxEnergy|Overtemp|Light|Knx|Display|Wemo|Hue|Retry|Remote|Shutter|Heating"; "Timer|Rule|MaxPower|MaxEnergy|Overtemp|Light|Knx|Display|Wemo|Hue|Retry|Remote|Shutter|Thermostat";
const uint8_t kDefaultRfCode[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 }; const uint8_t kDefaultRfCode[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 };

File diff suppressed because it is too large Load Diff