Intelliflow pump RS485 protocol

Does anyone know anything about the protocol over the "protocol adapter", which puts the RS-485 bus on the local network. I've sniffed it with Wireshark and it doesn't look exactly the same. I never see the FF 00 FF packets.
 
 - jason
 
Here are some example packets with the packet and the printable ascii under it. The bbcode tag messes the printable code up a bit so it's not 100% accurate.
 
Code:
0000   cc 52 af 0e 35 6b 00 90 c2 fa 45 5a 08 00 45 00
0010   00 28 91 0c 00 00 40 06 67 5c c0 a8 00 aa c0 a8
0020   00 6d 00 50 f0 5c 05 c2 d8 51 56 08 0c b6 50 10
0030   04 00 f7 ed 00 00
R5kEZE(@g\mP\QVP

0000   cc 52 af 0e 35 6b 00 90 c2 fa 45 5a 08 00 45 00
0010   00 48 91 0d 00 00 40 06 67 3b c0 a8 00 aa c0 a8
0020   00 6d 00 50 f0 5c 05 c2 d8 51 56 08 0c be 50 18
0030   04 00 dc 16 00 00 02 00 0f 00 18 00 00 00 11 00
0040   00 00 30 30 2d 39 30 2d 43 32 2d 46 41 2d 34 35
0050   2d 35 41 00 00 00
R5kEZEH@g;mP\QVP00-90-C2-FA-45-5A

0000   cc 52 af 0e 35 6b 00 90 c2 fa 45 5a 08 00 45 00
0010   00 30 91 0e 00 00 40 06 67 52 c0 a8 00 aa c0 a8
0020   00 6d 00 50 f0 5c 05 c2 d8 71 56 08 0d 12 50 18
0030   04 00 d8 61 00 00 03 00 1c 00 00 00 00 00
R5kEZE0@gRmP\qVPa

0000   cc 52 af 0e 35 6b 00 90 c2 fa 45 5a 08 00 45 00
0010   00 68 91 0f 00 00 40 06 67 19 c0 a8 00 aa c0 a8
0020   00 6d 00 50 f0 5c 05 c2 d8 79 56 08 0d 1a 50 18
0030   04 00 26 06 00 00 04 00 b9 1f 38 00 00 00 19 00
0040   00 00 50 4f 4f 4c 3a 20 35 2e 32 20 42 75 69 6c
0050   64 20 37 33 33 2e 30 20 52 65 6c 00 00 00 02 00
0060   00 00 05 00 00 00 02 00 00 00 02 00 00 00 02 00
0070   00 00 0c 00 00 00
R5kEZEh@gmP\yVP&8POOL: 5.2 Build 733.0 Rel
 
Whizzo said:
Also FYI, i just put my code on Github as well. Just for arduino and controlling pumps, thanks @blueman2 I used a litle of your code to make the classes and find some issues. I also detected that when you have a standalone pump - then you should talk to the pump a lot, otherwise it just keeps it's mouth shut and gives a flatline voltage on the RS-485 interface. (I first thought it was broken)
 
Maybe a little question along the way: does anyone know the connectortype of the pentair RS-485 connection cable??
 
Github link : https://github.com/Zuntara/Arduino.Pentair
 
Hi Whizzo,
 
I want to make an Arduino Uno read the Pentair Intellichem status.  My Intellichem is connected to and controlling an intellichlor.
 
The pump system is controlled by another Arduino Mega which for now I will leave alone, as it maybe too busy with other  tasks.  But I will at least send the Mega digital signals based on Intellichem comms, i.e. run pump faster when filter is getting restricted, or need more run time to increase ORP, ...
 
I'm ok with basic Arduino coding, but RS485 is new to me.  Also I see you use a lot of C coding beyond my skill.
 
I wanted to use a max485 instead of the linksprite, if it's not to complicated to for me to figure out.
 
It looks like your Pentair Arduino code is the best code to start with.   Do you agree?
 
I looked at your code, trying to figure out what needs changing, but maybe it's not an easy change:
 
pentair_driver_v2.ino - A few things to change here? Which ino to use?
 
pentair_hardware_serial.ino - A few things to change here? Which ino to use?
 
Pentair.cpp - lots to change here?
 
Pentair.h - lots to change here?
 
BTW I'm from Belgium also!  But I am living in Los Angeles for a long time now.  If you ever come to California, you can stop by!
 
GdB
 
I am a newbie to this forum. I installed a Pentair Boost-Rite variable speed pump. Now I would like to control the pump using a Raspberry PI, since I am already using that to control relays, e.g. for turning the aux. pump on and off.
I connected an RS485 converter/adapter to the Raspberry and the pump. I would like to use c-code or php to control the pump, and I tried sending messages using the arrays defined on page 5 of this forum (It does not allow me to send a link here). However, the messages don't do anything to the pump operations and it always send the same repsonse: 7e8399a8
Hope somene can help.
Ben
 
Hi Ben,
 
Welcome to Cocoontech.
 
The only suggestion That I have without digging deeper is to try reversing the + and - of the RS-485 line at one end, although you have probably already thought of that. I could be that the data is inverted.
 
mark
 
Has anyone found the protocol form the wireless MobileTOUCH2 device. it follows the 0xA5, 01, DST, SRC, CMD, LEN, DATA[], CSUM protocol except occasionally when i receive packet with CMD=5 the CSUM is completely incorrect but the controller system still responds to it correctly.  i'm simply using a 485 to usb device to monitor the traffic as a means to monitor pool status. thank you for any help you can offer
 
rocco said:
Hi Ben,
 
Welcome to Cocoontech.
 
The only suggestion That I have without digging deeper is to try reversing the + and - of the RS-485 line at one end, although you have probably already thought of that. I could be that the data is inverted.
 
mark
 
I chaged my test code to write the bytes one at a time to /dev/ttyUSB1 and also I read from ttyUSB1 a byte at a time when done transmitting a message to the pump. Using the messages I found in this forum, I get this:
 
TX= ff 0 ff a5 0 60 10 1 4 3 27 2 ee 2 34 0 
RX= 0 
 
TX= ff 0 ff a5 0 10 60 1 2 2 ee 2 8 0 0 0 
RX= 0 1 2d 3f df fd f7 f9 b1 fb 23 bf d9 0 
 
TX= ff 0 ff a5 0 60 10 1 4 3 28 6 d6 2 21 0 
RX= 0 1 2d df 3f fd fb fb 23 bf ef ff ff 0 
 
TX= ff 0 ff a5 0 10 60 1 2 6 d6 1 f4 0 0 0 
RX= 0 1 2d 3f df fd f7 f9 af f3 53 bf fb 0 
 
TX= ff 0 ff a5 0 60 10 1 4 3 29 7 d0 2 1d 0 
RX= 0 1 2d df 3f fd fb f3 53 7f c1 ff ff 0 
 
TX= ff 0 ff a5 0 10 60 1 2 7 d0 1 ef 0 0 0 
RX= 0 1 2d 3f df fd f7 f9 ad f1 5f bf dc 0 
 
TX= ff 0 ff a5 0 60 10 1 4 3 2a c b2 2 5 0 
RX= 0 1 2d df 3f fd fb f1 5f 7f 8 ff ff 0 
 
TX= ff 0 ff a5 0 10 60 1 2 c b2 1 d6 0 0 0 
RX= 0 1 2d 3f df fd f7 f9 ab e7 9b bf df 0 
 
TX= ff 0 ff a5 0 60 10 4 1 ff 2 19 0 0 0 0 
RX= 0 1 2d df 3f fd fb e7 9b 7f 8a ff ff 0 
 
TX= ff 0 ff a5 0 10 60 4 1 ff 2 19 0 0 0 0 
RX= 0 1 2d 3f df f7 fd 1 bf ee ff ff ff 0 
 
TX= ff 0 ff a5 0 60 10 6 1 4 1 20 0 0 0 0 
RX= 0 1 2d df 3f f7 fd 1 bf ee ff ff ff 0 
 
TX= ff 0 ff a5 0 10 60 6 1 4 1 20 0 0 0 0 
RX= 0 1 2d 3f df f3 fd f7 fd bf ff ff ff ff 0 
 
TX= ff 0 ff a5 0 60 10 1 4 3 21 0 0 1 3e 0 
RX= 0 1 2d df 3f f3 fd f7 fd bf ff ff ff ff 0 
 
TX= ff 0 ff a5 0 10 60 1 2 0 0 1 18 0 0 0 
RX= 0 1 2d 3f df fd f7 f9 bd ff ff fd 83 ff 0 
 
TX= ff 0 ff a5 0 60 10 6 1 a 1 26 0 0 0 0 
RX= 0 1 2d df 3f fd fb ff ff fd cf ff ff ff 0 
 
TX= ff 0 ff a5 0 10 60 6 1 a 1 26 0 0 0 0 
RX= 0 1 2d 3f df f3 fd eb fd b3 ff ff ff ff 0 
 
TX= ff 0 ff a5 0 60 10 1 4 3 21 0 10 1 4e 0 
RX= 0 1 2d df 3f f3 fd eb fd b3 ff ff ff ff 0 
 
TX= ff 0 ff a5 0 10 60 1 2 0 10 1 28 0 0 0 
RX= 0 1 2d 3f df fd f7 f9 bd ff df fd 63 ff 0 
 
TX= ff 0 ff a5 0 60 10 1 4 3 2b 0 1 1 49 0 
RX= 0 1 2d df 3f fd fb ff df fd af ff ff ff 0 
 
TX= ff 0 ff a5 0 10 60 1 2 0 1 1 19 0 0 0 
RX= 0 1 2d 3f df fd f7 f9 a9 ff fd fd 6d ff 0 
 
Nothing happens on the pump when I send the messages. I can't make sense of the received messages.
 
eriedl said:
Alright, it's been now a few weeks, but I made some good progress and wanted to share this with you. I can now control my Pentair VS pump from my mobile phone: https://www.youtube.com/watch?v=T3iz8tXQJtM
My test rig is a bit unwieldy at the moment and not ready for permanent use just yet :)
 
I mentioned this before, but I just wanted to sum up what my goal here was. I have a very basic pool setup: VS pump, manual valves and a manual heater. So my main motivation was to be able to perform some basic tasks on the pump and not have to walk all the way back to my pump. While I could also run an external program and have to repeat the command every 30 seconds, which my Arduino controller program can do, it seemed to me a bit of an overkill for my use case. I understand why you want an external controller do that. For example, if the connection to the pump gets disrupted, you want the pump to stop and not keep going for safety reasons. Anyway, so right now I have to walk up to the pump and press one button to get it going. That's what I also wanted to be able to do from my phone.
 
That being said, I also found out more about some of the data for the "Mode" CFI (Command/Function/Instruction) 0x05. The highlighted values below allow you to choose the desired speed like you would press the button the pump panel itself. If you choose to do this, the pump will keep going and will not stop until you actually send the stop command again. This is different from running an external program, where you have to repeat the command every 30 seconds. So, use with caution!
 
From Michael's pa_iflo.h (line 23ff):

#define IFLO_MOD 5
#define IFLO_MOD_FILTER 0x00 /* Filter */
#define IFLO_MOD_MANUAL 0x01 /* Manual */
#define IFLO_MOD_BKWASH 0x02 // ERIE: SPEED 1
#define IFLO_MOD______3 0x03 /* never seen */ // ERIE: SPEED 2
#define IFLO_MOD______4 0x04 /* never seen */ // ERIE: SPEED 3
#define IFLO_MOD______5 0x05 /* never seen */ // ERIE: SPEED 4
#define IFLO_MOD_FEATR1 0x06 /* Feature 1 */
#define IFLO_MOD______7 0x07 /* never seen */
#define IFLO_MOD______8 0x08 /* never seen */
#define IFLO_MOD_EXT_P1 0x09
#define IFLO_MOD_EXT_P2 0x0a
#define IFLO_MOD_EXT_P3 0x0b
#define IFLO_MOD_EXT_P4 0x0c

The above values might have different meanings for a different pump model. But that is what they do in my case.
 
So to run Speed 2, I have to send the following commands:

/*
* Checksum omitted for laziness reasons. The program calculates it at runtime.
* The pump confirmation responses have also been omitted for brevity reasons. The app, however, checks them
* to verify that the last CFI was successful.
*/
P R E A M B L E VER PUMP CTRL CFI LEN DATA CHKH CHKL
Set Control Remote: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x04, 0x01, 0xFF, 0x00, 0x00 }
Set Mode Speed 2: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x05, 0x01, 0x03, 0x00, 0x00 }
Set Run Start: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x06, 0x01, 0x0A, 0x00, 0x00 }
Set Control Local: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x04, 0x01, 0x00, 0x00, 0x00 }

// Stop Pump and put it back into Schedule Mode
Set Control Remote: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x04, 0x01, 0xFF, 0x00, 0x00 }
Set Run Stop: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x06, 0x01, 0x04, 0x00, 0x00 }
// Like pressing Stop twice on the panel
Set Run Stop: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x06, 0x01, 0x04, 0x00, 0x00 }
Set Control Local: { 0xFF, 0x00, 0xFF, 0xA5, 0x00, 0x60, 0x20, 0x04, 0x01, 0x00, 0x00, 0x00 }

My next steps are to get my rig into a small watertight container (Pelican makes some) and see if I can downsize the Arduino board to a UNO or so and then power it maybe with a couple of D batteries, so I can leave the rig next to my pump.
 
Yet another shout-out to Michael whose C code was a tremendous help here! And of course rocco and tag, too :)
 
 
Hi Eriedl, I am trying to manage an Intelliflow pump like you and cannot sketch to compile the code. Getting " #error "Sorry, afLib does not support this board" Pentair:335:2: error: #endif without #if
 
Any ideas?
 
Regards,
 
Paul Aviles
 
OK, I had a chance to look at this. I made two commits: One removes that dangling #endif and the second one refactors some calls to afLib to match the latest version of the API. You will also need to the following libraries to and need to put them in your Arduino home directory:
  1. Timer.h: https://github.com/JChristensen/Timer/archive/master.zip
    I am sure you can probably use also Arduino-Timer, just need to change the include to lowercase timer.h. But I haven't tested this.
  2. afLib: https://github.com/aferodeveloper/afLib
    This is what enables the communication with the Afero Cloud. You can obviously swap that part out, but the application code has been implemented for this particular IoT platform. You can find more details about Afero and on their Developer Portal at https://developer.afero.io. Disclosure: Yes, I work for them.
This should at least allow you to compile the code. That being said, my C/C++ environment on my mac is completely borked - I get errors like "'uint8_t' does not name a type" which is not good although XCode works just fine. In short, I cannot verify if it actually runs on any of the two Arduino boards. A colleague of mine was kind enough to give me the diff for the API changes to afLib and was able to compile it without any further issues. I ran the code initially on a Mega 2560. There is also a branch for an UNO board and you will have to apply the two commits to it as well.
 
I hope this helps you to move forward.
 
 
Best,
Erhard.
 
 
//EDIT 2019-06-07
For posterity reasons, I wanted to give a quick update. It turns out my development environment was not borked. I just created a new Arduino project and copied the file contents over and everything compiles just fine. I also updated the code base to use the latest afLib3. The sketch compiles now without any errors, but I did not set up the whole rig again and fully tested it :)
 
Hello, I'm very impressed by your blog. However I'm not a programmer. My question is has anyone been successful controlling these pumps with a PLC? I have your typical 4 to 20 ma analog out or via 0-5v to 0-10v. Thanks for answering.
 
Wow!
 
excellent work. My pump room is working on an Arduino Mega 2560 R3. Once I'm done with the chemical monitoring parts (copper ionization system), I'm going to start working  on getting rid of my EasyTouch, the world's most overrated pool controller. I'm guessing your work so far will be immensely helpful in achieving this.
 
 
 
Hi Tri,
 
Do you have a way to monitor copper levels? I have a copper / ozone system, but I monitor the copper with a Taylor reagent test kit. It's tedious. Is there a better way?
 
I am curious about the physical interface between the Raspberry Pi and the Intelliflo pump. 
Did you use the official Pentair communication cable? I believe it only uses 2 of the 4 pins from the pump connector, but I am not sure which two?
Then what did you use to convert from the rs485 format to the Pi either RS232 or USB? Was a separate driver needed for that conversion?
 
Thanks,
 
Doug Hillmer.
 
 
Back
Top