mirror of https://github.com/sfeakes/AqualinkD.git
2.4.1
parent
f4e67c8a4f
commit
2d717fbe74
12
README.md
12
README.md
|
@ -119,22 +119,18 @@ NEED TO FIX FOR THIS RELEASE.
|
|||
* DONE look at virtual button support
|
||||
* vbuton will need the PDA on iAQT protocol working.
|
||||
* change dimmer to % from steps. (will make HASIO & Homekit easier)
|
||||
* show Colorlight name in UI
|
||||
* add config for homekit_f (panel in F homekin in C), F to F or C to C is fine.
|
||||
* deprecate extended_device_id_programming
|
||||
* show error is vbutton and no extended_device_id
|
||||
# Updates in 2.3.9
|
||||
-->
|
||||
<!--
|
||||
# Updates in 2.4.1 (dev 0.1) -> Under development
|
||||
* Added support for One Touch Buttons & Virtual Buttons.
|
||||
* look at `virtual_button??_label` in aqualinkd.conf
|
||||
* have to use AqualinkTouch protocol for `extended_device_id` 0x31->0x33 in aqualinkd.conf
|
||||
|
||||
# Updates in 2.4.1 (under development)
|
||||
* PDA panel Rev 6.0 or newer that do not have a Jandy iAqualink device attached can use the AqualinkTouch protocol rather than PDA protocol.
|
||||
* This is faster, more reliable and does not intefear with the physical PDA device (like existing implimentation)
|
||||
* Please consider this very much BETA at the moment.
|
||||
* use `rssa_device_id=0x33` in aqualinkd.conf
|
||||
-->
|
||||
* use `device_id=0x33` in aqualinkd.conf
|
||||
|
||||
# Updates in Release 2.4.0
|
||||
* <b>WARNING</b> Breaking change if you use dimmer (please change button_??_lightMode from 6 to 10)
|
||||
* Fixed bugs with particular Jandy panel versions and color lights.
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -28,6 +28,10 @@ display_warnings_in_web=true
|
|||
# If you change this from 80, remember to update aqualink.service.avahi
|
||||
socket_port=80
|
||||
|
||||
|
||||
# Note on serial port below. If you want aqualinkd to start and run without connecting to a panel or port
|
||||
# use 0x00 for device_id and a dummy serial_port like /dev/tty0.
|
||||
|
||||
# The serial port the daemon access to read the Aqualink RS8
|
||||
serial_port=/dev/ttyUSB0
|
||||
|
||||
|
@ -59,7 +63,6 @@ panel_type = RS-8 Combo
|
|||
# Working RS ID's are 0x0a 0x0b 0x09 0x08 <- 0x08 is usually taken
|
||||
# If your panel is a PDA only model, then PDA device ID's are 0x60, 0x61, 0x62, 0x63.
|
||||
# (These are NOT recomended to use unless you absolutly have no other option)
|
||||
#device_id=0x0a
|
||||
device_id=0x00
|
||||
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -121,7 +121,8 @@ DEV_UNKNOWN_MASK = 0xF8; // Unknown mask, used to reset values
|
|||
#define AQ_MINPKTLEN 5
|
||||
//#define AQ_MAXPKTLEN 64
|
||||
//#define AQ_MAXPKTLEN 128 // Max 79 bytes so far, so 128 is a guess at the moment, just seen large packets from iAqualink
|
||||
#define AQ_MAXPKTLEN 256 // Still getting this at 128, so temp increase to 256 and print message over 128 in aq_serial.c
|
||||
//#define AQ_MAXPKTLEN 256 // Still getting this at 128, so temp increase to 256 and print message over 128 in aq_serial.c
|
||||
#define AQ_MAXPKTLEN 512 // Still getting this at 128, so temp increase to 256 and print message over 128 in aq_serial.c
|
||||
#define AQ_PSTLEN 5
|
||||
#define AQ_MSGLEN 16
|
||||
#define AQ_MSGLONGLEN 128
|
||||
|
|
|
@ -482,7 +482,7 @@ int startup(char *self, char *cfgFile)
|
|||
|
||||
// Sanity check on Device ID's against panel type
|
||||
if (isRS_PANEL) {
|
||||
if (_aqconfig_.device_id >= 0x08 && _aqconfig_.device_id <= 0x0B) {
|
||||
if ( (_aqconfig_.device_id >= 0x08 && _aqconfig_.device_id <= 0x0B) || _aqconfig_.device_id == 0x00) {
|
||||
// We are good
|
||||
} else {
|
||||
LOG(AQUA_LOG,LOG_ERR, "Device ID 0x%02hhx does not match RS panel, please check config!\n", _aqconfig_.device_id);
|
||||
|
@ -992,7 +992,7 @@ void main_loop()
|
|||
got_probe_rssa = true;
|
||||
|
||||
if (_aqconfig_.device_id == 0x00) {
|
||||
LOG(AQUA_LOG,LOG_NOTICE, "Searching for valid ID, please configure one for faster startup\n");
|
||||
LOG(AQUA_LOG,LOG_WARNING, "Searching for valid ID, please configure `device_id` for faster startup\n");
|
||||
}
|
||||
|
||||
LOG(AQUA_LOG,LOG_NOTICE, "Waiting for Control Panel probe\n");
|
||||
|
@ -1001,13 +1001,17 @@ void main_loop()
|
|||
// Loop until we get the probe messages, that means we didn;t start too soon after last shutdown.
|
||||
while ( (got_probe == false || got_probe_rssa == false || got_probe_extended == false ) && _keepRunning == true)
|
||||
{
|
||||
if (blank_read == blank_read_reconnect) {
|
||||
if (blank_read == blank_read_reconnect / 2) {
|
||||
LOG(AQUA_LOG,LOG_ERR, "Nothing read on '%s', are you sure that's right?\n",_aqconfig_.serial_port);
|
||||
#ifdef AQ_CONTAINER
|
||||
// Reset blank reads here, we want to ignore TTY errors in container to keep it running
|
||||
blank_read = 1;
|
||||
#endif
|
||||
} else if (blank_read == blank_read_reconnect*2) {
|
||||
if (_aqconfig_.device_id == 0x00) {
|
||||
blank_read = 1; // if device id=0x00 it's code for don't exit
|
||||
}
|
||||
_aqualink_data.updated = true; // Make sure to show erros if ui is up
|
||||
} else if (blank_read == blank_read_reconnect*2 ) {
|
||||
LOG(AQUA_LOG,LOG_ERR, "I'm done, exiting, please check '%s'\n",_aqconfig_.serial_port);
|
||||
stopPacketLogger();
|
||||
close_serial_port(rs_fd);
|
||||
|
|
|
@ -686,7 +686,8 @@ bool setConfigValue(struct aqualinkdata *aqdata, char *param, char *value) {
|
|||
pump_detail *pump = getpump(aqdata, num);
|
||||
if (pump != NULL) {
|
||||
pump->pumpID = strtoul(cleanalloc(value), NULL, 16);
|
||||
if ( (int)pump->pumpID <= PENTAIR_DEC_PUMP_MAX) {
|
||||
//if ( (int)pump->pumpID <= PENTAIR_DEC_PUMP_MAX) {
|
||||
if ( (int)pump->pumpID >= PENTAIR_DEC_PUMP_MIN && (int)pump->pumpID <= PENTAIR_DEC_PUMP_MAX) {
|
||||
pump->prclType = PENTAIR;
|
||||
} else {
|
||||
pump->prclType = JANDY;
|
||||
|
|
|
@ -947,7 +947,6 @@ bool processPacketFromJandyChemFeeder(unsigned char *packet_buffer, int packet_l
|
|||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
// JXi Heater
|
||||
|
|
|
@ -334,7 +334,13 @@ void updateAQButtonFromPageButton(struct aqualinkdata *aq_data, struct iaqt_page
|
|||
}
|
||||
break;
|
||||
default:
|
||||
LOG(IAQT_LOG,LOG_NOTICE, "Unknown state 0x%02hhx for button %s\n",pageButton->state,pageButton->name);
|
||||
// Dimmer light will have the % as the state. so 0x32=50% 0x4B=75%
|
||||
// So anything greater than 0 use as on
|
||||
if (pageButton->state > 0x00) {
|
||||
aq_data->aqbuttons[i].led->state = ON;
|
||||
aq_data->updated = true;
|
||||
}
|
||||
//LOG(IAQT_LOG,LOG_NOTICE, "Unknown state 0x%02hhx for button %s\n",pageButton->state,pageButton->name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
/*
|
||||
|
||||
Read Jandy packet To 0xa3 of type Unknown '0x53' | HEX: 0x10|0x02|0xa3|0x53|0x08|0x10|0x03|
|
||||
Read Jandy packet To 0x00 of type Ack | HEX: 0x10|0x02|0x00|0x01|0x3f|0x00|0x52|0x10|0x03|
|
||||
|
||||
*/
|
|
@ -45,19 +45,33 @@
|
|||
//SPA WILL TURN OFF AFTER COOL DOWN CYCLE
|
||||
|
||||
|
||||
bool printableChar(char ch)
|
||||
{
|
||||
if ( (ch < 32 || ch > 126) ||
|
||||
ch == 123 || // {
|
||||
ch == 125 || // }
|
||||
ch == 34 || // "
|
||||
ch == 92 // backslash
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
int json_chars(char *dest, const char *src, int dest_len, int src_len)
|
||||
{
|
||||
int i;
|
||||
int end = dest_len < src_len ? dest_len:src_len;
|
||||
for(i=0; i < end; i++) {
|
||||
/*
|
||||
if ( (src[i] < 32 || src[i] > 126) ||
|
||||
src[i] == 123 || // {
|
||||
src[i] == 125 || // }
|
||||
src[i] == 34 || // "
|
||||
src[i] == 92 // backslash
|
||||
) // only printable chars
|
||||
src[i] == 92 // backslash
|
||||
) // only printable chars*/
|
||||
if (! printableChar(src[i]))
|
||||
dest[i] = ' ';
|
||||
else
|
||||
dest[i] = src[i];
|
||||
|
@ -120,24 +134,11 @@ const char* _getStatus(struct aqualinkdata *aqdata, const char *blankmsg)
|
|||
return JSON_TIMEOUT;
|
||||
}
|
||||
|
||||
// NSF should probably use json_chars here.
|
||||
if (aqdata->last_display_message[0] != '\0') {
|
||||
int i;
|
||||
for(i=0; i < strlen(aqdata->last_display_message); i++ ) {
|
||||
if (aqdata->last_display_message[i] <= 31 || aqdata->last_display_message[i] >= 127) {
|
||||
if (! printableChar(aqdata->last_display_message[i])) {
|
||||
aqdata->last_display_message[i] = ' ';
|
||||
} else {
|
||||
switch (aqdata->last_display_message[i]) {
|
||||
case '"':
|
||||
case '/':
|
||||
case '\n':
|
||||
case '\t':
|
||||
case '\f':
|
||||
case '\r':
|
||||
case '\b':
|
||||
aqdata->last_display_message[i] = ' ';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//printf("JSON Sending '%s'\n",aqdata->last_display_message);
|
||||
|
|
|
@ -206,6 +206,7 @@ const char *getDevice(unsigned char ID) {
|
|||
if (ID >= 0x70 && ID <= 0x73)
|
||||
return HEAT_PUMP;
|
||||
|
||||
// Looks like 0xe0 is also a Jandy ePump
|
||||
if (ID >= 0x78 && ID <= 0x7B)
|
||||
return EPUMP;
|
||||
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
#define AQUALINKD_NAME "Aqualink Daemon"
|
||||
#define AQUALINKD_SHORT_NAME "AqualinkD"
|
||||
#define AQUALINKD_VERSION "2.4.0"
|
||||
#define AQUALINKD_VERSION "2.4.1 (Dev)"
|
||||
|
|
Loading…
Reference in New Issue