sfeakes / AqualinkD

Daemon to control Jandy Aqualink RS pool equipment from any home automation hub (Alexa, Homekit & Siri, Home Assistant, smartthings, domoticz etc) or web browser.
Other
171 stars 47 forks source link

VSP power / rpm reporting #352

Open lodged78 opened 1 week ago

lodged78 commented 1 week ago

EDIT 2: Using the Aqualink Touch protocol extended_device_id=0x31 works better - power / rpm goes to zero when the pump is turned off, shows higher power when priming, then the correct power / rpm at steady state. The rpm value is not shown during priming, but I don't believe rpm is reported by the controller during priming. Power during priming fluctuates between zero, the last power reported, and the higher priming power - but this is very minor.

aqualinkd.log


EDIT: I edited my config file and added the line extended_device_id=0x41 - power / rpm values are now published to MQTT when the pump is running in steady state.

When the pump is turned off, power / rpm values of zero are not published to MQTT as expected.

Turning the pump on publishes MQTT zeros for power / rpm

Sep 22 23:33:34 Info:   NetService:MQTT: Published id=546: aqualinkd/Filter_Pump/RPM 0
Sep 22 23:33:34 Info:   NetService:MQTT: Published id=547: aqualinkd/Filter_Pump/Watts 0
Sep 22 23:33:34 Info:   NetService:MQTT: Published id=548: aqualinkd/Filter_Pump/Status -1

But actual power / rpm values aren't updated during priming - power / rpm remains at zero. Info: One Touch: Menu Line 2 = JANDY ePUMP 1 Info: One Touch: Menu Line 3 = PRIMING Info: One Touch: Menu Line 4 = WATTS: 578

When priming is complete, the correct power / rpm values are published to MQTT.


My system was running fine with 2.3.6, including reporting VSP rpm / power to MQTT. I noticed when the filter pump was off, AqualinkD continued publishing the last known power / rpm to MQTT instead of zero.

I upgraded to 2.4.0 to see if it fixed the issue, but actually made things worse.

Turning the pump off causes the SWG to publish MQTT that the SWG is off; I would expect the same sort of logic for power / rpm when the pump is off.

Sep 22 21:45:21 Info:   AllButton: No AQUAPURE message in cycle, pump is off so setting SWG to off
Sep 22 21:45:21 Info:   AllButton: RS Message :- 'JANDY AquaLinkRS'
Sep 22 21:45:23 Info:   AllButton: RS Message :- 'AIR TEMP 63 F'
Sep 22 21:45:23 Info:   NetService:MQTT: Published id=117: aqualinkd/SWG 0
Sep 22 21:45:23 Info:   NetService:MQTT: Published id=118: aqualinkd/SWG/enabled 0
Sep 22 21:45:23 Info:   NetService:MQTT: Published id=119: aqualinkd/SWG/fullstatus 255
Sep 22 21:45:23 Info:   NetService:MQTT: Published id=120: aqualinkd/SWG/Display_Message AQUAPURE OFF
Sep 22 21:45:25 Info:   AllButton: RS Message :- 'PUMP OFF'
Sep 22 21:45:27 Info:   AllButton: RS Message :- '09/22/24 SUN'
Sep 22 21:45:29 Info:   AllButton: RS Message :- '9:46 PM'

My /etc/aqualink.conf was not overwritten by the upgrade, and I made no change to the config file after upgrading.

I found AqualinkD 2.4.0 is no longer publishing power / rpm to MQTT at all, or displaying power / rpm in the log.

The log previously showed power / rpm messages

Sep 22 20:59:38 Info:   RS Allbtn: RS Message :- '09/22/24 SUN'
Sep 22 20:59:39 Info:   RS Allbtn: RS Message :- '9:01 PM'
Sep 22 20:59:41 Info:   RS Allbtn: RS Message :- 'JANDY AquaLinkRS'
Sep 22 20:59:42 Info:   JandyDvce: Jandy Pump Status message = WATTS 196
Sep 22 20:59:43 Info:   RS Allbtn: RS Message :- 'AIR TEMP 72 F'
Sep 22 20:59:45 Info:   RS Allbtn: RS Message :- 'POOL TEMP  74 F'
Sep 22 20:59:47 Info:   JandyDvce: Jandy Pump Status message = RPM 1750
Sep 22 20:59:48 Info:   RS Allbtn: RS Message :- 'AquaPure 40%'
Sep 22 20:59:49 Info:   RS Allbtn: RS Message :- 'SALT 3500 PPM'

After upgrading to 2.4.0, the log no longer shows and power / rpm messages from the controller, but I can see the current power / rpm on my One Touch panel.

Sep 22 22:36:58 Info:   AllButton: RS Message :- '09/22/24 SUN'
Sep 22 22:37:00 Info:   AllButton: RS Message :- '10:37 PM'
Sep 22 22:37:02 Info:   AllButton: RS Message :- 'AIR TEMP 62 F'
Sep 22 22:37:05 Info:   AllButton: RS Message :- 'POOL TEMP  74 F'
Sep 22 22:37:06 Info:   AllButton: RS Message :- 'AquaPure 40%'
Sep 22 22:37:08 Info:   AllButton: RS Message :- 'SALT 3500 PPM'

Long clicking on the filter pump in the web interface correctly shows the current RPM (but no power) - the rpm is clearly being received from the controller, put isn't being published in the log or to MQTT.

Serial Logger

Notice:  RS Serial: RS485 interface received 600 packets in 22 seconds (~27.27 Msg/Sec)
Notice:  RS Serial: Jandy Control Panel Model   :  RS-8 Combo
Notice:  RS Serial: Jandy Control Panel Version :  REV R
Notice:  RS Serial: Jandy ID's found
Notice:  RS Serial: ID 0x40 is in use    <-- Onetouch device
Notice:  RS Serial: ID 0x50 is in use    <-- Salt Water Generator (Aquarite mode)
Notice:  RS Serial: ID 0x0a is not used  <-- can use for Aqualinkd
Notice:  RS Serial: ID 0x60 is not used  <-- can use for Aqualinkd (PDA mode only)
Notice:  RS Serial: ID 0x48 is not used  <-- can use for Aqualinkd (RSSA ID)
Notice:  RS Serial: ID 0x78 is in use    <-- Jandy VSP ePump
Notice:  RS Serial: ID 0x08 is not used  <-- can use for Aqualinkd
Notice:  RS Serial: ID 0x09 is not used  <-- can use for Aqualinkd
Notice:  RS Serial: ID 0x0b is not used  <-- can use for Aqualinkd
Notice:  RS Serial: ID 0x41 is not used  <-- can use for Aqualinkd (Extended Device ID)
Notice:  RS Serial: ID 0x42 is not used  <-- can use for Aqualinkd (Extended Device ID)
Notice:  RS Serial: ID 0x43 is not used  <-- can use for Aqualinkd (Extended Device ID)
Notice:  RS Serial: ID 0x30 is not used  <-- can use for Aqualinkd (Prefered Extended Device ID)
Notice:  RS Serial: ID 0x31 is not used  <-- can use for Aqualinkd (Prefered Extended Device ID)
Notice:  RS Serial: ID 0x32 is not used  <-- can use for Aqualinkd (Prefered Extended Device ID)
Notice:  RS Serial: ID 0x33 is not used  <-- can use for Aqualinkd (Prefered Extended Device ID)
Notice:  RS Serial:

Notice:  RS Serial: Suggested aqualinkd.conf values
Notice:  RS Serial: -------------------------
Notice:  RS Serial: panel_type =  RS-8 Combo
Notice:  RS Serial: device_id = 0x0a
Notice:  RS Serial: rssa_device_id = 0x48
Notice:  RS Serial: extended_device_id = 0x30
Notice:  RS Serial: -------------------------

Config file

# aqualinkd.conf
#

# The directory where the web files are stored

web_directory=/var/www/aqualinkd/

# Log to file, comment out if you do not want to log to file
#log_file=/var/log/aqualinkd.log

# The log level. [DEBUG_DERIAL, DEBUG, INFO, NOTICE, WARNING, ERROR]
# Pick the highest level, and all levels below will be sent to syslog.
# your syslog settings may be set to only display messages above a certian level
# in which case make sure you use the log_file settings to capture everything
# you want when debugging
# so, NOTICE also prints WARNING & ERROR
#     DEBUG_SERIAL would print everything possible

#log_level=DEBUG
#log_level=INFO
log_level=NOTICE
#log_level=WARNING

# Display any ERROR & Warning messages in web interface.
display_warnings_in_web=true

# The socket port that the daemon listens to
# If you change this from 80, remember to update aqualink.service.avahi
socket_port=80

# The serial port the daemon access to read the Aqualink RS8
serial_port=/dev/ttyUSB0

# Your RS panel size. ie 4, 6, 8, 12 or 16 relates to RS4, RS6, RS8, RS12 or RS16.
# VERY important that you select 12 or 16, if you have either of those size panels.
# Also don't think setting a 12 when you have a 8 will give you 4 more accessories to control, it won't the
# panel information is needed as different panels use different bits within the RS protocol for status and key
# presses.
# serial_logger will get the panel type string if you don't know it, below are examples.
# Must be in format `XX-N ????`  (XX=RS or PD, N=Circuits, ????=Combo or Only or Dual)
panel_type = RS-8 Combo
#panel_type = PD-8 Combo
#panel_type = RS-16 Combo
#panel_type = RS-2/14 Dual
#panel_type = RS-4 Combo
#panel_type = RS-8 Only
#
# If serial_logger doesn't give you a type string in the format above, you can use the next options to set the specifics.
#
# panel_type_size = (6, 8, 10, 12, 14 or 16)  (Number of supported accessories / buttons)
# panel_type_combo = (yes or no)              (combo panels support BOTH pool & spa)
# panel_type_dual = (yes or no)               (dual circuit panel)
# panel_type_pda = (yes or no)                (PDA panel. only set this if you have to. Panel ONLY supports the PDA protocol)
# panel_type_rs = (yes or no)                 (RS panel. Panel Supports all protocols)

# The ID of the Aqualink terminal device. Devices probed by RS8 master are:
# 08-0b, 10-13, 18-1b, 20-23, 28-2b, 30-33, 38-3b, 40-43
# 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

# The ID of Jandy SerialInterface device. These is only one usable ID, if serial_logger
# picks up your panel supports this, uncomment, as it will speed up heater setpoints & RS16 panels.
#rssa_device_id=0x48

# The ID for extended settings to allow for faster programming
# VARIABLE SPEED PUMP are only supported with this option.
# Do not enable this if you don't use either, you'll just waste memory and cpu cycles
# Valid ID's are 0x40, 0x41, 0x42 & 0x43. for ONE Touch
# Valid ID's are 0x30, 0x31, 0x32 & 0x33. for Aqualink Touch
#extended_device_id=0x31

# If you have extended_device_id set, then you can also use that ID for programming some features.
# This means that you can turn things on/off while AqualinkD is programming certian features.
# If you are using Aqualink Touch protocol for extended_device_id then this is highly recomended
# as it will speed up programming substantially. if One Touch it's 50/50.
#extended_device_id_programming = yes

# Read information from these devices directly from the RS485 bus as well as control panel.
# swg = Salt Water Generator
# ePump = Jandy ePump or ePump AC
# vsfPump = Pentair VS,VF,VSF pump
# JXi = Jandy JXi heater (might also be LXi heaters)
# LX = Jandy LX & LT heaters
# Chem = Jandy Chemical Feeder
read_RS485_swg = yes
read_RS485_ePump = yes
#read_RS485_vsfPump = yes
#read_RS485_JXi = yes
#read_RS485_LX = yes
#read_RS485_Chem = yes

# Keep the panel time synced with systemtime.  Make sure to set systemtime / NTP correctly.
keep_paneltime_synced = yes

# If equiptment is in freeze protect mode some commands like pump_off / spa_on are
# ignored.  You can force these to work by setting the below.
override_freeze_protect = no

# Convert Deg F to Deg C when posting to Domoticz or MQTT.
# If using homebridge-aqualinkd convert_mqtt_temp_to_c must be set to yes.
convert_mqtt_temp_to_c = no
convert_dz_temp_to_c = yes

# default is to use pool water temp as spa water temp when spa is off (and there for not able to report water temp)
# enable below to report 0 as the spa temp when spa is off.
# This is for MQTT cnnections only, WEB socket and WEB API always report TEMP_UNKNOWN (-999) allowing the consumer to
# decide how to report.
report_zero_spa_temp = yes

# default is to not report changes to pool temp when the filter pump is off or in spa mode
# enable below to report 0 as the pool temp when the filter pump is off or when in spa mode.
# This is for MQTT cnnections only, WEB socket and WEB API always report TEMP_UNKNOWN (-999) allowing the consumer to
# decide how to report.
report_zero_pool_temp = no

# mqtt stuff
mqtt_address = 192.168.4.99:1883
mqtt_user = mqtt
mqtt_passwd = xxxx
#mqtt_dz_pub_topic = domoticz/in
#mqtt_dz_sub_topic = domoticz/out
mqtt_aq_topic = aqualinkd
mqtt_hassio_discover_topic = homeassistant

# MQTT will only post updated information, this option AqualinkD will re-post all MQTT information every ~5 minutes.
mqtt_timed_update = yes

# Please see forum for this, only set to yes when logging information to support new devices. (or debugging protocol)
# Information will be written to /tmp/RS485.log & /tmp/RS485_raw.log respectively
#debug_RSProtocol_packets = no
#debug_RSProtocol_bytes = no

# Log any packets from this device.
#serial_debug_filter = 0x00

# Not documented. These are experimental.  Will change how RS485 / Serial works, Only use if asked to for problem solving purposes.
rs485_frame_delay = 4

# Get rid of the startup warning message about no low latency. BETTER option is to buy a better adapter.
#ftdi_low_latency = no

# Stop the SWG bounce from displaying when using VSP.
#swg_zero_ignore_count = 20

# Enable AqualinkD scheduler.
# A version of cron that supports cron.d must be installed for the scheduler to work.
# If you used the install script and didn;t receive any cron warnings, you should be good to go.
enable_scheduler = no

# Put AqualinkD to sleep when in PDA mode after inactivity.
# Ignore if you are not using PDA mode.
# If you have Jandy PDA then this MUST be set to yes as the controller can only support one PDA.
# If you don't have a Jandy PDA leave this at no as AqualinkD will be a lot quicker.
#pda_sleep_mode = yes

# If you have a SWG connected to the control panel, set this to yes.
# AqualinkD can only detect a SWG if it's on, so after a restart you will not see/access a SWG until the the next time the pump is >
force_SWG = yes

# AqualinkD can take sime time to find heater setpoints (if they exist), This will force the pool & spa
# heaters to be listed as thermostats vs switches on startup, helps with homekit.
force_PS_setpoints = no

# AqualinkD can take sime time to find freeze protect (if panel supports it), This will force the freeze protect
# to be listed as thermostat on startup.
force_Frzprotect_setpoints = no

# AqualinkD can take sime time to find chemical feeder (if panel supports it), This will force the chemical feeder
# to be listed on startup.
force_chem_feeder = no

# Lights can be programmed by control panel or AqualinkD (if controlpanel doesn;t support specific light or light mode you want)
# IF YOU WANT AQUALINKD TO PROGRAM THE LIGHT, IT MUST NOT BE CONFIGURED AS A COLOR LIGHT IN THE JANDY CONTROL PANEL.
# Light probramming mode. 0=safe mode, but slow.
# any number greater is seconds to wait between button presses.
# 0.4 seems to be the minimum. (workd for light modes below 10 presses)
# 0.6 seems to work about 95% of the time, but above 20 presses can be hit or miss.
# 0 will simply wait for the controler to send the response back before sending the next, so is equivelent to about 1.2
light_programming_mode=0

# Light programming assumes light needs to be on before sending pulse (above setting)
# If the light is off when request is made to change "light show", then the below value are used
light_programming_initial_on=15

# Turn the light off for below time before start programmig puleses.
light_programming_initial_off=12

# Everything below here, if it ends with dzidx, then that's the ID for domoticz,
# so not needed if you are not suing dooticz.
# Domoticz ID's for temps.
# All below are Virtual Sensors
#air_temp_dzidx=0
#pool_water_temp_dzidx=0
#spa_water_temp_dzidx=0
#SWG_percent_dzidx=0
#SWG_PPM_dzidx=0
# Must be Virtual Alert Sensor
#SWG_Status_dzidx=0

# Use/find labels from Control Panel, these will overwrite the button_xx_label below,
# it noes NOT work in PDA mode, and it also considerable slows down AqualinkD startup process.
use_panel_aux_labels=no

# These are all the button labels / options / pump and light configurations you want to use.
# Simply change these to your setup, valid options for wach button are :-
# None of these are mandatory unless you have PDA or RS16 panel, then _label is mandatory
# button_??_label=Filter Pump  <Label you want to see>
# button_??_dzidx=37           <Domoticz IDX>
# button_??_pumpID=0x60        <RS485 ID of VSP>
# button_??_pumpIndex=1        <Pump index Jandy panel is configured to use>
# button_??_lightMode=4        <Color light mode>
#
# In most cases the label is just what you want to see in web UI/MQTT/API. ie you don't need to use Jandy's labeling. There are 2 e>
# 1) If using PDA mode, The Labels below are of the utmost importance, the labels MUST exactly match the labels in the "EQUIPTMENT >
# 2) RS 16 Panels have no protocol bit representation for AUXB5 to AUXB8, only text, so as with PDA Those labels MUST match the con>
# Use NONE for label if you don't have anything connected to that circuit and don't want to see the button in the UI.
#
# Below is an example of how different Panels map into the buttons.
#
#             |  RS-6 Combo  |  RS-6 Only   | RS-8 Combo   | RS-2/6 Dual  | RS-2/10 Dual |  RS-16 Combo |
#             --------------------------------------------------------------------------------------------
# Button_01   | Filter Pump  | Filter Pump  | Filter Pump  | Filter Pump  | Filter Pump  | Filter Pump  |
# Button_02   | Spa          | Aux_1        | Spa          | Spa          | Spa          | Spa          |
# Button_03   | Aux 1        | Aux 2        | Aux 1        | Aux 1        | Aux 1        | Aux 1        |
# Button_04   | Aux 2        | Aux 3        | Aux 2        | Aux 2        | Aux 2        | Aux 2        |
# Button_05   | Aux 3        | Aux 4        | Aux 3        | Aux 3        | Aux 3        | Aux 3        |
# Button_06   | Aux 4        | Aux 5        | Aux 4        | Aux 4        | Aux 4        | Aux 4        |
# Button_07   | Aux 5        | Temp 1       | Aux 5        | Aux 5        | Aux 5        | Aux 5        |
# Button_08   | Pool Heater  | Temp 2       | Aux 6        | Aux 6        | Aux 6        | Aux 6        |
# Button_09   | Spa Heater   | Solar Heater | Aux 7        | Pool Heater  | Aux B1       | Aux 7        |
# Button_10   | Solar Heater |              | Pool Heater  | Spa Heater   | Aux B2       | Aux B1       |
# Button_11   |              |              | Spa Heater   | Solar Heater | Aux B3       | Aux B2       |
# Button_12   |              |              | Solar Heater |              | Aux B4       | Aux B3       |
# Button_13   |              |              |              |              | Pool Heater  | Aux B4       |
# Button_14   |              |              |              |              | Spa Heater   | Aux B5       |
# Button_15   |              |              |              |              | Solar Heater | Aux B6       |
# Button_16   |              |              |              |              |              | Aux B7       |
# Button_17   |              |              |              |              |              | Aux B8       |
# Button_18   |              |              |              |              |              | Pool Heater  |
# Button_19   |              |              |              |              |              | Spa Heater   |
# Button_20   |              |              |              |              |              | Solar Heater |

#
# Optional, ( button_01_pumpID & button_01_pumpIndex )
# If you have a Variable Speed Pump, then assign the RS485 ID to the button below so RPM/GPH/WATTS are displayed
# Format is button_01_pumpID=0x60.   Leave blank if you don't have a VSP.
#  Pentair pump ID's
#  0x60 to 0x6F (0x60, 0x61 0x62, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F)
#  Jandy pump ID's
#  0x78, 0x79, 0x7A, 0x7B
#
# button_01_pumpIndex=1
# If you have assigned this pump an index number in your Aqualink control panel, (Between 1 & 4), put it here for VSP, RPM, Primp i>
#
# button_xx_lightMode = (0=Aqualink program, 1=Jandy, 2=Jandy LED, 3=SAm/SAL, 4=Color Logic, 5=Intellibrite, 6=Dimmer)
#
# Below are settings for standard buttons on RS-8 Combo panel used as example.
button_01_label=Filter Pump
button_01_pumpID=0x78
button_01_pumpIndex=1

#button_02_label=Spa Mode
button_02_label=NONE

#button_03_label=Cleaner
button_03_label=NONE

#button_04_label=Spa Blower
button_04_label=NONE

button_05_label=Pool / Spa Lights

#button_06_label=Aux 4
button_06_label=NONE

#button_07_label=Aux 5
button_07_label=NONE

button_08_label=NONE

button_09_label=NONE

#button_10_label=Pool Heater
button_10_label=NONE

#button_11_label=Spa Heater
button_11_label=NONE

#button_12_label=Solar Heater
button_12_label=NONE
sfeakes commented 1 week ago

Thanks for all the information as you saw/noted your configuration was incorrect extended_device_id MUST be set for VSP to work correctly, without that you are only getting 1/2 the information that’s taken from the pump directly. One thing to note for VSP Pumps is you need to take the MQTT on/off state over everything else / it’s the priority. Ie if the pump is off, ignore all RPM/GPM values. SWG is its own device and that’s why it works slightly differently. Pump RPM/GPM reporting will depend a lot on how things are configured & protocols used. But if you take the ON/OFF value and/or Pump/Status over everything else, you will be fine.

But what’s interesting (maybe a bug) is that during priming, as you noted, the control panel does not report RPM/GPM but the pump “usually” does, and since you have button_01_pumpID=0x78 in your config, AqualinkD should be reporting that RPM/GPM taken directly from the pump.