Hayward AquaLogic / ProLogic automation

I can control everything, and I can see sensors, except the “sensor.aqualogic_pool_temperature” it shows “Unknown”

The sensors are updated by reading the display text and parsing the text to get the values. Does your display cycle through and display the pool temp? Like this:

The code looks for Pool and Temp:

if parts[0] == 'Pool' and parts[1] == 'Temp':
    # Pool Temp <temp>°[C|F]
    value = int(parts[2][:-2])
    if self._pool_temp != value:
        self._pool_temp = value
        self._is_metric = parts[2][-1:] == 'C'
        data_changed_callback(self)

I updated all code from aqualogic_ew11
Added the aqualogic_display sensor, and I can see Air Temp and Spa Temp, but not showing the Pool Temperature.

image

image

I also tried deleting everything from configuration.yaml and removing the entity records because I used to have the PoolMath integration connected, and that one creates a pool_temp sensor. I removed everything, then updated all the files with the “newest code from” /mas985/AquaLogic_EW11_HA/ and tried to find differences with the code from J4yDubsHome/aqualogic/aqualogic_p4p8/.

Any idea?. Thanks in advance :handshake:

Does you Aqualogic Display cycle through to Pool Temp? Your screen shot shows Spa Temp on the display, does it also show Pool Temp? On mine the filer needs to be running for the Pool Temp to show up on the display.

The code you posted looks fine. Is there any errors in the log?

Yes, on the AquaLogic P-8 screen, I can see the air temperature and water sensor (pool). However, the interesting thing is that I can’t see the spa temperature (I didn’t even know it had a sensor before adding the EW11 to the panel), but in HA, I do get the temperature. :raised_hands:

I notice that it does report sometimes to HA.
image

I also need to do something to cool down that pool. Arizona weather, lol. :sweat_smile:

So it looks like you controller is using the words “Water Sensor” instead of “Pool Temp”. You’ll need to either change the existing code or add code to parse it.

The easiest way will be to just change ‘Pool’ to ‘Water’ and ‘Temp’ to ‘Sensor’ on line 317 on the code screenshot you posted

Like this:

if parts[0] == 'Water' and parts[1] == 'Sensor':
    # Pool Temp <temp>°[C|F]
    value = int(parts[2][:-2])
    if self._pool_temp != value:
        self._pool_temp = value
        self._is_metric = parts[2][-1:] == 'C'
        data_changed_callback(self)

I don’t understand how you got values in “Aqualogic Pool Tempature” though. It would only do that is your display showed “Pool Temp” instead of “Water Sensor”.

If you switch over to Spa, it displays “Spa Temp” and that’s why that value is being filled in.

Is your pool really 118? Wow. I put on a fountain when my pool gets to 90 to try to cool it down.

I changed the code, and it stopped working even with the pump on, so I switched back to the original code.

I’ve noticed that the pool temperature only works when the pool pump is on. The weird thing is that it shows on the panel without the pump working, but in HA, it shows as “unknown” when the pump is off. As soon as I turn it on, it starts reporting the temperature in a few minutes and stops when I turn the pump off. Any idea why this happens? Or can we change the “unknown” status to “Turn on Pump” or something similar?

Also, I have a fountain, but the motor is old and consumes about 5000W. I need to replace it with an efficient one. Plus, I have to add shock to the pool every week because the free chlorine (FC) drops to 0. But that’s another story.
Thanks, J4yDubs :handshake:

Re: your pool temperature only showing up when your pump is on:
Not sure if that’s a P-8 vs P-4 thing but on my P-4 I get pool temp readings all the time. However, the sensor for the water temp is apparently in the plumbing at the filter, not in the pool itself. So when the pump is off and the air temp gets to, like, 117 as it did here yesterday in Las Vegas, the pool temp sensor is reading the temperature of the near-ambient temp water that’s sitting in the filter plumbing. For that reason, I got a wireless floating thermometer to put in the pool, linked to HA via RTL_433. Perhaps you have a flow sensor that overrides your pool temp sensor when there’s no flow? Like I said, maybe a P-8 specific thing?

I have a P4 and I only get pool temp when the pump is running. Otherwise, as was stated, the reading would be sky high because the probe is in one of the external pipes and the water in there gets really hot. I see this when I first turn on the pump. The first couple of reading are really high until the pool water cycles through.

As for the “unknown” showing, when I first looked at the original swilson aqualogic code, it was doing a reinitialize of the sensors if the network connect was dropped or timed out, so I was getting “unknown” a good bit. I made changes to the code so that it doesn’t do that (it only initializes when it first starts) as well as a bunch of changes to better handle timeouts and lost network connections.

I’m not sure if Mark’s ew11 fork has those changes in it or not. Sierra, it might be worth trying the p4p8 fork and see if it keeps the last temp even when the pump is off.

My filter turns on at noon, so you can see the spike:

I just finished setting up an EW11 (using the latest script) to interface my Home Assistant interface with my P4. I have been going through and testing all of the features and I am currently having issues with the Super Chlorinate functionality. From Home Assistant, I can toggle switches like the filter, pool light, and Aux2 (patio lights). However, when I try to toggle switch.aqualogic_super_chlorinate, nothing happens. If I turn on Super Chlorinate from my remote or from the panel, switch.aqualogic_super_chlorinate will update. However sensor.aqualogic_super_chlorinate and sensor.aqualogic_super_chlorination_countdown will never update. To rule out my dashboard, I’m trying to toggle via Settings > Devices & Services > Entities.

In terms of things that are working, water temperature, air temperature, chlorinator, status, display, button (left, right, plus, minus), light, and aux 2.

Here is my config

aqualogic_p4p8:
  host: 192.168.1.47   #Set to HostName, IP Address, or Serial path
  port: 8899           #Set port if using a network device
  device: socket        #Set to socket or serial
  usescript: True       #Set to False if not using script on a network device
  p4p8: p4              #Set to p4 or p8

sensor:
  - platform: aqualogic_p4p8
    monitored_conditions:
      - pool_temp
      - air_temp
      - display
      - pool_chlorinator
      - salt_level
      - status
      - super_chlorinate_time_remaining
      - is_heater_enabled
      - is_super_chlorinate_enabled

switch:
  - platform: aqualogic_p4p8
    monitored_conditions:
      - filter
      - aux_1
      - aux_2
      - left
      - lights
      - menu
      - minus
      - plus
      - right
      - service
      - super_chlorinate
      - heater_1
      - heater_auto_mode

Anyone have any ideas about what could be wrong here?

Your config looks fine and the fact that other switches work means it’s communicating OK.

Can you enable debug logging? After rebooting HA, press super chlorination on your panel. Wait a few seconds so that you see the countdown on the display and then turn off super chlorination. Then post the logs that it produces.

Put this in your configuration.yaml to enable debug logging and restart HA. It should start writing out a log line every second or so, so the log will start to get large. Remove the debug logging after you’ve turned on and off the super chlorination.

logger:
  logs:
    custom_components.aqualogic_p4p8: debug

Good news, I figured it out. Post 319 mentioned needing to update some files for super chlorinate. The only thing that I needed to add was the following to keys.py:

SUPER_CHLORINATE = 0x04000000

After I did that everything started working again.

Thanks!

1 Like

That’s interesting. I know it was there at one point (because I’ve used it from HA), but it must have been removed in one of the merges. I added it back in to the repo.

Thanks for catching that.

1 Like

The elfin ew11 finally came in.
I think i hooked it up and set it all up correctly.
Using the newest script and used the most updated repo files.

I am able to receive all data, but cant send.
I have a p8, on a prologic board.

As per the above i just added:
logger:
logs:
custom_components.aqualogic_p4p8: debug

To see if i can get some more relevant errors.

Here is my config yaml.

aqualogic_p4p8:
  host: 192.168.2.28   #Set to HostName, IP Address, or Serial path
  port: 8899           #Set port if using a network device
  device: socket        #Set to socket or serial
  usescript: True       #Set to False if not using script on a network device
  p4p8: p8              #Set to p4 or p8

sensor:
  - platform: aqualogic_p4p8
    monitored_conditions:
      - pool_temp
      - air_temp
      - display
      - pool_chlorinator
      - salt_level
      - status
      - super_chlorinate_time_remaining
      - is_heater_enabled
      - is_super_chlorinate_enabled
      - pump_power
      - spa_temp

switch:
  - platform: aqualogic_p4p8
    monitored_conditions:
      - filter
      - aux_1
      - aux_2
      - aux_3
      - aux_4
      - aux_5
      - aux_6
      - aux_7
      - aux_8
      - aux_9
      - aux_10
      - left
      - lights
      - menu
      - minus
      - plus
      - right
      - service
      - super_chlorinate
      - heater_1
      - heater_auto_mode
      - pool
      - service
      - spa
      - valve_3
      - valve_4


Just tested and works using the remote emulator. Just not in HA.

edit:
And somehow it started responding to switches. Weird. I changed nothing.
Its still very laggy tho, maybe even worse than before the ew11.

Maybe im using an old source repo or script for the ew11?
Can anyone please share the most recent stable release?

If it’s working with the mobile apps then it should be working with HA. They use the same EW11 script. Are you getting any errors in the logs?

If you’re using the files from the repo below, that will be the latest.

https://github.com/J4yDubsHome/aqualogic

Thanks. That’s the repo im using. I’m just asking to make sure i’m not missing anything basic.
I’ve been a IT pro for almost 3 decades, i know myself. I sometimes overlook the most basic things. Today was a day… With CrowdStrike. I feel really bad for anyone in Desktop Support. :frowning:

I think the issue im having is due to a weak wifi signal from the ew11. I did not know in essence its a wifi repeater in itself. And ofc i got the one with no antenna.
I’ll see about adding an antenna to it, or just will get the model that comes with one.
I have 5 wifi routers spread out around my house all with openwrt and 802.11r Fast Transition enabled on them all. Some WAX220’s and a BananapiR4.
I also have a AXE11000 as my first hop router from the ISP.

Also some antennas dedicated just for the IoT crap that mostly still uses 2.4Ghz.

Its connected to my network fine, but its own repeater is very weak.

My EW11 has an external antenna, so I got a RP-SMA cable and moved the antenna outside of the metal box that everything is in. Much better reception. It’s about 100ft from the nearest access point and it has a good signal.

I have one of these laying around here.
https://www.amazon.com/gp/product/B0B2KRK7W9/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1

Soon as the antenna model comes in, ill give it a try again

Does anyone know if this is possible to do with the swimpure plus? It has RS485 ports, but cant seem to get my w610 to transmit anything.