Control your Jandy equipment from your PC with a $15 adapter

Status
Not open for further replies.
Re: Control your Jandy equipment from your PC with a $15 ada

agent-P said:
My code, even the version I uploaded, doesn't require a web server. That is built into the daemon using the websockets library. I have apache (httpd) disabled on the server, and my daemon uses port 80, just so I don't have to specify a port in the URL to access it. I also keep the client code in /var/www/html for convenience. If apache was serving it, it wouldn't work. :) Simply a convenience. My clients do use a web browser, since I wrote them in javascript. I didn't want to write an app for every device. Though, I have been toying with writing an app that wraps a web view. I have one working in android, but didn't bother with iOS since Apple requires the $90 / year developer subscription to deploy to an actual device, even your own for testing.
Ah! Now I understand. I was serving controller.html from Apache when I was trying your code earlier. I went back and moved all the web files to the directory where the aqualinkd executable is and stopped httpd. It's not working any better, however. I put the url http://localhost:6500/controller.html in my browser (firefox) and it paints the picture of the controller with all zero values. I don't see any errors in the log fie. It's not an issue with message formats to the Aqualink controller, however, because I can see that it is successfully talking to my controller and getting all the values when it starts up.

I haven't sprung for the iOS license either. I sort of got put off by needing to use objective C, so I'm just using the web browser from my iPhone for now.
 
Re: Control your Jandy equipment from your PC with a $15 ada

The client files have to be in a hierarchy in the "running_directory" defined in the .conf file. if not present the default running directory is /tmp. I guess you could define it as the daemon's directory, but I tend not to. I define it as /var/www/html/Aqualink_RS8 because it is a web app, and it is easy to find. Check to make sure you are using the correct port. The daemon doesn't log an error on port issues in syslog since I put in the websocket code. I need to look into that. Set the log level to DEBUG in /etc/aqualinkd.conf and your logs will show up in <running_directory>/log. It will give pretty verbose messages as to why it is not communicating with the client. All zeros means you aren't connected to the server. Opening controller.html from the file system will get you the same result. That is how I test layout when I am modifying the CSS file.

From your description it sounds like your port spec is okay, and it sounds like the daemon is serving the HTML files. It might be a permission thing. I have to run the daemon as root when I invoke from the command line.

If you post the log file, I can give you a better idea of what is going on.

agent-P
 
Re: Control your Jandy equipment from your PC with a $15 ada

agent-P said:
The client files have to be in a hierarchy in the "running_directory" defined in the .conf file. if not present the default running directory is /tmp. I guess you could define it as the daemon's directory, but I tend not to. I define it as /var/www/html/Aqualink_RS8 because it is a web app, and it is easy to find. Check to make sure you are using the correct port. The daemon doesn't log an error on port issues in syslog since I put in the websocket code. I need to look into that. Set the log level to DEBUG in /etc/aqualinkd.conf and your logs will show up in <running_directory>/log. It will give pretty verbose messages as to why it is not communicating with the client. All zeros means you aren't connected to the server. Opening controller.html from the file system will get you the same result. That is how I test layout when I am modifying the CSS file.

From your description it sounds like your port spec is okay, and it sounds like the daemon is serving the HTML files. It might be a permission thing. I have to run the daemon as root when I invoke from the command line.

If you post the log file, I can give you a better idea of what is going on.
Here's the config file
Code:
# aqualinkd.conf
#
#  Created on: Aug 17, 2012
#

# The directory where the lock and log files are stored
running_directory=/home/joe/AqualinkRS8/aqualinkd

# The log level. [DEBUG, INFO, WARNING, ERROR]
log_level=DEBUG

# The socket port that the daemon listens to
socket_port=6500

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

# The id of the Aqualink terminal device. Devices probed by RS8 master are:
# 08-0b, 10-13, 18-1b, 20-23,
device_id=0a

# The labels for the AUX functions 1 - 7
# They can be any string with a limit of 31 readable characters
aux1_label=Water Fall
aux2_label=Spa Jets
aux3_label=Spa Blower
aux4_label=Pool/Spa Lights
aux5_label=Lights Color Wheel
aux6_label=Unassigned
aux7_label=Unassigned

And here's the log file running as root
Code:
Jan-23-13 17:40:15 PM - INFO: Synch'ing with Aqualink master device...
Jan-23-13 17:40:15 PM - DEBUG:   8156 REV JJ   
Jan-23-13 17:40:15 PM - INFO: Retrieving pool and spa heater set points...
Jan-23-13 17:40:15 PM - DEBUG: Get Freeze Protect Set Point waiting to execute...
Jan-23-13 17:40:15 PM - DEBUG: KEY_MENU command sent
Jan-23-13 17:40:15 PM - DEBUG: 00 10 02 00 01 00 09 1c 10 03 00 
Jan-23-13 17:40:16 PM - DEBUG: KEY_RIGHT command sent
Jan-23-13 17:40:16 PM - DEBUG: 00 10 02 00 01 00 18 2b 10 03 00 
Jan-23-13 17:40:16 PM - DEBUG: Processing long message: PRESS ~ FOR MORE OPTIONS... PRESS ENTER* TO SELECT             
Jan-23-13 17:40:16 PM - DEBUG: PRESS ~ FOR MORE OPTIONS... PRESS ENTER* TO SELECT
Jan-23-13 17:40:16 PM - DEBUG: PROGRAM      ~*
Jan-23-13 17:40:17 PM - DEBUG: KEY_RIGHT command sent
Jan-23-13 17:40:17 PM - DEBUG: 00 10 02 00 01 00 18 2b 10 03 00 
Jan-23-13 17:40:17 PM - DEBUG: REVIEW       ~*
Jan-23-13 17:40:18 PM - DEBUG: KEY_ENTER command sent
Jan-23-13 17:40:18 PM - DEBUG: 00 10 02 00 01 00 1d 30 10 03 00 
Jan-23-13 17:40:18 PM - DEBUG: PROGRAMS     ~*
Jan-23-13 17:40:19 PM - DEBUG: KEY_RIGHT command sent
Jan-23-13 17:40:19 PM - DEBUG: 00 10 02 00 01 00 18 2b 10 03 00 
Jan-23-13 17:40:19 PM - DEBUG: TEMP SET     ~*
Jan-23-13 17:40:20 PM - DEBUG: Get Freeze Protect Set Point waiting to execute...
Jan-23-13 17:40:20 PM - DEBUG: KEY_ENTER command sent
Jan-23-13 17:40:20 PM - DEBUG: 00 10 02 00 01 00 1d 30 10 03 00 
Jan-23-13 17:40:21 PM - DEBUG: Processing long message: POOL TEMP IS SET TO 80ßF                
Jan-23-13 17:40:21 PM - DEBUG: POOL TEMP IS SET TO 80ßF
Jan-23-13 17:40:22 PM - DEBUG: Processing long message: SPA TEMP IS SET TO 90ßF                
Jan-23-13 17:40:22 PM - DEBUG: SPA TEMP IS SET TO 90ßF
Jan-23-13 17:40:22 PM - DEBUG:     5:39 PM     
Jan-23-13 17:40:23 PM - DEBUG:  AIR TEMP 66ßF  
Jan-23-13 17:40:25 PM - DEBUG:     PUMP OFF    
Jan-23-13 17:40:25 PM - DEBUG: Get Freeze Protect Set Point waiting to execute...
Jan-23-13 17:40:27 PM - DEBUG:   01/23/13 WED  
Jan-23-13 17:40:29 PM - DEBUG:     5:39 PM     
Jan-23-13 17:40:30 PM - INFO: Retrieving freeze protection set point...
Jan-23-13 17:40:30 PM - DEBUG: KEY_MENU command sent
Jan-23-13 17:40:30 PM - DEBUG: 00 10 02 00 01 00 09 1c 10 03 00 
Jan-23-13 17:40:31 PM - DEBUG: KEY_RIGHT command sent
Jan-23-13 17:40:31 PM - DEBUG: 00 10 02 00 01 00 18 2b 10 03 00 
Jan-23-13 17:40:31 PM - DEBUG: Processing long message: PRESS ~ FOR MORE OPTIONS... PRESS ENTER* TO SELECT             
Jan-23-13 17:40:31 PM - DEBUG: PRESS ~ FOR MORE OPTIONS... PRESS ENTER* TO SELECT
Jan-23-13 17:40:31 PM - DEBUG: PROGRAM      ~*
Jan-23-13 17:40:32 PM - DEBUG: KEY_RIGHT command sent
Jan-23-13 17:40:32 PM - DEBUG: 00 10 02 00 01 00 18 2b 10 03 00 
Jan-23-13 17:40:33 PM - DEBUG: KEY_RIGHT command sent
Jan-23-13 17:40:33 PM - DEBUG: 00 10 02 00 01 00 18 2b 10 03 00 
Jan-23-13 17:40:33 PM - DEBUG: REVIEW       ~*
Jan-23-13 17:40:34 PM - DEBUG: KEY_ENTER command sent
Jan-23-13 17:40:34 PM - DEBUG: 00 10 02 00 01 00 1d 30 10 03 00 
Jan-23-13 17:40:34 PM - DEBUG: PROGRAMS     ~*
Jan-23-13 17:40:35 PM - DEBUG: KEY_RIGHT command sent
Jan-23-13 17:40:35 PM - DEBUG: 00 10 02 00 01 00 18 2b 10 03 00 
Jan-23-13 17:40:35 PM - DEBUG: TEMP SET     ~*
Jan-23-13 17:40:36 PM - DEBUG: KEY_RIGHT command sent
Jan-23-13 17:40:36 PM - DEBUG: 00 10 02 00 01 00 18 2b 10 03 00 
Jan-23-13 17:40:36 PM - DEBUG: SPA SWITCH   ~*
Jan-23-13 17:40:37 PM - DEBUG: KEY_RIGHT command sent
Jan-23-13 17:40:37 PM - DEBUG: 00 10 02 00 01 00 18 2b 10 03 00 
Jan-23-13 17:40:37 PM - DEBUG: SPA LINK     ~*
Jan-23-13 17:40:38 PM - DEBUG: KEY_RIGHT command sent
Jan-23-13 17:40:38 PM - DEBUG: 00 10 02 00 01 00 18 2b 10 03 00 
Jan-23-13 17:40:38 PM - DEBUG: FRZ PROTECT  ~*
Jan-23-13 17:40:39 PM - DEBUG: KEY_ENTER command sent
Jan-23-13 17:40:39 PM - DEBUG: 00 10 02 00 01 00 1d 30 10 03 00 
Jan-23-13 17:40:40 PM - DEBUG: Processing long message: ITEMS ASSIGNED TO FREEZE PROTECTION ARE:                
Jan-23-13 17:40:40 PM - DEBUG: ITEMS ASSIGNED TO FREEZE PROTECTION ARE:
Jan-23-13 17:40:40 PM - DEBUG:   FILTER PUMP   
Jan-23-13 17:40:43 PM - DEBUG: Processing long message: FREEZE PROTECTION IS SET TO 34ßF                
Jan-23-13 17:40:43 PM - DEBUG: FREEZE PROTECTION IS SET TO 34ßF
Jan-23-13 17:40:43 PM - DEBUG:     5:39 PM     
Jan-23-13 17:40:45 PM - DEBUG:  AIR TEMP 65ßF  
Jan-23-13 17:40:47 PM - DEBUG:     PUMP OFF    
Jan-23-13 17:40:49 PM - DEBUG:   01/23/13 WED  
Jan-23-13 17:40:49 PM - INFO: serving HTTP URI: /controller.html
Jan-23-13 17:40:50 PM - INFO: serving HTTP URI: /css/small_ff.css
Jan-23-13 17:40:50 PM - INFO: serving HTTP URI: /js/aqualink.js
Jan-23-13 17:40:51 PM - INFO: serving HTTP URI: /images/battery_ok.png
Jan-23-13 17:40:51 PM - DEBUG:     5:40 PM     
Jan-23-13 17:40:51 PM - INFO: serving HTTP URI: /images/battery_low.png
Jan-23-13 17:40:51 PM - INFO: serving HTTP URI: /images/battery_blank.png
Jan-23-13 17:40:51 PM - INFO: serving HTTP URI: /images/led_on.png
Jan-23-13 17:40:52 PM - INFO: serving HTTP URI: /images/led_off.png
Jan-23-13 17:40:52 PM - INFO: serving HTTP URI: /images/led_enabled.png
Jan-23-13 17:40:52 PM - INFO: serving HTTP URI: /images/net_off.png
Jan-23-13 17:40:52 PM - INFO: serving HTTP URI: /images/net_yellow.png
Jan-23-13 17:40:53 PM - INFO: serving HTTP URI: /images/net_green.png
Jan-23-13 17:40:53 PM - DEBUG:  AIR TEMP 65ßF  
Jan-23-13 17:40:53 PM - INFO: serving HTTP URI: /images/net_red.png
Jan-23-13 17:40:55 PM - DEBUG:     PUMP OFF    
Jan-23-13 17:40:57 PM - DEBUG:   01/23/13 WED  
Jan-23-13 17:40:59 PM - DEBUG:     5:40 PM     
Jan-23-13 17:41:01 PM - DEBUG:  The Buehl Pool 
Jan-23-13 17:41:03 PM - DEBUG:  AIR TEMP 65ßF  
Jan-23-13 17:41:05 PM - DEBUG:     PUMP OFF    
Jan-23-13 17:41:07 PM - DEBUG:   01/23/13 WED  
Jan-23-13 17:41:09 PM - DEBUG:     5:40 PM
 
Re: Control your Jandy equipment from your PC with a $15 ada

jbuehl,

WOW. More working than I thought. I am not seeing any errors or warnings. Server looks like it is working just fine. I will look at the javascript client code, and send you a debug version. Though, you can check your browser console to see if there are any errors. Some versions of the browsers don't support websockets. The latest versions of Safari, Google, and Firefox do support it. The built-in android browser doesn't, by the way. When I tried it, I got all zeros like you describe.

agent-P
 
Re: Control your Jandy equipment from your PC with a $15 ada

That's probably it. I was using Firefox 3 and it looks like they didn't add websocket support until later. I'll try it with a different browser later today.

Edit:

Yep that was it. I got data when I used Chrome. Not all the right data, but something. The time, freeze protection, pool set, and spa set values are correct. Air temp and battery level are wrong even though I can see in the log that it is getting the correct air temp from the controller. The pump isn't running so current pool or spa temp isn't available. The log didn't show any errors.

I'm going to start implementing the All Button commands in my program. I'll find out if there are any differences in message formats between your controller and mine.

[attachment=0:1kavt21x]Screen Shot 2013-01-24 at 8.01.08 AM.png[/attachment:1kavt21x]
 

Attachments

  • Screen Shot 2013-01-24 at 8.01.08 AM.png
    Screen Shot 2013-01-24 at 8.01.08 AM.png
    86.5 KB · Views: 285
Re: Control your Jandy equipment from your PC with a $15 ada

Sorry, the rest of the data issues are my fault. I brute force parse some of the messages, AIR TEMP being one of them, because I was lazy. That is why the air temp and the temp units are missing. They are both parsed out of the air temp string simply by position in the string. Based on the display, it looks like the date isn't getting parsed properly either. The version I am working on now improves on that significantly, but didn't touch air temp or date. I will work on a fix for that this weekend.
 
Re: Control your Jandy equipment from your PC with a $15 ada

agent-P said:
Sorry, the rest of the data issues are my fault. I brute force parse some of the messages, AIR TEMP being one of them, because I was lazy. That is why the air temp and the temp units are missing. They are both parsed out of the air temp string simply by position in the string. Based on the display, it looks like the date isn't getting parsed properly either. The version I am working on now improves on that significantly, but didn't touch air temp or date. I will work on a fix for that this weekend.
I was also able to turn the filter pump and cleaner (aux1) on and off using your interface, so those functions are working.

I have implemented a good chunk of the All Button panel functionality. Here is a part of my log that shows the time and air temp messages. I hope it helps.
Code:
2013-01-24 20:13:09 - RS485:    opening serial port /dev/ttyUSB0
2013-01-24 20:13:09 - Display:  starting display thread
2013-01-24 20:13:09 - Display:  waiting for display update to start
2013-01-24 20:13:09 - RS485:    synchronized
2013-01-24 20:13:09 - Read:     starting read thread
2013-01-24 20:13:09 - RS485:    --> 1002 00 01 8b00 9e 1003
2013-01-24 20:13:09 - SerialUI: opening serial port /dev/ttyUSB1
2013-01-24 20:13:09 - SerialUI: unable to open serial port
2013-01-24 20:13:09 - Web:      starting web thread
2013-01-24 20:13:09 - Web:      opening port 80
2013-01-24 20:13:09 - Web:      waiting for connections
2013-01-24 20:13:15 - RS485:    --> 1002 09 00  1b 1003
2013-01-24 20:13:15 - RS485:    <-- 1002 00 01 0000 13 1003
2013-01-24 20:13:15 - AllButt:  probe
2013-01-24 20:13:15 - RS485:    --> 1002 09 02 0000000000 1d 1003
2013-01-24 20:13:15 - RS485:    <-- 1002 00 01 0000 13 1003
2013-01-24 20:13:15 - AllButt:  status  0000000000
2013-01-24 20:13:15 - RS485:    --> 1002 09 03 0020203831353620524556204a4a202020 53 1003
2013-01-24 20:13:15 - RS485:    <-- 1002 00 01 0000 13 1003
2013-01-24 20:13:15 - AllButt:  msg     00   8156 REV JJ
2013-01-24 20:13:19 - RS485:    --> 1002 09 03 0020202020393a333220504d2020202020 d3 1003
2013-01-24 20:13:19 - RS485:    <-- 1002 00 01 0000 13 1003
2013-01-24 20:13:19 - AllButt:  msg     00     9:32 PM
2013-01-24 20:13:21 - RS485:    --> 1002 09 03 00204149522054454d50203632df462020 5d 1003
2013-01-24 20:13:21 - RS485:    <-- 1002 00 01 0000 13 1003
2013-01-24 20:13:21 - AllButt:  msg     00  AIR TEMP 62ßF
2013-01-24 20:13:23 - RS485:    --> 1002 09 03 002020202050554d50204f464620202020 5b 1003
2013-01-24 20:13:23 - RS485:    <-- 1002 00 01 0000 13 1003
2013-01-24 20:13:23 - AllButt:  msg     00     PUMP OFF
2013-01-24 20:13:25 - RS485:    --> 1002 09 03 00202030312f33312f3031205745442020 22 1003
2013-01-24 20:13:25 - RS485:    <-- 1002 00 01 0000 13 1003
2013-01-24 20:13:25 - AllButt:  msg     00   01/31/01 WED
2013-01-24 20:13:27 - RS485:    --> 1002 09 03 0020202020393a333320504d2020202020 d4 1003
2013-01-24 20:13:27 - RS485:    <-- 1002 00 01 0000 13 1003
2013-01-24 20:13:27 - AllButt:  msg     00     9:33 PM
2013-01-24 20:13:29 - RS485:    --> 1002 09 03 00204149522054454d50203632df462020 5d 1003
2013-01-24 20:13:29 - RS485:    <-- 1002 00 01 0000 13 1003
2013-01-24 20:13:29 - AllButt:  msg     00  AIR TEMP 62ßF
2013-01-24 20:13:31 - RS485:    --> 1002 09 03 002020202050554d50204f464620202020 5b 1003
2013-01-24 20:13:31 - RS485:    <-- 1002 00 01 0000 13 1003
2013-01-24 20:13:31 - AllButt:  msg     00     PUMP OFF
2013-01-24 20:13:37 - RS485:    --> 1002 09 03 002054686520427565686c20506f6f6c20 49 1003
2013-01-24 20:13:37 - RS485:    <-- 1002 00 01 0000 13 1003
2013-01-24 20:13:37 - AllButt:  msg     00  The Buehl Pool
 
Re: Control your Jandy equipment from your PC with a $15 ada

That is a sweet looking interface you all have. I kind of wished I would have stayed w/ the RPi setup but I had my wife and mother in law to consider.

Sent from my HTC One X using Tapatalk 2
 
Re: Control your Jandy equipment from your PC with a $15 ada

jkurl said:
That is a sweet looking interface you all have. I kind of wished I would have stayed w/ the RPi setup but I had my wife and mother in law to consider.
You obviously have your priorities in the right order :-D
 
Re: Control your Jandy equipment from your PC with a $15 ada

jbuehl said:
jkurl said:
That is a sweet looking interface you all have. I kind of wished I would have stayed w/ the RPi setup but I had my wife and mother in law to consider.
You obviously have your priorities in the right order :-D

What I can do is hook up the RPi and then leave them a note saying hey if it doesn't work read this thread on trouble free pools. :lol:

Sent from my HTC One X using Tapatalk 2
 

Enjoying this content?

Support TFP with a donation.

Give Support
Re: Control your Jandy equipment from your PC with a $15 ada

I'm in the planning stages for a new pool, and it will have a Jandy RS-PS4 controller board. I'm not even bothering with purchasing a human-oriented panel. Going to start right away with a web interface. My house will have a number of RS485 components (16F688 microcontrollers, an Arduino, a couple RPi, and the master linux server). Somewhere in there, I'll tie something to the pool controller.

I've subscribed to ericbuehl/pyaqualink on github, and will start working from that, as Python is my preferred language.

It's going to be about six months, but I'll publish all my code as I'm working on it (at code.google.com/p/gstein/).
 
Re: Control your Jandy equipment from your PC with a $15 ada

gstein said:
I'm in the planning stages for a new pool, and it will have a Jandy RS-PS4 controller board. I'm not even bothering with purchasing a human-oriented panel. Going to start right away with a web interface. My house will have a number of RS485 components (16F688 microcontrollers, an Arduino, a couple RPi, and the master linux server). Somewhere in there, I'll tie something to the pool controller.

I've subscribed to ericbuehl/pyaqualink on github, and will start working from that, as Python is my preferred language.

It's going to be about six months, but I'll publish all my code as I'm working on it (at code.google.com/p/gstein/).
Since I last updated ericbuehl/pyaqualink two months ago I have been working on a more far-reaching home automation project based on the RPi involving lights, sprinklers, HVAC, etc. in addition to the pool. I used pyaqualink as the basis for the pool interface, but there are some differences.

The low level Interface class in that project has been rock solid, as has the RPi and cheapo RS485 adapter. Changes were made to the higher level classes. Emulating the AllButton panel is the way to go. The other Aqualink panels were interesting to figure out, but they don't seem to add any additional capabilities, so I have abandoned that code.

I plan to create another git repository in the near future for this project and I'll post it here as soon as I do.
 
Re: Control your Jandy equipment from your PC with a $15 ada

Hi,

Hi have an RS8 PDA system and attempted to hook up the emulators. I wired to an open connector on the multiplexer board. When I launch an emulator, the port is found but I get a "waiting" message from all the emulators. I suspected it is because of an "address" conflict so I used the one touch version that defaults the address to 4.

No joy, should I disconnect my PDA transceiver and try again? Any other ideas?

Also in regard to the homegrown linux based automation here, has there been any thought to steering that effort towards one of the open source home automation projects like Open Remote or some other? I have developed homegrown stuff for the Rainforest Automation Smart Meter (for the electric power meter outside of my house) and was going to look into the Enphase Inverter API (for my Photovoltaic system). I was going to look to steering those efforts to contribute open source home automation project but haven't picked one. If this Jandy stuff was available on any open source project, that would surely effect my decision :)

Thanks in advance

Dave
 
Re: Control your Jandy equipment from your PC with a $15 ada

jbuehl said:
OK, I now have the RPi in the closet where my network equipment is. I used an abandoned piece of CAT5 that runs under the house from there to near the Aqualink control panel. It seems to matter which conductors in the CAT5 you use. That cable is about 40' long and the data was garbled until I used a twisted pair for the data +/- (black/yellow). Any other wire can be used for ground (green), and the power (red) doesn't have to be connected.

Jandy - CAT5
black - blue
yellow - blue/white
green - green
red - nc


Hopefully you are still around. Are you saying you used a Cat5 cable to talk to our jandy equipment? I am following along the thread and so far I have 2 roadblocks:

1.) What connector to buy, and how to connect it to the Jandy equipment.
2.) Getting the AqualinkRS8 src to compile. There are no makefiles and I am somewhat new to c

Hopefully you see this and can respond. Thanks.
 
Re: Control your Jandy equipment from your PC with a $15 ada

I use CAT5 as well. Though, the RS485 bus the Jandy equipment uses can probably use CAT3. You need to get an RS485 to serial converter. Lots of people use the RS485 to USB converters. It depends on what you want to connect to. On the RPi it is probably USB. I use one with the FTDI chip set. It was the only one I could get to work reliably. You can find them on Monprice.com or simply Google it. There are plenty of variations.

For your second question, which set of C code are you trying to compile? A couple of different sets were posted. Mine was a C daemon with an integrated mini web server and a javascript client. I posted an Eclipse CDT project file along with it, I thought. If you want to build mine and can't find the Eclipse CDT project file, let me know, and I will upload my latest version (lots of enhancements) to git hub and I will post a link.

Note. Mine doesn't currently run on RPi because of the web sockets library I picked. In the process of porting it. I have only built and tested it in Linux FC14.

agent-p
 
Re: Control your Jandy equipment from your PC with a $15 ada

Agent-P you have no idea how happy I am you replied. I am using the code you posted aqualinkrs8.zip

I got libwebsocket built and installed but I didn't know how to build your project.

I am using a raspberry pi as well with raspbian distro.

Once I buy the converter. Where on my outside system do I plug in the wires? I was going to drive down to frys right now to get the rs485 adapter
 
Re: Control your Jandy equipment from your PC with a $15 ada

To connect to the Aqualink controller, you can connect the wire to the screw terminal that the remote panel(s) connect to. You don't need a connector. I recently learned that you really only need 2 wires for RS-485. The red and green are used to supply power to the Aqualink panel which aren't needed if you are connecting to a PC. So any pair in the CAT5 cable should work if you connect them to the terminals that the black and yellow panel wires connect to. You could also use phone wire.

It has been a while, but I don't remember if I got the C code that agent-P wrote to work. I ended up writing my own software in Python which I have been using.
 
Re: Control your Jandy equipment from your PC with a $15 ada

Ah, now it's coming back to me... I ran into trouble getting libwebsockets to work on the RPi with arch linux so I never got agent-P's code fully working. That was almost a year ago, so maybe it's easier in Raspbian.

I am using this RS-485 adapter http://www.amazon.com/gp/product/B00241 ... UTF8&psc=1. I actually now have 2 of them - one for the Aqualink controller and one for the Pentair VS pump that I recently installed.
 
Re: Control your Jandy equipment from your PC with a $15 ada

VegasMike,

jbuehl is correct there is no connector on the Aqualink side. It is just a terminal block. Also, any pair of your CAT5 will work for the RS485 bus. Make sure you use a twisted pair, not just any two wires. The RS485 to USB converter should come with a terminal block to attach the other end of your twisted pair. Note if you reverse the signal wires the data will be unintelligible. If it is and all of your serial parameters are correct try switching the signal wires.

As far as the code goes, building it should be pretty straight forward. If you built libwebsockets, you did the hard part. A simple compile and link no special compile or link flags that I recall. I do recommend a static link to libwebsockets. I will power up my dev system and see if I can generate a make file for you if you can't get it to work. Let me know.

agent-p
 
Re: Control your Jandy equipment from your PC with a $15 ada

Well I've always been a win developer. I'm just now getting around to taking the training wheels off so I don't have much experience with gcc or linking anything. That's probably why I was having problems.
 

Enjoying this content?

Support TFP with a donation.

Give Support
Status
Not open for further replies.