diff --git a/release/aqualinkd-amd64 b/release/aqualinkd-amd64 new file mode 100755 index 0000000..61d0d23 Binary files /dev/null and b/release/aqualinkd-amd64 differ diff --git a/release/aqualinkd-arm64 b/release/aqualinkd-arm64 index 04d31e2..91b8860 100755 Binary files a/release/aqualinkd-arm64 and b/release/aqualinkd-arm64 differ diff --git a/release/aqualinkd-armhf b/release/aqualinkd-armhf index 9ac6ba0..15a452d 100755 Binary files a/release/aqualinkd-armhf and b/release/aqualinkd-armhf differ diff --git a/release/serial_logger-amd64 b/release/serial_logger-amd64 new file mode 100755 index 0000000..3a360eb Binary files /dev/null and b/release/serial_logger-amd64 differ diff --git a/source/allbutton.c b/source/allbutton.c index f836e50..10d5f6b 100644 --- a/source/allbutton.c +++ b/source/allbutton.c @@ -196,6 +196,7 @@ void _processMessage(char *message, struct aqualinkdata *aq_data, bool reset) //static int boost_msg_count = 0; static int16_t msg_loop = 0; static aqledstate default_frz_protect_state = OFF; + static bool boostInLastLoop = false; // NSF replace message with msg #ifdef AQ_RS16 int16_t rs16; @@ -284,7 +285,7 @@ void _processMessage(char *message, struct aqualinkdata *aq_data, bool reset) } */ if ((msg_loop & MSG_BOOST) != MSG_BOOST) { - if (aq_data->boost == true) { + if (aq_data->boost == true || boostInLastLoop == true) { LOG(ALLB_LOG,LOG_INFO, "Boost turned off\n"); event_happened_set_device_state(AQS_BOOST_OFF, aq_data); // Add code to check Pump if to turn it on (was scheduled) ie time now is inbetween ON / OFF schedule @@ -292,6 +293,7 @@ void _processMessage(char *message, struct aqualinkdata *aq_data, bool reset) aq_data->boost = false; aq_data->boost_msg[0] = '\0'; aq_data->boost_duration = 0; + boostInLastLoop = false; //if (aq_data->swg_percent >= 101) // aq_data->swg_percent = 0; } @@ -578,6 +580,7 @@ void _processMessage(char *message, struct aqualinkdata *aq_data, bool reset) aq_data->boost = true; msg_loop |= MSG_BOOST; msg_loop |= MSG_SWG; + boostInLastLoop = true; //convert_boost_to_duration(aq_data->boost_msg) //if (aq_data->ar_swg_status != SWG_STATUS_ON) {aq_data->ar_swg_status = SWG_STATUS_ON;} if (aq_data->swg_percent != 101) {changeSWGpercent(aq_data, 101);} diff --git a/source/aq_scheduler.c b/source/aq_scheduler.c index d822d3d..c31d45c 100644 --- a/source/aq_scheduler.c +++ b/source/aq_scheduler.c @@ -258,7 +258,9 @@ int build_schedules_js(char* buffer, int size) // Group 9 is URL // Group 10 is value if (groupArray[8].rm_so == (size_t)-1) { - LOG(SCHD_LOG,LOG_ERR, "No matching information from cron file\n"); + if (size > 0) { + LOG(SCHD_LOG,LOG_ERR, "No matching information from cron file\n"); + } } else { cline.enabled = (line[groupArray[1].rm_so] == '#')?false:true; sprintf(cline.minute, "%.*s", (groupArray[2].rm_eo - groupArray[2].rm_so), (line + groupArray[2].rm_so)); @@ -268,8 +270,8 @@ int build_schedules_js(char* buffer, int size) sprintf(cline.dayw, "%.*s", (groupArray[6].rm_eo - groupArray[6].rm_so), (line + groupArray[6].rm_so)); sprintf(cline.url, "%.*s", (groupArray[9].rm_eo - groupArray[9].rm_so), (line + groupArray[9].rm_so)); sprintf(cline.value, "%.*s", (groupArray[10].rm_eo - groupArray[10].rm_so), (line + groupArray[10].rm_so)); - LOG(SCHD_LOG,LOG_INFO, "Read from cron. Enabled:%d Min:%s Hour:%s DayM:%s Month:%s DayW:%s URL:%s Value:%s\n",cline.enabled,cline.minute,cline.hour,cline.daym,cline.month,cline.dayw,cline.url,cline.value); if (size > 0) { + LOG(SCHD_LOG,LOG_INFO, "Read from cron. Enabled:%d Min:%s Hour:%s DayM:%s Month:%s DayW:%s URL:%s Value:%s\n",cline.enabled,cline.minute,cline.hour,cline.daym,cline.month,cline.dayw,cline.url,cline.value); length += sprintf(buffer+length, "{\"enabled\":\"%d\", \"min\":\"%s\",\"hour\":\"%s\",\"daym\":\"%s\",\"month\":\"%s\",\"dayw\":\"%s\",\"url\":\"%s\",\"value\":\"%s\"},", cline.enabled, cline.minute, @@ -300,7 +302,9 @@ int build_schedules_js(char* buffer, int size) } } } else { - LOG(SCHD_LOG,LOG_DEBUG, "regexp no match (%d) %s\n", rc, line); + if (size > 0) { + LOG(SCHD_LOG,LOG_DEBUG, "regexp no match (%d) %s", rc, line); + } } } diff --git a/source/aq_scheduler.h b/source/aq_scheduler.h index 299e7d3..70271bb 100644 --- a/source/aq_scheduler.h +++ b/source/aq_scheduler.h @@ -26,7 +26,7 @@ typedef struct aqs_cron int build_schedules_js(char* buffer, int size); int save_schedules_js(const char* inBuf, int inSize, char* outBuf, int outSize); - +void get_cron_pump_times(); #define AQS_PUMP_URL BTN_PUMP "/set"