Aqualink PDA automation using RS485

jobybett

Gold Supporter
Silver Supporter
Mar 15, 2017
98
Mission Viejo, CA
That sounds amazing Mutley, Python does support threads, but yes, c is much better at it, how complex do you need to get? Are you willing to share what you have done? Sounds like the community would greatly benefit from it.
 

Mutley

Member
Jun 6, 2016
22
Houston tx
Python does support threads, but not an a manor where I *think* you'll be able to time everything appropriately. You need to get into mutex / locking & kicking one thread from another. If I could have found a way round that nightmare, I would have. I really can't believe anyone would have designed this interface over RS485 so badly, I always tell myself I must have missed something in the protocol, but then again looking at pool equipment companies and their current "inteligent" controllers it doesn't surprise me..:)

I just went back to the code, it's right around 250,000 lines. I never really decided what I was going to do with it. At one point I was thinking of selling some devices, but I just couldn't based on PI hardware knowing that it wasn't/isn't as stable as it should be for this kind-a device. And I never did get round to porting it to a device that's better suited to embedded systems. I really need to clean up some of the hard coding and find a better way to map the LED configuration status messages so they are not hard coded to my equipment. When you start reading the LED binary "blob" data you'll soon realize to decode it neatly and efficiently is a bit of a pain if you want it to be generic for all the RS models. At the moment, my stuff will work with RS 6 & 8, but all the labels & buttons will be incorrect on the RS10 and above.

Give me some time to think about how best to approach this / read some of the licenses I may be encroaching by publishing. I know for one, I'll have to strip out the native HomeKit support. But you can install HomeBridge on the pi (or any other computer on your network), and still get the same functionality by linking HomeBridge to the HTTP API's in my software.
 

ab.origine

Active member
May 10, 2017
28
Paradiso
@efp3 - Earle, my web-server does not seem to be responding to buttons any more, it does respond one step at a time whenever I reboot PI or roughly once every half an hour. The screen updates right away if anything changes on the controller though. I have not mane any changes either to the Raspberry or the script. Any ideas?
Thanks!
 

lmichale

New member
Jan 5, 2018
1
Allen/Texas
I just wanted to say Thank you! My PDA has been damaged for years. On Friday it died for good. I don't have the money to replace or buy iAqualink at this time. My kids were bummed that they couldn't use the hot tub. I Saturday I spent to $43.00 on a Raspberry Pi Zero W and a USB to RS485 dongle. After hours reading this thread and and the other thread, I wired it up, stuffed it into the original AquaLink outdoor "box" and simply ran aquawebpda-v2.py. It worked...perfectly. I have years of experience writing software, IOT, Android, iPhone, etc. What I don't have is time. Someday I hope to return the favor by helping out here.. Until then all I can offer is my sincerest thanks!

Larry M.

IMG_20180108_185053.jpg
 

jrodp

Member
Jun 15, 2017
7
Mansfield, TX
I started my pool automation with a Pi last summer and got phase 1 complete. Phase 2 was going to involve reading the data to/from my JEP-R controller that controls my variable speed pump, which is how I found this thread.

A quick overview of my setup...right now I have my Pi3 along with an 8 channel relay module and a 24 volt transformer (to power my Intermatic valve actuator) in a plastic Orbit sprinkler control box. The JEP-R has 4 remote control inputs to remotely control the first 4 programmed speeds/buttons in the controller. I have each one connected to a relay so I can turn each of programmed speeds on or off and controller responds with "Remote Control Active" on screen. I have two more of the relays connected to the valve actuator to control the two different directions. I am running WebIOPI with a custom built mobile web page that I built to turn each relay on and off. All is working great so far.

So for phase 2, I would like to be able do the same thing the controller does but with the Pi. Basically, this includes setting the RPM and reading what data is sent back from the pump. There is a RS485 connection from the controller to the pump, which is a Jandy FloPro variable speed pump. On the pump is a dip switch that is set to tell the pump whether the AquaLink controller is used or the JEP-R. I assume that I would connect a USB to RS485 adapter between the controller and the pump to read what is being sent? Would the aquadisplay.py script work, would it read the data from this controller? I would guess that there are some differences in the way the AquaLink vs the JEP-R communicate with the pump since you have to change the dip switch based on what you have. Any help or instructions to get me going would be greatly appreciated.
 

danielhdz

New member
Feb 19, 2018
1
PEMBROKE PNES, FL
Hi, I am new to forum ... so Hi! ... this is going to be a lengthy post but bear with me please!

After reading this thread and a longer one (previous/older) about automation, I would like to ask if someone have tried something I believe a bit different (simpler at least in my mind because of my limited experience and mainly because of my current setup).

Before asking about my approach (and for my benefit as I write my current understanding) I would like to summarize what I believe you have done with all your hard work (thanks by the way)

1) Changed the RS485 data connection from aqualink power center from either wired terminal, Radio Frequency transceiver to the PDA or Wifi "iaqualink" (not sure about this one) to a RS485 - USB adapter to communicate serial to a RPi.

2) Read the serial communication aqualink protocol (looks a bit similar to Modbus, at least to my limited understanding: ID - Command - Data) and translate either with python or C and make it available to a web page, API and MQTT I believe. All of this processed on the RPi

3) Send commands to aqualink "brains" in the power center "emulating" the different screens and button pressed.

I know it does a lot more and correct me if I am wrong but to me it looks very similar (with a lot of caveats) to dumb terminals communicating to a server in a similar fashion as an older webpage browser and web server used to work.

1) Client (Dumb terminal) request info (by answering to its ID to the constant server poling)
2) Server sends a page (Screen data/layout)
3) Client in the specified time (very tricky) acknowledges and sends a command (limited to the available buttons)
4) Server do the requested action if any and "serves" the corresponding page (Screen data/layout)
5) Repeats 3 and 4 until client timeouts.

Assuming this is relatively right, this is my setup:

1) I have the aqualink RF PDA working just fine
2) I have some home automation using the following:
a) RPi 3 running Openhab 2.0 (open source home automation software)
b) A few Phillips hue lights controlled using Openhab binding (driver)
c) A Logitech harmony hub also controlled by Openhab for my media (Music, TV, etc.)
d) A few DYI smart switches and lights (and other stuff: alarm clock, temperature/Humidity, etc.) made with ESP8266 and communicating to Opoenhab via MQTT also running on the RPi.
e) I use a Node red dashboard also on the RPi for GUI to control/manage my home automation.

3) I would like to integrate my pool management/information as much as possible with the rest of my home automation.


For my setup adding another RPi is a bit overkill for a few reasons: RPi maintenance (configuration, upgrades/updates), Physical environment, SD card overtime corruption, etc ... but mainly the fact that it mostly be used as a "glorified" wireless serial connection to my other RPi doing all the heavy lifting.

This is what I have in mind:

1) Use a cheap MAX485 Module (RS-485 to TTL for less than a $1.00 USD) to connect to a ESP8266 (also very cheap ) via RX/TX pins to create my wireless serial connection. I believe I will need some logic level converter (also cheap) for the 3.3V to 5V. logic.

2) For the aqualink "Translation":Use all my home automation setup as is (via MQTT) and have the ESP8266 do all the aqualink screen/buttons translation and timing back and forth. (other option would be to use it just as a serial bridge and do all the processing on the RPi, using code already written)

I do all my ESP8266 firmware as an Arduino and already have a standard for it to communicate via MQTT, do Over the Air (OTA) updates and communicate to my Openhab home automation server.


So after the long post here are my questions:


1) Does it sounds reasonable to make a "serial wireless bridge"?

2) Has anyone tried this? (Couldn't find anything in the forum or "googling")

3) Would somebody else benefit if I give it a try? (and may be help me a bit if possible)

Most of the programming logic thankfully is already done. It would be a matter of porting it to Arduino or reusing exiting code.

Thanks.
 

ajohnson30

Member
Jun 21, 2017
5
Riverside, CA
1) Does it sounds reasonable to make a "serial wireless bridge"?

I actually tried something like this using a USR-WIFI232-604 module on the RS-485 side ($30ish on ebay), and then modified the RPi code to communicate with it via TELNET instead of the serial/TTYUSBx. I eventually gave up on this approach, deciding that the telnet libraries were less robust than the serial libraries. Specifically, they didn't block/buffer/interrupt the data flow properly and stuff simply just got lost.

It may be this was the fault of the hardware module, or I should've gone with a different approach with the data stream, but that was my experience.

I'm back to straight hardwiring, but have little time to tinker these days. Every time I pick the project back up, one of you folks has jumped 10 steps ahead of me :)
 

pizero

New member
Feb 1, 2018
2
Melbourne
Hi ab.origine
just wondering if you worked out issue with aquaweb, I also got the old square hard wired remote control, but still I can't make it work, any feedback would be highly appreciated

Thanks

- - - Updated - - -

@efp3 - Earle, my web-server does not seem to be responding to buttons any more, it does respond one step at a time whenever I reboot PI or roughly once every half an hour. The screen updates right away if anything changes on the controller though. I have not mane any changes either to the Raspberry or the script. Any ideas?
Thanks!

Hi ab.origine
Just wondering if you got any luck troubleshooting your aquaweb, I also got an old square hard wired remote control and ca't it make to work
 

Enjoying this content?

Support TFP with a donation.

Give Support

ajohnson30

Member
Jun 21, 2017
5
Riverside, CA

I have working code now with Mutley's web/MQTT project and my existing alexa skill. Unfortunately neither one is generic, but I might be able to give someone else pointers. I have a seperate server in my "DMZ" so to speak, that runs a MQTT server. Mutley's program sends everything to topics on there. I have a custom web page on the server that I can make special http calls to so I can to turn pool lights on/off, and plan to allow the spa to turn on etc. This happens just by calling code to post into the appropiate MQTT topic.

On the Alexa side, I added code to allow posts to the appropiate MQTT topic also. This wasn't difficult, since I was already using a "thing" shadow for some house temperatures and a weather station, which could be accessed via MQTT. I just added more entries for pool temp, air temp, and a few device statuses and put the code on the same raspberry pi that is running everything else.

So far the only thing I feel I'm missing is my Pool Pump RPM. Since Mutleys code is an RS8 (sorry Mutley) but I'm used to a "One Touch" with a huge LCD display. I'm missing some info
 

ab.origine

Active member
May 10, 2017
28
Paradiso
Hi ab.origine
just wondering if you worked out issue with aquaweb, I also got the old square hard wired remote control, but still I can't make it work, any feedback would be highly appreciated

Thanks

- - - Updated - - -



Hi ab.origine
Just wondering if you got any luck troubleshooting your aquaweb, I also got an old square hard wired remote control and ca't it make to work

Hi Pzero,

Just saw the post. Nothing yet on my side. Were you able to figure out anything?
Thanks
 

smird

New member
Nov 8, 2012
4
So I decided to try this out. I just bought a house with a pool and it's got the aqualinkRS with an older pda remote. having a little problem, hope someone can help me with.

loading the aquawebpda-v2.py I get:

Creating screen emulator
creating rs485 port
creating web server
IN cmd=03 args=4669726d776172652056657273696f6e *** bad checksum ***

Was looking at the Autelis but he doesn't respond to any emails and hasn't even approved my forum membership.

Would really appreciate any help at this point I don't even know my pools scheduled run times.
 

smird

New member
Nov 8, 2012
4
Tried different cables for the serial connection, tried differnt power supplies. Not sure what to do.

Sat Jun 16 15:18:35 2018: Creating screen emulator
Sat Jun 16 15:18:35 2018: Creating RS485 port
Sat Jun 16 15:18:35 2018: Creating web server
Sat Jun 16 15:18:36 2018: IN cmd=04 args=01205044412d505334f0fbffd9dff988e01002600401205044412d50533420436f6d626f2020 msg=' PDA-PS4` PDA-PS4 Combo ' *** bad checksum ***
Sat Jun 16 15:18:37 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:18:37 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:18:37 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:18:37 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:18:39 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:18:39 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:18:40 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:18:40 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:18:41 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:18:41 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:18:41 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:18:41 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:18:42 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:18:42 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:18:47 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:18:47 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:18:48 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:18:48 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:18:49 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:18:49 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:18:50 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:18:50 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:18:51 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:18:51 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:19:00 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:19:00 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:19:00 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:19:00 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:19:10 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:19:10 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:19:17 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:19:17 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:19:17 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:19:17 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:19:25 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:19:25 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:19:27 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:19:27 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:19:34 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:19:34 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:19:43 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:19:43 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:19:45 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:19:45 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:19:53 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:19:53 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:19:53 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:19:53 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:20:00 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:20:00 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:20:01 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:20:01 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:20:02 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:20:02 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:20:27 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:20:27 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:20:29 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:20:29 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:20:29 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:20:29 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:20:30 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:20:30 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:20:37 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:20:37 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:20:46 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:20:46 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:20:48 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:20:48 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:20:55 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:20:55 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:20:56 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:20:56 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:05 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:05 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:12 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:12 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:13 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:13 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:14 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:14 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:22 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:22 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:30 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:30 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:38 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:38 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:39 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:39 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:41 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:41 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:48 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:48 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:49 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:49 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:50 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:50 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:56 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:56 2018: IN cmd=03 args= *** bad checksum ***
Sat Jun 16 15:21:58 2018: IN cmd=02 args=02 *** bad checksum ***
Sat Jun 16 15:21:58 2018: IN cmd=03 args= *** bad checksum ***
 

bsheedy

New member
Jun 27, 2017
4
Kingwood, TX
I have tried many Aqualink RS integration projects mentioned in this forum, and nothing even comes close to this one: GitHub - sfeakes/AqualinkD: Daemon to control Jandy Aqua Link RS pool equipment from any home automation hub (Alexa, Homekit, Home Assistant, smartthings, domoticz etc) or web browser.

I have to say, I have completely integrated my AqualinkRS6 with the API's and use every function within Home Assistant (HASS.IO) home automation software.

Check it out - very little configuration, runs on a Raspberry Pi Zero with a RS-485 to USB adapter.

Thanks.
 
Thread Status
Hello , There was no answer in this thread for more than 60 days.
It can take a long time to get an up-to-date response or contact with relevant users.