Jandy Pool/Spa Plugin - Help Page

Pool / Spa Integration - Ain't life, and Indigo, GREAT when you can turn on the spa from the restaurant, and it's ready when you get home!
yergeyj
Posts: 260
Joined: Wed Dec 29, 2004 7:30 am

Jandy Pool/Spa Plugin - Help Page

Post by yergeyj »

Jandy Aqualink Plugin

1.2.3 - Sep-2012 (posted Feb 2013) - Changes from version 1.2.0:
- Fixed a few bugs with RS-2/6 Pool & Spa Separate Equipment systems
- Fixed bugs with Salt Concentration state

1.2.0 - 14-Jul-2012 - Changes from version 1.1.0:
- Added support (and device state) for reading salt concentration with AquaPure Electronic Salt Water Chlorinator
- Added Menu Items with debugging toggle / device information / RS serial testing commands
- Improved action menus to more accurately reflect which actions are available on given system
- Improved messaging when inappropriate (unusable on installed system) actions are selected
- Further cleaned up unused device states
- Fixed bug with heater state introduced in version 1.1.0
- Improved logging and debug logging for LED command

1.1.0 - 5-Jul-2012 - Changes from version 1.0.0:
- Added proper support for Pool Only and Spa Only systems
- Fixed bug with "extra" state cleanup when device is created/reloaded - eliminates states not available on a given system.
- Added decoding and logging of additional Jandy status queries (#MODEL?, #OPMODE?, #OPTIONS?, #VBAT?, #VERS? and #S1?)
- Added new state, and included update at device creation/reload, to capture Jandy Model number.


1.0.0 - 18-Jun-2012 - Thanks to all the beta testers who helped get to this point, especially kpfriedberg and pgershon who did a lot of testing!


This plugin supports the following configurations of the Jandy Aqualink RS

RS-4 Pool & Spa Combo
RS-6 Pool & Spa Combo
RS-8 Pool & Spa Combo
RS-2/6 Pool & Spa Separate Equipment
RS-4 Pool or Spa Only
RS-6 Pool or Spa Only
RS-8 Pool or Spa Only


Notes:
• Assumes a Jandy Aqualink-RS Serial Adaptor is connected to the Indigo server, typically using a USB-serial adaptor such as the Keyspan USA-19HS USB Serial Adapter
• This plugin establishes a single "device" representing the Aqualink-RS Serial Adaptor, with each of the elements to which the Aqualink communicates represented as device states.
• If AppleScripts to control a Jandy system are currently installed and running on your Indigo system, they must be disabled before installing the Jandy Aqualink plugin
• Control for second pool heater (POOLHT2) is not currently implemented - please let me know if anyone needs, and is able to test, this functionality

Some portions of the plugin are implemented but have not been tested, as the author and beta testers do not have the equipment on their respective pools. Please post in the forum any commentary regarding the following:
1) Dual-speed pump connected to AUX2 and controlled by PUMPLO commands.
2) Waterfall installed on AUX3 and controlled by WFALL commands. Note that a waterfall controlled on other AUX has been tested successfully.
3) Dimmable AUX

Solar heater - attached to AUXX and controlled by SOLHEAT commands; confirmed operational.



Configuration:

Create a New Device (example illustrated for RS-4 Pool/Spa Combo)

Type: Plugin
Plugin: Jandy Aqualink
Model: Select according to your equipment
01 - Create-Edit Jandy Device.png
01 - Create-Edit Jandy Device.png (54.77 KiB) Viewed 8393 times
Edit Device Settings (example illustrated for RS-4 with two AUX labelled)

Serial Port: Select your serial port connected to the Jandy Aqualink-RS Serial Adaptor (e.g. USA19H47P1.1)

Logging for Jandy state changes: Select what level of logging you desire (see notes below)

AUX1 - AUXX: Select auxiliaries that are installed on your system. If a Pool Cleaner, Low Speed Pump, Waterfall or Solar Heater are installed on AUX1, AUX2, AUX3 or AUXX, respectively, select the corresponding checkbox. Add a label to be used in Triggers and Control Page pop-ups if desired. [Note that device states and actions will still refer to AUX by number.]

Aquapure Salt Water Chlorinator: Select if a salt water chlorinator is installed, to capture salt concentrations
02 - Configure Jandy Pool-Spa v1.2.png
02 - Configure Jandy Pool-Spa v1.2.png (73.79 KiB) Viewed 8393 times

Devices States:

The following device states are created, and kept up-to-date with ongoing communication.

pumpState - Pump On / Off / WaitingforDelay - Specific to Pool & Spa COMBO and Pool or Spa ONLY systems (RS-4, RS-6 or RS-8)
valveState - Pool or Spa - Specific to Pool & Spa COMBO systems (RS-4, RS-6 or RS-8)
poolPumpState - Pool Pump On / Off - Specific to Pool & Spa SEPARATE systems (RS-2/6)
spaPumpState - Spa Pump On / Off - Specific to Pool & Spa SEPARATE systems (RS-2/6)

poolHeat - Pool Heater On / Off / Enabled - Enabled if valves set to Spa, or already at temperature
spaHeat - Spa Heater On / Off / Enabled - Enabled if valves set to Pool, or already at temperature)
solHeat - Solar Heat On / Off / Enabled

tempUnits - °F or °C
poolTemp - Pool temperature
poolSetpoint - Pool setpoint temperature
spaTemp - Spa temperature
spaSetpoint - Spa setpoint temperature
solTemp - Solar temperature
airtemp - Air temperature

State options are the same for all of the following auxiliaries: Off / On if not dimmable or Off / 25% / 50% / 75% / 100% if dimmable

aux1 through aux3 (RS-4), aux6 (RS-6 and RS 2/6), or aux7 (RS-8) plus auxX (all systems)
cleanr - Pool Cleaner on AUX1
pumpLo - Low Speed Pump on AUX2
wfall - Waterfall on AUX3
solHeat - Solar Heater on AUXX

saltConc - Salt concentration in ppm (if an AquaPure Electronic Salt Water Chlorinator is installed)
commActive - true/false (used to provide an indication of active communication with Jandy system)
loggingChoice - logOff / logAllButTemp / logAll - Log state changes; note that Jandy updates temperatures quite frequently, hence the choice to turn off their logging.

Notes:
1) All of the above states are available in Triggers and Control Pages. Example of creating a new Trigger Action shown below.
2) The Jandy COSMSGS command is issued at startup to enable the Jandy system to update the device states in an ongoing manner. [For those who have used the Jandy Aqualink AppleScripts, note that this method of direct communication used by the plugin allows your Pool/Spa device to maintain up-to-date temperatures as well as valve, heater, etc. states without ongoing polling by the plugin.]
3) All temperatures are stored (as integers) in °F or °C, per units selected at the Jandy system

Example of creating a New Trigger Action:
03 - Create-Edit Trigger Action.png
03 - Create-Edit Trigger Action.png (116.93 KiB) Viewed 8393 times
Example of a Control Page:
Notes:
1) All of the elements use the same "Display: Device Status For: Yergey Pool/Spa" and just select the appropriate state from the list.
2) For those that are linked to an action, the "Server action: Plugin" is used, and an action is created, as exemplified and highlighted for toggling the spa heater.
3) Red, yellow and green versions of a Button+.png file are used to differentiate various states (e.g. Button+off.png = red, Button+enabled.png = yellow and Button+on.png = green are used for the pool or spa heater states off, enabled and on, respectively). Button examples included with installation zip file.
4) The temperatures are presented as integers, and the units device state are aligned next to the temps.
5) Because COSMSGS is set on for communication, temperatures are updated in real-time, unlike with the older AppleScript implementation.
04 - Control Page Example.png
04 - Control Page Example.png (305.74 KiB) Viewed 8393 times
Actions:

The following default actions are defined and available:

Send direct command to Jandy - useful if variations on default commands are needed and for debugging. Note that there is minimal syntax checking, other than transforming all commands to upper case and removing embedded spaces. This is done to check for disallowed commands; ECHO, RSPFMT, CMDCHR, NRMCHR, and ERRCHR are not allowed as they would "break" decoding of responses by the plugin.

Set Jandy logging - Used to select the level of Indigo logging for device state updates from Jandy system; Use Edit Action Settings to make selection
Toggle Jandy logging - Used to select the level of Indigo logging for device state updates from Jandy system

Switch valves to Pool or Spa (Pool and Spa COMBO systems) - Switches valves to pool or spa, as selected in Edit Actions Settings
Toggle pump on/off (Pool and Spa COMBO and Pool or Spa ONLY systems) - Toggle pool pump on/off
Toggle pool pump on/off (Pool and Spa SEPARATE equipment systems) - Toggle pool pump on/off
Toggle spa pump on/off (Pool and Spa SEPARATE equipment systems) - Toggle spa pump on/off
Toggle CLEANR on/off - Toggle cleaner on/off - if cleaner is installed on AUX1
Toggle WFALL on/off - Toggle waterfall on/off - if waterfall is installed on AUX3

Turn on/enable Pool, Spa or Solar heat - Turn on or enable the heater selected in Edit Action Settings
Turn off Pool, Spa or Solar heat - Turn off the selected heater
Toggle Pool, Spa or Solar heat - Toggle the selected heater
New Pool or Spa Setpoint - Change heater setpoint; use Edit Action Settings to make selection and set temperature
Increment Pool or Spa Setpoint - Same as above, but set +/- change

Note: The plugin will only allow temperatures input as integers, without degree symbols or units, and the plugin will only allow setpoints in the range 60-104°F or 15-40°C

Turn on AUX - Turn on the selected AUX (in the range of 1-8, or X) - AUX selected in Edit Action Settings
Turn off AUX - Turn off the selected AUX
Toggle AUX - Toggle the selected AUX
Dim AUX (if available) - Dim the selected AUX by one step
Brighten AUX (if available) - Brighten the selected AUX by one step

Example of creating a New Action Group:
05 - Create-Edit Send Direct Command to Jandy.png
05 - Create-Edit Send Direct Command to Jandy.png (68.39 KiB) Viewed 8393 times
Example for "Send direct command to Jandy" Action, sending the "#LED?" command:
06 - Configure Send direct command to Jandy.png
06 - Configure Send direct command to Jandy.png (22.72 KiB) Viewed 8393 times
Menu Items: - effective version 1.2.0
Toggle Plugin Debugging - Toggles extensive plugin debug logging, useful if plugin is having any issues.
Log Device Information, States and Properties - For a selected pool/spa system, logs information about plugin, devices states and properties
Run Aqualink-RS Checks - Runs several commands to Jandy system to ensure set-up is correct and RS-Serial is operating correctly.


Scripting Support:

Plugin ID: org.yergeyjDoesntHaveaURL.jandyaqualink


Send Direct Command to Jandy Aqualink
Action ID: directJandy
Properties for scripting: newCommand (Text with command content; <CR> added by plugin)

Set Jandy Logging
Action ID: setLoggingChoice
Properties for scripting: loggingChoice (Value must be "logOff", "logAllButTemp" or "logAll" )

Toggle Jandy Logging
Action ID: toggleLoggingChoice
Properties for scripting: none

Switch Valves to Pool or Spa - Specific to Combo systems (RS-4, RS-6 or RS-8)
Action ID: switchValves
Properties for scripting: valvePopUp (Value must be "pool" or "spa" )

Toggle Pump - Specific to Combo systems (RS-4, RS-6 or RS-8)
Action ID: togglePump

Toggle Pool Pump - Specific to Separate systems (RS-2/6)
Action ID: togglePoolPump

Toggle Spa Pump - Specific to Separate systems (RS-2/6
Action ID: toggleSpaPump

Toggle Cleaner
Action ID: toggleCleanr

Toggle Waterfall
Action ID: toggleWfall

Turn On/Enable, Turn Off or Toggle Pool, Spa or Solar Heater
Action ID: turnOnHeat or turnOffHeat or toggleHeat
Properties for scripting: heatOnPopUp or heatOffPopUp or heatTogglePopUp, respectively (Value must be "pool," "spa" or "solar" )

Change Temperature Setpoint for Pool or Spa
Action ID: newSetpoint
Properties for scripting: newSetpointPopUp (Value must be "pool" or "spa" ) and newSetpoint (Value must be integer)

Increment/Decrement Temperature Setpoint for Pool or Spa
Action ID: incrementSetpoint
Properties for scripting: incrementSetpointPopUp (Value must be "pool" or "spa" ) and incrementSetpoint (Value must be + or - with integer)

Turn On, Turn Off or Toggle Auxilliary
Action ID: turnOnAux, turnOffAux or toggleAux
Properties for scripting: auxChoice (Value must be text in the range "1" to "7" or "X")

Dim or Brighten Auxilliary
Action ID: dimAux or brightenAux
Properties for scripting: auxChoice (Value must be text in the range "1" to "7" or "X")

Examples:

Code: Select all

## Send direct command to Jandy Aqualink
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("directJandy", deviceId=1215166506, props={"newCommand":"#PUMP?"})

## Set Jandy Logging (logging all changes exemplified)
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("setLoggingChoice", deviceId=1215166506, props={"loggingChoice":"logAll"}) 

## Toggle Jandy Logging
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("toggleLoggingChoice", deviceId=1215166506)

## Switch Valves to Pool or Spa  on COMBO System (switch to pool exemplified) 
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("switchValves", deviceId=1215166506, props={"valvePopUp":"pool"})

## Toggle Pump on COMBO System
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("togglePump", deviceId=1215166506)

## Toggle Pool Pump on Separate Pump System
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("togglePoolPump", deviceId=1215166506)

## Toggle Spa Pump on Separate Pump System
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("toggleSpaPump", deviceId=1215166506)

## Toggle Cleaner
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("toggleCleanr", deviceId=1215166506)

## Toggle Waterfall
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("toggleWfall", deviceId=1215166506)

## Turn On/Enable, Turn Off or Toggle Pool, Spa or Solar Heat (Turn on/enable spa heat exemplified)
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("turnOnHeat", deviceId=1215166506, props={"heatOnPopUp":"spa"})

## Change Temperature Setpoint for Pool or Spa (Set pool to 90°F exemplified)
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("newSetpoint", deviceId=1215166506, props={"newSetpointPopUp":"pool", "newSetpoint":"90"})

## Increment/Decrement Temperature Setpoint for Pool or Spa (Decrement Pool by 5° exemplified)
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("incrementSetpoint", deviceId=1215166506, props={"incrementSetpointPopUp":"pool", "incrementSetpoint":"-5"})

## Turn On, Turn Off or Toggle Auxilliary (Toggle AUX1 exemplified)
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("toggleAux", deviceId=1215166506, props={"auxChoice":"1"})

## Dim or Brighten Auxilliary (Toggle AUX4 brighten exemplified)
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
	jandyAqualinkId.executeAction("brightenAux", deviceId=1215166506, props={"auxChoice":"4"})


kpfriedberg

Re: Jandy Pool/Spa Plugin - Help Page

Post by kpfriedberg »

I can confirm the awesomeness of this plugin! Terrific work yergeyj!
Locked

Return to “Yergey's Forum”