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?

So I am really new to Nixie/nodejs-PoolController and the HA integration. I’m kinda confused how we change pump speeds and how we can schedule it in HA. Unless I’m completely wrong it seems like you configure your pump with different circuits that have an RPM assigned to each one. That much makes sense I guess, even though I would call them profiles and not circuits.
When trying to call these “circuits” in HA though I can’t seem to in an automation. I only seem to have one circuit, and the only device I can turn on or off is the Pool, not even the pump. This makes little sense to me. Am I doing something wrong?
In the device list some of the circuits show up, oddly not the one it lists if I open the “Pool” device. And the one place I would expect all of them to appear as switches, the Pump device has no controls at all, just stats.
This is very confusing.

There is definitely a learning curve. It took me a while to wrap my head around controlling the pump speed by toggling circuits. The highest pump speed for the circuits that are on wins. My advice is to get everything working the way you want with nodejs-PoolController first. Home Assistant only lets you control it, not configure it. In HA, each circuit will show up as it’s own device, along with Nixie and Pool. So let’s say you have a few circuits set up called Max Speed, Fast Speed, and Regular speed. Each one of those has a RPM associated with them. Those circuits will each show up as there own device, and within those devices will be a switch to toggle the circuit on/off. Here is what I have for devices, and what one of them looks like. Hopefully this helps, let me know if you are still lost.



1 Like

Thanks, seems to help a bit. What is confusing for me, is the circuit “Pump 3000 rpm” does not really show up like the others. It’s found under the Pool Body only and seems to be the master on/off for the pool I’m guessing. All the other circuits show up. I was eventually able to make an automation for running things. I just had to tell it to turn on the turn on the “Pool” first, wait for the egg timer, then trigger my next RPM circuit and so forth. Then on Mondays it will trigger the Super Chlorinate on my salt cell for a sort of “shock” treatment.
I just hope that when the “Pool” is turned on it will always default to the 3000 rpm circuit. Not sure what dictates thats.



What does your circuits page look like in dashpanel? Based on what I’m seeing, your have named your body of water as “Reese Pool”. In your circuits, I’m guessing that you have on called Pump 3000 RPM with a type of “Pool” or “Reese Pool” (not sure how it shows since I never renamed mine). If that is the case, then yes, whenever the pool is on the pump should be running at 3000 RPM (unless the Pump MAX circuit is on).

That pool circuit is what is running when the pool is on, which if my assumption was correct would explain why the Pump 3000 RPM switch controls the “master pool”.