Pentair Pool Equipment

I have built a plugin to control your pool equipment without an Autelis device. It uses a Raspberry Pi and a RS-485 converter to communicate with IntelliCenter, IntelliTouch, EasyTouch and standalone pool pumps and chlorinators.

You can find the Pi interface at

and the plugin at

3 Likes

Very interesting. I have a piscine laghetto (astralpool) and I’m struggling to get support from the manufacturer. I hope to get a serial connection some day, and I will definitely look at your code/guidance for inspiration!

Nice. Now I have to order a Pi and 485!

Not sure of what to make of that hardware. According to the marketing material it looks like it uses RS485 to communicate with the pumps and chlorinators. The relay outputs look similar to Jandy and Pentair in that they use a low voltage xformer attached to high voltage relays. Even the lighting docs indicate the same on/off/on sequence for setting the themes and colors. Sometimes I wonder if all this gear is just re-branded from some unknowable source.

I suppose that depends on your definition of “source” :grinning:

1 Like

Maybe not illuminati but a distant cousin maybe.

Unfortunately mine is manufactured here (even if they’re a group) and I can’t seem to find the data sheet. Two summers ago they mentioned a serial port because they were toying with the idea of an add-on. I should call them and convince to give me the details about the serial port.

so, I was able to track it back to a local manufacturer. they kindly sent me a diagram and I notice that it’s a re-branded device with a ModBus port on it. Serial to USB adapter ordered, can’t wait to hack this thing :slight_smile: It was on the backlog since 2 years, thanks @rstrouse for giving me the motivation :wink:

2 Likes

Good Luck. If the controller interfaces with VS/VF pumps and chlorinators its probably half-duplex RS485. The pumps and chlorinators form many manufacturers seem to be pretty standard in their protocols so you may learn something from nodejs-poolController.

In Europe Pentair sells pool control equipment under the name Intellipool. Does this plugin also work with Intellipool?

The original board seems to offer things that are probably disabled on this version. We’ll see. The model is Mopo Pro by Astrel Group.

I have already sent a couple of messages to friends working on the field, so I hope to be able to integrate this. I’ll definitely take a look at the project, even if I’ll place a raspberry with .net core near the controller and write some api as you did.

I don’t know as I have never seen one of these. It communicates with the same equipment so there is a good chance that it might. Maybe a bit less committal than you were looking for but all I can say is try it. If an rs485 port can be found poolController will listen to see if the messages are recognized.

Yeah the api is written in node. The pi is probably your best bet. Once you have it listening it is simply a matter of decoding the chatter.

Hello Robert,

Greatly appreciative of all your efforts and fantastic documentation on github for this project. Have been able to cobble it all together so far - nodejs on pi, poolController, poolController-dashPanel. All good.

Last part integrating with Vera is proving to be a challenge.

I have the same problem as the github issue reported previously. Uploaded files to Vera, created device, but no luck getting the services to connect. The following is in the Vera Plus LuaUPnP.log

01 04/04/21 11:21:58.015 LuaInterface::CallFunction_Startup-1 device 118 function pcpInitialize failed [string “–…”]:184: attempt to index global ‘self’ (a nil value) <0x76cda520>
01 04/04/21 11:21:58.016 LuImplementation::StartLua running startup code for 118 I_PoolController.xml failed <0x76cda520>

I verified all the files are on Vera ok, not corrupted. Device creation succeeds ok, and when hitting “Configure” in the created device, I select “Keep Equipment Together” and enter the correct IP. I have tried both the server IP and server ip:4200. Of note, each time I enter “Configure” it is a blank screen, does not appear to store the prior entries.

Logs have the following repeating as well for the calls to Vera
10 04/04/21 11:23:40.803 mg_callback from IP:192.168.50.143:59562 /data_request id=action&DeviceNum=118&serviceId=urn:rstrouse-com:serviceId:PoolController1&action=SetEventData&targetData=lightGroup start id: 37 <0x73266520>
12 04/04/21 11:23:40.804 luvd_get_info_data_request starting /data_request?id=action&DeviceNum=118&serviceId=urn:rstrouse-com:serviceId:PoolController1&action=SetEventData&targetData=lightGroup pMem 0x1485000/21516288 diff: 11161600 <0x73266520>
08 04/04/21 11:23:40.805 JobHandler_LuaUPnP::HandleActionRequest device: 118 service: urn:rstrouse-com:serviceId:PoolController1 action: SetEventData <0x73266520>
08 04/04/21 11:23:40.806 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=118 <0x73266520>
02 04/04/21 11:23:40.807 Device_LuaUPnP::HandleActionRequest 118 not ready 0xb5eb98 <0x73266520>
02 04/04/21 11:23:40.808 JobHandler_LuaUPnP::RunAction device 118 action urn:rstrouse-com:serviceId:PoolController1/SetEventData failed with -911/Device not ready <0x73266520>
10 04/04/21 11:23:40.808 luvd_get_info_data_request creating file buffer /data_request?id=action&DeviceNum=118&serviceId=urn:rstrouse-com:serviceId:PoolController1&action=SetEventData&targetData=lightGroup pMem 0x1485000/21516288 diff: 11161600 <0x73266520>
10 04/04/21 11:23:40.809 luvd_get_info_data_request done /data_request?id=action&DeviceNum=118&serviceId=urn:rstrouse-com:serviceId:PoolController1&action=SetEventData&targetData=lightGroup ret 0 size 23 pMem 0x1485000/21516288 diff: 11161600 took 0 info (nil) <0x73266520>
10 04/04/21 11:23:42.911 mg_callback from IP:192.168.50.143:59564 /data_request id=action&DeviceNum=118&serviceId=urn:rstrouse-com:serviceId:PoolController1&action=SetEventData&targetData=controller start id: 39 <0x734da520>
12 04/04/21 11:23:42.911 luvd_get_info_data_request starting /data_request?id=action&DeviceNum=118&serviceId=urn:rstrouse-com:serviceId:PoolController1&action=SetEventData&targetData=controller pMem 0x1485000/21516288 diff: 11161600 <0x734da520>
08 04/04/21 11:23:42.913 JobHandler_LuaUPnP::HandleActionRequest device: 118 service: urn:rstrouse-com:serviceId:PoolController1 action: SetEventData <0x734da520>
08 04/04/21 11:23:42.914 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=118 <0x734da520>
02 04/04/21 11:23:42.915 Device_LuaUPnP::HandleActionRequest 118 not ready 0xb5eb98 <0x734da520>
02 04/04/21 11:23:42.916 JobHandler_LuaUPnP::RunAction device 118 action urn:rstrouse-com:serviceId:PoolController1/SetEventData failed with -911/Device not ready <0x734da520>
10 04/04/21 11:23:42.916 luvd_get_info_data_request creating file buffer /data_request?id=action&DeviceNum=118&serviceId=urn:rstrouse-com:serviceId:PoolController1&action=SetEventData&targetData=controller pMem 0x1485000/21516288 diff: 11161600 <0x734da520>
10 04/04/21 11:23:42.917 luvd_get_info_data_request done /data_request?id=action&DeviceNum=118&serviceId=urn:rstrouse-com:serviceId:PoolController1&action=SetEventData&targetData=controller ret 0 size 23 pMem 0x1485000/21516288 diff: 11161600 took 0 info (nil) <0x734da520>

It would appear there is a problem in I_PoolController.xml. Any suggestions?

Thanks

Matt
I_PoolController.xml.pdf (47.4 KB)

Matt,

I will have a look at this. Perhaps there is a variable that is uninitialized if status data hasn’t come back from njspc yet. For sure if the configuration is not being saved then that will cause this.

Matt,

I replicated the issue on my test device and managed to figure out what was happening. Turns out the code was attempting to call a lua method that no longer seems to work in Vera. I have replaced this with a working API method. Get a new L_PoolController.lua and upload it to your vera via Develop Apps → Luup Files. This should automatically restart luup. After luup has reloaded go into the Pool Controller configuration and set the IP address for njspc. Remember this part must be done locally and cannot be done through the ezlo relay servers.

Finally got around to trying this out. Downloaded new lua, uploaded to Vera and restarted. The config now remembers the ip setting but still has problems, doesn’t detect the pool devices. Full reboot, no improvement. Deleted device, uploaded all 30 files, created device, updated config.json with new device #, redid the config with IP. Near as I can tell from Vera log, data is being sent from the pool controller and is being seen/received by Vera but it’s not getting processed. The pool device in Vera is updating temperatures, heat mode, set points etc but that’s it. The main pool device in Vera shows “Ready” and “Auto”. Once in a while I’ll see an “Error Getting State 7” but its infrequent and usually follows an engine reload. For the last round I even restarted poolController and the dashPanel on the pi. No luck. Running njsPC 6.5.1 - noticed you updated to 7.0.0. Also, i’m running this on a persnickety Vera Secure, latest firmware. Known issues, for example I often need to manually reload engine or full reboot to get settings to take. Usually a minor workaround. Let me know if you want access, logs etc. Making progress… Thanks for pursuing

Matt

Grep for “^01” error codes in log reveals the following:

01 04/17/21 9:59:25.357 LuaInterface::CallFunction_Job device 122 function SPoolController_PoolController1_SetEventData_job failed [string “–…”]:1058: attempt to concatenate a table value <0x770ce320>
01 04/17/21 9:59:25.357 Lua_Job::Run job#3683 : dev:122 (0x18b5340) P:50 S:0 Id: 3683 failed <0x770ce320>
01 04/17/21 9:59:25.364 LuaInterface::CallFunction_Job device 122 function SPoolController_PoolController1_SetEventData_job failed [string “–…”]:1058: attempt to concatenate a table value <0x770ce320>
01 04/17/21 9:59:25.364 Lua_Job::Run job#3685 : dev:122 (0x194f0c8) P:50 S:0 Id: 3685 failed <0x770ce320>
01 04/17/21 10:00:00.307 LuaInterface::CallFunction_Job device 122 function SPoolController_PoolController1_SetEventData_job failed [string “–…”]:1058: attempt to concatenate a table value <0x770ce320>
01 04/17/21 10:00:00.308 Lua_Job::Run job#3692 : dev:122 (0x18e4128) P:50 S:0 Id: 3692 failed <0x770ce320>

Lots of examples in log similar to this one where requests are being processed:

08 04/17/21 10:46:30.422 JobHandler_LuaUPnP::HandleActionRequest device: 122 service: urn:rstrouse-com:serviceId:PoolController1 action: SetEventData <0x7301c520>
08 04/17/21 10:46:30.423 JobHandler_LuaUPnP::HandleActionRequest argument {“id”:192,“isActive”:true,“name”:“Intellibrite”,“type”:{“val”:3,“name”:“intellibrite”,“desc”:“IntelliBrite”},“action”:{“val”:0,“name”:“ready”,“desc”:“Ready”},“equipmentType”:“lightGroup”,“circuits”:[],“lightingTheme”:{“val”:196,“name”:“white”,“desc”:“White”,“type”:“intellibrite”}}= <0x7301c520>
08 04/17/21 10:46:30.423 JobHandler_LuaUPnP::HandleActionRequest argument DeviceNum=122 <0x7301c520>
08 04/17/21 10:46:30.423 JobHandler_LuaUPnP::HandleActionRequest argument serviceId=urn:rstrouse-com:serviceId:PoolController1 <0x7301c520>
08 04/17/21 10:46:30.423 JobHandler_LuaUPnP::HandleActionRequest argument action=SetEventData <0x7301c520>
08 04/17/21 10:46:30.423 JobHandler_LuaUPnP::HandleActionRequest argument targetData=lightGroup <0x7301c520>
50 04/17/21 10:46:30.427 luup_log:122: Setting Data target for: 122 to lightGroup <0x770ce320>
04 04/17/21 10:46:30.430 <0x770ce320>

Matt

So it looks like njspc is sending data to the plugin. What is odd is that the plugin is not creating its children. The error on line 1058 is because of this. I completely wiped out the plugin and reinstalled with the latest firmware and it went off without a hitch.

That being said, can you upload your poolConfig.json and a luup log during a luup reload. Clearly, the plugin isn’t digesting the information that is returned.

Looking deeper into this the issue is with the Error Getting State 7. 7 is the httpCode that is returned from inet.wget. This should be returning the output from http://[your njspc ip]:4200/state/all

What happens when you type this into a browser? Does it return any data?