mirror of https://github.com/sfeakes/AqualinkD.git
Updates
parent
5bd4776fad
commit
6ddd64f29f
|
@ -67,6 +67,9 @@ Designed to mimic AqualinkRS6 All Button keypad, and just like the keypad you ca
|
|||
* http://aqualink.ip/simple.html <- (Anothr opion if you don't like the above)
|
||||
* http://aqualink.ip/simulator.html <- (RS8 All Button Control Panel simulator)
|
||||
#<a name="release"></a>
|
||||
## Update in Release 1.2.6
|
||||
* fix for PDA with SPA messages. (Thanks to ballle98)
|
||||
* Added report 0 for pool temp when not available. (Thanks to tcm0116)
|
||||
## Update in Release 1.2.5a
|
||||
* fix bug for MQTT freeze protect.
|
||||
## Update in Release 1.2.4
|
||||
|
|
9
config.c
9
config.c
|
@ -78,6 +78,7 @@ void init_parameters (struct aqconfig * parms)
|
|||
parms->convert_mqtt_temp = true;
|
||||
parms->convert_dz_temp = true;
|
||||
parms->report_zero_spa_temp = false;
|
||||
parms->report_zero_pool_temp = false;
|
||||
|
||||
generate_mqtt_id(parms->mqtt_ID, MQTT_ID_LEN);
|
||||
}
|
||||
|
@ -266,6 +267,8 @@ void readCfg_OLD (struct aqconfig *config_parameters, struct aqualinkdata *aqdat
|
|||
config_parameters->flash_mqtt_buttons = text2bool(indx+1);
|
||||
} else if (strncasecmp (b_ptr, "report_zero_spa_temp", 20) == 0) {
|
||||
config_parameters->report_zero_spa_temp = text2bool(indx+1);
|
||||
} else if (strncasecmp (b_ptr, "report_zero_pool_temp", 21) == 0) {
|
||||
config_parameters->report_zero_pool_temp = text2bool(indx+1);
|
||||
} else if (strncasecmp (b_ptr, "button_", 7) == 0) {
|
||||
int num = strtoul(b_ptr+7, NULL, 10) - 1;
|
||||
//logMessage (LOG_DEBUG, "Button %d\n", strtoul(b_ptr+7, NULL, 10));
|
||||
|
@ -382,7 +385,10 @@ bool setConfigValue(struct aqconfig *config_parameters, struct aqualinkdata *aqd
|
|||
} else if (strncasecmp(param, "report_zero_spa_temp", 20) == 0) {
|
||||
config_parameters->report_zero_spa_temp = text2bool(value);
|
||||
rtn=true;
|
||||
}
|
||||
} else if (strncasecmp (param, "report_zero_pool_temp", 21) == 0) {
|
||||
config_parameters->report_zero_pool_temp = text2bool(value);
|
||||
rtn=true;
|
||||
}
|
||||
// removed until domoticz has a better virtual thermostat
|
||||
/*else if (strncasecmp (param, "pool_thermostat_dzidx", 21) == 0) {
|
||||
config_parameters->dzidx_pool_thermostat = strtoul(value, NULL, 10);
|
||||
|
@ -553,6 +559,7 @@ bool writeCfg (struct aqconfig *config_parameters, struct aqualinkdata *aqdata)
|
|||
fprintf(fp, "override_freeze_protect = %s\n", bool2text(config_parameters->override_freeze_protect));
|
||||
fprintf(fp, "flash_mqtt_buttons = %s\n", bool2text(config_parameters->flash_mqtt_buttons));
|
||||
fprintf(fp, "report_zero_spa_temp = %s\n", bool2text(config_parameters->report_zero_spa_temp));
|
||||
fprintf(fp, "report_zero_pool_temp = %s\n", bool2text(config_parameters->report_zero_pool_temp));
|
||||
|
||||
fprintf(fp, "\n#** Programmable light **\n");
|
||||
if (config_parameters->light_programming_button <= 0) {
|
||||
|
|
1
config.h
1
config.h
|
@ -54,6 +54,7 @@ struct aqconfig
|
|||
bool convert_dz_temp;
|
||||
bool flash_mqtt_buttons;
|
||||
bool report_zero_spa_temp;
|
||||
bool report_zero_pool_temp;
|
||||
//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];
|
||||
|
|
|
@ -300,7 +300,7 @@ void mqtt_broadcast_aqualinkstate(struct mg_connection *nc)
|
|||
//send_mqtt_temp_msg_new(nc, AIR_TEMPERATURE_TOPIC, _aqualink_data->air_temp);
|
||||
send_domoticz_mqtt_temp_msg(nc, _aqualink_config->dzidx_air_temp, _aqualink_data->air_temp);
|
||||
}
|
||||
|
||||
/*
|
||||
if (_aqualink_data->pool_temp != TEMP_UNKNOWN && _aqualink_data->pool_temp != _last_mqtt_aqualinkdata.pool_temp) {
|
||||
_last_mqtt_aqualinkdata.pool_temp = _aqualink_data->pool_temp;
|
||||
send_mqtt_temp_msg(nc, POOL_TEMP_TOPIC, _aqualink_data->pool_temp);
|
||||
|
@ -308,7 +308,20 @@ void mqtt_broadcast_aqualinkstate(struct mg_connection *nc)
|
|||
// IF spa is off, report pool water temp to Domoticz.
|
||||
if (_aqualink_data->spa_temp == TEMP_UNKNOWN)
|
||||
send_domoticz_mqtt_temp_msg(nc, _aqualink_config->dzidx_spa_water_temp, _aqualink_data->pool_temp);
|
||||
|
||||
}
|
||||
*/
|
||||
if (_aqualink_data->pool_temp != _last_mqtt_aqualinkdata.pool_temp) {
|
||||
if (_aqualink_data->pool_temp == TEMP_UNKNOWN && _aqualink_config->report_zero_pool_temp) {
|
||||
_last_mqtt_aqualinkdata.pool_temp = TEMP_UNKNOWN;
|
||||
send_mqtt_temp_msg(nc, POOL_TEMP_TOPIC, (_aqualink_config->convert_mqtt_temp?-18:0));
|
||||
} else if (_aqualink_data->pool_temp != TEMP_UNKNOWN) {
|
||||
_last_mqtt_aqualinkdata.pool_temp = _aqualink_data->pool_temp;
|
||||
send_mqtt_temp_msg(nc, POOL_TEMP_TOPIC, _aqualink_data->pool_temp);
|
||||
send_domoticz_mqtt_temp_msg(nc, _aqualink_config->dzidx_pool_water_temp, _aqualink_data->pool_temp);
|
||||
// IF spa is off, report pool water temp to Domoticz.
|
||||
if (_aqualink_data->spa_temp == TEMP_UNKNOWN)
|
||||
send_domoticz_mqtt_temp_msg(nc, _aqualink_config->dzidx_spa_water_temp, _aqualink_data->pool_temp);
|
||||
}
|
||||
}
|
||||
|
||||
if (_aqualink_data->spa_temp != _last_mqtt_aqualinkdata.spa_temp) {
|
||||
|
|
Binary file not shown.
|
@ -44,6 +44,12 @@ flash_mqtt_buttons = no
|
|||
# decide how to report.
|
||||
report_zero_spa_temp = no
|
||||
|
||||
# default is to not report changes to pool temp when the filter pump is off or in spa mode
|
||||
# enable below to report 0 as the pool temp when the filter pump is off or when in spa mode.
|
||||
# This is for MQTT cnnections only, WEB socket and WEB API always report TEMP_UNKNOWN (-999) allowing the consumer to
|
||||
# decide how to report.
|
||||
report_zero_pool_temp = no
|
||||
|
||||
# mqtt stuff
|
||||
#mqtt_address = localhost:1883
|
||||
#mqtt_user = someusername
|
||||
|
|
Loading…
Reference in New Issue