Page 7 of 8

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Sun Jan 15, 2012 7:13 pm
by hamw
Looks like it works great - plugin states are accurate!

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Tue Jan 17, 2012 10:59 am
by hamw
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.

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Tue Jan 17, 2012 12:18 pm
by nlagaros
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.

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Wed Jan 18, 2012 10:12 am
by hamw
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?

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Fri Jan 20, 2012 6:28 pm
by hamw
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?

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Sat Jan 21, 2012 9:46 am
by nlagaros
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.

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Sat Jan 21, 2012 7:42 pm
by nlagaros
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.

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Sat Jan 21, 2012 8:01 pm
by nlagaros
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.

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Sat Jan 21, 2012 8:56 pm
by hamw
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.

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Wed May 02, 2012 5:50 pm
by hamw
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!!

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Wed May 02, 2012 5:51 pm
by hamw
duplicate of above post.

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Sat May 05, 2012 6:02 am
by nlagaros
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.

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Sun May 06, 2012 1:07 pm
by nlagaros
I posted an update with error handling that should prevent the crash you experienced.

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Sun May 06, 2012 1:42 pm
by hamw
Super. Installed the update just now and will let you know how it goes.

Re: Jandy Aqualink Pool / Spa Control - AppleScripts updated

PostPosted: Mon May 07, 2012 8:03 pm
by hamw
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.