Hayward AquaLogic / ProLogic automation

Update

I now have an Android app for testing purposes on Google Play:

AquaLogic PS8 - Google Play

Also, I have updated the wpf app for some UI changes. If the wpf app does not work and just shows “Connecting…”, it is likely an issue with the firewall blocking internet access for the application. You may need to change permissions for the app on the PC.

EW11/AquaLogic Information - Google Drive

Mark and everyone. I cannot believe that this could be this easy. Well for me at least because I have the Hayward Aqua-connect. If I would have known this the whole time. Actually figured it out on a fluke.
So that piece of equipment, its IP, has a GUI already. Put that Http in the website card and boom. There it is. Hope this helps someone else in the future

Never even needed any adapter. lol


Unfortunately, I don’t believe that works with the AquaLogic which is what this thread is all about. Also, it comes at a very high cost, the other reason for this thread.

Good point. Just figured I’d post

@Its_pimpin_pimpin I have this too (posted as much info as I could find about it) I do like this workaround though. I just wish I could actually expose the buttons as entities so I can control the pool lights with HomeKit

I totally agree !!

Maybe something like this could work? How to create a card with buttons that execute/trigger URLs?

Sharing back because this forum has been very helpful in getting my own system up and running (stand alone- no HA). My hardware setup is very similar to that of @sj777fj, but with a Raspberry Pi Zero W instead of a ESP01. Also, their clear enclosure cover and voltmeter display on the power converter look far cooler than my solid box :slight_smile:


(my apologies for the image collage- i’m only allowed a single image per post)

One thing I didn’t see mentioned in this thread is that for flashing display characters (such as the colon on most time updates and menu screens involving setting variables), the 7th bit (highest) being 1 indicates flashing. For example, for day+time updates, the colon 00111010 is encoded as 10111010 for flashing. I thought this was a special character case akin to the underscore/degree symbol, but that’s not the case.

Another thing I found is that the older AQL-P4 devices have separate on/off commands, unlike the PS8 which uses a toggle command (same command for on and off). These on/off commands still worked with my Aqualogic board, but only on the subset of commands that the AQL-P4 included (pool/spa- no spillover, pump, lights, aux1, aux2). I’m not sure why this command structure was abandoned on the later models, especially considering the local display “knows” the states of the pool through the LEDs so it would be able to send the appropriate on or off command. If your system only uses those controls, I highly recommend using the on/off commands instead of the toggle to improve command responsiveness and reliability (you could hypothetically hammer the Aqualogic board with on+on+on+on+on after each keep alive without worrying if a previous command already went through). I’ve summarized my notes on the protocol here.

My solution isn’t perfect, but I hope there is a piece that helps someone else. Many thanks to @swilson and everyone else who has contributed their findings to this thread!

3 Likes

Hi SJ

I came up with an almost identical solution. However, I was concerned about drawing the power from the Hayward. So I have a separate power supply going into the buck.

I’m able to read all the data. That’s coming through nicely. I’m unable to transmit instructions back to the unit to turn on the pump, lights, etc.

Is there something I am missing?

Hi Bernard - a few quick thoughts (trying to recall!) as I think I also at one point had a separate power supply while I was testing. On that note, ensure the grounds across the system are all connected. Separately though, I did encounter a couple challenges with transmission. One issue was a direct result of the signal strength of the connection from the ESP-01 to my router. I have Google WiFi and was able to solve that by putting a puck that was inside my house but closer to the outdoor unit. I have the puck about 25 ft from the equipment and no issues with signal anymore. I also made some changes (going off memory but can check) to the custom component to exclusively use the wireless protocol. I couldn’t get the signal back to control the pumps otherwise. I think this was the key item that made my setup work reliably - it is referenced here in the thread but happy to dig up the change I made and share if you need.

Cheers,
SJ

Hi Camen

I noticed your post about communicating with your OnCommand controller. Are you using the Aqualogic/prologic to communicate with the oncommand?

If you have details of how you set up your RS485 device? That would be great.

I have a two 485 devices. One causes a communication error the other reads data and sends it over an EsP8266. I can’t send anything back to control the switches. I’m either doing something wrong or it doesn’t work for oncommand. The RF remote suggests it runs prologic and works with prologic controllers. So I have assumed that they are essentially the same.

Bernard

I’m having the exact same issue. Any solution?

I modified the code to always use the WIRELESS_KEY_EVENT and that solved the issue for me. If you want to test it out, modify the core.py file and look for the _get_key_event_frame function. In that function I removed the if/else logic and always use the WIRELESS_KEY_EVENT data.

I could not use the original integration. I could receive data fine and get all the status, but could not send commands - not sure it it is because I’m using WIFI with a higher latency than ethernet.

So, I used the capability of RS485 from Hi-Flying to analyze packages locally and created an script to minimize collision when sending data. Because of that, I needed to adapt the original code and Home Assistant integration. Couple changes from the original code:

  • Home Assistant Integration supports HEATER On/Off command
  • Cleaned some unused (in my system) parts of the code (including web server)
  • Removed the Keep Alive frame from being transmitted in the WIFI, so less traffic and less load to the HASS

If anyone has the same problem and wants to give it a try: https://github.com/rfnovo/hass.aqualogic

1 Like

@rfnovo Just got my rs to ethernet device today and installed yours via HACS. I haven’t got it hooked to my pool yet, but would you expect your custom component to work with a wired connection? I have an Aquaplus Prologic. Thank you so much for creating this (and @swilson of course)

Yes, it should work

It worked perfectly after initial confusion on my part. I edited the python to change the name of aux_1 from waterfall and also added aux_2 in. Thank you.

i have a question i have been playing with this and have not been able to get it going the ip that you add and port you select one ip within your local network or you just make anyone because my rs485 i have connected to panel and the ethernet port connected to router and have a port to call from network 10.0.0.21 port 4328

For anyone who happens to have the Aqua Connect Local gateway (ifeign, its_pimpin_pimpin) and wants better integration with HA for automation or dashboard customization, I hacked together switch and sensors using rest devices and templates. It’s been working well so far.

Just in case this is useful to anyone else, I’ve posted the relevant config:

2 Likes

from aqualogic.core import AquaLogic

Can anyone point me to where I can find the most current version of the aqualogic.core source code?
I’ve searched through the development core repository, no joy, though maybe I’m looking in the wrong place.


First follow up:

My production install of Home Assistant is of HAOS in a VirtualBox virtual environment on my prod Linux host. The only access I’m aware of to the HA command line is the Terminal & SSH add-on, which is a restricted shell that provides no access to any of the core code, including Aqualogic.

The development repository contains some Aqualogic component files, but not the core.

So I ended up doing a throw-away installation of Home Assistant Supervised on a test Linux box, which brought in…more. I found what I assume will be the most current Aqualogic core.py in two locations, one being (in case you’re ever looking for it):
/var/lib/docker/overlay2/<GUID>/diff/usr/local/lib/python3.9/site-packages/aqualogic
While the component files were found under:
/var/lib/docker/overlay2/<GUID>/diff/usr/src/homeassistant/homeassistant/components/aqualogic

I’ve adopted the minor differences from this code into my custom_component installation of Aqualogic. Was hoping a one-or-two year newer version of the core might have fixes for some of the (common) issues I’m seeing, but no such luck:

  • filter button toggles between High and Off, skips past the Low setting of my two-speed pump motor
  • gas heater won’t turn off when in idle mode

Anybody develop custom solutions for these?


Second follow up:

Doh! Actually, I’d already known of the filter_low_speed switch, but had assumed it would act the same as the low speed switch on both my Hayward console and fob – i.e. even though there’s a physical button, it’s really just an indicator light. So I expected one should similarly press the filter button in HA to step the filter into low speed.

However, adding the filter_low_speed switch to the dashboard today didn’t do anything…until I modified this line in core.py from False to True:
self._multi_speed_pump = False

And now it actually does toggle the speed, will switch from Low to High by sending two pump commands – clever!

    if state == States.FILTER_LOW_SPEED:
        if not self._multi_speed_pump:
            return False
        # Send the FILTER key once.
        # If the pump is in high speed, it will switch to low speed.
        # If the pump is off the retry mechanism will send an additional
        # FILTER key to switch into low speed.
        # If the pump is in low speed then we pretend the pump is off;
        # the retry mechanism will send an additional FILTER key
        # to switch into high speed.

They say reading the documentation helps, but only if you actually understand the documentation! Funny, it seems shockingly clear now :wink:

Thanks.