diff --git a/README.md b/README.md
index 9370236..6198f8e 100644
--- a/README.md
+++ b/README.md
@@ -10,6 +10,8 @@ Binaries are supplied for Raspberry Pi both 32 & 64 bit OS, Has been, and can be
If you like this project, you can buy me a cup of coffee :)
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=SEGN9UNS38TXJ)
+
+
## AqualinkD new home
@@ -79,7 +81,7 @@ Designed to mimic AqualinkRS devices, used to fully configure the master control
## All Web interfaces.
* http://aqualink.ip/ <- (Standard WEB UI
-* http://aqualink.ip/simple.html <- (Simple opion if you don't like the above)
+
* http://aqualink.ip/simulator.html <- (Displays all simulators in one page with tabs)
* http://aqualink.ip/aqmanager.html <- (Manage AqualinkD configuration & runtime)
* http://aqualink.ip/allbutton_sim.html <- (All Button Simulator)
@@ -136,6 +138,20 @@ NEED TO FIX FOR THIS RELEASE.
* Use set_allbutton_light_dimmer for all lights (ie color lights)
-->
+
+
+
+
+
+# Notice
+
+AqualinkD will soon be dropping support for OS's older than debian bullseye. (GLIBC 2.31 will be minimum).
+
+AqualinkD will be moving over to github hosted runners for compiling, currently AqualinkD is using self hosted. This means supporting old OS releases like Stretch is not worth it. AqualinkD will still be tested and support local compiling on old OS's, just the binaries in the release packages will be for bullseye and newer
+
+
+
+
# Updates in 3.0.0 (dev)
* WARNING V3.0 has undergone a significant amount code changes and refactoring, there may be issues.
* Serial optimization for AqualinkD HAT.
@@ -143,7 +159,9 @@ NEED TO FIX FOR THIS RELEASE.
* web/config.js is now web/config.json any custom settings will need to be migrated.
* Added example plugin of how to get HomeAssistant devices to show up in AqualinkD UI.
* upgraded network library ( HTTP(S), MQTT(S), WS )
-* Added support for HTTPS and MQTTS
+* Added support for HTTPS and MQTTS.
+ * HTTPS is for two way auth only, ie You create your own cert and load on both AqualinkD server and all client devices.
+ * Example script to generate HTTPS certificates is in (./extras/generate-certs.sh)
* Optimized updates to MQTT, web sockets & WebUI (only update when absolutely necessary)
* Added options to force upgrades in aqmanager. (add ?upgrade or ?devupgrade to url to enable upgrade button)
* MQTT Discovery for all supporting hubs (HomeAssistant Domoticz Hubitat OpenHAB etc)
@@ -156,12 +174,12 @@ NEED TO FIX FOR THIS RELEASE.
* Changed caching of HTTP server. (Better for UI config updates)
* Autoconfigure will now get panel size/type for panels that support PC-Dock interface.
* Autoconfigure will *try* to work for PDA panels.
-* Added example script to generate HTTPS certificates. (./extras/generate-certs.sh)
* Cleaned up exit & errors when running as daemon and docker.
* Fixed issues with external sensors and homekit.
* Added preliminary support for Jandy Infinite water color lights
- Need to finish off :-
* HAT serial optimizations broke some USB serial adapters
+ * SWG not auto finding
# Updates in 2.6.11 (Sept 14 2025)
diff --git a/release/aqualinkd-arm64 b/release/aqualinkd-arm64
index aa5f216..0b9da61 100755
Binary files a/release/aqualinkd-arm64 and b/release/aqualinkd-arm64 differ
diff --git a/release/aqualinkd-armhf b/release/aqualinkd-armhf
index b2462fc..4296d94 100755
Binary files a/release/aqualinkd-armhf and b/release/aqualinkd-armhf differ
diff --git a/release/install.sh b/release/install.sh
index 740e2c9..cdd2b68 100755
--- a/release/install.sh
+++ b/release/install.sh
@@ -34,7 +34,7 @@ _logfile=""
_frommake=$FALSE
_ignorearch=$FALSE
_nosystemd=$FALSE
-_ignoreglibc=$TRUE
+_ignoreglibc=$FALSE
log()
{
@@ -250,7 +250,9 @@ fi
# V3.0.0 uses config.json not config.js
if [ -f "$WEBLocation/config.js" ]; then
- log "AqualinkD web config is old, please migrate and settings from $WEBLocation/config.js to $WEBLocation/config.json"
+ if [ ! -f "$WEBLocation/config.json" ]; then
+ log "AqualinkD web config is old, please migrate and settings from $WEBLocation/config.js to $WEBLocation/config.json"
+ fi
fi
# V2.3.9 & V2.6.0 has kind-a breaking change for config.js, so check existing and rename if needed
# we added Aux_V? to the button list
diff --git a/release/serial_logger-arm64 b/release/serial_logger-arm64
index 7805770..3028af5 100755
Binary files a/release/serial_logger-arm64 and b/release/serial_logger-arm64 differ
diff --git a/release/serial_logger-armhf b/release/serial_logger-armhf
index 54d2569..ea93ba8 100755
Binary files a/release/serial_logger-armhf and b/release/serial_logger-armhf differ
diff --git a/source/allbutton.c b/source/allbutton.c
index ed71d65..894c84d 100644
--- a/source/allbutton.c
+++ b/source/allbutton.c
@@ -256,7 +256,10 @@ void _processMessage(char *message, struct aqualinkdata *aqdata, bool reset)
aqdata->service_mode_state = OFF; // IF we get this message then Service / Timeout is off
}
- if ( ((msg_loop & MSG_SWG_DEVICE) != MSG_SWG_DEVICE) && aqdata->swg_led_state != LED_S_UNKNOWN) {
+ // Removed aqdata->swg_led_state check from below if, so SWG can be found if read_SWG_rs584 is off.
+ // May want to add options like (isIAQT_ENABLED == false && isONET_ENABLED == false && READ_RSDEV_SWG == false )
+ // Then remove the aqdata->swg_led_state check
+ if ( ((msg_loop & MSG_SWG_DEVICE) != MSG_SWG_DEVICE) /*&& aqdata->swg_led_state != LED_S_UNKNOWN*/) {
// No Additional SWG devices messages like "no flow"
if ((msg_loop & MSG_SWG) != MSG_SWG && aqdata->aqbuttons[PUMP_INDEX].led->state == OFF )
setSWGdeviceStatus(aqdata, ALLBUTTON, SWG_STATUS_OFF);
diff --git a/source/aq_serial.c b/source/aq_serial.c
index 7f22fdb..1c893f0 100644
--- a/source/aq_serial.c
+++ b/source/aq_serial.c
@@ -185,10 +185,10 @@ const char* get_jandy_packet_type(const unsigned char* packet , int length)
return "GetID";
break;
case CMD_PERCENT:
- return "AR %%";
+ return "SWG %%";
break;
case CMD_PPM:
- return "AR PPM";
+ return "SWG PPM";
break;
case CMD_PDA_0x05:
return "PDA Unknown";
diff --git a/source/aq_systemutils.c b/source/aq_systemutils.c
index 0350eaa..fc7a72f 100644
--- a/source/aq_systemutils.c
+++ b/source/aq_systemutils.c
@@ -72,6 +72,8 @@ FILE *aq_open_file(char *filename, bool *ro_root, bool *created_file)
remount_root_ro(*ro_root);
}
+ LOG(AQUA_LOG, LOG_INFO, "Open file %s for writing\n",filename);
+
return fp;
}
@@ -137,7 +139,8 @@ bool copy_file(const char *source_path, const char *destination_path)
return true;
}
-bool run_aqualinkd_upgrade(uint8_t type)
+//bool run_aqualinkd_upgrade(uint8_t type)
+bool run_aqualinkd_upgrade(char *version)
{
int pipe_curl_to_bash[2];
pid_t pid_curl, pid_bash;
@@ -146,12 +149,18 @@ bool run_aqualinkd_upgrade(uint8_t type)
char *bash_args[] = {"bash", "-s", "--", "", NULL};
int status_curl, status_bash;
+ /*
if (isMASK_SET(type, CHECKONLY)) {
bash_args[3] = "check";
} else {
+
if (isMASK_SET(type, INSTALLDEVRELEASE)) {
bash_args[3] = "development";
}
+ }*/
+
+ if (version != NULL) {
+ bash_args[3] = version;
}
if (pipe(pipe_curl_to_bash) == -1)
diff --git a/source/aq_systemutils.h b/source/aq_systemutils.h
index afc0776..d9dfacc 100644
--- a/source/aq_systemutils.h
+++ b/source/aq_systemutils.h
@@ -9,7 +9,8 @@
FILE *aq_open_file( char *filename, bool *ro_root, bool* created_file);
bool aq_close_file(FILE *file, bool ro_root);
bool copy_file(const char *source_path, const char *destination_path);
-bool run_aqualinkd_upgrade(uint8_t type);
+//bool run_aqualinkd_upgrade(uint8_t type);
+bool run_aqualinkd_upgrade(char *version);
diff --git a/source/aqualink.h b/source/aqualink.h
index 3689573..4aa56df 100644
--- a/source/aqualink.h
+++ b/source/aqualink.h
@@ -249,11 +249,11 @@ typedef enum panel_vsp_status
#define ERROR_SERIAL ( 1 << 9 )
-
+/*
#define INSTALLDEVRELEASE ( 1 << 0 )
#define UPDATERELEASE ( 1 << 1 )
#define CHECKONLY ( 1 << 3 )
-
+*/
typedef struct pumpd
{
int rpm;
@@ -437,6 +437,7 @@ struct aqualinkdata
//char version[AQ_MSGLEN*2]; // Will be replaced by below in future
//char revision[AQ_MSGLEN]; // Will be replaced by below in future
uint8_t updatetype;
+ char *upgrade_version;
// The below 4 are set (sometimes) but not used yet
char panel_rev[AQ_MSGLEN]; // From panel
char panel_cpu[AQ_MSGLEN]; // From panel
diff --git a/source/aqualinkd.c b/source/aqualinkd.c
index 487d9e2..eaf8645 100644
--- a/source/aqualinkd.c
+++ b/source/aqualinkd.c
@@ -116,7 +116,7 @@ bool isAqualinkDStopping() {
void intHandler(int sig_num)
{
if (sig_num == SIGRUPGRADE) {
- if (! run_aqualinkd_upgrade(_aqualink_data.updatetype)) {
+ if (! run_aqualinkd_upgrade(_aqualink_data.upgrade_version)) {
LOG(AQUA_LOG,LOG_ERR, "AqualinkD upgrade failed!\n");
}
return; // Let the upgrade process terminate us.
diff --git a/source/devices_jandy.c b/source/devices_jandy.c
index bd5f375..535c249 100644
--- a/source/devices_jandy.c
+++ b/source/devices_jandy.c
@@ -280,7 +280,7 @@ bool processPacketFromSWG(unsigned char *packet, int packet_length, struct aqual
changedAnything = true;
SET_DIRTY(aqdata->is_dirty);
}
- // logMessage(LOG_DEBUG, "Read SWG PPM %d from ID 0x%02hhx\n", aqdata.swg_ppm, SWG_DEV_ID);
+ // LOG(LOG_DEBUG, "Read SWG PPM %d from ID 0x%02hhx\n", aqdata.swg_ppm, SWG_DEV_ID);
}
return changedAnything;
@@ -334,8 +334,11 @@ void setSWGdeviceStatus(struct aqualinkdata *aqdata, emulation_type requester, u
// return;
//}
+ //LOG(DJAN_LOG, LOG_DEBUG, "Set SWG device state to '0x%02hhx', request from %d\n", aqdata->ar_swg_device_status, requester);
+
+
if ((aqdata->ar_swg_device_status == status) || (last_status == status)) {
- //LOG(DJAN_LOG, LOG_DEBUG, "Set SWG device state to '0x%02hhx', request from %d\n", aqdata->ar_swg_device_status, requester);
+ LOG(DJAN_LOG, LOG_DEBUG, "Set SWG device state to '0x%02hhx', request from %d (no change)\n", aqdata->ar_swg_device_status, requester);
return;
}
last_status = status;
@@ -382,7 +385,7 @@ void setSWGdeviceStatus(struct aqualinkdata *aqdata, emulation_type requester, u
return;
break;
}
-
+//printf("************ Set SWG device state to '0x%02hhx', request from %d, LED state = %d\n", aqdata->ar_swg_device_status, requester, aqdata->swg_led_state);
LOG(DJAN_LOG, LOG_DEBUG, "Set SWG device state to '0x%02hhx', request from %d, LED state = %d\n", aqdata->ar_swg_device_status, requester, aqdata->swg_led_state);
}
@@ -457,8 +460,11 @@ void setSWGpercent(struct aqualinkdata *aqdata, int percent) {
if (aqdata->swg_led_state == OFF || (aqdata->swg_led_state == ENABLE && ! isSWGDeviceErrorState(aqdata->ar_swg_device_status)) ) // Don't change ENABLE / FLASH
SET_IF_CHANGED(aqdata->swg_led_state, ON, aqdata->is_dirty);
- if (aqdata->ar_swg_device_status == SWG_STATUS_UNKNOWN)
+ if (aqdata->ar_swg_device_status == SWG_STATUS_UNKNOWN)
SET_IF_CHANGED(aqdata->ar_swg_device_status, SWG_STATUS_ON, aqdata->is_dirty);
+
+ if (aqdata->swg_led_state == LED_S_UNKNOWN)
+ SET_IF_CHANGED(aqdata->swg_led_state, ON, aqdata->is_dirty);
} if ( aqdata->swg_percent == 0 ) {
if (aqdata->swg_led_state == ON)
@@ -466,6 +472,10 @@ void setSWGpercent(struct aqualinkdata *aqdata, int percent) {
if (aqdata->ar_swg_device_status == SWG_STATUS_UNKNOWN)
SET_IF_CHANGED(aqdata->ar_swg_device_status, SWG_STATUS_ON, aqdata->is_dirty); // Maybe this should be off
+
+ if (aqdata->swg_led_state == LED_S_UNKNOWN)
+ SET_IF_CHANGED(aqdata->swg_led_state, ENABLE, aqdata->is_dirty);
+
}
LOG(DJAN_LOG, LOG_DEBUG, "Set SWG %% to %d, LED=%d, FullStatus=0x%02hhx\n", aqdata->swg_percent, aqdata->swg_led_state, aqdata->ar_swg_device_status);
diff --git a/source/json_messages.c b/source/json_messages.c
index 11a277c..9b23147 100644
--- a/source/json_messages.c
+++ b/source/json_messages.c
@@ -656,6 +656,11 @@ int build_aqualink_aqmanager_JSON(struct aqualinkdata *aqdata, char* buffer, int
length += sprintf(buffer+length, ",\"aqualinkd_version\":\"%s\"",AQUALINKD_VERSION);
+ length += sprintf(buffer+length, ",\"panel_type_full\":\"%s\"",getPanelString());
+ length += sprintf(buffer+length, ",\"panel_type\":\"%s\"",getShortPanelString());
+ length += sprintf(buffer+length, ",\"panel_revision\":\"%s %s\"",aqdata->panel_cpu, aqdata->panel_rev );//8157 REV MMM",
+
+
/*
length += sprintf(buffer+length, ",\"panel_type\":\"%s\"",getPanelString());
@@ -1204,7 +1209,7 @@ int json_cfg_element(char* buffer, int size, const char *name, const void *value
if (isMASKSET(config_mask, CFG_FORCE_RESTART)) {
adv_size += sprintf(adv+adv_size,",\"force_restart\": \"yes\"");
if ( strcmp(name, CFG_N_panel_type) == 0 ) {
- adv_size += sprintf(adv+adv_size,",\"force_restart_msg\": \"If you panel_type, you must save and reload config for correct config options to show, and must also restart AqualinkD once finished!\"");
+ adv_size += sprintf(adv+adv_size,",\"force_restart_msg\": \"If you change panel_type, you must save and reload config for correct config options to show!\\nYou must also restart AqualinkD once finished!\"");
}
}
diff --git a/source/net_services.c b/source/net_services.c
index d90110e..01e42eb 100644
--- a/source/net_services.c
+++ b/source/net_services.c
@@ -1109,7 +1109,19 @@ uriAtype action_URI(request_source from, const char *URI, int uri_length, float
} else if (strncmp(ri1, "restart", 7) == 0 && from == NET_WS) { // Only valid from websocket.
LOG(NET_LOG,LOG_NOTICE, "Received restart request!\n");
raise(SIGRESTART);
- return uActioned;
+ return uActioned;
+ } else if (strncmp(ri1, "installrelease", 14) == 0 && from == NET_WS) { // Only valid from websocket.
+ if (ri2 != NULL) {
+ LOG(NET_LOG,LOG_NOTICE, "Received install release request, %s\n",ri2);
+ _aqualink_data->upgrade_version = malloc( (sizeof(char*) * strlen(ri2)) + 1);
+ snprintf(_aqualink_data->upgrade_version, strlen(ri2)+1, ri2);
+ } else {
+ LOG(NET_LOG,LOG_NOTICE, "Received install release request, but no version named, using latest!\n");
+ _aqualink_data->upgrade_version = "latest";
+ }
+ raise(SIGRUPGRADE);
+ return uActioned;
+ /*
} else if (strncmp(ri1, "upgrade", 7) == 0 && from == NET_WS) { // Only valid from websocket.
LOG(NET_LOG,LOG_NOTICE, "Received upgrade request!\n");
setMASK(_aqualink_data->updatetype, UPDATERELEASE);
@@ -1120,6 +1132,7 @@ uriAtype action_URI(request_source from, const char *URI, int uri_length, float
setMASK(_aqualink_data->updatetype, INSTALLDEVRELEASE);
raise(SIGRUPGRADE);
return uActioned;
+ */
} else if (strncmp(ri1, "seriallogger", 12) == 0 && from == NET_WS) { // Only valid from websocket.
LOG(NET_LOG,LOG_NOTICE, "Received request to run serial_logger!\n");
//LOG(NET_LOG,LOG_NOTICE, "Received request ri1=%s, ri2=%s, ri3=%s value=%f\n",ri1,ri2,ri3,value);
@@ -1857,6 +1870,7 @@ void action_websocket_request(struct mg_connection *nc, struct mg_ws_message *wm
DEBUG_TIMER_STOP(tid, NET_LOG, "action_websocket_request() save_config_js took");
ws_send(nc, message);
}
+ break;
case uSaveWebConfig:
{
DEBUG_TIMER_START(&tid);
diff --git a/source/version.h b/source/version.h
index 7f3d161..c1b47a4 100644
--- a/source/version.h
+++ b/source/version.h
@@ -4,5 +4,5 @@
#define AQUALINKD_SHORT_NAME "AqualinkD"
// Use Magor . Minor . Patch
-#define AQUALINKD_VERSION "3.0.0 (beta 1)"
+#define AQUALINKD_VERSION "3.0.0 (beta 2)"
\ No newline at end of file
diff --git a/web/aqmanager.html b/web/aqmanager.html
index 0ffd5a1..c99bcd6 100644
--- a/web/aqmanager.html
+++ b/web/aqmanager.html
@@ -14,7 +14,7 @@