Jandy Aqualink Pool / Spa Control - AppleScripts updated

Posted on
Sun Jan 15, 2012 7:13 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

Looks like it works great - plugin states are accurate!

Posted on
Tue Jan 17, 2012 10:59 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

Could you look at the Spa temp up/down commands? I have them set up just like the Pool temp commands, but they don't seem to work. I thought it might be b/c the spa is not active, but the Autelis control will increment the heater temps without the spa being enabled or on.

Posted on
Tue Jan 17, 2012 12:18 pm
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

It relies on a response from the AquaLink - this is why you do not see it updating. I'm surprised (maybe not) that the Autelis accepts the input. I suppose it thinks that it has taken over as the brain for controlling temperature. I'm open to thinking about this differently - let me know what you think.

Posted on
Wed Jan 18, 2012 10:12 am
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

I posed the question to the folks at Autelis:

The behavior of the plugin should match the behavior of the web interface.  There are some typos in the indigo plugin including the probable source of your error: outmsg = "#SPASPP".  Also the plugin should monitor the state of the TCP connection in the main loop and restart itself if needed.


What do you think?

Posted on
Fri Jan 20, 2012 6:28 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

Following their advice, I opened Autelis.py and changed line 187 from #SPASPP to #SPASP, reloaded the plugin and the spa temp controls worked.

The plugin has worked flawlessly for the last 4 days but today had a couple of hiccups. It reloaded without trouble but failed again. I'll check my connection but was wondering if there is any way to test the telnet connection and reload as necessary?

Posted on
Sat Jan 21, 2012 9:46 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

Thanks for following up on this one. I will see if I can come up with some heartbeat type mechanism that would trigger a reload of the plugin. At the very least, I can create an action for it.

Posted on
Sat Jan 21, 2012 7:42 pm
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

I updated the plugin to memorialize the Spa Setpoint typo, but more importantly implement logic to attempt to reconnect to a broken socket when an action fails. There is a new action that allows you to send any command to the Autelis/Jandy Aqualink.

What I have done is create a schedule that executions the Jandy Command action with an argument of #OPMODE? every 15 seconds. If there is a socket error, the plugin will automatically reload.

It isn't very elegant, but seemed to work. I tested by rebooting the Autelis a few times and I did observe the plugin reconnect.

Let me know if this works for you.

Posted on
Sat Jan 21, 2012 8:01 pm
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

As a follow-up, with sockets, no real way for me to know if the listener is having a problem since it is stateless and just waiting for characters to stream across. Think this is just about the best that can be done - I also am not much of a programmer, so there may be a better way that I am just not aware of.

Posted on
Sat Jan 21, 2012 8:56 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

Sounds great. It's been really stable overall, and the test/reload should make it bulletproof. Thanks for all your work on the plugin - I'm looking forward to using it more this summer.

Posted on
Wed May 02, 2012 5:50 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

Any idea as to what's going on here?
Code: Select all
2012-05-02 17:51:37   Application   Starting plugin "Autelis Jandy 1.0.2" (pid 4478)
2012-05-02 17:51:37   Application   Plugin "Autelis Jandy" connected
2012-05-02 17:51:38   Application   Plugin "Autelis Jandy 1.0.2" started
2012-05-02 17:51:38   Autelis Jandy   Saved Plugin Configuration
2012-05-02 17:51:38   Autelis Jandy   Socket: 10.0.1.40:6000 connected succesfully
2012-05-02 17:51:45   Autelis Jandy Error   Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 46, in runConcurrentThread
  File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/AutelisJandy.indigoPlugin/Contents/Server Plugin/Autelis.py", line 68, in runConcurrentThread
  File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/AutelisJandy.indigoPlugin/Contents/Server Plugin/Autelis.py", line 140, in checkForMessages
  File "/Library/Application Support/Perceptive Automation/Indigo 5/Plugins/AutelisJandy.indigoPlugin/Contents/Server Plugin/Autelis.py", line 248, in processJandy
<type 'exceptions.ValueError'>: invalid literal for int() with base 10: '0\r!00 POOLSP'

2012-05-02 17:51:45   Autelis Jandy Error   plugin runConcurrentThread function returned or failed; will attempt again in 10 seconds


Also, I looked at the Mini the other day and the process Indigo Plugin Host was pushing the CPU really hard. I stopped all the plugins and it turned out to be the Autelis plugin. Ideas?

Otherwise it's working great!!

Posted on
Wed May 02, 2012 5:51 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

duplicate of above post.
Last edited by hamw on Sun May 06, 2012 1:35 pm, edited 1 time in total.

Posted on
Sat May 05, 2012 6:02 am
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

It looks like the plugin started up in the middle of a transmission from the Autelis. I don't have any error handling in the plugin - will add some statements this weekend to handle this.

Posted on
Sun May 06, 2012 1:07 pm
nlagaros offline
Posts: 1646
Joined: Dec 20, 2010

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

I posted an update with error handling that should prevent the crash you experienced.

Posted on
Sun May 06, 2012 1:42 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

Super. Installed the update just now and will let you know how it goes.

Posted on
Mon May 07, 2012 8:03 pm
hamw offline
Posts: 1212
Joined: Mar 31, 2008

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

FYI I updated to the newest version of the Autelis firmware, 1.4.1, and could not get the plugin to connect. Downgraded to 1.3.4 and all is well again.
Last edited by hamw on Mon May 07, 2012 9:08 pm, edited 1 time in total.

Who is online

Users browsing this forum: No registered users and 7 guests