nodejs-PoolController Integration

If you own a pool, do yourself a favor and check out the amazing project nodejs-PoolController. It allowed me to automate my pool (Hayward VS pump, Aquarite SWG, ColorLogic lights, and Hayward Heat Pump) on the cheap. My controller is basically a raspberry pi, dual rs485 hat, and a 4-relay module. I’m saving a ton in electricity by doing things like only ramping up the pump when the heater needs to run and creating a schedule for everything else.

I have created an integration to interact with nodejs-PoolController called njsPC-HA. It is installed via HACS after adding the url as a custom repository. I have released the initial release knowing I have to clean up some code, but I wanted to get it out there. The repository can be found here:

The heaters have a HVAC mode of AUTO always and are controlled through the preset modes so they can match up with njsPC. The colorshows for lights are found as effects for the light.


image

1 Like

The custom component has been updated to:

  • Add a few sensors
  • Only rely on climate presets for when more than one non-off option is available
  • Support cooling for heaters that have it enabled
  • Unavailable/available based on njs-pc connection

If you end up using this, let me know how its going, things that don’t work properly, or things you’d like to see added. Thanks.

Updated to v0.3.4.

Changes:

  • Add support for superChlorHours
  • Add support for light commands as buttons (color sync, recall, hold, etc).
  • Home Assistant minimum of 2022.7.0 due to number entity requirements

Thanks for making this.

In the process of setting up a Pi3 with njsPC. Once I have that going, I’ll install this and give it a go with my SWG.

Randy

Thanks a bunch for setting this up! I did run into a few issues that required modifying some code:

  1. Pool controller config or state may be a little unexpected. At one point, under temp/bodies it was reporting a “phantom” body without an ID. Another time, the spa body did not have “temp” assigned. And one last, under pumps, the flow was set to zero (I have no VF pumps), but the minFlow/maxFlow rates were not defined. I’d recommend including some key validation in places.

  2. Had some issues with getting the climate entities to function. In async_set_hvac_mode it sends poolcontroller val 1 for off, and > 1 otherwise. I needed to decrement that to 0 for off, and 1 for heater.

@zzachattack2 Yeah, definitely need to add some key validation on it. It started out as just a project for my stuff then expanded from there.

Can you show your response from a GET request to http://<ipaddress>:4200/config/body/1/heatModes? That way I can see what your system is looking for. Thanks. Mine looks like this [{"val":1,"name":"off","desc":"Off"},{"val":9,"name":"heatpump","desc":"Heat Pump"}]

Sorry for the late response… I somehow didn’t see that you had replied.

My config for heat modes is [{"val":0,"name":"off","desc":"Off"},{"val":1,"name":"heater","desc":"Heater"}]

@zzachattack2 I just pushed out v0.4.0 that hopefully will take care of your heater issue. Let me know how it works. Thanks.

I am really interested in this. We have a pentair easytouch 4 (nothing fancy - we have lights, a pump and will get a heater next year). I have heard nightmares about the Screenlogic controls (especially on android) and performance. So controlling the lights, our variable pump speeds/schedule, seeing the temp, turning on the heater when we want…that’s about all I would ever want!

Do I need to be an expert coder for this to get it working (I last coded in fortran in grad school, so…)? How about making sure I get the right Pi and connect it properly? I don’t see the instructions for connections into the comms so I want to get it right and not mess up my system. Thank you big time in advance.

Lots of help here to get you going. With an ET4 you simply need a Raspberry Pi and an RS485 adapter. There are tons of articles in the Wiki for more advanced installs.

2 Likes

@Crewski Hi David, thank you so much for this component, I’m waiting for my new Aquarite+ and pump to be delivered so I can try to control them with nodejs-PC and your integration.

I was going to the MQTT autodiscovery route but it seemed too confusing and not very well maintained, luckily you chimed in that discussion and I found this.

I opened a discussion because I have some doubts on the connections and on some functionalities: Hayward Aquarite+ SV (AQR-PLUS-SV33ST) + Hayward SuperPump SP2622XW251 + Home Assistant · tagyoureit/nodejs-poolController · Discussion #805 · GitHub

Can’t wait to tinker with all this. :slight_smile:

@Crewski thanks for this excellent integration! Here’s the dashboard I created using this integration.

Trying to keep this as simple as possible. I only need Aquarite to Home Assistant. Can I just connect from a Pi’s USB port to the Hayward using a USB to RS485 adapter?

Pretty much. My aquarite salt cell needs to be powered by a 10V (I forget what the actual range is), so keep that in mind as you’ll need something for that. I have mine powered with 12V. Also you’ll need to run nodejs-PoolController on the pi as this integration just talks to that.

@lymanepp, how are you measuring your water properties? Is it done manually or do you have sensors?