Viron Astral Pool ChlorinatorGo integration

Interestingly mine has been fine. I’ll keep you posted.

hows yours going the last few days?

After saying mine only fails every few days… it’s now failed for the second time today

Yep. Failing a couple of times a day too.

I assume no progress with any sort of fix? No way we can force the chlorinator to reboot every 24 hours?

nah, unfortunately no fix as of yet. I’ve tried a few different things, nothing has improved the random hangup of the halo’s ble.
If only we could roll back to firmware v1.3.

I tried building an automation alert message, triggered by the Halo sensor becoming “Unavailable”, but it has never triggered for some reason.

alias: "Alert: Halo BT Failed"
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.hchlor_info_message
    to: Unavailable
    for:
      hours: 0
      minutes: 5
      seconds: 0
condition: []
action:
  - service: notify.mobile_app_m2102j20sg
    metadata: {}
    data:
      message: Halo BT Unavailable
mode: single

Small update: Power cycle the Halo will reset the Bluetooth connection.

I put a Wifi switch plug on the Halo power inlet.

Now to work out the automation script…

Try changing
Unavailable
to
'unavailable'

Doesn’t make much sense, but other have reported success with this.

1 Like

Thanks, I’ll try that and report back

Did you ever work out a way to connect it to HA? I have the Halo Chlor 35 and im stuck

Thanks Paul, that works!

Trigger when the Halo is unavailable for 5 minutes.
Send a mobile notification.
Turn the Wifi switch off
Wait 30 seconds.
Turn the switch on.

My automation:

alias: "Alert: Halo BT Failed"
description: ""
trigger:
  - platform: state
    entity_id:
      - sensor.hchlor_info_message
    to: unavailable
    for:
      hours: 0
      minutes: 5
      seconds: 0
condition: []
action:
  - service: notify.mobile_app_m2102j20sg
    metadata: {}
    data:
      message: Halo BT Unavailable
  - type: turn_off
    device_id: a86445c2244ab0a311c0c123f7aef851
    entity_id: b66e37ec606825449c52caef6807f968
    domain: switch
  - delay:
      hours: 0
      minutes: 0
      seconds: 30
      milliseconds: 0
  - type: turn_on
    device_id: a86445c2244ab0a311c0c123f7aef851
    entity_id: b66e37ec606825449c52caef6807f968
    domain: switch
mode: single

2 Likes

Not sure what’s going on but today my ChlorGo can’t be connected to via WIFI. BT works, and the BT ESP proxy works. But in the ChlorGo app, the green dot doesn’t appear (sometimes does, but then fails to connect).

The ChlorGo itself is connected via ethernet. Got an IP address (which i can ping from my laptop)… the “test” works except the last time “Remote Server Connection”… Sounds like a ChlorGo issue maybe??

I’ve also tried via WIFI, also tried rebooting etc.

It’s not just you. Mine is doing the same thing today.
Was working fine last night.
Must be an outage at Fluidra end.

1 Like

Seems to be back to normal now.

Maybe too early to say, but since the ‘outage’ yesterday, my ChlorGO hasn’t gone “Unavailable” at all…

Now that we have Home Assistant integration (thanks Paul & Daniel!) I wanted to start tracking and alerting some of the the manual items needed to maintain my pool.

I have created a GitHub repo where I will track any updates or bug-fixes as I go.
GitHub source < here

Cumulative Acid Dosing Over Time

Problem Statement

I wanted to know when the acid drum for the peristaltic pump is nearing empty.

My pool acid is automatically fed by the Halo’s peristaltic pump from a 5L drum next to my pump-house, but there are no warnings or notifications about the drum being empty or nearing empty.

The Halo tracks acid dosing via the sensor.hchlor_dosing_pump_today_ml sensor, which measures the amount of acid dosed in a calendar day.
However, this sensor resets at midnight so it does not track cumulative acid dosage over time.

Requirements:

  • Track and show cumulative volume of acid dosed over any period of time.
  • Show how much acid is still available in the drum.
  • Allow me to define the total volume of the acid drum. Default to 5L but allow any volume.
  • Create an alert (push/mobile/email) when the acid drum remaining volume drops below a certain level. e.g. 1L remaining.
  • Allow me to reset the cumulative volume counter when I refill the acid feed drum.

Bonus features:

  • Show the average daily acid usage over the last 1, 3, 7 and 30 days.

Method

Sensors and Entities:

  1. Create input_number entity to store cumulative acid dosage each day from the HCHLOR default sensor.
  2. Create input_number entity to store total drum volume.
  3. Create a Statistics sensor to calculate average daily acid usage by the HCHLOR default sensor.
  4. Create a Template sensor to show how much acid is still available in the drum.
  5. Create a Template sensor to show Average Daily Usages: 3, 7, 30 days.
  6. Create a virtual button that will reset the cumulative volume counter when you refill the acid feed drum.

Automations:

  1. Update cumulative acid dosage each day.
  2. Reset the cumulative volume counter when the virtual button is pressed.
  3. Alert when the acid drum remaining volume drops below 1L.

Dashboard:

  1. Create a Lovelace Card that tracks everything with a button to reset the acid volume when refilled.

Guide

configuration.yaml

Add the following lines to configuration.yaml

# Pool Acid Sensors and Variables
  - platform: template
    sensors:
      # Calculate the sum of acid dosed today plus cumulative acid dosed
      pool_acid_dosed_today_plus_cumulative:
        friendly_name: "Pool Acid Dosed Today + Cumulative"
        unit_of_measurement: 'mL'
        value_template: "{{ states('sensor.hchlor_dosing_pump_today_ml') | float + states('input_number.pool_acid_cumulative_dosed') | float }}"
      # Show how much acid is still available in the drum.
      # This sensor will start at the volume of the drum (as stored in input_number.pool_acid_drum_volume) and decrease by the amount dosed each day.
      pool_acid_remaining:
        friendly_name: "Pool Acid Drum Volume Remaining"
        unit_of_measurement: 'mL'
        value_template: "{{ states('input_number.pool_acid_drum_volume') | float - states('input_number.pool_acid_cumulative_dosed') | float - states('sensor.hchlor_dosing_pump_today_ml') | float }}"
      # Average Daily Usages: 3, 7, 30 days
      pool_acid_average_daily_usage_3_days:
        friendly_name: "Pool Acid Average Daily Usage over Last 3 Days"
        unit_of_measurement: 'mL'
        value_template: "{{ states('sensor.pool_acid_usage_statistics') | float / 3 }}"
      pool_acid_average_daily_usage_7_days:
        friendly_name: "Pool Acid Average Daily Usage over Last 7 Days"
        unit_of_measurement: 'mL'
        value_template: "{{ states('sensor.pool_acid_usage_statistics') | float / 7 }}"
      pool_acid_average_daily_usage_30_days:
        friendly_name: "Pool Acid Average Daily Usage over Last 30 Days"
        unit_of_measurement: 'mL'
        value_template: "{{ states('sensor.pool_acid_usage_statistics') | float / 30 }}"

  # Statistics sensor to calculate average daily acid usage by the HCHLOR default sensor
  - platform: statistics
    name: pool_acid_usage_statistics
    entity_id: sensor.hchlor_dosing_pump_today_ml
    state_characteristic: mean
    max_age:
      days: 1000

# Create input_number entities to store cumulative dosed and drum volume
# Update the max values below if you have a drum size larger than 25L
input_number:
  # Store the cumulative volume of acid dosed 
  pool_acid_cumulative_dosed:
    name: Pool Acid Cumulative Dosed
#    initial: 0
    min: 0
    max: 25000
    step: 1
  # Store the total volume of the acid drum
  pool_acid_drum_volume:
    name: Pool Acid Drum Volume
    initial: 5000
    min: 0
    max: 25000
    step: 1

# Create a virtual button that will reset the cumulative volume counter when you refill the acid feed drum
input_boolean:
  reset_pool_acid_cumulative_dosed:
    name: Reset Pool Acid Cumulative Dosed
    initial: off

Automations:

1. Update cumulative acid dosage each day.

alias: "Pool: Daily Update Pool Acid Cumulative Dosed"
description: Update cumulative acid dosage each day
trigger:
  - platform: time
    at: "23:50:00"
    enabled: true
action:
  - service: input_number.set_value
    target:
      entity_id: input_number.pool_acid_cumulative_dosed
    data:
      value: >-
        {{ states('input_number.pool_acid_cumulative_dosed') | float +
        states('sensor.hchlor_dosing_pump_today_ml') | float }}

2. Reset the cumulative volume counter when the virtual button is pressed.

alias: "Pool: Reset Pool Acid Cumulative Dosed"
description: Reset the cumulative volume counter when the virtual button is turned on
trigger:
  - platform: state
    entity_id: input_boolean.reset_pool_acid_cumulative_dosed
    to: "on"
action:
  - service: input_number.set_value
    target:
      entity_id: input_number.pool_acid_cumulative_dosed
    data:
      value: 0
  - service: input_boolean.turn_off
    target:
      entity_id: input_boolean.reset_pool_acid_cumulative_dosed
    data: {}
mode: single

3. Alert when the acid drum remaining volume drops below 1L.

alias: "Pool: Alert on Low Acid Volume"
description: Alert when the acid drum remaining volume drops below 1L
trigger:
  - platform: numeric_state
    entity_id: sensor.pool_acid_remaining
    below: 1000
condition: []
action:
  - repeat:
      while:
        - condition: numeric_state
          entity_id: sensor.pool_acid_remaining
          below: 1000
      sequence:
        - service: notify.mobile_app_m2102j20sg
          data:
            message: "Alert: Acid drum volume is below 1L. Please refill."
        - delay:
            hours: 12
mode: single

Lovelace Dashboard card:

Dependency on the via the multiple-entity-row HACS front-end component available via this GitHub:

      - type: vertical-stack
        title: Pool Acid
        cards:
          - type: entities
            entities:
              - type: custom:multiple-entity-row
                entity: sensor.hchlor_dosing_pump_today_ml
                show_state: true
              - type: custom:multiple-entity-row
                entity: sensor.pool_acid_dosed_today_plus_cumulative
                show_state: true
              - type: custom:multiple-entity-row
                entity: input_number.pool_acid_cumulative_dosed
                show_state: true
              - type: custom:multiple-entity-row
                entity: sensor.pool_acid_remaining
                show_state: true
              - type: custom:multiple-entity-row
                entity: input_number.pool_acid_drum_volume
                show_state: true
              - entity: input_boolean.reset_pool_acid_cumulative_dosed
                type: button
          - type: history-graph
            entities:
              - entity: sensor.pool_acid_average_daily_usage_3_days
              - entity: sensor.pool_acid_average_daily_usage_7_days
              - entity: sensor.pool_acid_average_daily_usage_30_days
            hours_to_show: 720
            refresh_interval: 0

Please let me know if you have any issues or other automation ideas.

Changelog

v1.0, 4 March 2024, Initial version released
v1.1, 4 March 2024, Updated pool_acid_remaining sensor to include the running dosage of today in the calculation. Thanks @zappoo.
v1.2, 5 March 2024, Fixed Cumulative counter reset to zero on HA restart. Removed initial: 0 from Cumulative sensor. Thanks @zappoo.

3 Likes

Love this!! Only thing i’d say is your pool_acid_remaining should also deduct today’s acid dose, ie i’ve added the 3rd operand to the subtraction:


      pool_acid_remaining:
        friendly_name: "Pool Acid Drum Volume Remaining"
        unit_of_measurement: 'mL'
        value_template: "{{ states('input_number.pool_acid_drum_volume') | float - states('input_number.pool_acid_cumulative_dosed') | float - states('sensor.hchlor_dosing_pump_today_ml') | float }}"
1 Like

Also how do i set it so the cumulative is set to 3000ml for now, given i’m guessing that’s how much has been used? I can set this via dev tools, but it gets wiped out on restart?