mirror of https://github.com/sfeakes/AqualinkD.git
pull/47/head
parent
50252b5239
commit
b8c94caa80
|
@ -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.6a
|
||||
* more PDA fixes (Thanks to ballle98)
|
||||
* Fix in MQTT requests to change temp when temp units are unkown.
|
||||
## 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)
|
||||
|
|
|
@ -118,8 +118,8 @@ int setpoint_check(int type, int value, struct aqualinkdata *aqdata)
|
|||
|
||||
switch(type) {
|
||||
case POOL_HTR_SETOINT:
|
||||
type_msg = (aqdata->single_device?"Temp1":"Pool");
|
||||
if ( aqdata->temp_units == CELSIUS ) {
|
||||
type_msg = (aqdata->single_device?"Temp1":"Pool");
|
||||
if ( aqdata->temp_units == CELSIUS ) {
|
||||
max = HEATER_MAX_C;
|
||||
min = (aqdata->single_device?HEATER_MIN_C:HEATER_MIN_C-1);
|
||||
} else {
|
||||
|
|
35
aqualinkd.c
35
aqualinkd.c
|
@ -567,18 +567,25 @@ bool process_pda_packet(unsigned char* packet, int length)
|
|||
}
|
||||
}else if (stristr(msg, "POOL HEATER") != NULL) {
|
||||
set_pda_led(_aqualink_data.aqbuttons[POOL_HEAT_INDEX].led, msg[AQ_MSGLEN-1]);
|
||||
}else if (stristr(msg, "SPA MODE") != NULL) {
|
||||
// when SPA mode is on the filter may be on or pending
|
||||
if (msg[AQ_MSGLEN-1] == 'N') {
|
||||
_aqualink_data.aqbuttons[PUMP_INDEX].led->state = ON;
|
||||
_aqualink_data.aqbuttons[SPA_INDEX].led->state = ON;
|
||||
} else if (msg[AQ_MSGLEN-1] == '*') {
|
||||
_aqualink_data.aqbuttons[PUMP_INDEX].led->state = FLASH;
|
||||
_aqualink_data.aqbuttons[SPA_INDEX].led->state = ON;
|
||||
} else {
|
||||
_aqualink_data.aqbuttons[SPA_INDEX].led->state = OFF;
|
||||
}
|
||||
}else if (stristr(msg, "SPA HEATER") != NULL) {
|
||||
}
|
||||
else if (stristr(msg, "SPA MODE") != NULL) {
|
||||
// when SPA mode is on the filter may be on or pending
|
||||
if (msg[AQ_MSGLEN - 1] == 'N') {
|
||||
_aqualink_data.aqbuttons[PUMP_INDEX].led->state = ON;
|
||||
_aqualink_data.aqbuttons[SPA_INDEX].led->state = ON;
|
||||
}
|
||||
else if (msg[AQ_MSGLEN - 1] == '*')
|
||||
{
|
||||
_aqualink_data.aqbuttons[PUMP_INDEX].led->state = FLASH;
|
||||
_aqualink_data.aqbuttons[SPA_INDEX].led->state = ON;
|
||||
}
|
||||
else
|
||||
{
|
||||
_aqualink_data.aqbuttons[SPA_INDEX].led->state = OFF;
|
||||
}
|
||||
}
|
||||
else if (stristr(msg, "SPA HEATER") != NULL)
|
||||
{
|
||||
set_pda_led(_aqualink_data.aqbuttons[SPA_HEAT_INDEX].led, msg[AQ_MSGLEN-1]);
|
||||
}
|
||||
} else if (pda_m_type() == PM_UNKNOWN) {
|
||||
|
@ -710,6 +717,10 @@ void action_delayed_request()
|
|||
char sval[10];
|
||||
snprintf(sval, 9, "%d", _aqualink_data.unactioned.value);
|
||||
|
||||
// If we don't know the units yet, we can't action, so wait until we do.
|
||||
if (_aqualink_data.temp_units == UNKNOWN && _aqualink_data.unactioned.type != SWG_SETPOINT)
|
||||
return;
|
||||
|
||||
if (_aqualink_data.unactioned.type == POOL_HTR_SETOINT) {
|
||||
_aqualink_data.unactioned.value = setpoint_check(POOL_HTR_SETOINT, _aqualink_data.unactioned.value, &_aqualink_data);
|
||||
if ( _aqualink_data.pool_htr_set_point != _aqualink_data.unactioned.value ) {
|
||||
|
|
|
@ -566,6 +566,8 @@ void set_light_mode(char *value)
|
|||
aq_programmer(AQ_SET_COLORMODE, buf, _aqualink_data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void action_web_request(struct mg_connection *nc, struct http_message *http_msg) {
|
||||
// struct http_message *http_msg = (struct http_message *)ev_data;
|
||||
if (getLogLevel() >= LOG_INFO) { // Simply for log message, check we are at
|
||||
|
@ -863,7 +865,7 @@ void action_mqtt_message(struct mg_connection *nc, struct mg_mqtt_message *msg)
|
|||
//aqualinkd/SWG/Percent_f/set
|
||||
|
||||
if (pt3 != NULL && (strncmp(pt2, "setpoint", 8) == 0) && (strncmp(pt3, "set", 3) == 0)) {
|
||||
int val = _aqualink_data->unactioned.value = (_aqualink_data->temp_units == FAHRENHEIT && _aqualink_config->convert_mqtt_temp) ? round(degCtoF(value)) : round(value);
|
||||
int val = _aqualink_data->unactioned.value = (_aqualink_data->temp_units != CELSIUS && _aqualink_config->convert_mqtt_temp) ? round(degCtoF(value)) : round(value);
|
||||
if (strncmp(pt1, BTN_POOL_HTR, strlen(BTN_POOL_HTR)) == 0) {
|
||||
_aqualink_data->unactioned.value = setpoint_check(POOL_HTR_SETOINT, val, _aqualink_data);
|
||||
_aqualink_data->unactioned.type = POOL_HTR_SETOINT;
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue