Hayward AquaLogic / ProLogic automation

I think a Raspberry Pi is probably overkill for this.I used a much smaller and cheaper esp8266 microprocessor (like a small Arduino with built-in wifi) and a cheap serial-to-RS485 board. See my setup described a few posts above.

0

im using the pi because i also have a relay board connected to control some other devices in that area… I am connected to the “remote” port on the controller and getting data (just using a py script to read the port) on the pi. where i have the issue, is reading the data in HA (remotely) using the Aqualogic code. What do i need on the HA server and how should i configure my config.yaml?

Well, this has been very reliable since setting it up! I’m already getting value out of history_stats sensors set up to show me the pump runtime for the past day, and the past week! Really helps to keep track for electricity savings purposes.

@swilson, fyi I have noticed some interesting behavior when my controller is in service mode whereby the air temp sensor and the pool temp sensor values are reported as string values unknown when in service mode.

Also I am curious if there is any way to know if it’s in service mode? Would be a nifty automation to remind me if it was in service mode for more than an hour (in case it wasn’t intentional).

I’ve been keeping it in service mode to override my schedule while I"m trying to clear some metal stains (not as successfully as I hoped, but that’s another story). Not to big of a deal, but did require setting up template sensors to avoid breaking the history graph (see below).

The temperature history graphs, in Lovelace, broke because a string value was returned unknown and were logged in the history (which I don’t want to delete/purge). This can be fixed by using some template sensors to pipe the values to int so that all string values are converted to 0.

For anyone else interested in tracking the history this will eliminate the string values:

- platform: template
    sensors:
      aqualogic_pool_temp_sanitized:
        friendly_name: "Pool Temp"
        unit_of_measurement: "°F"
        #Convert to ensure all values are numeric; string value such as 'unknown'
        # will convert to default value of 0.
        value_template: "{{ states('sensor.aqualogic_pool_temperature') | int }}"

You’d have to add code to the HA aqualogic/sensor.py that checks the service state via get_state(States.SERVICE).

Hi Ron,

I like the idea of this setup and would like to replicate it - the wifi->RS485 adapter I’m currently using is… flaky at best.

Could you share any configurations or helpful documentation you found along the way to configure settings such as the baud rate, data bits, stop bits, etc.? Or was it really as simple as flash esp-link, solder up rx/tx, and off you went?

I am stuck with a flashed nodemcu until Amazon delivers the TTL to RS485 adapter you referenced and would really like to get all my ducks in a row.

Thank you!

Edited to add:
Looks like one of my issues was being on v2.23 which didn’t have easily exposed data format settings. I updated to 3.0.14 and now see the following for available configuration:
image

Which I assume is configured correctly.

Yeah, my setup has been working for several weeks now without problems. It looks like your settings are correct. My main issues were lack of soldering skills (improving) and general inexperience with digital electronics devices. I had to read the esp-link docs over several times, each time coming away with another insight. The whole business of swapping UART pins took me a while to figure out. Then, the issue of Boot Modes, combined with some poor solder connections sent me down a rabbit hole for a while. I would recommend using the Standard UART pins (GPIO 1 & 3) and I did use 4.7K pullup resistors on GPIO0 & 2, and a pulldown on GPIO15. Not sure if the resistors are necessary but during my rabbit hole journey to find out why the board wouldn’t reboot or transmit I put them on. I finally got it all working on 2 stacked perfboards, voltage converter on one and the NodeMCU and interface board on the other. Took about a six foot length of 4 conductor cable with 4 pin male headers that match the Hayward Comm ports soldered to either end. 3D printed an open-topped box that fits the circuits and connectors. I was able to fit this behind the face panel of the Hayward control box and run the cable to the Comm Port. Took a lot longer than it should have and I’m glad I bought multiple parts to burn through. But as I said now that it’s up and running, it’s been good. I even got it to communicate with my VeraPlus hub so I can control pool lights, etc. via Alexa. Let me know if there’s anything I can help you with.

1 Like

I finally got some time to wire it up this weekend and I have to say I am very impressed. Way more stable / incredibly faster response time than my previous solution (USR-WIFI232-630)

Only note to add would be that the converter board you linked is marked for where it wants you connect TX and RX, not the connections that are exposed as RX and TX. If you’re like me, and used to wiring ESPTX->ClientRX and ESPRX->ClientTX you will run into issues. Just a quick swap and I was good to go.

Thanks again!

I ended up using 2 screw terminals for the Rx and Tx lines because I kept switching them around so much. :grinning:

Hi Carmen

Are you running home assistant with your OnCommand controller?

Guys this is awesome! I’ve been trying to do this for years! I’m not a dev by any means but can stumble my way around. I’ve got it working to the point that I have Home Assistant reading the controller just fine and can turn on/off the filet and light. I really want to switch between spa/pool and also see if heater is in auto but don’t see how to do that. Anytime I try and add a switch for spa I get a bad config error. I would love to have something like d3 here has on this screenshot. I’ve read and searched everywhere but I don’t see any switches here for pool/spa or heater here AquaLogic - Home Assistant (home-assistant.io) here is my configuration.yaml

aqualogic:
  host: XX.XX.XX.XX - not posting for security
  port: 4328
  
# Example configuration.yaml entry
sensor:
  - platform: aqualogic
    monitored_conditions:
      - pool_temp
      - air_temp
      - spa_temp
      - salt_level
      - pool_chlorinator
      - status
      
      
      # Example configuration.yaml entry
switch:
  - platform: aqualogic
    monitored_conditions:
      - lights
      - filter

Any assistance would be greatly appreciated! I was so excited today when I got it reading just these things I could have done a backflip. Now to try and sell my aq-serial-co :slight_smile:
Thanks!

Switches for heater & pool/spa are in the latest library. They haven’t been integrated into HA yet because the gatekeepers insist the config code be re-written and I haven’t had time. Here’s the (rejected) pull request: https://github.com/home-assistant/core/pull/36458

1 Like

Thanks! Are there instructions on how I can add this to my HA deployment? I’m using a VM on Hyper-V. I really can’t thank you enough for all the work you and the community have put into this as I have tried a number of platforms over the past few years and Finally have it working almost perfectly! If you’re ever in N FL I will absolutely buy you dinner and a few beers!

My Hayward controller is a model PL-PS-8-CUL. Unfortunately, Hayward’s installation manual does not provide comprehensive information on the board and it’s connections, so I’m uncertain how to connect to an RS485 board. Can anyone confirm that the four-screw green block at the top left of this (less than perfect) photo is what I would use?
Screenshot 2020-10-19 215432

Thanks.

See https://github.com/swilson/aqualogic/wiki/RS‐485-Notes

Thanks, I’ve already been through your aqualogic wiki. My circa 2012 PL-PS-8-CUL main board looks nothing like the image on the RS‐485 Notes page. There is no four pin connector I can find, other than the white COMM sockets, which I’ve no idea whether they’re RS485 (but am guessing not). However, the green four-screw block does have similar RED/BLCK/YEL/GRN identifiers as to your image.

I’d love to hear confirmation from someone who has my same board.

Has anybody had success with the Hayward AquaRite+ (Plus) salt system?

This unit was just bought and installed in Australia.
https://www.hayward-pool.com.au/shop/en/australia/aus-aquarite-plus

The motherboard has five-pin RS485 plugs. Using the instructions for the WiFi expansion kit as an example, I have assumed the yellow and green wires are the TX/RX.

I have mine plugged into a USR W600 RS485-Ethernet device. I do not see any traffic in the USR debugging terminal. Also the RXD LED on the USR W600 box isn’t lighting up either.

I get the same result with either the WIFI or REMOTE RS485 sockets.

Has anybody got this exact unit to work? Any tips/tricks?

  • Is 19200, 8, N, 2 correct?
  • Does the RS485 port need to detect a load attached to the 10V pin before it begins to sends data?
  • Do I need to power cycle the AquaRite after hooking up the TX/RX?

Here is a close-up of the plugs on the AquaRite+

Anyone doing RS485 (to RS232) to USB for the connection to your Home Assistant server?

I would prefer such a direct connection rather than wifi or ethernet so as to keep the pool controls off my network, which would improve security through reduced exposure.

Thanks.

The latest code supports direct serial connections. It hasn’t been integrated into HA yet because the gatekeepers insist the config code be re-written and I haven’t had time. Here’s the (rejected) pull request: https://github.com/home-assistant/core/pull/36458

1 Like

That is awesome! Thanks for your work.

Like you, I live in the great white north (I’m 60 mins west of T.O.) and my pool is shutdown for the winter, but I’m excited to dig into this come April/May.

My hope is I’ll be able to run a cable from what I suspect is the RS485 port on my ProLogic board – still no definitive answer on that yet to my earlier post – and connect it to an RS485-to-USB adapter plugged into my Home Assistant host. This FTDI-based adapter looks promising.

Does that appear like it should work, from a hardware perspective?

Thanks.