Jandy Aqualink Pool/Spa Plugin - beta testers needed!

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Tue Sep 20, 2011 8:57 pm
yergeyj offline
Posts: 260
Joined: Dec 29, 2004

Jandy Aqualink Pool/Spa Plugin - beta testers needed!

Jandy Aqualink Plugin (0.9.8 beta)

NOTE: Version 1.0.0 posted. Join us over here! - http://www.perceptiveautomation.com/userforum/viewforum.php?f=29

Beta 0.9.5 posted 25-Sep-2011
• Includes naming for AUX; used for Triggers and Control Pages
• Does not store any auxiliaries that are not "installed," i.e. when their respective checkboxes are not selected in Edit Device Settings (this operation is still "buggy" and requires accessing Edit Device Settings twice or opening a new Trigger Action or Control Page edit to remove uninstalled auxiliaries - working to rectify)
• Added support for dimmable auxiliaries (although not yet tested, as I don't have any dimmable devices)

Beta 0.9.6 available 28-Sep-2011 - Phils just finished the season with win 102 (11:41 EDT!!)
• Fixed error with decoding/parsing #PUMP and #SPA commands.
• NOTE: An analogous version for the Pentair IntelliTouch is now available for testing; turns out the same commands work on both systems; thanks to Swancoat for helping with initial debugging, as there are some EOL character differences between the systems!

Beta 0.9.7 available 23-Nov-2011
• Modified the getDeviceStatus to be compatible with GM 5.0; this also allows state variables to be updated correctly from "Edit Device Settings."
• NOTE: I am only able to test this version in a limited fashion, as my pool is now closed for the season. PLEASE POST A PM if you want the new version sent, as I assume most others pools are also be closed.

Beta 0.9.8 available 24-Mar-2012
• Modified the temperature variables to be INTEGER rather than string variables. Please note that this may require adjusting any control pages to include both the temperature and the "unit state" to provide a temperature with units.
• Added additional actions, detailed below, for toggling the pump, cleaner and waterfall (assuming the latter two are installed).

Beta 0.9.9 available 25-Mar-2012
• Minor bug fixes


(If you are interested in testing the plugin, please send me a PM with your e-mail address noted, and I will send you a copy of the plugin.))


Questions for anyone who tests this plugin (please respond on this forum)

Note: I have an RS-4 Pool/Spa Combo, and only have on/off pool and spa lights as auxiliaries. Feedback on any other options installed that operate correctly - or not - would be appreciated.
1) What values are returned for pumpState for RS-2/6, given that there are two pumps?
2) What values are returned for valveState for RS-2/6 or RS-4/6/8 Pool Only / Spa Only systems?
3) What temperature is returned for solHeat if active?
4) Are Intelliflow pumps connected to AUX2 and controlled by pumpLo commands?
5) Does anyone have a system purchased from Jandy's new owner (Zodiac), and does the plugin operate?

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

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
• RS-4/6/8 Pool Only / Spa Only systems may function with their respective "Combo" configurations, however, I am not certain how these systems are plumbed, and therefore, what Jandy Aqualink commands are valid
• 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) not currently implemented


Configuration:

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

Type: Plugin
Plugin: Jandy Aqualink
Model: Select according to your equipment

Create-Edit Jandy Device.png
Create-Edit Jandy Device.png (54.77 KiB) Viewed 7232 times


Edit Device Settings (example illustrated below for RS-4 with two auxiliaries labeled)

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.]

Configure Jandy Pool-Spa.png
Configure Jandy Pool-Spa.png (72.48 KiB) Viewed 7232 times


Devices States:

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

pumpState - Main Pump On / Off / WaitingforDelay
valveState - Pool or Spa

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 Spa, 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 aux4 (RS-4), aux6 (RS-6 and RS 2/6), or aux8 (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

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. An example of Trigger Action creation is 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 communciation 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:
Create-Edit Trigger Action.png
Create-Edit Trigger Action.png (116.93 KiB) Viewed 7232 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

Toggle Pump - Toggle pool pump on/off - does not act if pump is "waiting for delay."
Toggle Cleaner - Toggle cleaner on/off - if cleaner is attached on AUX1
Toggle Waterfall - Toggle waterfall on/off - if waterfall is attached 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 - Dim the selected AUX by one step
Brighten AUX - Brighten the selected AUX by one step

Example of creating a new Action Group:
Create-Edit Action Group.png
Create-Edit Action Group.png (90.14 KiB) Viewed 7232 times


Example for "Send direct command to Jandy" Action, sending the "#LED?" command:
Configure Send direct command to Jandy.png
Configure Send direct command to Jandy.png (22.72 KiB) Viewed 7232 times



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
Action ID: switchValves
Properties for scripting: valvePopUp (Value must be "pool" or "spa" )

Toggle Pump
Action ID: togglePump

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 (switch to pool exemplified)
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
   jandyAqualinkId.executeAction("switchValves", deviceId=1215166506, props={"valvePopUp":"pool"})

## Toggle Pump
jandyAqualinkId = indigo.server.getPlugin("org.yergeyjDoesntHaveaURL.jandyaqualink")
if jandyAqualinkId.isEnabled():
   jandyAqualinkId.executeAction("togglePump", 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"})


Last edited by yergeyj on Tue Jun 19, 2012 6:06 pm, edited 10 times in total.

Posted on
Wed Sep 21, 2011 9:22 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

Hey Jim, this sounds fantastic! Now, if I only had a Jandy Aqualink. Or a pool for that matter... ;)

I can't tell everyone how pleased we are with the number and quality of plugins we've seen contributed so far and with Indigo 5 still in beta (done soon we hope) it's even more impressive. Indigo will very quickly come to compete with the other more established "complete" solutions with this kind of support - and the only one on the Mac! Way to go and know that we really do appreciate the efforts!

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Wed Sep 21, 2011 10:13 am
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

I'm going to take a look at the Jandy serial protocol and compare it to the Pentair one I'm using. I think they're almost identical.

If that's the case, I'll give this a shot on my Pentair setup as well and see how it works.

On an aside... I was originally wanting to write one of these myself, but I intended to configure the interface at the plugin level and then set each 'circuit' (Pentair's terminology) as a device. So it would be: Load plugin and configure for serial port. Then create device (plugin:pool, Device: Aux9) which you would then call 'pool lights' or whatever.

I really desired having my pool lights, 'pool program' ,'spa program', waterfall, fire feature, etc... as as seperate devices as opposed to characteristics of one single giant complicated device (pool). I was hampered by my negative lack of skill as a programmer.

Hopefully this thing works on my Pentair!

http://nerdhome.jimdo.com

Posted on
Sun Sep 25, 2011 3:30 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

I've got the plugin from yergeyj, but can't seem to get it to load. I dropped it into the Plugins (Disabled) folder but it just won't show up in the plugins menu. Rebooted Indigo - but still nothing.

Any ideas here?

http://nerdhome.jimdo.com

Posted on
Sun Sep 25, 2011 4:03 pm
yergeyj offline
Posts: 260
Joined: Dec 29, 2004

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

I think to get a new plugin to load you have to stop and start the Indigo server after putting the plugin into your Plugin or Plugin (Disabled) folder.

I am almost certain you have to do that if you change the plugin init.plist file (i.e. the version number). Otherwise, two versions of the plugin, with the same name, show up in all of the device/trigger/action menu selections.

Jim

Posted on
Sun Sep 25, 2011 7:04 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

Ugh. I forgot you had to restart the server.

Ok, running now. It's definitely communicating with the serial port, and logging the activity while I turn things on or off. However, I although the protocols between pentair and jandy are similar, clearly it's not similar enough. I'm logging a lot of "Faulty response: blah blah"

I have my serial adapter set to 'verbose response', but I'm not sure if that's the problem here or if a very slight difference in response format is causing a parse error of some sort (weird though. The protocols are SO similar, it seems like it's obviously no coincidence. Probably sourced from the same place. I would have thought there was a decent chance they would be fully interchangeable).

Now even though it's not actually recording any states or anything for me correctly... how would I 'turn on aux 4' in Indigo if I wanted to? All I see is the box at the bottom of the main Indigo window where all of the device states would go, but no way to control them.

(This is where I got stuck writing my own protocol. I thought eventually, I would set up say, AUX4 as a Relay Device. Then it's control and response would be analagous to any other relay device.

http://nerdhome.jimdo.com

Posted on
Sun Sep 25, 2011 7:40 pm
yergeyj offline
Posts: 260
Joined: Dec 29, 2004

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

Swancoat wrote:
Ok, running now. It's definitely communicating with the serial port, and logging the activity while I turn things on or off. However, I although the protocols between pentair and jandy are similar, clearly it's not similar enough. I'm logging a lot of "Faulty response: blah blah"


The Faulty response comes if there is no line feed in the response, as the Jandy system ends every response with a <CR><LF>. Not sure what the Pentair system uses but I'll check the documentation. I have modified the plugin a bit to allow easier on/off of extensive debugging, which I will send you to help understand if this is a fundamental problem, or just something you have to set in your serial adaptor.

Now even though it's not actually recording any states or anything for me correctly... how would I 'turn on aux 4' in Indigo if I wanted to? All I see is the box at the bottom of the main Indigo window where all of the device states would go, but no way to control them.


The easiest way to turn on/off or toggle an aux is to create a new "Action Group," specifying it as a Plugin action for the Jandy. You can then select AUX commands, along with all of the other commands you'd likely want to send. That's the purpose of having specified actions in the Actions.xml file, i.e. to make them readily accessible to the user. Make sense?

Note, however, if the plugin is not setting up your states, it will likely not allow you to use the default actions for sending commands to the AUX, etc. However, there is also an action available to send a direct command to the pool system (top of the plugin action list you should see), and in that one you can specify any valid command, e.g. #AUX4=On to turn on aux 4.

Jim

Posted on
Mon Sep 26, 2011 7:15 am
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

Thanks Jim,

For Matt and Jay:
Regarding the Indigo plugin architecture, is this how all of the plugins are going to be implemented? I kind of envisioned having this thing set up where say, my "pool lights" are a 'device'. I can turn them on or off, from Indigo Touch or whatever. Basically as a peer to my Insteon devices.

http://nerdhome.jimdo.com

Posted on
Mon Sep 26, 2011 7:34 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

It will eventually (soon I hope!) be possible to create relay/dimmer type plugin devices, which will inherit the basic On/Off actions (and control UI in Indigo Touch, etc.). The plugin developer, however, will have to modify their plugin to take advantage of the new capability.

Image

Posted on
Mon Sep 26, 2011 7:51 am
yergeyj offline
Posts: 260
Joined: Dec 29, 2004

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

Swancoat wrote:
Thanks Jim,

For Matt and Jay:
Regarding the Indigo plugin architecture, is this how all of the plugins are going to be implemented? I kind of envisioned having this thing set up where say, my "pool lights" are a 'device'. I can turn them on or off, from Indigo Touch or whatever. Basically as a peer to my Insteon devices.


P.S. All this said, as Spock said at the end of the episode when he transported to an alternate universe ... "I shall consider it."

Jeremy,

I did not design the Jandy plugin to set up separate devices for each of the pool / spa elements, as there is really only a single device (the serial adaptor) that the plugin addresses, and all of the commands and responses need to go through that "device."

I would think that you would have your main interaction with the pool system through a Control Page, and on that you should be able to set up each pool element as a viewable "device."

Given that none of the pool accessories will have properties the same as an Insteon/X-10 device, I'm not sure why you'd want to set up each as a separate device. It would make communication with the "real" serial adaptor device quite complicated.

Jim

Posted on
Mon Sep 26, 2011 9:49 am
jay (support) offline
Site Admin
User avatar
Posts: 18224
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

Swancoat wrote:
Regarding the Indigo plugin architecture, is this how all of the plugins are going to be implemented? I kind of envisioned having this thing set up where say, my "pool lights" are a 'device'. I can turn them on or off, from Indigo Touch or whatever. Basically as a peer to my Insteon devices.


As Jim points out, it's really left up to the plugin developer as to how they want to implement their functionality. To control custom devices, you'll need to create separate elements on your control pages and have those elements execute the actions provided by the plugin.

So, for instance, to control iTunes, you'd need to add the various control page elements that would execute the appropriate plugin actions. You could, for instance, have an element that represented the iTunes play state, and tapping on that element would execute the playPause action, which would toggle play/pause for the selected iTunes device.

As Matt points out, our intention is to allow plugin developers to implement relay (on/off) and dimmer (on/off/dim/brighten/set brightness) device types that would inherit the popup controls and states of their INSTEON and X10 counterparts - but that may not really work for any given plugin. So, it's really up to the plugin developer to decide how best to implement the functionality they're delivering.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Sep 26, 2011 11:46 am
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

yergeyj wrote:
Swancoat wrote:
Thanks Jim,

For Matt and Jay:
Regarding the Indigo plugin architecture, is this how all of the plugins are going to be implemented? I kind of envisioned having this thing set up where say, my "pool lights" are a 'device'. I can turn them on or off, from Indigo Touch or whatever. Basically as a peer to my Insteon devices.


P.S. All this said, as Spock said at the end of the episode when he transported to an alternate universe ... "I shall consider it."

Jeremy,

I did not design the Jandy plugin to set up separate devices for each of the pool / spa elements, as there is really only a single device (the serial adaptor) that the plugin addresses, and all of the commands and responses need to go through that "device."

I would think that you would have your main interaction with the pool system through a Control Page, and on that you should be able to set up each pool element as a viewable "device."

Given that none of the pool accessories will have properties the same as an Insteon/X-10 device, I'm not sure why you'd want to set up each as a separate device. It would make communication with the "real" serial adaptor device quite complicated.

Jim


Yeah, I see what you're saying here Jim and I think you're right. The intracacies of the Pool/Spa combo with temp setpoints etc, doesn't really lend itself to a dimmer/relay-type of thing.

I think my persistance on seeing it that way is that my pool controller controls a few other things that aren't really pool-related and are well suited to a device level interface. (I have a flood light over the equipment pad, the pool light, the spa light, a gas fire pit and a gas fire feature that would totally be 'seperate devices' to me though, and not characteristics of the 'pool device'.

As to your point about how a complicated setup with the 'real adapter'... I wanted to configure the serial adapter in the plugin config box. That would open communication to the pool, and also maybe create a variable that the plugin would update the airtemp to. Then I would have two available device types: Pool/Spa and Aux (which is basically a relay). The relays get setup pretty straightforward, just mapping them to AUX4 or whatever, Pool/Spa would be a custom device type with an on/off state, a temperature, and heat setpoint. I'd set up one device each for Pool and Spa (Since switching from one to the other sends an 'off' command on the serial adapter, it would handle the switch fine).

Anyway... please don't take this as criticism or ungratefulness in any way! Just trying to explain my rantings as I train myself for the new control paradigm.

http://nerdhome.jimdo.com

Posted on
Mon Sep 26, 2011 8:02 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

Ok, I think I've found the crux of the problem:

One of the first things the plugin does on device start up is send:
Code: Select all
#CMDCHR=35

I don't know why it's being set to '35', but all it really does is set the command prefix to '3'.

I'm pretty sure that's not what's intended, because all subsequent commands are sent with a '#' prefix. That IS why it keeps kicking back INVALID COMMAND though. The '#' sign is now meaningless.

I'm glad you sent the version with the debugging code, as when I tried to interface with my adapter manually, I was also getting the INVALID COMMAND response and didn't know what was wrong.

http://nerdhome.jimdo.com

Posted on
Mon Sep 26, 2011 8:11 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

I've thought about it more.... :mrgreen:

It's probably a logical fallacy to even include a command to change the command prefix. Basically, if the command prefix needs to be set to something particular for your plugin to work, and it currently isn't, then you won't be able to change it anyway (because you have the wrong command prefix). If you DO have the current command prefix, well then - there's no reason to change.

http://nerdhome.jimdo.com

Posted on
Tue Sep 27, 2011 4:41 am
yergeyj offline
Posts: 260
Joined: Dec 29, 2004

Re: Jandy Aqualink Pool/Spa Plugin - beta testers needed!

Swancoat wrote:
I've thought about it more.... :mrgreen:

It's probably a logical fallacy to even include a command to change the command prefix. Basically, if the command prefix needs to be set to something particular for your plugin to work, and it currently isn't, then you won't be able to change it anyway (because you have the wrong command prefix). If you DO have the current command prefix, well then - there's no reason to change.


Agreed. The same is true for several of the commands sent at startup; and I note that in my comments in the plugin (which of course most people won't see if things work well). I've left those calls in there for now, in part so that everyone testing understands that the command character, response format, normal response character, and end of response all have to be set properly, or the plugin can't parse things.

The command character is the most important of course, because if that's set one can at least fix the rest.

Jim

P.S. Are you getting things to work at all yet?

Who is online

Users browsing this forum: No registered users and 3 guests