Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeakes committed Sep 17, 2024
1 parent e3dc3db commit e0109d7
Show file tree
Hide file tree
Showing 30 changed files with 410 additions and 90 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ NEED TO FIX FOR THIS RELEASE.
* cleaned up code for spa_mode and spa for newer pannels.
* Allow VSP to be asigned to virtual button.
* Fixed bug with timer not starting.
* Increase Speed of detecting device state changes.

# Updates in Release 2.4.0
* <b>WARNING</b> Breaking change if you use dimmer (please change button_??_lightMode from 6 to 10)
Expand Down
7 changes: 4 additions & 3 deletions docker/aqexec-pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
# This file should be placed in the config aqualinkd directory defined
# in your docker-compose.yml (or equiv)
#
# MAKE SURE TO CHAGE THE IP BELOW
#
# MAKE SURE TO CHAGE THE IP BELOW (1.1.1.1)
# aqualinkd.cong should have serial_port=/dev/ttyEW11

echo "Starting SOCAT port binding....."
socat -d -d pty,link=/dev/tty.Pool2,raw TCP:192.168.99.248:8899 &
socat -d -d pty,link=/dev/ttyEW11,raw,ignoreeof TCP4:1.1.1.1:8899,ignoreeof &
sudo docker compose up
echo "Sleeping for SOCAT start....."
sleep 2s
Binary file modified release/aqualinkd-amd64
Binary file not shown.
Binary file modified release/aqualinkd-arm64
Binary file not shown.
Binary file modified release/aqualinkd-armhf
Binary file not shown.
Binary file modified release/serial_logger-amd64
Binary file not shown.
Binary file modified release/serial_logger-arm64
Binary file not shown.
Binary file modified release/serial_logger-armhf
Binary file not shown.
27 changes: 21 additions & 6 deletions source/allbutton.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,27 @@
#include "devices_jandy.h"
#include "allbutton_aq_programmer.h"

void processLEDstate(struct aqualinkdata *aq_data)
/* Below can also be called from serialadapter.c */
void processLEDstate(struct aqualinkdata *aq_data, unsigned char *packet, logmask_t from)
{

int i = 0;
int byte;
int bit;

if (memcmp(aq_data->raw_status, packet + 4, AQ_PSTLEN) != 0) {
aq_data->updated = true;
LOG(from,LOG_DEBUG, "Processing LEDs status CHANGED\n");
} else {
LOG(from,LOG_DEBUG, "Processing LEDs status\n");
// Their is no point in continuing here, so we could return if wanted.
// But for the moment, we don't need to speed up anything.
}

memcpy(aq_data->raw_status, packet + 4, AQ_PSTLEN);

//debuglogPacket(ALLB_LOG, );


for (byte = 0; byte < 5; byte++)
{
Expand All @@ -29,7 +42,7 @@ void processLEDstate(struct aqualinkdata *aq_data)
else
aq_data->aqualinkleds[i].state = OFF;

//LOG(ALLB_LOG,LOG_DEBUG,"Led %d state %d",i+1,aq_data->aqualinkleds[i].state);
//LOG(from,LOG_DEBUG,"Led %d state %d",i+1,aq_data->aqualinkleds[i].state);
i++;
}
}
Expand All @@ -44,14 +57,14 @@ void processLEDstate(struct aqualinkdata *aq_data)
aq_data->aqualinkleds[SOLAR_HTR_LED_INDEX - 1].state = ENABLE;
/*
for (i=0; i < TOTAL_BUTTONS; i++) {
LOG(ALLB_LOG,LOG_NOTICE, "%s = %d", aq_data->aqbuttons[i].name, aq_data->aqualinkleds[i].state);
LOG(from,LOG_NOTICE, "%s = %d", aq_data->aqbuttons[i].name, aq_data->aqualinkleds[i].state);
}
*/
#ifdef CLIGHT_PANEL_FIX // Use state from RSSD protocol for color light if it's on.
for (int i=0; i < aq_data->num_lights; i++) {
if ( aq_data->lights[i].RSSDstate == ON && aq_data->lights[i].button->led->state != ON ) {
aq_data->lights[i].button->led->state = aq_data->lights[i].RSSDstate;
//LOG(ALLB_LOG,LOG_WARNING,"Fix Jandy bug, color light '%s' is on, setting status to match!\n", aq_data->lights[i].button->label);
//LOG(from,LOG_WARNING,"Fix Jandy bug, color light '%s' is on, setting status to match!\n", aq_data->lights[i].button->label);
}
}
#endif
Expand Down Expand Up @@ -641,8 +654,10 @@ bool process_allbutton_packet(unsigned char *packet, int length, struct aqualink
case CMD_STATUS:
//LOG(ALLB_LOG,LOG_DEBUG, "RS Received STATUS length %d.\n", length);
//debuglogPacket(ALLB_LOG, packet, length, true, true);
memcpy(aq_data->raw_status, packet + 4, AQ_PSTLEN);
processLEDstate(aq_data);

//memcpy(aq_data->raw_status, packet + 4, AQ_PSTLEN);
//processLEDstate(aq_data);
processLEDstate(aq_data, packet, ALLB_LOG);

/* NSF Take this out, and use the ALLButton loop cycle to determin if we get spa/pool temp
messages. Works better for dual equiptment when both pool & spa pumps and dual temp sensors */
Expand Down
2 changes: 1 addition & 1 deletion source/allbutton.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define ALLBUTTON_H_



void processLEDstate(struct aqualinkdata *aq_data, unsigned char *packet, logmask_t from);
bool process_allbutton_packet(unsigned char *packet, int length, struct aqualinkdata *aq_data);

#endif //ALLBUTTON_H_
8 changes: 4 additions & 4 deletions source/aq_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,9 +627,9 @@ void initPanelButtons(struct aqualinkdata *aqdata, bool rs, int size, bool combo

aqdata->aqbuttons[index].led = &aqdata->aqualinkleds[19-1];
aqdata->aqbuttons[index].led->state = LED_S_UNKNOWN;
aqdata->aqbuttons[index].label = rs?name2label(BTN_SOLAR_HTR):BTN_PDA_SOLAR_HTR;
aqdata->aqbuttons[index].name = BTN_SOLAR_HTR;
aqdata->aqbuttons[index].code = KEY_SOLAR_HTR;
aqdata->aqbuttons[index].label = rs?name2label(BTN_EXT_AUX):BTN_PDA_EXT_AUX;
aqdata->aqbuttons[index].name = BTN_EXT_AUX;
aqdata->aqbuttons[index].code = KEY_EXT_AUX;
aqdata->aqbuttons[index].dz_idx = DZ_NULL_IDX;
aqdata->aqbuttons[index].special_mask = 0;
index++;
Expand Down Expand Up @@ -809,7 +809,7 @@ bool setDeviceState(struct aqualinkdata *aqdata, int deviceIndex, bool isON, req
//#ifdef PRESTATE_ONOFF
if (_aqconfig_.device_pre_state) {
if ((button->code == KEY_POOL_HTR || button->code == KEY_SPA_HTR ||
button->code == KEY_SOLAR_HTR) &&
button->code == KEY_EXT_AUX) &&
isON > 0) {
button->led->state = ENABLE; // if heater and set to on, set pre-status to enable.
//_aqualink_data->updated = true;
Expand Down
3 changes: 3 additions & 0 deletions source/aq_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ const char* get_jandy_packet_type(unsigned char* packet , int length)
case CMD_IAQ_MSG_LONG:
return "iAq Popup message";
break;
case CMD_IAQ_AUX_STATUS:
return "iAq AUX status";
break;
case RSSA_DEV_STATUS:
// This is a fail reply 0x10|0x02|0x48|0x13|0x02|0x00|0x10|0x00|0x7f|0x10|0x03|
// Rather than check all, just check 0x02 and checksum sin't I'm not sure 0x10 means faiure without 0x00 around it.
Expand Down
16 changes: 13 additions & 3 deletions source/aq_serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ const char *getJandyDeviceName(emulation_type etype);
#define JANDY_DEC_SWG_MAX 83 // 0x53
#define JANDY_DEC_PUMP_MIN 120 // 0x78
#define JANDY_DEC_PUMP_MAX 123 // 0x7b
// Have also seen epump at 0xe0 with panel rev W that supports more pumps
#define JANDY_DEC_PUMP2_MIN 224 // 0xe0
#define JANDY_DEC_PUMP2_MAX 228 // 0xe3 // Their are probably more, but this is a guess

#define JANDY_DEC_JXI_MIN 104 // 0x68
#define JANDY_DEC_JXI_MAX 107 // 0x6B
#define JANDY_DEC_LX_MIN 56 // 0x38
Expand Down Expand Up @@ -204,7 +208,8 @@ DEV_UNKNOWN_MASK = 0xF8; // Unknown mask, used to reset values
#define KEY_AUX7 0x15
#define KEY_POOL_HTR 0x12
#define KEY_SPA_HTR 0x17
#define KEY_SOLAR_HTR 0x1c
//#define KEY_SOLAR_HTR 0x1c
#define KEY_EXT_AUX 0x1c
#define KEY_MENU 0x09
#define KEY_CANCEL 0x0e
#define KEY_LEFT 0x13
Expand Down Expand Up @@ -242,7 +247,8 @@ DEV_UNKNOWN_MASK = 0xF8; // Unknown mask, used to reset values
#define BTN_AUX7 "Aux_7"
#define BTN_POOL_HTR "Pool_Heater"
#define BTN_SPA_HTR "Spa_Heater"
#define BTN_SOLAR_HTR "Solar_Heater"
//#define BTN_SOLAR_HTR "Solar_Heater"
#define BTN_EXT_AUX "Extra_Aux"

#define BTN_TEMP1_HTR "Temp1_Heater"
#define BTN_TEMP2_HTR "Temp2_Heater"
Expand Down Expand Up @@ -271,7 +277,8 @@ DEV_UNKNOWN_MASK = 0xF8; // Unknown mask, used to reset values
#define BTN_PDA_AUX7 "AUX7"
#define BTN_PDA_POOL_HTR "POOL HEAT"
#define BTN_PDA_SPA_HTR "SPA HEAT"
#define BTN_PDA_SOLAR_HTR "EXTRA AUX"
//#define BTN_PDA_SOLAR_HTR "EXTRA AUX"
#define BTN_PDA_EXT_AUX "EXTRA AUX"

#define BUTTON_LABEL_LENGTH 20

Expand Down Expand Up @@ -402,6 +409,9 @@ SPILLOVER IS DISABLED WHILE SPA IS ON
#define CMD_IAQ_TITLE_MESSAGE 0x2d // This is what the product name is set to (Jandy RS) usually
//#define CMD_IAQ_VSP_ERROR 0x2c // Error when setting speed too high
#define CMD_IAQ_MSG_LONG 0x2c // This this is display popup message. Next 2 bytes 0x00|0x01 = wait and then 0x00|0x00 clear

// If
#define CMD_IAQ_AUX_STATUS 0x72 // Get this on AqualinkTouch protocol when iAqualink protocol sends 0x18 (get aux status I assume)
/*
#define CMD_IAQ_MSG_3 0x2d // Equiptment status message??
#define CMD_IAQ_0x31 0x31 // Some pump speed info
Expand Down
37 changes: 2 additions & 35 deletions source/aqualinkd.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,8 +625,7 @@ int startup(char *self, char *cfgFile)
LOG(AQUA_LOG,LOG_NOTICE, "Config light_pgm_mode = %.2f\n", _aqconfig_.light_programming_mode);
LOG(AQUA_LOG,LOG_NOTICE, "Debug RS485 protocol = %s\n", bool2text(_aqconfig_.log_protocol_packets));
LOG(AQUA_LOG,LOG_NOTICE, "Debug RS485 protocol raw = %s\n", bool2text(_aqconfig_.log_raw_bytes));
if ( _aqconfig_.RSSD_LOG_filter != NUL)
LOG(AQUA_LOG,LOG_NOTICE, "Log RS485 packets from = 0x%02hhx\n", _aqconfig_.RSSD_LOG_filter);

//LOG(AQUA_LOG,LOG_NOTICE, "Use PDA 4 auxiliary info = %s\n", bool2text(_aqconfig_.use_PDA_auxiliary));
//LOG(AQUA_LOG,LOG_NOTICE, "Read Pentair Packets = %s\n", bool2text(_aqconfig_.read_pentair_packets));
// logMessage (LOG_NOTICE, "Config serial_port = %s\n", config_parameters->serial_port);
Expand Down Expand Up @@ -774,39 +773,7 @@ void caculate_ack_packet(int rs_fd, unsigned char *packet_buffer, emulation_type
//DEBUG_TIMER_STOP(_rs_packet_timer,AQUA_LOG,"AquaTouch Emulation type Processed packet in");
break;
case IAQUALNK:
/*
Probe | HEX: 0x10|0x02|0xa3|0x00|0xb5|0x10|0x03|
Ack | HEX: 0x10|0x02|0x00|0x01|0x00|0x00|0x13|0x10|0x03|
Unknown '0x61' | HEX: 0x10|0x02|0xa3|0x61|0x00|0x00|0x00|0x04|0x00|0x27|0x41|0x10|0x03|
Ack | HEX: 0x10|0x02|0x00|0x01|0x61|0x00|0x74|0x10|0x03|
Unknown '0x50' | HEX: 0x10|0x02|0xa3|0x50|0x20|0x20|0x20|0x20|0x20|0x20|0x20|0x20|0x20|0x00|0x25|0x10|0x03|
Ack | HEX: 0x10|0x02|0x00|0x01|0x50|0x00|0x63|0x10|0x03|
Unknown '0x51' | HEX: 0x10|0x02|0xa3|0x51|0x00|0x06|0x10|0x03|
Ack | HEX: 0x10|0x02|0x00|0x01|0x51|0x00|0x64|0x10|0x03|
Unknown '0x59' | HEX: 0x10|0x02|0xa3|0x59|0x00|0x0e|0x10|0x03|
Ack | HEX: 0x10|0x02|0x00|0x01|0x59|0x00|0x6c|0x10|0x03|
Unknown '0x52' | HEX: 0x10|0x02|0xa3|0x52|0x00|0x07|0x10|0x03|
Ack | HEX: 0x10|0x02|0x00|0x01|0x52|0x00|0x65|0x10|0x03|
Unknown '0x53' | HEX: 0x10|0x02|0xa3|0x53|0x08|0x10|0x03|
Ack | HEX: 0x10|0x02|0x00|0x01|0x3f|0x00|0x52|0x10|0x03|
Use byte 3 as return ack, except for 0x53=0x3f
*/
if (packet_buffer[PKT_CMD] == 0x53) {
/*
static int cnt=0;
if (cnt++ > 10) {
cnt=0;
LOG(IAQL_LOG,LOG_NOTICE, "Sending get bigass packet\n");
send_extended_ack(rs_fd, 0x3f, 0x18);
} else*/ {
// Use 0x3f
send_extended_ack(rs_fd, 0x3f, 0x00);
}
send_jandy_command(rs_fd, get_rssa_cmd(packet_buffer[PKT_CMD]), 4);
} else {
// Use packet_buffer[PKT_CMD]
send_extended_ack(rs_fd, packet_buffer[PKT_CMD], 0x00);
}
send_iaqualink_ack(rs_fd, packet_buffer);
break;
#endif
#ifdef AQ_PDA
Expand Down
12 changes: 10 additions & 2 deletions source/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ void init_parameters (struct aqconfig * parms)
//parms->device_id = strtoul(DEFAULT_DEVICE_ID, &p, 16);
parms->device_id = strtoul(DEFAULT_DEVICE_ID, NULL, 16);
parms->rssa_device_id = NUL;
parms->RSSD_LOG_filter = NUL;

for (int i=0; i < MAX_RSSD_LOG_FILTERS; i++) {
parms->RSSD_LOG_filter[i] = NUL;
}
parms->paneltype_mask = 0;
#if defined AQ_ONETOUCH || defined AQ_IAQTOUCH
parms->extended_device_id = NUL;
Expand Down Expand Up @@ -398,7 +401,12 @@ bool setConfigValue(struct aqualinkdata *aqdata, char *param, char *value) {
_aqconfig_.rssa_device_id = strtoul(cleanalloc(value), NULL, 16);
rtn=true;
} else if (strncasecmp(param, "RSSD_LOG_filter", 15) == 0) {
_aqconfig_.RSSD_LOG_filter = strtoul(cleanalloc(value), NULL, 16);
for (int i=0; i < MAX_RSSD_LOG_FILTERS; i++) {
if (_aqconfig_.RSSD_LOG_filter[i] == NUL) {
_aqconfig_.RSSD_LOG_filter[i] = strtoul(cleanalloc(value), NULL, 16);
break;
}
}
rtn=true;
#if defined AQ_ONETOUCH || defined AQ_IAQTOUCH
} else if (strncasecmp (param, "extended_device_id_programming", 30) == 0) {
Expand Down
5 changes: 4 additions & 1 deletion source/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
#define READ_RS485_JAN_LX (1 << 4) // Jandy LX heater
#define READ_RS485_JAN_CHEM (1 << 5) // Jandy Chemical Feeder

#define MAX_RSSD_LOG_FILTERS 4

struct aqconfig
{
char *config_file;
Expand All @@ -47,6 +49,7 @@ struct aqconfig
unsigned char extended_device_id2;
bool extended_device_id_programming;
bool enable_iaqualink;
//bool enable_RS_device_value_print;
#endif
bool deamonize;
#ifndef AQ_MANAGER // Need to uncomment and clean up referances in future.
Expand Down Expand Up @@ -89,7 +92,7 @@ struct aqconfig
bool display_warnings_web;
bool log_protocol_packets; // Read & Write as packets
bool log_raw_bytes; // Read as bytes
unsigned char RSSD_LOG_filter;
unsigned char RSSD_LOG_filter[MAX_RSSD_LOG_FILTERS];
//bool log_raw_RS_bytes;
/*
#ifdef AQ_RS_EXTRA_OPTS
Expand Down
22 changes: 12 additions & 10 deletions source/devices_jandy.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ bool processJandyPacket(unsigned char *packet_buffer, int packet_length, struct
rtn = processPacketToSWG(packet_buffer, packet_length, aqdata/*, _aqconfig_.swg_zero_ignore*/);
previous_packet_to = packet_buffer[PKT_DEST];
}
else if (READ_RSDEV_ePUMP && packet_buffer[PKT_DEST] >= JANDY_DEC_PUMP_MIN && packet_buffer[PKT_DEST] <= JANDY_DEC_PUMP_MAX)
else if (READ_RSDEV_ePUMP && ( (packet_buffer[PKT_DEST] >= JANDY_DEC_PUMP_MIN && packet_buffer[PKT_DEST] <= JANDY_DEC_PUMP_MAX)
|| (packet_buffer[PKT_DEST] >= JANDY_DEC_PUMP2_MIN && packet_buffer[PKT_DEST] <= JANDY_DEC_PUMP2_MAX) ) )
{
interestedInNextAck = DRS_EPUMP;
rtn = processPacketToJandyPump(packet_buffer, packet_length, aqdata);
Expand Down Expand Up @@ -129,7 +130,7 @@ bool processPacketToSWG(unsigned char *packet, int packet_length, struct aqualin
//static int swg_zero_cnt = 0;
bool changedAnything = false;

// Only log if we are jandy debug move and not serial (otherwise it'll print twice)
// Only log if we are jandy debug move and not serial (otherwise it'll print twice)
if (getLogLevel(DJAN_LOG) == LOG_DEBUG && getLogLevel(RSSD_LOG) < LOG_DEBUG ) {
char buff[1024];
beautifyPacket(buff, 1024, packet, packet_length, true);
Expand Down Expand Up @@ -164,8 +165,9 @@ bool processPacketToSWG(unsigned char *packet, int packet_length, struct aqualin
setSWGpercent(aqdata, (int)packet[4]);
changedAnything = true;
aqdata->updated = true;
LOG(DJAN_LOG, LOG_DEBUG, "Set SWG %% to %d from control panel RS485 packet to SWG\n", aqdata->swg_percent);
LOG(DJAN_LOG, LOG_INFO, "Set SWG %% to %d from control panel to SWG\n", aqdata->swg_percent);
}

// LOG(DJAN_LOG, LOG_DEBUG, "SWG set to %d due to packet from control panel to SWG 0x%02hhx 0x%02hhx\n",
// aqdata.swg_percent,packet[4],packet[5]);
/*}*/
Expand Down Expand Up @@ -212,7 +214,7 @@ bool processPacketFromSWG(unsigned char *packet, int packet_length, struct aqual

if ( (packet[4] * 100) != aqdata->swg_ppm ) {
aqdata->swg_ppm = packet[4] * 100;
LOG(DJAN_LOG, LOG_DEBUG, "Set SWG PPM to %d from SWG packet\n", aqdata->swg_ppm);
LOG(DJAN_LOG, LOG_INFO, "Received SWG PPM %d from SWG packet\n", aqdata->swg_ppm);
changedAnything = true;
aqdata->updated = true;
}
Expand Down Expand Up @@ -571,9 +573,9 @@ bool processPacketToJandyPump(unsigned char *packet_buffer, int packet_length, s
// If type 0x45 and 0x44 set to interested in next command.
if (packet_buffer[3] == CMD_EPUMP_RPM) {
// All we need to do is set we are interested in next packet, but ca lling function already did this.
LOG(DJAN_LOG, LOG_DEBUG, "ControlPanel request Pump ID 0x%02hhx set RPM to %d\n",packet_buffer[PKT_DEST], ( (packet_buffer[EP_HI_B_RPM-1] * 256) + packet_buffer[EP_LO_B_RPM-1]) / 4 );
LOG(DJAN_LOG, LOG_INFO, "ControlPanel request Pump ID 0x%02hhx set RPM to %d\n",packet_buffer[PKT_DEST], ( (packet_buffer[EP_HI_B_RPM-1] * 256) + packet_buffer[EP_LO_B_RPM-1]) / 4 );
} else if (packet_buffer[3] == CMD_EPUMP_WATTS) {
LOG(DJAN_LOG, LOG_DEBUG, "ControlPanel request Pump ID 0x%02hhx get watts\n",packet_buffer[PKT_DEST]);
LOG(DJAN_LOG, LOG_INFO, "ControlPanel request Pump ID 0x%02hhx get watts\n",packet_buffer[PKT_DEST]);
}

if (getLogLevel(DJAN_LOG) == LOG_DEBUG) {
Expand Down Expand Up @@ -685,24 +687,24 @@ bool processPacketToJandyJXiHeater(unsigned char *packet_buffer, int packet_leng
*/

if (packet_buffer[5] != aqdata->pool_htr_set_point) {
LOG(DJAN_LOG, LOG_DEBUG, "JXi pool setpoint %d, Pool heater sp %d (changing to LXi)\n", packet_buffer[5], aqdata->pool_htr_set_point);
LOG(DJAN_LOG, LOG_INFO, "JXi pool setpoint %d, Pool heater sp %d (changing to LXi)\n", packet_buffer[5], aqdata->pool_htr_set_point);
aqdata->pool_htr_set_point = packet_buffer[5];
}

if (packet_buffer[6] != aqdata->spa_htr_set_point) {
LOG(DJAN_LOG, LOG_DEBUG, "JXi spa setpoint %d, Spa heater sp %d (changing to LXi)\n", packet_buffer[6], aqdata->spa_htr_set_point);
LOG(DJAN_LOG, LOG_INFO, "JXi spa setpoint %d, Spa heater sp %d (changing to LXi)\n", packet_buffer[6], aqdata->spa_htr_set_point);
aqdata->spa_htr_set_point = packet_buffer[6];
}

if (packet_buffer[7] != 0xff && packet_buffer[4] != 0x00) {
if (packet_buffer[4] == 0x11 || packet_buffer[4] == 0x19) {
if (aqdata->pool_temp != packet_buffer[7]) {
LOG(DJAN_LOG, LOG_DEBUG, "JXi pool water temp %d, pool water temp %d (changing to LXi)\n", packet_buffer[7], aqdata->pool_temp);
LOG(DJAN_LOG, LOG_INFO, "JXi pool water temp %d, pool water temp %d (changing to LXi)\n", packet_buffer[7], aqdata->pool_temp);
aqdata->pool_temp = packet_buffer[7];
}
} else if (packet_buffer[4] == 0x12 || packet_buffer[4] == 0x1a) {
if (aqdata->spa_temp != packet_buffer[7]) {
LOG(DJAN_LOG, LOG_DEBUG, "JXi spa water temp %d, spa water temp %d (changing to LXi)\n", packet_buffer[7], aqdata->spa_temp);
LOG(DJAN_LOG, LOG_INFO, "JXi spa water temp %d, spa water temp %d (changing to LXi)\n", packet_buffer[7], aqdata->spa_temp);
aqdata->spa_temp = packet_buffer[7];
}
}
Expand Down
4 changes: 2 additions & 2 deletions source/devices_pentair.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ bool processPentairPacket(unsigned char *packet, int packet_length, struct aqual
// Set power to pump
else if (packet[PEN_PKT_CMD] == PEN_CMD_POWER && packet[PEN_PKT_DEST] >= PENTAIR_DEC_PUMP_MIN && packet[PEN_PKT_DEST] <= PENTAIR_DEC_PUMP_MAX) {
if (packet[9] == 0x0A) {
LOG(DPEN_LOG, LOG_INFO,"Pentair Pump 0x%02hhx request set power ON\n");
LOG(DPEN_LOG, LOG_INFO,"Pentair Pump 0x%02hhx request set power ON\n",packet[PEN_PKT_DEST]);
} else {
LOG(DPEN_LOG, LOG_INFO,"Pentair Pump 0x%02hhx request set power OFF\n");
LOG(DPEN_LOG, LOG_INFO,"Pentair Pump 0x%02hhx request set power OFF\n",packet[PEN_PKT_DEST]);
}
}

Expand Down
Loading

0 comments on commit e0109d7

Please sign in to comment.