Comments (217)
Protocol Information.
Jandy and Pentair are the only protocols I've looked at and AqualinkD / Aquapure understand both, also any control panel from either manufacturer from around 2010 or newer will also understand both. (Zodiac is Jandy to the best of my knowledge)
-
The "standard" RS protocol for Control Panels & Keypads are different between Jandy & Pentair.
-
Variable Speed Pumps from any manufacturer usually follow the Pentair protocol. (except one line of Jandy pumps.)
-
SWG from all manufactures follow the Jandy Protocol. (I've never seen a SWG that uses Pentair protocol)
-
All other devices usually follow that manufacturer protocol. Heaters / Keypads / Chemical readers, etc.
Few other notes
This is why when you read over that NodeJS project that's designed for Pentair you'll see is states that SWG uses a different protocol. (It's the Jandy protocol, they just haven't figured that out yet).
Also when using that project, completely ignore the first page when it states look for **ffff 00ff a5ff**
, you will never see that since it's part of the Pentair protocol, and not part of the Jandy protocol.
Since some of you have tried both Aquapure and the NodeJS project and neither work for the TRi, I think it's now down to having to work out how the TRi detects a RS485 connection and faking that. Aquapure will fake the software part, (I assume that NodeJS project does as well) but there is obviously something else now we need to figure out.
from aquapured.
Some feedback @DutchForce75 et al
I have decided to power the POS port directly with a 5.2V power supply, the unregulated power coming from the RB was part of the problem. As soon as i got the power stable RS485 started to work.
!!! MAKE SURE YOUR POWER IS NOT 4.87 V !!!
Now some questions:
- Once we gain control of the SWG, how do i know that the commands are working?
Example follows
192.168.1.224 - - [10/Sep/2019 17:10:06] "GET /setChlorine?pct=69 HTTP/1.1" 200 -
RS485 : <-- 1002 50 00 62 1003
RS485 : --> 1002 00 01 0000 13 1003
RS485 : <-- 1002 50 11 45 b8 1003
RS485 : --> 1002 00 12 5000 74 1003
RS485 : <-- 1002 50 00 62 1003
RS485 : --> 1002 00 01 0000 13 1003
RS485 : <-- 1002 50 11 45 b8 1003
RS485 : --> 1002 00 12 5000 74 1003
RS485 : <-- 1002 50 00 62 1003
RS485 : --> 1002 00 01 0000 13 1003
from aquapured.
hi @Kranzy
Let me summarize my findings in the last weeks
- Using the RB USB unregulated power is not the best option. Ensure that you have a 5 V stable power. I found a PDU with 5.2 V and feed the board directly
- No need to GND the RS485 converter. I used the A+B in two different dongles.
- Be careful with the screws in the Zodiac. It is easy to wire the wrong places. The labeling in the board is tricky.
- Rigid cable as UTP is a good choice.
- There is no need to reboot, ON-OFF the SWG.
- One the first packet has arrived to the SWG, it gets into "remote-controlled" mode. If no more packets arrive in the next 20 seconds, it goes OFF
- Look at the Display for a icon like this:
=======
==
==
==
==
Then you know that Zodiac-Tri has received the RS packet
(ASCII-Art) from @art0
from aquapured.
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.
from aquapured.
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?
from aquapured.
That’s correct. DO NOT connect the Ground at all to anything.
from aquapured.
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.
from aquapured.
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.
from aquapured.
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.
from aquapured.
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.
from aquapured.
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?
from aquapured.
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.
from aquapured.
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.
from aquapured.
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
from aquapured.
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.
from aquapured.
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.
from aquapured.
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.
from aquapured.
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.
from aquapured.
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.
from aquapured.
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 ")")"
from aquapured.
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.
from aquapured.
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.
from aquapured.
My mistake, it should be make aquarited
, not make
from aquapured.
@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?
from aquapured.
@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.
from aquapured.
@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?
from aquapured.
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.
from aquapured.
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.
from aquapured.
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
from aquapured.
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.
from aquapured.
Few thoughts.
-
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.
-
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.
-
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.
from aquapured.
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
from aquapured.
@Kranzy. Yup, I've read that. That is all about how to mimic a keypad to control the RS485 master, same thins AqualinkD does. This (Aquapure) needs to mimic the RS485 master to control the SWG, meaning it has to control the RS bus and not be a slave to it.
If the Tri can correctly mimic Jandy AquaPure, then it must be some the power that's the problem. I used the. I used the control panel to power the RS bus for this, just didn't connect the data terminals to the master, they connect to the USB device.
The other thing you could try is this.
https://github.com/tagyoureit/nodejs-poolController
Since the Pentair uses the Jandy protocol for SWG, and the above project states it can support stand alone SWG, it should work to control Pentair SWG. Since it uses the same hardware, it should be easy to test.
from aquapured.
Hi
Just to make sure that we are all the same page. This is what I found around (See picture)
A
B
POS
OV
So A and B are data ports for RS485 and OV is a nice way to say "Ground". And POS should stand for "positive?"
It is unclear what voltage should be there? 10V?
from aquapured.
I believe mine is 12v. I seem to remember that the TRi has a ~12vdc on a different terminal block from reading the manual a long time ago. I wonder if you could simply use that (ie jumper the 12v output to the RS485 0v & POS terminal).
I actually don't believe the RS485 bus needs to be powered for this to work since the Trip has it's own power for the RS circuit. BUT I think it may need to be powered simply so if thinks something is connected on the bus. You may also try connecting 0V on the Trip to the ground on the USB adapter (if it's a 3 terminal adapter), and not applying any power at all.
from aquapured.
Thanks for all this. I'll post a pic of the terminals on my chlorinator and try swapping A and B. I'll have a look at the nodejs project too.
(I had tried connecting 0v to the USB adaptor but not without also connecting 9v to the TRi. My adaptor is a 3 terminal one.)
from aquapured.
That nodejs project (https://github.com/tagyoureit/nodejs-poolController) readme has the following. Is this going to be a useful test for our purposes here? I'll try it too and post the results.
To see if you are getting the proper communications from the bus, before you even try to run this program, run from your unix command line
od -x < /dev/ttyUSB0
Of course, you'll need to change the address of your RS-485 adapter if it isn't the same as mine (here and in the code).
You'll know you have the wires right when the output of this command looks like (you should see multiple repetitions of ffa5ff):
0002240 0000 0000 0000 0000 0000 ff00 ffff ffff
0002260 **ffff 00ff a5ff** 0f0a 0210 161d 000c 0040
0002300 0000 0000 0300 4000 5004 2050 3c00 0039
0002320 0400 0000 597a 0d00 af03 00ff a5ff 100a
0002340 e722 0001 c901 ffff ffff ffff ffff ff00
This is the WRONG wiring (no ffa5ff present).
0001440 0000 0000 0000 0000 0000 0000 0000 6a01
0001460 e1d6 fbdf d3c5 fff3 ff7f ffff ffff f9ff
0001500 7fff 5ff7 bf5f 87ff ff8d f7ff ffff 4d0b
0001520 e5ff adf9 0000 0000 0000 0000 0100 d66a
0001540 dfe1 c5fb f3d3 7fff ffff ffff ffff fff9
from aquapured.
Nope, 12v didn't work, swapping A and B didn't work. The od -x command did nothing. My board is the same as art0 posted above, see the pic below.
As I understand a few manuals (eg https://www.zodiac-poolcare.co.uk/medias/product/EN_MANUAL_Tri%20Expert%20LS_01-2018_D_H0493600.PDF) the 15v is needed to be able to use some automatic pool covers (chlorine output reduced when cover is on). So I'm reluctant to put 15v across the RS485 terminals. I might get brave later.
from aquapured.
I’m not sure it’s worth jumping the 15v and damage the board.
from aquapured.
In my unit when powercycling the unit I have this firmware:
TRi SERIES
V3.04 OCT 2014
When I got to EXT CONTROLLER I have only one option to choose
EOS/PENTAIR
I get the feeling that other geeks in this issue have different firmware versions and options in EXT CONTROLLER?
from aquapured.
This doc, for a predecessor project to the nodejs-poolController one suggests anything between 5v and 15v is acceptable: https://github.com/tagyoureit/nodejs-Pentair/files/590407/Pentair_Pool-ZODIAC-Tri.pdf
I can't make the nodejs-poolController give me any results either. Frustrating.
from aquapured.
@art0 My firmware is v2.03 from April 2011. I have three controller options, eos/pentair, jandy rev k and jandy rev l/m. I used the latter, given @sfeakes tip.
from aquapured.
At @tortfeaser does it say "TRi SERIES"? strange that version that is V3.03 has less option of external controllers. Have you tried with Nodejs-poolController and EOS?
from aquapured.
@art0, yes, says TRi SERIES, V2.03 APR 2011. I tried nodejs-poolController. No result. I didn't know about EOS, I'll look that up. I'm thinking I should get something from the RS485 stream. I'll check wiring again and maybe try a different RS485 adaptor.
from aquapured.
I am confused with the protocols and brands. Maybe this is something for @sfeakes to clarify. To my understanding the Zodiac boxes can do the following remote controllers
Aqualink Tri
Jandy Rev L/M
Jandy Rev K
EOS/PENTAIR
AquapureD runs Jandy Rev L/M and the nodejs-poolController runs Pentair that is also Jandy?
Can anyone bring some light? I guess one thing is the "discovery" process and the other is the commands?
I fail to understand why @tortfeaser firmware that is from 2011 supports more types of controllers (v2.03 April 2011) that (v3.03 October 2014). My unit is labelled as Dual-Link Tri-Expert.
It is clear that "noise" is part of the strategy of vendors. I am totally displeased with how ORP is used in the Zodiac and that is why I want to control the SWG directly myself.
from aquapured.
@art0 My firmware is v2.03 from April 2011. I have three controller options, eos/pentair, jandy rev k and jandy rev l/m. I used the latter, given @sfeakes tip.
One thing to note. ALL Jandy & Pentair protocols are the same for a SWG. (But they are different for other devices). Jandy in their infinite wisdom decided to block any SWG that's not Jandy on rev L and above.
So once the controller and SWG start communicating, the SWG sends it's Information (rev / manufacturer etc), if a Jandy control panel sees it's not a Jandy SWG it will block any future SWG access. So all those different settings are simply telling the SWG to send a fake identifier so a Jandy control panel doesn't block communicating with a SWG. Since none of the software here does the same it really shouldn't matter.
However the above it to the best of my knowledge, after testing a few SWG. There is no documentation on this stuff and neither Jandy or Pentair will give it out. That's why I say use Jandy rev l/m. It shouldn't matter, but I can assure you that Aquapure & the above mentioned Node JS implementation both are designed / tested around how that protocol works.
from aquapured.
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 My Zodiac Tri-Expert
only shows EOS/Pentair in the EXT CONTROLLER menu. What is the master/slave ID in this scenario?
This was an artifact of the Zodiac scroll-down/up menu. Using the arrow keys shows all the options.
AquapureD should act as RS485 master? and Zodiac SWG as slave?
from aquapured.
@art0
Master ID = 0x00,
Slave ID = 0x50
Aquapure = Master
from aquapured.
I managed to get my newly bought pcb for the Zodiac Tri with version 3.03 (from memory) working with Jandy Rev L/M protocol. I wrote my own python scripts based on various sources on the internet, probably the code used here as well. It also worked on a previous board I owned, with version 2.x
Just using the a/b wires didn't do the trick, and after I inspected the pcb I found out that the connectors on the PSU board lead to a Max481 chip, and should be powered since they aren't by default. The datasheets for the Max481 chip said it should be powered by 5v, and after applying that worked using Slave ID 0x50.
Just wondering if anyone ever managed to read pH and ORP values from this board?
from aquapured.
I managed to get my newly bought pcb for the Zodiac Tri with version 3.03 (from memory) working with Jandy Rev L/M protocol. I wrote my own python scripts based on various sources on the internet, probably the code used here as well. It also worked on a previous board I owned, with version 2.x
Just using the a/b wires didn't do the trick, and after I inspected the pcb I found out that the connectors on the PSU board lead to a Max481 chip, and should be powered since they aren't by default. The datasheets for the Max481 chip said it should be powered by 5v, and after applying that worked using Slave ID 0x50.
Just wondering if anyone ever managed to read pH and ORP values from this board?
@DutchForce75 Would you mind sharing your code and a wiring diagram for how you have connected to the system? I'm assuming that you don't have a controller in the system and you are interacting directly with the SWG? Good to hear others have had success in this.
from aquapured.
@Kranzy: Sure, but I have to warn you, I am an amateur programmer and used GitHub for publishing for the first time : https://github.com/DutchForce75/pyZodiacTri/
from aquapured.
@DutchForce75 and @Kranzy,
Sounds like great news! So the problem was just the voltage? Sounds strange that applying 9V to the "POS" will not trigger a response.
Can you share the RS debug too? Will be nice to see the protocol back and forth.
Also my unit has firmware 3.03 but i can only see "EOS/PENTAIR" option. What options do you get?
from aquapured.
My device is 1350 km's away from me right now (that's why I need the remote :-) , but from memory I think I can choose from:
Aqualink Tri
Jandy Rev L/M
Jandy Rev K
EOS/PENTAIR
It works on Jandy Rev L/M, definitely not Aqualink Tri. Not sure if the others would work.
The protocol is the same Aquarite protocol as found here and on other resources, for example:
RS485 : <-- 1002 50 00 62 1003
RS485 : --> 1002 00 01 0000 13 1003
RS485 : <-- 1002 50 11 64 d7 1003
RS485 : --> 1002 00 16 28010000 51 1003
Perhaps it works only if the ground or 0v comes from the same PSU as the USB / Raspberry device.
Did you apply 9 volts to POS an 0V then?
from aquapured.
Hi @DutchForce75
I have tested and I get no answer from the Zodiac
RS485 : <-- 1002 50 00 62 1003
RS485 : -->
RS485 : <-- 1002 50 11 64 d7 1003
RS485 : -->
Do you need to turn on/off the device?
from aquapured.
I think it doesn't matter, because if the connection is lost, the Zodiac switches to off mode by itself.
What RS485 adapter are you using?
from aquapured.
After trillion of attempts I got this handshake
RS485 : <-- 1002 50 14 01 77 1003
RS485 : --> 1002 00 03 0141717561507572650000000000000000 3a 1003
Unfortunately it happened only once.
I tried 2 different models. Not the same one you use though
from aquapured.
At least that's something! Might be a line problem, do you have a long cable in between? Mine is only 5 meters of twisted pair network cable. By memory I think the Zodiac Tri Board has a EOL resistor onboard. Not sure about the USB device on the other side. Currently it works here without any EOL resistors, but you might need one if cable length is long.
Which software did you end up using this result?
from aquapured.
The cable is 2m long, and I do not run a EOL. I used your software, the webserver and the testing script.
Where did you buy your USB-RS dongle?
Can @DutchForce75 describe the order you follow to see communications in place?
a) start webserver
b) power off? power on? SWG
c) select EXT Controller, power on/off?
from aquapured.
I bought a bunch of these at two different stores, not sure if they are 100% the same:
https://www.reichelt.de/raspberry-pi-usb-rs485-interface-rpi-usb-rs485-p242783.html?r=1
https://www.hobbyelectronica.nl/product/max485-module-voor-rs485-seriele-communicatie-usb/
Not sure which I actually end up using.
Which one are you using?
Up till now I had the Zodiac Tri powered up and then made the connection with the scripts. Haven't tested what happens the otherway around, although my guess that it won't give problems.
On the Zodiac Tri, EXT controller is set to the Jandy Rev L/M setting, and mine remembers this when powered off.
One thing if you used my python software: it will first try to sync the packets, but if malformed packets are received they won't be displayed. Might be the reason why you don't see much traffic going on.
What happens if you open a terminal and run the following cmds like 10 times?:
echo -n -e '\x10\x02\x50\x00\x62\x10\x03' > /dev/ttyUSB0
od -x < /dev/ttyUSB0
In my case I get this response:
0000000 1000 0002 0001 1300 0310
0000012
from aquapured.
I run more tests this morning. POS(5V) and 0V coming from RB.
Again I got some non consistent responses. Do you get responses from the first cmd or do you need to send ten beacons first?
I start to wonder if the problem is not related to the RS485 dongle. I have used in production for a electrical meter. Will be great to test with your same model to troubleshoot
python2 zodiactest.py
RS485 : opening RS485 port /dev/ttyUSB0
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 : -->
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 : -->
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 : -->
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 : -->
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 : --> 1002 00 03 0141717561507572650000000000000000 3a 1003
RS485 : <-- 1002 50 00 62 1003
RS485 : --> 1002 00 01 0000 13 1003
RS485 : <-- 1002 50 14 01 77 1003
RS485 : --> 1002 00 03 0141717561507572650000000000000000 3a 1003
RS485 : <-- 1002 50 00 62 1003
RS485 : --> 1002 00 01 0000 13 1003
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 : --> 1002 00 03 0141717561507572650000000000000000 3a 1003
RS485 : <-- 1002 50 00 62 1003
RS485 : -->
RS485 : <-- 1002 50 14 01 77 1003
RS485 : --> 1002 00 03 0141717561507572650000000000000000 3a 1003
RS485 : <-- 1002 50 00 62 1003
RS485 : -->
from aquapured.
No 1 or 2 messages are enough to get a decent response in my case.
Just to rule out that the syncing part in the python script is the problem, or to see what actually goes wrong on the RS485 communication layer: what happens if you run these commands from the command line:
echo -n -e '\x10\x02\x50\x00\x62\x10\x03' > /dev/ttyUSB0
od -x < /dev/ttyUSB0
from aquapured.
Also make sure you feed the Raspberry with a big stable power supply. Read on another forum that can prevent bad checksums as well
from aquapured.
Hello,
I just did a test with my Zodiac Tri and it works. I can read data. Thank @DutchForce75
On the other hand, what would be interesting, it is to be able to recover the information concerning the Chlorine and the PH.
from aquapured.
Haven't succeeded in obtaining pH and ORP info.
I tried to send every command between 0 and 255, but the Tri responded only on the already known AquaRite commands.
I cant test right now, but maybe it will respond to ChemLink commands when Ext Controller is set to Aqualink?
Has anyone succeeded in connecting when set to Aqualink at all?
Really keen on being able to read these values too!
from aquapured.
The SWG AquaRight protocol only has SWG % and PPM information in it. There is one other value I haven’t had chance to decide yet, but I believe it’s water temp.
My bet is you can get this using the ChemLink protocol. But until I find someone with a working ChemLink to Aqualink control panel, I won’t be able to decode that. All I know so far is the ID for ChemLink
from aquapured.
%SWG: % of time that the Cell works. Not sure how this works, if 50% will it stop every 30 mins per hour?
PPM: PPM of what? Salt? How is the Salt PPM measured? Calculated from the voltage level in the cell?
from aquapured.
@art0
SWG% is the % of Chlorine to generate. This is same as setting the % control knob on the panel itself. I have not looked into the electronics, but I would assume it's simply changing the voltage going to the salt cell itself, rather then cycling it.
PPM is Parts Per Million of salt measured from the water traveling through the cell.
There is usually LED on the panel that states "remote controlled" or something similar, when that is lit you are controlling the panel over RS485. But you need to send a command every second or so to keep it under remote controlled.
from aquapured.
BTW, The ChemLink ID is 0x80 so if you send a probe packet to that ID and you get an ACK back you know the Tri can also use the ChemLink protocol. Then you should be able to set and get Ph & ORP, plus change the Ph and ORP feed rate.
from aquapured.
@sfeakes: Next time I can try is in 5 weeks, but will def try!
from aquapured.
@DutchForce75
Here is some information on ChemLink protocol. I don;t have much more, but it'll be enough to get you started.
Probe to ChemLink
| HEX: 0x10|0x02|0x80|0x00|0x62|0x10|0x03|
ACK from ChemLink
| HEX: 0x10|0x02|0x00|0x01|0x18|0x00|0x2B|0x10|0x03|
Request for ChemLink status
| HEX: 0x10|0x02|0x80|0x02|0x94|0x10|0x03|
ChemLink Status Reply
| HEX: 0x10|0x02|0x00|0x21|0x02|0x3B|0x03|0x4B|0x0E|0x02|0xCE|0x10|0x03
0x10|0x02 = head
0x12 = ChemLink Responce Message
0x02 = Responce type is Status
0x3B = Target ORP (1st bit)
0x03 = Target ORP (2st bit)
0x0E = Target PH (1st bit)
0x02 = Target PH (2st bit)
0xCE = checksum
0x10|0x03 = tail
from aquapured.
@art0
SWG% is the % of Chlorine to generate. This is same as setting the % control knob on the panel itself. I have not looked into the electronics, but I would assume it's simply changing the voltage going to the salt cell itself, rather then cycling it.
PPM is Parts Per Million of salt measured from the water traveling through the cell.There is usually LED on the panel that states "remote controlled" or something similar, when that is lit you are controlling the panel over RS485. But you need to send a command every second or so to keep it under remote controlled.
@sfeakes The Zodiac Tri does not change the voltage of the cell, it remains constant. % of chlorine seems a time-based % i.e. the time that the cell is active vs the time that SWG is ON.
from aquapured.
@sfeakes: Great stuff! Will try as soon as I have the opportunity.
Or is there somebody else here that can test some python code and have Aqualink selected as controller on the Zodiac Tri?
from aquapured.
@art0
I will be looking at testing mine tonight. Can you let me know what your wiring ended up looking like? Was it just 5v to the board and A & B between RS485 usb and board or did you need the ground on the USB adapter shared between the pi, adapter and board or any combination of?
from aquapured.
I’d be happy to test once I’ve got Aquapure up and running successfully.
@sfeaks
We are free to change between different software and protocols without the board locking to a specific one?
from aquapured.
@Kranzy
It’s the control panel that will lock out on SWG change, not the SWG itself. So yes to the best of my knowledge you’re free to change.
Also AquapureD and the Python script posted uses the exact same protocol, so switching between them won’t cause an issue. If one works so should the other as the both send the same codes.
from aquapured.
@art0 I can confirm that I used the same power routing directly from the PSU and not directly from the RPI, didn't thought it would make such a big difference, sorry!
from aquapured.
@Kranzy: would be great if you could test!
So please run the chemlinktest.py and aqualinkscan.py that's in the https://github.com/DutchForce75/pyZodiacTri
If you want the screen output to a file instead use these commands to post the results here, but you won't see any feedback on the screen then (anyone got a working around to see screen output AND route it to file?):
python aqualinkscan.py > aqualinklog.txt
python chemlinktest > chemlinklog.txt
from aquapured.
Hello,
Here are the generated files. I am in "Jandy Rev L / M" mode
output-aqualinkscan.txt.gz
output-chemlinktest.txt.gz
from aquapured.
from aquapured.
Yes, I can generate them, but only tonight.
from aquapured.
For Jandy mode
aqualinkscan:
RS485 : <-- 1002 50 00 62 1003
RS485 : --> 1002 00 01 0000 13 1003
chemlinktest:
got no answer
Changed to Aqualink.-Tri controller and got no responses for both tests.
from aquapured.
Thanks guys!! Too bad you didn't get any answer art0
from aquapured.
Here are the generated files. I am in "Jandy Rev L / M" mode
output-aqualinkscan.txt.gz
output-chemlinktest.txt.gz
These are axaclty as what I got, no response other then the AquaRite protocol unfortunately
from aquapured.
I’m still getting nothing read when using aquapure. Haven’t tried with @DutchForce75 code.
from aquapured.
No 1 or 2 messages are enough to get a decent response in my case.
Just to rule out that the syncing part in the python script is the problem, or to see what actually goes wrong on the RS485 communication layer: what happens if you run these commands from the command line:
echo -n -e '\x10\x02\x50\x00\x62\x10\x03' > /dev/ttyUSB0
od -x < /dev/ttyUSB0
@DutchForce75 When running these (assuming I did it correctly) my response is just '0000000'
I am running the Pi from a USB adapter and a separate adapter to apply 5v.
Do you think the issue could be that I am not sharing a common ground between the 5v psu to the board and the usb that is powering the Pi? I did try grounding the RS485 to the psu to the board but no luck.
Tx led lights on the board, Rx led never lights.
@art0 did the power supply you used to the board, did that also power the pi or was it two separate circuits in your setup?
I even tried using a raspberry pi b+ instead of an original pi.
Open to any other ideas to try...
from aquapured.
Seems like you don't get a repsonse yet.
Are you sure your RS485 adapter shows up as /dev/ttyUSBO?
You could check by running ls /dev/tty*
I use a power adapter that poweres both the RPI as well as the Zodiac Tri. Make sure the power supply is big enough. I use this one:
https://nl.farnell.com/mean-well/hdr-30-5/power-supply-ac-dc-5v-3a/dp/2815640?CMP=i-ddd7-00001003
In my case I did use the + and ground for the Tri
from aquapured.
Seems like you don't get a repsonse yet.
Are you sure your RS485 adapter shows up as /dev/ttyUSBO?
You could check by running ls /dev/tty*
Yeah I'm pretty sure it is. I have run ls /dev/tty* and there is only one USB device which is USB0. When I run either your script or sfeakes I get led feedback on the RS485 adapter. Just no responses.
from aquapured.
Might be driver / adapter related?
from aquapured.
@Kranzy: You could try to edit myZodiacTriClass.py line 78 into
self.port.rs485_mode = serial.rs485.RS485Settings(True,False,None,None)
Does that make a difference?
from aquapured.
@DutchForce75
No difference unfortunately. I did power the raspberry pi and 5v for the SWG from the same power source and I started getting rx led responding after the tx led. However I was still unable to get a response back when running either scripts.
from aquapured.
@Kranzy:
So what did you change that made the RX led respond? Was it the power source or the change of line 78?
from aquapured.
It was the power.
Changing line 78 didn’t seem to make a difference even after power change.
from aquapured.
That's something!
What is the response if you run these again?
echo -n -e '\x10\x02\x50\x00\x62\x10\x03' > /dev/ttyUSB0
od -x < /dev/ttyUSB0
from aquapured.
Side question.
Might be due for a new pump soon. Looking at an eco pump. Are there any brands that would be able to be integrated with this software??
from aquapured.
Side question.
Might be due for a new pump soon. Looking at an eco pump. Are there any brands that would be able to be integrated with this software??
There is a Jandy line of pumps that use this protocol, I listed above in this thread when I was explaining protocols. But most use the Pentair protocol.
The node project I listed will support Pentair pumps (and this SWG) protocol without a master control panel.
But neither this project or the python listed in this thread currently support pumps.
from aquapured.
Just wondering why the Zodiac Tri isn't responding when controller set to Aqualink, could this be because it's communicating on a higher baud rate?
from aquapured.
That's something!
What is the response if you run these again?
echo -n -e '\x10\x02\x50\x00\x62\x10\x03' > /dev/ttyUSB0
od -x < /dev/ttyUSB0
So back to square one unfortunately. I couldnt get any response or rx leds when powering both SWG and pi from the same 5v source. Wondering if I need to try a different adapter...although not sure that it's the problem.
I might try and move the pi so its a very short cable run to the SWG, see if that makes any difference.
from aquapured.
What did you change compared to the situation where the rx leds responded?
from aquapured.
What did you change compared to the situation where the rx leds responded?
@DutchForce75 I'm not sure to be honest. When I was first testing it and got the rx led to respond I was having to clamp the positive/negative 5v to drive the controller and then powered the pi with it also.
I bought a dc plug to match the transformer I was using, and wired the 5v for controller with a micro usb to power the pi on the same power source. Still no joy. So I then added wires so I could power the pi from the gpis headers, no change. I even tried powering pi via usb and gpis header from the same 5v source running to the controller.
I have decided to by a different RS485 for testing, im assuming that'll take another week or two to arrive.
Open to any other ideas to try in the mean time.
from aquapured.
@sfeakes @DutchForce75 If we can not get the PH and ORP values from the SWG I wonder if we could tap into the sensors to read the voltage there.
Has anyone any experience measuring the voltage from the BNC of the sensors?
Do you know the brand of the sensors and their voltage range/curve?
from aquapured.
Related Issues (10)
- Zodiac Tri Protocol not working
- fullstatus not updating to 254 when off HOT 5
- Salt PPM Levels HOT 11
- Check Cell Message HOT 5
- MQTT publishing wrong topic state for SWG HOT 7
- Config for init_swg_device
- Please add support for Linux (Arch 32_64)
- List of compatible hardware HOT 39
- Future Developement of AquapureD HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aquapured.