Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Testing #1

Open
Kranzy opened this issue Oct 25, 2018 · 217 comments
Open

Initial Testing #1

Kranzy opened this issue Oct 25, 2018 · 217 comments

Comments

@Kranzy
Copy link

Kranzy commented Oct 25, 2018

Hi sfeakes,

Thought I would post here to keep our discussions about AquapureD separate from AqualinkD.

My RS485 converter showed up last night.
This is the one I got: https://www.amazon.com.au/gp/product/B0721BB8PQ/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

Would you might giving a bit of direction about whats involved in introducing power on the RS485?
Will I need to supply power into the Tri Chlor or just the 2 data pins?

Im assuming just setting up rasbian on the pi?

I have a Pi model B (from memory) laying around not doing anything that I'll be using. Ill be running ethernet to the shed (backs onto house) and will be looking at integrating it with home assistant once its all up and running.

@AUPoolUser
Copy link

AUPoolUser commented Oct 25, 2018

Kranzy, can you please take a photo of the connector? My guess would be from this document below that you only need connect the A and B wires.

https://www.aquatechpoolspasolutions.com.au/image/data/manuals_guides/Zodiac/Zodiac%20Product%20Brochures/Zodiac%20Chlorinators/Tri%20XO/Tri%20XO%20Manual/Zodiac%20TRi-XO%20Manual.pdf

@Kranzy
Copy link
Author

Kranzy commented Oct 25, 2018

https://drive.google.com/file/d/11aJhwEV9gFtvIbM6sXoOA5lFJrsw94u4/view?usp=drivesdk

https://drive.google.com/file/d/1HrrM5e3YLhkO3Vik55_4ZlnMCTbozym7/view?usp=drivesdk

Looking at that link that’s my chlorinator so connecting A & B to A & B on the RS485 board?

@AUPoolUser
Copy link

That’s correct. DO NOT connect the Ground at all to anything.

@sfeakes
Copy link
Owner

sfeakes commented Oct 25, 2018

Looking at that link that’s my chlorinator so connecting A & B to A & B on the RS485 board?

Yes that's correct. Just two wires between Chlorinator and RS485 USB adapter.

Would you might giving a bit of direction about whats involved in introducing power on the RS485?

When I did this before, I piggybacked power from a control panel. So used power + and - from control panel to RS485 connection on chlorinator. Then A / B from Chlorinator to A / B on RS485USB adapter.

So, I would just use a DC power adapter and connect the + & - to the + & - of the RS485 port on the Chlorinator. As for voltage, you should look at specs, I seem to remember 12v, (I can check if you want), but don't take that for granted.

BUT first of all, you could try with no voltage, just to see.

@Kranzy
Copy link
Author

Kranzy commented Jan 7, 2019

Ok so finally got around to running some cable to the shed with the pool equipment.

Im downloading the software now to put on my raspberry pi.

Will be in touch with how it all goes.

@Kranzy
Copy link
Author

Kranzy commented Jan 7, 2019

Ok so couldn't get the software to run based on the readme file.

pi@raspberrypi:~/Documents/AquapureD-master/release $ sudo aquarited -d -c aquarited.conf sudo: aquarited: command not found

Copied the files to the documents folder and when trying to run based on the readme file i kept getting aquarited: command not found

Apologies if I have missed something simple with this.

@Kranzy
Copy link
Author

Kranzy commented Jan 9, 2019

Did a bit of research yesterday and changed the permissions of aquarited to be executable which then ran the script.

pi@raspberrypi:~/Documents/AquapureD-master $ sudo ./release/aquarited -d -c ./release/aquarited.conf Error: Open file failed '/tmp/aquarite.cache' Debug: Starting aquarited! Notice: Starting MQTT client to (null) Debug: Openeded serial port /dev/ttyUSB0 Debug: Set serial port /dev/ttyUSB0 to non blocking mode Debug: Set serial port /dev/ttyUSB0 io attributes Debug: Sent Probe | HEX: 0x00|0x10|0x02|0x50|0x00|0x62|0x00|0xc4|0x10|0x03|0x00| Debug: Send Probe Debug: Nothing read Debug: Sent Probe | HEX: 0x00|0x10|0x02|0x50|0x00|0x62|0x00|0xc4|0x10|0x03|0x00| Notice: MQTT client stopped Notice: Starting MQTT client to (null) Debug: Nothing read Debug: Sent Probe | HEX: 0x00|0x10|0x02|0x50|0x00|0x62|0x00|0xc4|0x10|0x03|0x00| Notice: MQTT client stopped

Currently I have A & B wired from the chlorinator to the RS485 board. No power currently connected to the +/- of the chlorinator comms. I'm not sure if I'm not getting a response because it needs power, or if my chlorintor controller setting is correct.

The options are:

  • Aqualink Tri (Current Selection)
  • Jandy Rev L/M
  • Jandy Rev K
  • EOS/PENTAIR

If you could confirm that is the correct controller setting and if so I guess my next option is to inject power. I did have a look around however I could not find any definitive answer for my chlorinator on what power is required.

@Kranzy
Copy link
Author

Kranzy commented Jan 9, 2019

The readme also states:

If you see an ACK after the probe, then we are in buisness. If not, and the RS485 port is setup correctly, then not much can be done.

What can i do to test the RS485 port is setup correctly?

@Kranzy
Copy link
Author

Kranzy commented Jan 9, 2019

@sfeakes

Another question for you. When this is up and running, will I still have my pump plugged into the Chlorinator or will I need to setup a relay to control the pump?

If you can let me know what voltage is required for the chlorinator that would be great. I have tried to find out online but as yet don't have a definitive answer, if you have a controller can you measure what it's putting out over the +/- pins for the RS485.

@sfeakes
Copy link
Owner

sfeakes commented Jan 10, 2019

Set the chlorintor controller to either Jandy setting. But if you didn't see any ACK from the PROBE then their might be more to it than just that setting. This software only understands the Jandy protocol, I'm not sure how different (if at all) the other ones are.
Next would be to add some power to the RS485 (but only the chlorintor side, not the RS485 USB adapter). I know mine needed power when it was configured without a control panel.

@sfeakes
Copy link
Owner

sfeakes commented Jan 10, 2019

According to the below, it's 10 Volt DC that you need to supply.
https://www.jandy.com/~/media/zodiac/global/downloads/0748-91071/6919.pdf

Since the chlorintor has it's own power, I'm sure the power over the RS485 bus is simply for some circuit detection, so no need to worry about amps, BUT I would keep it to the lowest AMP power supply you can find. So something below 1 AMP. Best bet would probably be a 9v battery to test with rather than buying a power supply if you don't have one. The 9V (6LR61) that you find in smoke detectors. And on Jandy equipment it's the two outside wires (labeled red & green).

According to the below (your equipment), the wires labeled Red and Green, but they are at one end of the 4 pin connector. Red is +, green is -
https://www.aquatechpoolspasolutions.com.au/image/data/manuals_guides/Zodiac/Zodiac%20Product%20Brochures/Zodiac%20Chlorinators/Tri%20XO/Tri%20XO%20Manual/Zodiac%20TRi-XO%20Manual.pdf

@sfeakes
Copy link
Owner

sfeakes commented Jan 10, 2019

One more edit, reading the document on your chlorintor, it looks like it will only try to connect to the RS485 for the first 20 seconds after the initial power on. So start AquapureD, then turn on the chlorintor. Might be worth trying that before you add power if that's not how you did it before.

Also in your manual, it looks like the chlorintor might have a 10v output to manage it's own equipment, so it's also worth trying to jumper the 10v out to the 10v in connections. You need a multimeter to test this theory, read the install guide and understand electronics. You should probably do it with a diode as well. You could really mess things up if you don;t know what you are doing, so be careful. That also goes for adding external power from a battery as well.

@Kranzy
Copy link
Author

Kranzy commented Jan 11, 2019

Ok so had a bit more of a play around with this.

From the photo attached you can see the cat6 cable I used to run into the study, where I can also inject power.

Looking at the photo on the far right, the red/black serves the fan ~20v DC
the next is as per the board 15v DC

I have used the A/B from the chlorinator to A/B on the RS485 board.

same result before with or without power, no response (no ACK). Tx light on RS485 board lights up but no activity on the Rx led.

Is there any chance that the A & B needs to be swapped?

I decided not to jump power from inside the unit at the moment as I wasn't confident that it wouldn't fry the board.

img_4561

@sfeakes
Copy link
Owner

sfeakes commented Jan 11, 2019

You could try swapping A and B it won’t damage anything. Did you try to connect after powering up the chlorinator? According to the manual it will only try to communicate for 20sec after a power up reset / boot. So each new thing you try you’ve got to power cycle the whole chlorinator.

@Kranzy
Copy link
Author

Kranzy commented Jan 12, 2019

Yeah I have been turning the chlorinator off then on a again after testing.

Swapped A/B around with no difference in result. No response at all.

Is there a way to test that the RS485 board is setup correctly? Any other reasons why there would be no responses?

Any suggestions on what to try next? Would the length of cable be a potential issue? Currently I have the raspberry pi in the study but once its all up and going ill be putting it in the shed and using the ethernet cable to connect to the network so it'll be a shorter serial cable.

@sfeakes
Copy link
Owner

sfeakes commented Jan 12, 2019

RS485 as a protocol is supposed to be good to something like 4000 ft, but no way you can go that far with the power. I'd say 40ft probably about the max for what you are testing with at the moment.

But the next thing would be to put them close to each other to test.

@Kranzy
Copy link
Author

Kranzy commented Jan 14, 2019

Cool, ill give that a shot.

Should this code work using Ubuntu? To make it easier to test I created a Ubuntu live USB so I could test on my laptop rather than having to setup the pi in the shed at the moment. Trying to run in either ubuntu in windows or the live usb i would get

"Syntax error: word unexpected (expecting ")")"

@sfeakes
Copy link
Owner

sfeakes commented Jan 14, 2019

You’ll have to compile it for Ubuntu as it’s comes compiled for the pi. Just run ‘make clean’ then ‘make’ from the director you downloaded AquapureD into. You’ll probably also have to install gcc on Ubuntu depending on what distro you’re using. But I don’t think the live CD/usb has gcc, and installing anything on a live CD is a pain, so you may be SOL unless you install a full blown Ubuntu, or have one to compile on.

@Kranzy
Copy link
Author

Kranzy commented Jan 22, 2019

So I was able to install gcc in ubuntu running in windows but now I'm not sure that ill be able to access the usb->serial converter.

Anyway I noticed when I did a make clean and make that it created a new aqualinkd file in the release folder. Should I be running aqualinkd or aquarited? in the commands on the wiki?

When I try and run sudo ./release/aquarited -d -c ./release/aquarited.conf after running make I get ./release/aquarited: 1: ./release/aquarited: Syntax error: word unexpected (expecting ")")

Apologies if these are basic questions.

@sfeakes
Copy link
Owner

sfeakes commented Jan 22, 2019

My mistake, it should be make aquarited, not make

@art0
Copy link

art0 commented Jun 29, 2019

@sfeakes @Kranzy Any luck connecting to the Tri-Expert? I have a Zodiac Tri-Expert and wanted to control it from Linux. Did you figure out what voltage to put in the "POS" of the PCB board?

@Kranzy
Copy link
Author

Kranzy commented Jul 3, 2019

@sfeakes @Kranzy Any luck connecting to the Tri-Expert? I have a Zodiac Tri-Expert and wanted to control it from Linux. Did you figure out what voltage to put in the "POS" of the PCB board?

I didnt get much further to be honest. I have a raspberry pi that I am going to setup to mount in the shed rather than running a long cable. I just havn't had the time to move and test it. I wasn't getting any responses prior to this. It would be great to have someone else trying to test it also. Hoping I can get this sorted.

@art0
Copy link

art0 commented Jul 3, 2019

@Kranzy, can you share an email/url so we can be in touch? Will be good to give it a try. I am not very happy with the ORP tracking of the tri-expert and I want to control it from a Linux box. Did you power the POS with 10V?

@Kranzy
Copy link
Author

Kranzy commented Jul 4, 2019

Did you power the POS with 10V?

I did my initial testing with a 9v battery. As I mentioned I'm going to move the pi to the shed with the pool equipment instead of using a long cable for testing.

If you want to get in touch, my email is kranzy85@ (gmail account). But I think its good to keep as much of the discussion here as possible.

@sbhc68
Copy link

sbhc68 commented Aug 13, 2019

Hello,

I am also interested in this project.
I have a Zodiac Tri 10 with a raspberry pi 2.

Do you have news about the first tests?

Thank you.

@tortfeaser
Copy link

tortfeaser commented Aug 31, 2019

Hi there. I'm keen for this to work.

I've tried it with an RPi3 and a generic USB-485 adaptor, with a Zodiac Tri pH. AquapureD sees the 485 adaptor. The result is below. Connections: A connected to A, B to B. I tried with and without 9v DC to the pos and - terminals on the chlorinator, no difference. I tried with 9v to the cholorinator and - (only) to both the chlorinator and the 485 adaptor, no difference. I tried with AquapureD running, then powering up the chlorinator, no difference. Tried starting AquapureD in less than 10s after powering up the chlorinator, no difference. Tried applying 9v at various times, no different result.

Chlorinator was set on the Jandy controller option (both of them tried, no result).

All the wiring tested with a multimeter, works. I see pulses on the chlorinator A and B terminals on a oscilloscope.

Any ideas on what else I can try? How can I debug this? Seems utterly daft to buy a controller just to be able to turn off and on the chlorinator and set boost/holiday modes.

pi@raspberrypi:~ $ sudo ./AquapureD/release/aquarited -d -c ./AquapureD/release/aquarited.conf
Error:  Open file failed '/tmp/aquarite.cache'
Debug:  Starting aquarited!
Notice: Starting MQTT client to (null)
Debug:  Openeded serial port /dev/ttyUSB0
Debug:  Set serial port /dev/ttyUSB0 to non blocking mode
Debug:  Set serial port /dev/ttyUSB0 io attributes
Debug:  Sent        Probe  | HEX: 0x00|0x10|0x02|0x50|0x00|0x62|0x00|0xc4|0x10|0x03|0x00|
Debug:  Send Probe
Debug:  Nothing read
Debug:  Sent        Probe  | HEX: 0x00|0x10|0x02|0x50|0x00|0x62|0x00|0xc4|0x10|0x03|0x00|
Notice: MQTT client stopped
Notice: Starting MQTT client to (null)
Debug:  Nothing read

@sfeakes
Copy link
Owner

sfeakes commented Aug 31, 2019

In the Jandy (& Pentair) protocol, the master RS485 device sends a Probe to a specific ID, and if a device at that ID is alive, with sends an ACK, after that, communication can start and things get more detailed and controlled. On Jandy the maser is fixed at device ID 0x00 and a SWG fixed at 0x50. Pentair the master ID is a bit different. So you can see that Aquapure is sending the "Probe" and not getting any reply (or anything at all on the RS485).

In HEX command above, the 4th byte 0x50 is the address the probe is sent to (ie sent to SWG).
Unless you see some other information coming back / being listed, then the SWG is not replying or doesn't understand the "probe" packet.

I'd play with the Jandy protocol settings on the SWG. Until you get some form of reply from the SWG you can't go much further.

@sfeakes
Copy link
Owner

sfeakes commented Aug 31, 2019

Few thoughts.

  1. Power could be an issue, I'm really not sure what the Trick expects, this software was what I used to control Aquarite SWG (which uses Jandy protocol). That needed Power to the RS485 connectors, then just A & B to the USB adapter.

  2. Only other thing I can think of is to switch the A and B wires. A and B means nothing, it's actually Data+ and Data-, A is Data + on the USB adapter and B is data - on the USB. That's usually A = Black and B = Yellow (but that does depend). Switching them will not hurt anything as long as you the the power and ground wires appropriately.

  3. The Jandy protocol setting should be "Jandy L/M" from the Tri manual, but either should work the only difference is the initial device signature after they start communicating, and you haven't got that far yet.

You could use some other tools that will monitor the RS485 network, (like serial_logger from aqualinkd), just to see if you notice anything from the Trip unit. But from my knowledge of Jandy SWG they are completely silent on the RS bus until they get that first Probe packet.

@Kranzy
Copy link
Author

Kranzy commented Sep 1, 2019

Hi there. I'm keen for this to work.

I tried with and without 9v DC to the pos and - terminals on the chlorinator, no difference. I tried with 9v to the cholorinator and - (only) to both the chlorinator and the 485 adaptor, no difference. I tried with AquapureD running, then powering up the chlorinator, no difference. Tried starting AquapureD in less than 10s after powering up the chlorinator, no difference. Tried applying 9v at various times, no different result.

Chlorinator was set on the Jandy controller option (both of them tried, no result).

Does your controller look the same as the image of mine posted above? With the 15v terminals next to the RS485 connections? Have you tried jumping those over to provide power to the RS485 bus? Im sceptical to try this as all the docs I can find suggest its only 10v.

I have been a bit busy so havnt had a chance in a while to try this however I'm glad your giving it a go also so hopefully together we can come up with a solution as I would love to be able to integrate it with Home Assistant.

@sfeakes I'm assuming you're all over the forum threads around this but I found this while looking https://www.troublefreepool.com/threads/control-your-jandy-equipment-from-your-pc-with-a-15-adapter.27391/page-12#post-1132598

@DutchForce75
Copy link

Maybe I was a bit too enthousiastic, will better test and write before I post :-D

What I meant was that when using ID 0xB0 in AquaLinkTri mode, the same commands seem to get the same replies as ID 0x50 in JandyRevLM mode (except for the extra status bytes for ph and orp)

I haven't actually verified that all things work exactly the same, will do so when I have found out more on if/how the setpoints can be adjusted.

@art0
Copy link

art0 commented Oct 23, 2019 via email

@DutchForce75
Copy link

Yes as a matter of fact, it takes any value after 0x11, and happens to be the same command value as the Set Percentage command in JandyRevLM mode, which also returns status bytes.

It also responds in the same manner to 0x14 0xXX messages as in JandyRevLM mode, again any value will do and will return the Id as a string just like in JandyRevLM mode. In AqualinkTri mode it returns something like "Aqualink Tri", haven't saved and eaxaclty decoded the return value, but it was something like that.

I am now polling every possible data byte (0-255) for every single command byte (0-255), and so far, up till command value 0x91, only command values 0x11 and 0x14 resulted in a response.

@sfeakes
Copy link
Owner

sfeakes commented Oct 23, 2019

It also looks like there are an extra 2 bits between the ppm and status on the Tri protocol.

Jandy
|0x10|0x02|0x00|0x16|0x28|0x00|0x00|0x00|0x50|0x10|0x03|
    start | ID |CMD |PPM |STAT|<-null-> | end

<your two returns>
|0x10|0x02|0x00|0x16|0x03|0x03|0x02|0x00|0x49|0x41|0x47|0x4a|0x4b|0x10|0x03
|0x10|0x02|0x00|0x16|0x03|0x03|0x22|0x00|0x49|0x32|0x49|0x1e|0x32|0x10|0x03
    start | ID |CMD | x1 | x2 | x3 |STAT|<---- ph/orp  ---->| end

x1 * 1000 is PPM on Jandy protocol, but that doesn;t look right
Looks like it might be X3, or a combination, something like X2 * 1000 + x3 * 100
For setting % below 10, the Jandy protocol uses 2 bits, so PPM might be similar for zri units, ie using a high and low bit

@DutchForce75
Copy link

Think I have seen code around the net that had more status bits, have you seen those too?

@sfeakes
Copy link
Owner

sfeakes commented Oct 23, 2019

On the Jandy with those 2 null bits (#7 & 8) after the status. No I have never see those defined, or even used. If you have a link, I'd love to see it. I have never seen them as anything other than null, and some SWG's don't even send them.
On the status bit itself, I have a complete list in AquapureD & AqualinkD, it's in the code and AqualinkD wiki.

(0 on, 1 no flow, 2 low salt, 4 high salt, 8 clean cell, 9 turning off, 16 high current, 32 low volts, 64 low temp, 128 check PCB, 255 service mode / local control for %)

@sfeakes
Copy link
Owner

sfeakes commented Oct 24, 2019

I've just updated AquapureD to add this new found information. Set the SWG id in the config to the respective setting on your TRI unit. use 0xB0 and it should show the info (if any) in the UI.

# 0x50 is Jandy normal SWG, 0xB0 is Zodiac Tri SWG with Chem (Ph,ORP)
#SWG_DEVICE_ID = 0x50
SWG_DEVICE_ID = 0xB0

@art0 if you want rest API, aquapured already has that, just use server:port?command=devices and you should bet something like below

{  
   "type":"devices",
   "version":"0.7",
   "name":"AquaPure Daemon",
   "fullstatus":"Generating Salt",
   "devices":[  
      {  
         "type":"setpoint_swg",
         "id":"SWG",
         "setpoint_id":"SWG/Percent",
         "name":"Salt Water Generator",
         "state":"on",
         "status":"on",
         "spvalue":"50",
         "value":"50",
         "extended_status":"0"
      },
      {  
         "type":"value",
         "id":"SWG/Percent",
         "name":"Salt Water Generator Percent",
         "state":"on",
         "value":"50"
      },
      {  
         "type":"value",
         "id":"SWG/PPM",
         "name":"Salt Level PPM",
         "state":"on",
         "value":"0"
      },
      {  
         "type":"value",
         "id":"SWG/Ph",
         "name":"Ph level",
         "state":"on",
         "value":"7"
      },
      {  
         "type":"value",
         "id":"SWG/ORP",
         "name":"ORP level",
         "state":"on",
         "value":"740"
      },
      {  
         "type":"switch",
         "id":"SWG/Boost",
         "name":"Boost pool",
         "state":"off",
         "status":"off"
      },
      {  
         "type":"switch",
         "id":"GPIO_18",
         "name":"Pump",
         "state":"off",
         "status":"off",
         "int_status":"0"
      },
      {  
         "type":"switch",
         "id":"GPIO_16",
         "name":"Pool Light",
         "state":"off",
         "status":"off",
         "int_status":"0"
      }
   ]
}


@DutchForce75
Copy link

You are right sfeakes, the salt addsalt and error bytes are totally different.

My observations right now (with the JandyRevLM names) are:

  • 'error' seems to be stationary on 0x03
  • 'salt' is either '0' or '300'
  • 'addsalt' is either:
    0x0000 (at the same moment salt is '0')
    0x0221 (pump is running, and low salt error is probably on the screen. Not sure about that since I am away from the machine again)
    0x0101 (when pump is stopped so with a no-flow error and probably the salt-error like above)

So it seems that things are indeed a bit different for this protocol.

@Kranzy
Copy link
Author

Kranzy commented Oct 28, 2019

Yup GPIO would be the way to control & read all equipment. I2c / 1wire would be used for sensors. I’ll start adding that to AquapureD.

@sfeakes is any additional hardware required for the pi to work with external sensors, such as temp sensors, pressure sensors etc? I havnt done any ADC work with a raspberry pi before.

I found this site... https://www.tindie.com/stores/cburgess129/ any that you would recommend?

@art0
Copy link

art0 commented Nov 18, 2019

Now that this issue is reaching 200 postings, will be great to edit the README and reflect the status?
@DutchForce75 @sfeakes
Let me know if we can state the following:

  • Zodiac requires to be fed with stable power and can accept 15V from the same board or external power supply. Feeding from the Raspberry might be insufficient.
  • With Jandy selection we can not obtain information about PH/ORP but it is possible with Aqualink
  • Support for Zodiac is possible now with AquapureD with Tri protocol and @DutchForce75 project.

Should we summarize with:

Zodiac support is best with Aqualink Protocol selection?
Art0

@Kranzy
Copy link
Author

Kranzy commented Nov 20, 2019

  • Zodiac requires to be fed with stable power and can accept 15V from the same board or external power supply. Feeding from the Raspberry might be insufficient.

While that worked for me, others have had success feeding 5v to the board. I think it might be worthwhile getting people to note the board number and the voltage they have used. I would hate for someone to use 15v and fry the board based on recommendations that it works for all.

Can definitely be noted that the raspberry pi is not sufficient.

I am interested to hear about if we should be using Aqualink protocol or not.

@ChutneyMary
Copy link

ChutneyMary commented Feb 3, 2020

Hi. It's been a long read but I'm grateful for all the information people have discovered.

I have a new Zodiac eXO Pro iQ Chlorinator that I wish to integrate into my home automation system. The main end-goal is to incorporate the device for energy management against solar input. The chlorinator includes a SWG and pH/ORP control. It has wifi connectivity for control and monitoring via apps for iOS and Android. The advertising blurb says -

"iAquaLink enabled - Features a built-in WiFi chip that allows you to monitor and control remotely, for complete control at your fingertips anytime, anywhere." (except if you want automatic control and monitoring from your home automation system....grrrrr).

The physical connections include two RS485 connections -

  1. Variable speed pump VSP - RS485
  2. iAL RS485

I've connected it up to my Raspberry Pi as per this thread's guidance. I'm using +5V/0V for injecting into the RS485 red (terminal 1) and green (terminal 4) connection points, DATA+/- into the black (terminal 2) and yellow (terminal 3) connection points. The Raspberry Pi uses the same power supply. Voltage measured at the chlorinator connection point is 5.02V.

I've used both @DutchForce75 and @sfeakes scripts but no response yet from the chlorinator.

I tried both SWG_DEVICE_ID of 0x50 and 0xB0. Perhaps importantly, the chlorinator menu doesn't have any options to change the protocol selection (nothing mentions Jandy or Aqualink).

My next thought is to try every variation of SWG_DEVICE_ID between 0 and 255. This is going to be really painful...

Any ideas on other options to try beforehand?

@Kranzy
Copy link
Author

Kranzy commented Feb 4, 2020

Hi @ChutneyMary hopefully we can sort it out prior to trying every variation.

For my particular case I didnt get any response from the chlorinator until I had 12v on the RS bus.

I ended up jumping power internally from the 15v available on the board to the RS485 bus and then just had the data lines running from the usb to rs485 device and the chlorinator.

Have a look through any documentation you can prior to putting higher voltages through your board. I found some for my SWG that indicated 10v was required. On the first connection I can tell you I was a bit nervous about damaging the board. I do not want you to take my advice and damage the board without having a look at what documentation might be around.

Also if you are running iAqualink then you might be able to use integrations with Home Assistant to acheive this. Although my preference is to have everything running locally.

@ChutneyMary
Copy link

ChutneyMary commented Feb 4, 2020 via email

@ChutneyMary
Copy link

I've tried +12V on the RS485 bus. I still don't see changes from the previous attempt with +5V. No response from anything.

I've now experimented with something else by a selection in the Chlorinator menu -

There are options for single speed pump or Zodiac Variable Speed Pump (ie. RS485). The previous selection was single speed pump and I've changed this to Zodiac VS.

I can now see the following on the RS485 bus -

`RS485 : <-- 1002 50 14 01 77 1003

RS485 : -->
RS485 : <-- 1002 50 00 62 1003
RS485 : -->
RS485 : <-- 1002 50 14 01 77 1003
RS485 : -->
RS485 : <-- 1002 50 00 62 1003
RS485 : -->
RS485 : <-- 1002 50 14 01 77 1003
RS485 : -->
RS485 : <-- 1002 50 00 62 1003
RS485 : -->
RS485 : <-- 1002 50 14 01 77 1003
RS485 : -->
RS485 : <-- 1002 50 00 62 1003
RS485 : --> 1002 78 00 8a 1003
RS485 : <-- 1002 50 14 01 77 1003
RS485 : --> 1002 78 00 8a 1003
RS485 : <-- 1002 50 00 62 1003
RS485 : -->
RS485 : <-- 1002 50 14 01 77 1003
RS485 : -->
RS485 : <-- 1002 50 00 62 1003
RS485 : -->
RS485 : <-- 1002 50 14 01 77 1003
RS485 : -->
RS485 : <-- 1002 50 00 62 1003
RS485 : -->
RS485 : <-- 1002 50 14 01 77 1003
RS485 : -->
RS485 : <-- 1002 50 00 62 1003
RS485 : -->
`

This message on the bus -

`RS485 : --> 1002 78 00 8a 1003'

occurs exactly every 20 seconds. I suspect this is the chlorinator pinging the (non-existent) pump to see whether it's there?

I should also note I'm testing using two scripts -

  1. AquapureD
  2. @DutchForce75 - pyZodiacTri

Only pyZodiacTri script is showing the 20 second reply message noted above. The AquapureD script shows repeating -

`Debug: SWG resend last message
Error: Too many no-reply from SWG, calling connection dead'

  1. I think I've got the system set up correctly (electrically) to read the bus (based on the 20 second recurring message).

  2. I'm not sure what I'm doing wrong that AquapureD can't see the 20 second responses.

  3. Any guidance on what I should do next?

@ChutneyMary
Copy link

Just a follow-up to previous testing -

The voltage required to get the RS485 bus to work is confirmed at 12VDC for my eXO Pro iQ chlorinator. The responses seen on the bus with the Chlorinator set for a Zodiac Variable Speed Pump disappear if 5VDC is used.

I think the lack of a setting within the chlorinator menu for an external controller means I might be out of luck for integration. It's probably been removed for the iAqualink system.

Moving on to the iAqualink / Home Assistant option...

@timelery
Copy link

timelery commented Mar 6, 2020

Just a follow-up to previous testing -

The voltage required to get the RS485 bus to work is confirmed at 12VDC for my eXO Pro iQ chlorinator. The responses seen on the bus with the Chlorinator set for a Zodiac Variable Speed Pump disappear if 5VDC is used.

I think the lack of a setting within the chlorinator menu for an external controller means I might be out of luck for integration. It's probably been removed for the iAqualink system.

Moving on to the iAqualink / Home Assistant option...

This same 12VDC voltage works on the Jandy Jxi heaters as well.

@art0
Copy link

art0 commented Apr 9, 2020

It also looks like there are an extra 2 bits between the ppm and status on the Tri protocol.

Jandy
|0x10|0x02|0x00|0x16|0x28|0x00|0x00|0x00|0x50|0x10|0x03|
    start | ID |CMD |PPM |STAT|<-null-> | end

<your two returns>
|0x10|0x02|0x00|0x16|0x03|0x03|0x02|0x00|0x49|0x41|0x47|0x4a|0x4b|0x10|0x03
|0x10|0x02|0x00|0x16|0x03|0x03|0x22|0x00|0x49|0x32|0x49|0x1e|0x32|0x10|0x03
    start | ID |CMD | x1 | x2 | x3 |STAT|<---- ph/orp  ---->| end

x1 * 1000 is PPM on Jandy protocol, but that doesn;t look right
Looks like it might be X3, or a combination, something like X2 * 1000 + x3 * 100
For setting % below 10, the Jandy protocol uses 2 bits, so PPM might be similar for zri units, ie using a high and low bit

Back to pool-ing here:

I have adapted @DutchForce75 script to send 0xB0 messages to the Zodiac, and I am able to collect PH and ORP values from the unit. When the SWG unit is OFF, the values do not seem to get updated. I can read the values by the hidden menu and they differ from the ones reported via Aqualink protocol. Will be nice to know if that is the case in other units.

** Salt **

I still have not been able to figure out if Salt information is sent by Aqualink protocol.

start | ID |CMD | x1 | x2 | x3 |STAT|<---- ph/orp ---->| end

Notice the values recorded so far:

The "1" is definitely "No Flow"

132 03030200
54383 03030201
4412 03032200
11 03033200

03 03 02
03 03 22
03 03 32

Seems X3 is increasing.

@sbhc68
Copy link

sbhc68 commented Apr 14, 2020

Hi art0,

Good news.

If you want I can test on my Zodiac Tri (Just tell me where the modifications are and the protocol to use).

@art0
Copy link

art0 commented Apr 21, 2020

Here it is an interesting graph. I have setup the SWG with ACL=2 that is 550mV ORP.
I am polling the values using Aqualink protocol and i turn on the water flow from 12 - 14 PM.
You can see several interesting things:
a) When there is "No flow", the ORP reported is the "one you set" not the one that is read.
b) Once the flow starts, you can see that the ORP goes "down", against the logic that adding more chlore brings the ORP up! After a few hours, it seems the chlor made the job and ORP is a bit higher.

An image for the SWG-geeks attached.

image

@DutchForce75
Copy link

That's actually different from what I've been seeing, Are you sure this pattern continues?

IMG_0302

@DutchForce75
Copy link

O wait, that's only with the 0xB0 ID instead of the 0x50?

@art0
Copy link

art0 commented Apr 22, 2020

Yes, i am using 0XB0 (Aqualink) as I want to get the ORP/PH. With 0x50 Jandy this was not possible right?

@hollapm
Copy link

hollapm commented Apr 23, 2020

Can you run AqualinkD and AquapureD at the same time (connected thru the same system?). It doesn't appear Aqualink has all the functionality (PH, ORB) that aquapure does.

@hollapm
Copy link

hollapm commented Apr 24, 2020

I tried running it with AuqalinkD and am getting this error:
sudo ~/software/AquapureD/release/aquapured -d -c ~/software/AquapureD/release/aquapured.conf
AquaPure Daemon 0.7
Error: Open file failed '/tmp/aquapure.cache'
Notice: Starting WEB Server on port 80
Error: Failed to create listener
Error: Can not start mqtt on port

I then turned off aqualinkd and started mosquitto and received the below.

AquaPure Daemon 0.7
Error: Open file failed '/tmp/aquapure.cache'
Notice: Starting WEB Server on port 80
Notice: Starting MQTT client to localhost:1883
Warning:BAD PACKET Jandy Received Unknown '0xe1'| HEX: 0x10|0x02|0x00|0xe1|0xdf|0xfb|0xfd|0xfb|0x7e|0xcd|0x30|0x75|0x10|0x03|
Warning:Serial read bad Jandy checksum, ignoring
Error: Too many no-reply from SWG, calling connection dead
Error: Too many no-reply from SWG, calling connection dead
Error: Too many no-reply from SWG, calling connection dead
Error: Too many no-reply from SWG, calling connection dead
Warning:BAD PACKET Jandy Received Unknown '0x72'| HEX: 0x10|0x02|0x33|0x72|0x08|0x01|0x02|0x03|0x04|0x05|0x06|0x07|0x20|0x00|0x01|0x00|0x00|0x07|0x43|0x6c|0x65|0x61|0x6e|0x65|0x72|0x00|0x01|0x00|0x00|0x09|0x57|0x61|0x74|0x65|0x72|0x66|0x61|0x6c|0x6c|0x00|0x01|0x00|0x00|0x09|0x53|0x70|0x69|0x6c|0x6c|0x6f|0x76|0x65|0x72|0x00|0x07|0x02|0x05|0x0a|0x50|0x6f|0x6f|0x6c|0x20|0x4c|
Warning:Serial packet too large

so questions, is it possible to run both?
or ultimately can I add orp and ph to aqualinkd??

and with the above comment, is it possible to pull this from the jandy (aquapure) or do you have to run the Zodiac Tri?

@brentk7
Copy link

brentk7 commented Aug 22, 2021

I'm trying to get this working with a Zodiac Tri with pH in order to be able to read the pH. If I set the Controller to "JANDY REV L/M" and set SWG_DEVICE_ID = 0x50 in aquapured.conf, theneverything works as expected (log). When I set the Controller to "AQUALINK Tri" and SWG_DEVICE_ID = 0xB0 - I get this in the logs and the web server shows disconnected. Should this functionality work as I 'm assuming? I see there has been almost no discussion regarding this since @sfeakes posted that he had added the functionality to set the SWG id in the config.

@jorythompson
Copy link

jorythompson commented Jan 24, 2022

This is a great thread find! I am trying to control my chlorinator with a Raspberry Pi as well.
I am using serial.Serial. Do you know what the following settings might be (I have indicated what my current settings are next to each one and Default where I have left it alone):

port – "COM3" (Device name or None.)
baudrate – 9600  (Baud rate such as 9600 or 115200 etc.)
bytesize – Default (Number of data bits. Possible values: FIVEBITS, SIXBITS, SEVENBITS, EIGHTBITS)
parity – Default (Enable parity checking. Possible values: PARITY_NONE, PARITY_EVEN, PARITY_ODD PARITY_MARK, PARITY_SPACE)
stopbits –  Default (Number of stop bits. Possible values: STOPBITS_ONE, STOPBITS_ONE_POINT_FIVE, STOPBITS_TWO)
timeout – 0.25 (Set a read timeout value in seconds.)
xonxoff –  Default (Enable software flow control.
rtscts – Default (Enable hardware (RTS/CTS) flow control.)
dsrdtr –  Default (Enable hardware (DSR/DTR) flow control.)
write_timeout –  Default (Set a write timeout value in seconds.)
inter_byte_timeout  –  Default (Inter-character timeout, None to disable (default).)

I have not connected power to the two pins next to the RS485 connector on the chlorinator yet. When I send the Request Status packet, I don't receive anything back. I have tried swapping the A and B connectors and it makes no difference. I am now going to try to connect a wall-wart 12v power supply to the two pins and see if I make any headway.

Update: I added 12v power but am still not getting any response from my status request:
Sending packet 0x10(16) 0x02(02) 0x00(00) 0x00(00) 0x00(00) 0x12(18) 0x10(16) 0x03(03)

I have tried with a destination address of 80 (that I found here) but it is still not responding
Sending packet 0x10(16) 0x02(02) 0x50(80) 0x00(00) 0x00(00) 0x62(98) 0x10(16) 0x03(03)

FWIW, I do see the data go out with my oscilloscope.

@wayner9
Copy link

wayner9 commented Oct 11, 2023

Can anyone provide a link to how you get started connecting to the RS-485 port of a Aqualink? I am interested in connecting to the board to read the temperature, salinity level and flow status. I would then use this information to control my heater from other code, flipping relays on devices like Sonoff switches, etc.

I have a serial to USB TTL adapter. Is this what is needed to make that interface? What is the pinout connection diagram?

I could do this with a Raspberry Pi or a PC running Linux, likely Ubuntu running under windows WSL, assuming that this would work ok with the serial port.

@habbich
Copy link

habbich commented Mar 25, 2024

Any updates? Got a Zodiac eXo Pro IQ with PH/redox module, Zodiac VS Flo pro pump that can be controled by the solinator (via RS485). I don't want to do cloud polling in my HomeAssistant. Would like to control it all locally.
The solinator has a temp sensor with which I would control the Aquark Mr. Silence heat pump also connected via RS485.

@andreondra
Copy link

Hi guys,

at first, thank you very much for your amazing work and research! It really helped me to modernize my Zodiac and connect it to the rest of my IoT system :).

First some bad news, during my research, I found out that setting pH and ACL/ORP may not be possible at all. If you search for the Zodiac AquaLink unit, which (I suppose) is the original unit to be used with the more advanced "Aqualink Tri" protocol, you find in the propagation materials, datasheets etc. that this unit supports only monitoring of these values. Nowhere in the manuals and photos of the device's menus is a mention of setting these values. I also tried probing various other addresses with no avail.

And for good news, I created a MQTT-based Home Assistant integration. It is in the testing state right now, but pH/ACL reading and output setting works. If anybody is interested, you can find the project here: https://github.com/andreondra/homeassistant-zodiac-tri-expert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests