Intelliflow pump RS485 protocol

Well, I do not have an Intellicomm unfortunately.  I have just been equating my Intermatic (which supposedly sort of clones the Intellicom) as a proxy.  But I will send that command to my Intermatic to see if it responds.....
 
Blueman, et al,
 
I think my RS485 adapter is dying as it no longer wants to write to the bus...  :angry2: .  I ordered a new one and it should be here shortly.  Good thing they are only $6.
 
In the meantime, download an interim version of the app from my Dropbox.  I don't want to post this on Github until I can test it fully.
 
I added 3 lines (21-23) for Intellicom, Intellitouch, or Pumps only switches that help the app understand your pool setup.  I can really only test one of these; Intellitouch.  If the Intellitouch isn't present, the app will populate the pump information from the pump packets directly (as opposed to the controller packets).
 
The debug variables are already set to display quite a bit of the pump information now.  
 
In the area with the pump messages, I tried to add all the decoding for the set remote/set program/run program/etc.  It would be great if you could test.
 
Try this out... thanks!
Tag
 
Will give this a try in the morning.  Thanks!
 
EDIT: well, OK, I just could not wait.  I just loaded it up and it ran perfectly!!  See output:


23:42:37.341 INFO
*******************************
Important:
Configuration is now read from your pool. The application will send the commands to retrieve the custom names and circuit names.
It will dynamically load as the information is parsed.
Visit http://_your_machine_name_:3000 to see a basic UI
Visit http://_your_machine_name_:3000/debug.html for a way to listen for specific messages

*******************************
23:42:43.002 VERBOSE Express Server listening at port 3000
23:42:43.040 VERBOSE Serial Port opened
23:42:47.942 INFO IntellicomII Controller Detected. No configuration request messages sent.
23:42:47.956 VERBOSE Msg# 1 Main --> Pump1: @ Pump Timer 1 : minutes [96,16,1,4,3,43,0,1,1,73]
23:42:47.975 VERBOSE Msg# 2 Pump1: Speed Set to 1 rpm: [16,96,1,2,0,1,1,25]

23:42:48.034 VERBOSE Msg# 3 Main --> Pump1: @ Save Program 1 as 750 : rpm [96,16,1,4,3,39,2,238,2,52]
23:42:48.053 VERBOSE Msg# 4 Pump1: Speed Set to 750 rpm: [16,96,1,2,2,238,2,8]

23:42:48.134 VERBOSE Msg# 5 Main --> Pump1: @ Save Program 2 as 1740 : rpm [96,16,1,4,3,40,6,204,2,23]
23:42:48.153 VERBOSE Msg# 6 Pump1: Speed Set to 1740 rpm: [16,96,1,2,6,204,1,234]

23:42:48.232 VERBOSE Msg# 7 Main --> Pump1: @ Save Program 3 as 2000 : rpm [96,16,1,4,3,41,7,208,2,29]
23:42:48.253 VERBOSE Msg# 8 Pump1: Speed Set to 2000 rpm: [16,96,1,2,7,208,1,239]

23:42:48.329 VERBOSE Msg# 9 Main --> Pump1: @ Program 4 as 3250 : rpm [96,16,1,4,3,42,12,178,2,5]
23:42:48.351 VERBOSE Msg# 10 Pump1: Speed Set to 3250 rpm: [16,96,1,2,12,178,1,214]

23:42:48.430 VERBOSE Msg# 11 Main --> Pump1: Remote control (turn off pump control panel): [96,16,4,1,255,2,25]
23:42:48.452 VERBOSE Msg# 12 Pump1: In remote control: [16,96,4,1,255,2,25]

23:42:48.532 VERBOSE Msg# 13 Main --> Pump1: Pump power to off: [96,16,6,1,4,1,32]
23:42:48.554 VERBOSE Msg# 14 Pump1: Pump power off: [16,96,6,1,4,1,32]

23:42:56.850 VERBOSE Msg# 15 Main --> Pump1: @ Save Program 1 as : rpm [96,16,1,4,3,33,0,0,1,62]
23:42:56.874 VERBOSE Msg# 16 Pump1: Speed Set to 0 rpm: [16,96,1,2,0,0,1,24]

23:42:56.917 VERBOSE Msg# 17 Main --> Pump1: @ Pump Timer 1 : minutes [96,16,1,4,3,43,0,1,1,73]
23:42:57.462 VERBOSE Msg# 18 Pump1: Speed Set to 1 rpm: [16,96,1,2,0,1,1,25]

23:42:57.996 VERBOSE Msg# 19 Main --> Pump1: @ Save Program 1 as 750 : rpm [96,16,1,4,3,39,2,238,2,52]
23:42:58.013 VERBOSE Msg# 20 Pump1: Speed Set to 750 rpm: [16,96,1,2,2,238,2,8]

23:42:58.050 VERBOSE Msg# 21 Main --> Pump1: @ Save Program 2 as 1740 : rpm [96,16,1,4,3,40,6,204,2,23]
23:42:58.073 VERBOSE Msg# 22 Pump1: Speed Set to 1740 rpm: [16,96,1,2,6,204,1,234]

23:42:58.149 VERBOSE Msg# 23 Main --> Pump1: @ Save Program 3 as 2000 : rpm [96,16,1,4,3,41,7,208,2,29]
23:42:58.173 VERBOSE Msg# 24 Pump1: Speed Set to 2000 rpm: [16,96,1,2,7,208,1,239]

23:42:58.249 VERBOSE Msg# 25 Main --> Pump1: @ Program 4 as 3250 : rpm [96,16,1,4,3,42,12,178,2,5]
23:42:58.273 VERBOSE Msg# 26 Pump1: Speed Set to 3250 rpm: [16,96,1,2,12,178,1,214]

23:42:58.347 VERBOSE Msg# 27 Main --> Pump1: Remote control (turn off pump control panel): [96,16,4,1,255,2,25]
23:42:58.371 VERBOSE Msg# 28 Pump1: In remote control: [16,96,4,1,255,2,25]

23:42:58.446 VERBOSE Msg# 29 Main --> Pump1: Pump power to off: [96,16,6,1,4,1,32]
23:42:58.501 VERBOSE Msg# 30 Pump1: Pump power off: [16,96,6,1,4,1,32]

23:42:58.549 VERBOSE Msg# 31 Main --> Pump1: @ Save Program 1 as : rpm [96,16,1,4,3,33,0,0,1,62]
23:42:58.573 VERBOSE Msg# 32 Pump1: Speed Set to 0 rpm: [16,96,1,2,0,0,1,24]

23:43:07.953 VERBOSE Msg# 33 Main --> Pump1: @ Pump Timer 1 : minutes [96,16,1,4,3,43,0,1,1,73]
23:43:07.972 VERBOSE Msg# 34 Pump1: Speed Set to 1 rpm: [16,96,1,2,0,1,1,25]

23:43:08.027 VERBOSE Msg# 35 Main --> Pump1: @ Save Program 1 as 750 : rpm [96,16,1,4,3,39,2,238,2,52]
23:43:08.053 VERBOSE Msg# 36 Pump1: Speed Set to 750 rpm: [16,96,1,2,2,238,2,8]

23:43:08.127 VERBOSE Msg# 37 Main --> Pump1: @ Save Program 2 as 1740 : rpm [96,16,1,4,3,40,6,204,2,23]
23:43:08.153 VERBOSE Msg# 38 Pump1: Speed Set to 1740 rpm: [16,96,1,2,6,204,1,234]

23:43:08.227 VERBOSE Msg# 39 Main --> Pump1: @ Save Program 3 as 2000 : rpm [96,16,1,4,3,41,7,208,2,29]
23:43:08.253 VERBOSE Msg# 40 Pump1: Speed Set to 2000 rpm: [16,96,1,2,7,208,1,239]

23:43:08.326 VERBOSE Msg# 41 Main --> Pump1: @ Program 4 as 3250 : rpm [96,16,1,4,3,42,12,178,2,5]
23:43:08.352 VERBOSE Msg# 42 Pump1: Speed Set to 3250 rpm: [16,96,1,2,12,178,1,214]

23:43:08.422 VERBOSE Msg# 43 Main --> Pump1: Remote control (turn off pump control panel): [96,16,4,1,255,2,25]
23:43:08.451 VERBOSE Msg# 44 Pump1: In remote control: [16,96,4,1,255,2,25]

23:43:08.523 VERBOSE Msg# 45 Main --> Pump1: Pump power to off: [96,16,6,1,4,1,32]
23:43:08.552 VERBOSE Msg# 46 Pump1: Pump power off: [16,96,6,1,4,1,32]

23:43:08.627 VERBOSE Msg# 47 Main --> Pump1: @ Save Program 1 as : rpm [96,16,1,4,3,33,0,0,1,62]
23:43:08.653 VERBOSE Msg# 48 Pump1: Speed Set to 0 rpm: [16,96,1,2,0,0,1,24]


     
EDIT: I did see that this line needed modifying:
 
23:42:58.549 VERBOSE Msg# 31 Main --> Pump1: @ Save Program 1 as : rpm [96,16,1,4,3,33,0,0,1,62]
23:42:58.573 VERBOSE Msg# 32 Pump1: Speed Set to 0 rpm: [16,96,1,2,0,0,1,24]
 
<3><33> is the command to select the pump speed program to use.  <0> for off, <8> for speed 1, etc.  
 
Tag,
 
The next thing I would love to have in your code so that I could abandon my version is the ability to write variables to my ISY (or any system that uses a REST interface).  Here is an extract of the code I inserted to do this in my 'hacked' version of your software. Please understand I am NOT a software person and this was my first ever experience with node.js, so apologies for brute force way I wrote this!
 

//for sending data to ISY
var request = require('request');
var username = "ISY username here";
var password = "ISY password here";
var burl = "http://" + username + ":" + password + "@192.168.1.145/rest/vars/set/2/"; //This is the base URL to send data to the ISY using REST interface


// 14 variables being tracked, 5 from pump (using status command), 9 from controller (sent every 10 seconds)
// from pump status response, when implemented, by sending the packet 165, 0, 96, 16, 7, 0
var pumptime; //clock time reply from pump
var pumphr = 0; //clock time - Hours reply from pump
var pumpmn = 0; //clock time - Minutes reply from pump
var pumptimer = -1; //pump timer (time till shutdown) given by the pump
var pumprun = -1; //start=10, stop=04 reply from pump
var pumprunold;
var pumpwatts = -1; //watts reply from pump
var pumpwattsold = -10;
var pumprpm = -1; //rpm reply from pump
var pumprpmold;

//from controller, sent every 10 seconds by the IntellicomII
var pumpctrlrem = -1; //Remote=255, Local=0 request from Controller
var pumpctrlremold;
var pumpctrlrun = -1; //start=10, stop=04 request from Controller
var pumpctrlrunold;
var pumpctrlspeedepgm = -1; //Speed program(0,1,2,3,4) currently being requested by Controller
var pumpctrlspeedepgmold;
var pumpctrlrpm = -1; //RPM calculated by epgm as requested by controller
var pumpctrlrpmold;
var pumpctrltimer = -1; //Timer in minutes that was sent to the pump (1 minute typically)
var speed1 = -1 //External Program Speed sent from Controller
var speed2 = -1 //External Program Speed sent from Controller
var speed3 = -1 //External Program Speed sent from Controller
var speed4 = -1 //External Program Speed sent from Controller


//send initial values to show program started
url = burl+ "13/" + pumpctrlspeedepgm; //13 = external program active in ISY
request( { url : url }, function (error, response, body) { } );
url = burl+ "15/" + pumpctrlrun; //15 = control setting for 4/16 for pump active in ISY
request( { url : url }, function (error, response, body) { } );
url = burl+ "16/" + pumpctrlrpm; //16 = external program speed active in ISY
request( { url : url }, function (error, response, body) { } );
url = burl+ "24/" + pumprpm; //24 = rpm in ISY
request( { url : url }, function (error, response, body) { } );
url = burl+ "25/" + pumpwatts; //25 = watts in ISY
request( { url : url }, function (error, response, body) { } );

// and here is example of what I did to get run/off variable sent to my ISY in your code:

case 6: //Set run mode
{
if (!responseBool) {
if (logPumpMessages && loglevel) logger.verbose('Msg# %s Run/Stop= %s: %s', counter, data[pumpPacketFields.CMD], JSON.stringify(data));
decoded = true;
pumpctrlrun = data[pumpPacketFields.CMD]
} else {
if (logPumpMessages && loglevel) logger.verbose('Msg# %s %s confirming it is in run _%s_: %s', counter, ctrlString[data[packetFields.FROM]], data[pumpPacketFields.CMD], JSON.stringify(data));
decoded = true;
}
if (pumpctrlrun != pumpctrlrunold) {
pumpctrlrunold = pumpctrlrun;
logger.verbose('ISY sending pumpRUN= %s to ISY', pumpctrlrun )
url = burl+ "15/" + pumpctrlrun; //15 = control setting for 4/16 for pump active in ISY
request( { url : url }, function (error, response, body) { } );
}


break;
}
default:
{
if (logPumpMessages && loglevel) logger.info('Msg# %s is UNKNOWN: %s', counter, JSON.stringify(data));
decoded = true;
}
instruction = data.slice();
}



 
I did a check each time the data comes in (every 10 seconds) to see if the value I want to track in my ISY has changed.  If so, it gets written via REST interface.  
 
The REST url for putting data into the ISY is:
 
http://<usernane>:<password>@ <isy ip address:port>/rest/vars/set/<var-type>/<var-id>/<value>
 
<var-type> is pretty much always 2, which is the type of variable that can trigger programs within the ISY.  So that is fixed. 
<var-id> can be anything from 1 t 255.  Is it the id where the ISY users decides to put the variable they want.  So this value needs to be configurable in your program.
<value> is the value of the paramter from your program that we want to send.
 
blueman2 said:
EDIT: I did see that this line needed modifying:
 
23:42:58.549 VERBOSE Msg# 31 Main --> Pump1: @ Save Program 1 as : rpm [96,16,1,4,3,33,0,0,1,62]
23:42:58.573 VERBOSE Msg# 32 Pump1: Speed Set to 0 rpm: [16,96,1,2,0,0,1,24]
 
<3><33> is the command to select the pump speed program to use.  <0> for off, <8> for speed 1, etc.  
 
Yup, looks like I missed the <3><33><0> command.  That will be easy to add.  And I'll work on the formatting of the messages. so they are more legible.
 
Blueman, can you go over the high level for me?  I know you have the IntelliCom and the ISY and want to do some "man in the middle" thing with this app, but do you want read/write to both of them?  Which one will be primary and which one will be the slave (for lack of a better word)?  I've gone back through a bunch of the posts but I'm still a bit confused on the big picture.  Is ISY only for storing variables and then being able to aggregate/view with the rest of your home automation?  Or do you want to be able to control the pool from either the ISY or the IntelliCom?  And quite a while ago you also referred to a Intermatic Multi-Wave Pool Controller.  Is this either the ISY or the IntelliCom?  Or a completely separate unit?
 
Thanks!  This stuff shouldn't be too hard to add once I can get it all straight in my head.   
 
And, BTW, you comment
Please understand I am NOT a software person and this was my first ever experience with node.js, so apologies for brute force way I wrote this!
applies 100% to me, as well.  I'm sure a true programmer would look at all of this and laugh.  But together we will get it all done!
 
tag
 
First, let me clarify the Intermatic Multi-wave.  The short version: For purposes of your program, Multi-wave = Intellicomm II.  Just ignore when I talk about Intermatic Multi-wave and think Intellicomm II.  Now, for the TL;DR version:  The Multi-wave is a low cost pool controller, similar (but inferior to) the Pentair Intellitouch or Easytouch. It controls different brands of devices, including the Pentair pump.  For the Pentair VS pumps, it acts very much like a Pentair Intellicomm II.  For the purposes of your program, it is sufficient that the software think my Multi-wave is an IntelliComm II.  
 
Now for the ISY:  The ISY is a home automation controller.  TL;DR version: It controls Insteon and z-wave devices and allows you to do some rather interesting programming.  It has if/then capabilities, allows storing and reading variables, and is well integrated into home security systems such as the ELK M1-Gold.  It has a very good REST interface for reading and writing data from/to other systems that support REST.  It is also integrated into the Amazon Echo so that you can turn on lights and check the condition of your house using voice commands (Alexa, ask doors locked? Alexa, Ask pool pump status?  Alexa, turn off pool pump etc...)  Made by a company called Universal Devices.  The current hacked version of your code that I am using successfully updates my ISY so that it knows when the pool pump is on or off, what speed it is running at, and even how many watts are being used.  Based on this data, I run different program such as "If pool pump has not run at speed 3 for 24 hours, send email to me to let me know the pool cleaner did not start".  Speed 3 is the speed of the Pentair that is set to turn on when my pool cleaner runs.  For now, it is just a read only device from the Pentair system.  Which really is 80%+ of what I need.  However, I would LOVE to make it also a write device so that my ISY can send a command to your software to turn my pump on or off and to a specific speed.  This is where the 'man in the middle' issue comes up.
 
It is my goal that the ISY and the Multi-wave/Intellicomm are able to be controllers for the pump, though only one of them at a time, of course.  .  
 - When the Multi-wave is in control it is sending commands to the pump, the pump is replying to those commands confirming it got them, your program is logging the commands and sending the data to my ISY so that the ISY knows what is going on.  This is what I am able to do today with the hacked version of your code.  
 - When the ISY is in control, it has the ability to turn the pump on and off and set a speed.  For this to happen, you need to fool the Multi-wave into thinking it is still talking to the pump.  you do this by sending the proper responses to any commands the multi-wave gives.But your program does NOT relay them to the Pump.  Instead, it takes commands from the ISY for pump control.  
 
This sort of trickery is need because the Mult-wave is a write only device.  It cannot take commands to turn pump on or off from the RS-485 interface.  This is very different from the Intellitouch, which can be told to turn a pump off and it takes care of talking to the pump to make that happen.  
 
blueman2 said:
I probably should start another thread on this or add to the Hayward controllerbut I just realized my Hayward Salt Chlorinator unit has RS485 too.  Some people have done work to decode the Controller comm traffic, but apparently no one has done any work understanding the communication between the Hayward controller and the Hayward Salt Chlorinator.  More puzzle work ahead!
Hi,
I also have the Hayward Aqua rite connected to my Hayward Oncommand with the rs485. So I can control it and get status. I tried to decode the data on the bus but it looks like it's not following the 10 02 .,, 10 03 start and end. Have you been able to control the Aqua Rite via rs485?
I want to get rid of the Oncommand and it's the only part missing (using Raspberry with Rexcontrols to control pump snd solar).
cheers
fred
 
tag said:
......
Thanks!  This stuff shouldn't be too hard to add once I can get it all straight in my head.
Tag, just recopying the thoughts on addresses we might use to deploy the 'man in the middle' concept:
 
Intellicom II               
Physical                   Virtual                    Virtual                 Physical  
Controller     <==>    Pump      <==>    Controller   <==>   Pump
@ 0x10                   @ 0x60                   @0x11                @0x61 
 
I did realize that the Intellicomm II is hard coded to be 16 and is hard coded for the pump being 96.    So I changed the ports above to what it will need to be for the Intellicom to work.  
 
Virtual Pump @ 96:
 - Normal Mode: Take control packets from the Intellicomm, provide the required response packet so that the Intellicomm thinks all is OK, then write the data from the packets to the ISY using REST so that the ISY knows what the intellicom is doing, and finally pass the packets to the Virtual controller for forwarding to the Physical pump 
 - Override Mode: same as above, but do not pass the packets along to pump at 97.  Just throw them away.  
 
Virtual Controller @ 17: 
 - Normal Mode: This will take packets from the virtual pump when in normal mode and send them to the Physical pump.  
 - Override Mode: This will take commands from the ISY from REST interface for pump speed program <3><33> to allow the ISY to control the pump speed.  Send them to the pump and handle the response.
 
 
 
farcouet said:
Hi,
I also have the Hayward Aqua rite connected to my Hayward Oncommand with the rs485. So I can control it and get status. I tried to decode the data on the bus but it looks like it's not following the 10 02 .,, 10 03 start and end. Have you been able to control the Aqua Rite via rs485?
I want to get rid of the Oncommand and it's the only part missing (using Raspberry with Rexcontrols to control pump snd solar).
cheers
fred
 
 did hook up my RS485 sniffer to the AquaRite, but did not get any traffic from it at all. All my google searches for AquaRite comms failed to find anything.  I would love it if we could figure that one out!
 
blueman2 said:
 did hook up my RS485 sniffer to the AquaRite, but did not get any traffic from it at all. All my google searches for AquaRite comms failed to find anything.  I would love it if we could figure that one out!
 
 
Tag, just recopying the thoughts on addresses we might use to deploy the 'man in the middle' concept:
 
Intellicom II               
Physical                   Virtual                    Virtual                 Physical  
Controller     <==>    Pump      <==>    Controller   <==>   Pump
@ 0x10                   @ 0x60                   @0x11                @0x61 
 
I did realize that the Intellicomm II is hard coded to be 16 and is hard coded for the pump being 96.    So I changed the ports above to what it will need to be for the Intellicom to work.  
 
Virtual Pump @ 96:
 - Normal Mode: Take control packets from the Intellicomm, provide the required response packet so that the Intellicomm thinks all is OK, then write the data from the packets to the ISY using REST so that the ISY knows what the intellicom is doing, and finally pass the packets to the Virtual controller for forwarding to the Physical pump 
 - Override Mode: same as above, but do not pass the packets along to pump at 97.  Just throw them away.  
 
Virtual Controller @ 17: 
 - Normal Mode: This will take packets from the virtual pump when in normal mode and send them to the Physical pump.  
 - Override Mode: This will take commands from the ISY from REST interface for pump speed program <3><33> to allow the ISY to control the pump speed.  Send them to the pump and handle the response.
 
Hi,
 
Yes I am getting traffic. My setup is Hayward OnCommand connected with the Hayward Aqua rite chlorinator by RS485. My pump is simple two speed pump without any data control (so connected via 2 relays).
 
I did a capture with the LCD pannel disconnected from the OnCommand so there is less garbage with the capture. The only thing I do not understand is it looks like that the only new packet are not using the standard end and start sequence. Here is an example On that example if the Chlorinator is enabled in the panel but disconnected the 3 line is truncated (so I think that it's the reply from the Chlorinator). I have tried to send them maully with realterm but if the pannel is disconnected there is nothing coming back from Chlorinator. I have seen that speed is supposed to be 19200 and that's what I have setup. I am using Monitor studio (free version) to capture everything.
 
I also tried with the raspberry PI (with the same usb adaptor) and the aquadisplay.py and I get the same things.
 
I also tried to change the mode on the Aquarite. Flow seems to be the same for AL0-0 to AL-4. With AL-5 I get Chlorinator error displayed on the Oncommand.
 
I can upload the whole stream that i have captured from the poweron and then couple of minutes (not sure where to send it).  I captured it in both hex and decoded. Let me know where I can send it. My email is farcouet at yahoo dot es. I would also be very happy to get this working to integrate with my controller that I am working on with the Raspberry Pi. It would nice also to integrate it with the ISY but that's another step that will come later maybe.
 
 
00156274    2016-09-18 12:31:37.6470928    +0.0000026    IRP_MJ_READ    UP    0x00000000    00     .
00156292    2016-09-18 12:31:37.6483578    +0.0000022    IRP_MJ_READ    UP    0x00000000    81 18     ..
00156310    2016-09-18 12:31:37.6642110    +0.0000030    IRP_MJ_READ    UP    0x00000000    80 00 d9 06 03 fe 80 18 e0 00 81 1e 80 00 c1 18 80 00 18 83     ....................
00156324    2016-09-18 12:31:37.6803440    +0.0000021    IRP_MJ_READ    UP    0x00000000    00 06 00 60 9e 00 60 00     ...`..`.
 
Here is some of the things I get at the poweron. It takes 5 seconds for the Aquarite to indicate remotely controlled.
 
00001231    2016-09-18 12:18:15.2195988    +0.0000065    IRP_MJ_READ    UP    0x00000000    10 02 02 09 00 1d 10 03     ........
00001239    2016-09-18 12:18:15.2516389    +0.0000085    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001250    2016-09-18 12:18:15.2663260    +0.0000055    IRP_MJ_READ    UP    0x00000000    00 e0 18     ...
00001274    2016-09-18 12:18:15.2806630    +0.0000073    IRP_MJ_READ    UP    0x00000000    80 00 d9 00 18 9e 00 c1 1e 00 00 c1 18 80 00 06 80     .................
00001290    2016-09-18 12:18:15.2965166    +0.0000026    IRP_MJ_READ    UP    0x00000000    00 00 1e 60 00 60 00 10 02 01 02 04 00 00 00 00     ...`.`..........
00001303    2016-09-18 12:18:15.3125345    +0.0000021    IRP_MJ_READ    UP    0x00000000    00 00 00 00 19 10 03 10 02 01 03 20 20 20 20 20 20 44 65 66 …    ...........      Def…
00001311    2016-09-18 12:18:15.3285217    +0.0000017    IRP_MJ_READ    UP    0x00000000    20 20 20 20 20 20 20 20 20 20 20 20 20 4d 65 6e 75 20 20 20 …                 Menu   …
00001319    2016-09-18 12:18:15.3445277    +0.0000022    IRP_MJ_READ    UP    0x00000000    00 10 03 10 02 01 01 00 14 10 03     ...........
00001327    2016-09-18 12:18:15.3765182    +0.0000025    IRP_MJ_READ    UP    0x00000000    10 02 01 02 00 00 00 00 00 00 00 00 00 15     ..............
00001335    2016-09-18 12:18:15.3926298    +0.0000022    IRP_MJ_READ    UP    0x00000000    10 03     ..
00001347    2016-09-18 12:18:15.4566322    +0.0000026    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001359    2016-09-18 12:18:15.5527804    +0.0000064    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001371    2016-09-18 12:18:15.6487803    +0.0000039    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001383    2016-09-18 12:18:15.7448506    +0.0000060    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001395    2016-09-18 12:18:15.8409578    +0.0000073    IRP_MJ_READ    UP    0x00000000    10     .
00001403    2016-09-18 12:18:15.8571053    +0.0000060    IRP_MJ_READ    UP    0x00000000    02 01 01 00 14 10 03     .......
00001415    2016-09-18 12:18:15.9529592    +0.0000060    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001427    2016-09-18 12:18:16.0490438    +0.0000064    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001439    2016-09-18 12:18:16.1449439    +0.0000030    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001451    2016-09-18 12:18:16.2410968    +0.0000073    IRP_MJ_READ    UP    0x00000000    10     .
00001459    2016-09-18 12:18:16.2569886    +0.0000039    IRP_MJ_READ    UP    0x00000000    02 01 01 00 14 10 03     .......
00001467    2016-09-18 12:18:16.2730819    +0.0000043    IRP_MJ_READ    UP    0x00000000    10 02 04 07 00 1d 10 03     ........
00001475    2016-09-18 12:18:16.3050621    +0.0000047    IRP_MJ_READ    UP    0x00000000    10 02 01 02 00 00 00 00 00 00 00 00 00 15 10 03 10 02 01 03 …    ....................…
00001482    2016-09-18 12:18:16.3210655    +0.0000026    IRP_MJ_READ    UP    0x00000000    44 65 66 61 75 6c 74 20 20 20 20 20 20 20 20 20 20 20 20 20 …    Default             …
00001491    2016-09-18 12:18:16.3370073    +0.0000022    IRP_MJ_READ    UP    0x00000000    20 20 20 20 20 20 00 08 10 00 10 03           ......
00001499    2016-09-18 12:18:16.3529995    +0.0000021    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001507    2016-09-18 12:18:16.3851773    +0.0000021    IRP_MJ_READ    UP    0x00000000    10 02 01 02 2a 00 00 00 00 00 00 00 00 3f 10 03     ....*........?..
00001519    2016-09-18 12:18:16.4491507    +0.0000043    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001531    2016-09-18 12:18:16.5451792    +0.0000038    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001543    2016-09-18 12:18:16.6411563    +0.0000021    IRP_MJ_READ    UP    0x00000000    10 02 01     ...
00001551    2016-09-18 12:18:16.6571820    +0.0000021    IRP_MJ_READ    UP    0x00000000    01 00 14 10 03     .....
00001563    2016-09-18 12:18:16.7533122    +0.0000055    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001575    2016-09-18 12:18:16.8492688    +0.0000029    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001587    2016-09-18 12:18:16.9453418    +0.0000034    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001599    2016-09-18 12:18:17.0414537    +0.0000056    IRP_MJ_READ    UP    0x00000000    10 02 01 01     ....
00001607    2016-09-18 12:18:17.0574767    +0.0000205    IRP_MJ_READ    UP    0x00000000    00 14 10 03     ....
00001619    2016-09-18 12:18:17.1535651    +0.0000060    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001631    2016-09-18 12:18:17.2495880    +0.0000073    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001642    2016-09-18 12:18:17.2640497    +0.0000056    IRP_MJ_READ    UP    0x00000000    00     .
00001660    2016-09-18 12:18:17.2663936    +0.0000064    IRP_MJ_READ    UP    0x00000000    c1 18 00 00     ....
00001686    2016-09-18 12:18:17.2814574    +0.0000030    IRP_MJ_READ    UP    0x00000000    e6 06 83 00 1e 1e 60 f0 0f 80 00 60 06 c0 00 18 60 00     ......`....`....`.
00001702    2016-09-18 12:18:17.2975661    +0.0000030    IRP_MJ_READ    UP    0x00000000    06 00 60 9e 00 60 00     ..`..`.
00001715    2016-09-18 12:18:17.3456831    +0.0000068    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
00001727    2016-09-18 12:18:17.4415739    +0.0000026    IRP_MJ_READ    UP    0x00000000    10 02 01 01     ....
00001735    2016-09-18 12:18:17.4574913    +0.0000025    IRP_MJ_READ    UP    0x00000000    00 14 10 03     ....
00001747    2016-09-18 12:18:17.5536815    +0.0000060    IRP_MJ_READ    UP    0x00000000    10 02 01 01 00 14 10 03     ........
 
 
Hummm got it... Weird product this thing!  The whole bus is running at 19200 BUT when it goes to the chlorinator it sends at 9600!!!  So no wonder why it looked so weird!  When I was setting at 9600 I had just junk or almost. At 19200 it's working well but the packet for the Chlorinator and from the Chlorinator made no sense and I was not able to send them back...

I just tried to put my laptop in the middle with two USB RS485 adaptors. At 19200 there was just stuff from the Oncommand. I decided to bridge at 9600 and then voila I got couple of packets out of all garbage that made sense and I could see the chlorinator replying! Who could believe they just decided to use two different speeds for the same bus!

Set at 15% (to chlorinator) 10 02 50 11 0f 82 10 03
Reply from chlorinator 10 02 00 12 40 00 64 10 03
So the 12 byte (0f) is the percentage directly converted...

20%
10 02 50 11 14 87 10 03
10 02 00 12 40 00 64 10 03

Superchlorinate:
10 02 50 11 65 d8 10 03
10 02 00 12 40 00 64 10 03

Now I need to see where is the ppm coming back
 
farcouet said:
Hummm got it... Weird product this thing!  The whole bus is running at 19200 BUT when it goes to the chlorinator it sends at 9600!!!  So no wonder why it looked so weird!  When I was setting at 9600 I had just junk or almost. At 19200 it's working well but the packet for the Chlorinator and from the Chlorinator made no sense and I was not able to send them back...

I just tried to put my laptop in the middle with two USB RS485 adaptors. At 19200 there was just stuff from the Oncommand. I decided to bridge at 9600 and then voila I got couple of packets out of all garbage that made sense and I could see the chlorinator replying! Who could believe they just decided to use two different speeds for the same bus!

Set at 15% (to chlorinator) 10 02 50 11 0f 82 10 03
Reply from chlorinator 10 02 00 12 40 00 64 10 03
So the 12 byte (0f) is the percentage directly converted...

20%
10 02 50 11 14 87 10 03
10 02 00 12 40 00 64 10 03

Superchlorinate:
10 02 50 11 65 d8 10 03
10 02 00 12 40 00 64 10 03

Now I need to see where is the ppm coming back
 
Brilliant work!  My first thought was baud rate, but seeing the 10 02 and 10 03 from the controller made me assume it was correct.  I have never seen 2 baud rates used at one time before.  Nice detective work!!!!
 
BTW, this is also nice because the Pentair runs at 9600 baud.  So this makes working with that system and the AquaRite on the same bus much easier.  
 
EDIT: Interesting that for the AquaRite, they have a different command structure than their controller normally uses.  Typically, it the 2 hex numbers before the ending 10 03 are the MSB and LSB of the checksum.  But in this case, there is only LSB.  I guess this is enough given the smaller packet size?    in any case, nice work on this.  
 
I had the damndest (is that a word?) problem over the past week+ that I just figured out.  My packets used to start 255,0,255,165,10,DEST,SRC,etc.
For whatever reason, the 10 packed changed to a 16.  I have no idea why... it just did.  Now the app reads this byte from the existing packet and simply mimics it.  Very, very strange and I've scratched a bald spot on my head figuring it out.  
 
I posted my latest 0.1.0 to Github for your viewing pleasure. 
 
Blueman, I've changed around the logic for the pumps a bit.  See if they make more sense on your end for now.  I also haven't given a whole lot of thought, yet, to your 'man in the middle' challenge.  Some things are mulling in my head but this inane problem I faced was eating up my brain cycles.
 
farcouet, welcome, and nice job contributing!  What's interesting is that a similar discussion to this has also picked up on a thread I originally used for my research at SDYoung's blog.  I think we are a little ahead of them, but we should all put our heads together.  I'll ping them as well to point them here and to my code.
 
tag
 
Hi all,  
 
as much as I love coming here, this thread is getting too unwieldy to try to collaborate effectively.  I setup a new community based on Gitter.im @ https://gitter.im/pentair_pool/Lobby.  We can have separate rooms for each of the functional areas (home automation (ISY/HomeBridge/Echo/etc), pumps, IntelliTouch, IntelliComII, etc.  I'll keep an eye on this thread, but I think we can be more effective working in realtime.  
 
I've also invited many others who are working on the Pentair bus so having a central place to collaborate will be a huge step forward for everyone.  
 
tag
 
tag said:
Hi all,  
 
as much as I love coming here, this thread is getting too unwieldy to try to collaborate effectively.  I setup a new community based on Gitter.im @ https://gitter.im/pentair_pool/Lobby.  We can have separate rooms for each of the functional areas (home automation (ISY/HomeBridge/Echo/etc), pumps, IntelliTouch, IntelliComII, etc.  I'll keep an eye on this thread, but I think we can be more effective working in realtime.  
 
I've also invited many others who are working on the Pentair bus so having a central place to collaborate will be a huge step forward for everyone.  
 
tag
Yeah, I was thinking the same thing while going through all the different threads and posts here on on GitHub and other places. I will definitely join you there.  
 
BTW, could it be the dec2bin function I saw in your code?  Sounds like you have the opposite happening though.  
 
Anyway, see you over on the other site.    
 
blueman2 said:
Yeah, I was thinking the same thing while going through all the different threads and posts here on on GitHub and other places. I will definitely join you there.  
 
BTW, could it be the dec2bin function I saw in your code?  Sounds like you have the opposite happening though.  
 
Anyway, see you over on the other site.    
See you over there... And I have definitely made some stupid mistakes, but it WAS working with the 10.  And I'm not referencing the dec2bin function anywhere so it couldn't be that.
 
Back
Top