mirror of https://github.com/sfeakes/AqualinkD.git
added Freeze protect overide
parent
3109c78b60
commit
1130fd0bc4
|
@ -348,6 +348,11 @@ void processMessage(char *message)
|
|||
else if(stristr(msg, " TURNS ON") != NULL) {
|
||||
logMessage(LOG_NOTICE, "Program data '%s'\n",msg);
|
||||
}
|
||||
else if(_config_parameters.override_freeze_protect == TRUE &&
|
||||
strncasecmp(msg, "Press Enter* to override Freeze Protection with", 47) == 0 ){
|
||||
//send_cmd(KEY_ENTER, aq_data);
|
||||
aq_programmer(AQ_SEND_CMD, (char *)KEY_ENTER, &_aqualink_data);
|
||||
}
|
||||
else {
|
||||
logMessage(LOG_DEBUG, "Ignoring '%s'\n",msg);
|
||||
}
|
||||
|
@ -499,6 +504,7 @@ int main(int argc, char *argv[]) {
|
|||
logMessage(LOG_NOTICE, "Config serial_port = %s\n", _config_parameters.serial_port);
|
||||
logMessage(LOG_NOTICE, "Config web_directory = %s\n", _config_parameters.web_directory);
|
||||
logMessage(LOG_NOTICE, "Config device_id = 0x%02hhx\n", _config_parameters.device_id);
|
||||
logMessage(LOG_NOTICE, "Config override frz prot = %s\n", bool2text(_config_parameters.override_freeze_protect));
|
||||
#ifndef MG_DISABLE_MQTT
|
||||
logMessage(LOG_NOTICE, "Config mqtt_server = %s\n", _config_parameters.mqtt_server);
|
||||
logMessage(LOG_NOTICE, "Config mqtt_dz_sub_topic = %s\n", _config_parameters.mqtt_dz_sub_topic);
|
||||
|
@ -510,6 +516,8 @@ int main(int argc, char *argv[]) {
|
|||
logMessage(LOG_NOTICE, "Config idx water temp = %d\n", _config_parameters.dzidx_air_temp);
|
||||
logMessage(LOG_NOTICE, "Config idx pool temp = %d\n", _config_parameters.dzidx_pool_water_temp);
|
||||
logMessage(LOG_NOTICE, "Config idx spa temp = %d\n", _config_parameters.dzidx_spa_water_temp);
|
||||
logMessage(LOG_NOTICE, "Config idx SWG Percent = %d\n", _config_parameters.dzidx_swg_percent);
|
||||
logMessage(LOG_NOTICE, "Config idx SWG PPM = %d\n", _config_parameters.dzidx_swg_ppm);
|
||||
/* removed until domoticz has a better virtual thermostat
|
||||
logMessage(LOG_NOTICE, "Config idx pool thermostat = %d\n", _config_parameters.dzidx_pool_thermostat);
|
||||
logMessage(LOG_NOTICE, "Config idx spa thermostat = %d\n", _config_parameters.dzidx_spa_thermostat);
|
||||
|
|
3
config.c
3
config.c
|
@ -54,6 +54,7 @@ void init_parameters (struct aqconfig * parms)
|
|||
//parms->device_id = strtoul(DEFAULT_DEVICE_ID, &p, 16);
|
||||
parms->device_id = strtoul(DEFAULT_DEVICE_ID, NULL, 16);
|
||||
//sscanf(DEFAULT_DEVICE_ID, "0x%x", &parms->device_id);
|
||||
parms->override_freeze_protect = FALSE;
|
||||
|
||||
parms->mqtt_dz_sub_topic = DEFAULT_MQTT_DZ_OUT;
|
||||
parms->mqtt_dz_pub_topic = DEFAULT_MQTT_DZ_IN;
|
||||
|
@ -239,6 +240,8 @@ void readCfg (struct aqconfig *config_parameters, struct aqualinkdata *aqdata, c
|
|||
config_parameters->dzidx_swg_percent = strtoul(indx+1, NULL, 10);
|
||||
} else if (strncasecmp (b_ptr, "SWG_PPM_dzidx", 13) == 0) {
|
||||
config_parameters->dzidx_swg_ppm = strtoul(indx+1, NULL, 10);
|
||||
} else if (strncasecmp (b_ptr, "override_freeze_protect", 23) == 0) {
|
||||
config_parameters->override_freeze_protect = text2bool(indx+1);
|
||||
}/*else if (strncasecmp (b_ptr, "pool_thermostat_dzidx", 21) == 0) { // removed until domoticz has a better virtual thermostat
|
||||
config_parameters->dzidx_pool_thermostat = strtoul(indx+1, NULL, 10);
|
||||
} else if (strncasecmp (b_ptr, "spa_thermostat_dzidx", 20) == 0) {
|
||||
|
|
1
config.h
1
config.h
|
@ -43,6 +43,7 @@ struct aqconfig
|
|||
int dzidx_swg_percent;
|
||||
int dzidx_swg_ppm;
|
||||
float light_programming_mode;
|
||||
bool override_freeze_protect;
|
||||
//int dzidx_pool_thermostat; // Domoticz virtual thermostats are crap removed until better
|
||||
//int dzidx_spa_thermostat; // Domoticz virtual thermostats are crap removed until better
|
||||
//char mqtt_pub_topic[250];
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue