Rest Sensor receiving JSON - Astralpool - connectmypool.com.au

What are you using for the Homekit integration? In addition, we have Google Home’s in the house and I would like to use them.

you only get the options of the Pump and if durning set-up you gave it access to timers.

if there is not access to use in timers on the connect10, then there is no auto. this is how I am running my heater pump…then it is toggle on and toggle off and the conditions of the automation check for the state first, off or on so as to not toggle it to the undesired state

the HA Home Kit integration does everything for you

How did you get the toggles to work - today in Automations UI I tried to set the pump by making it listen for the state and then send a command but whenever I added the actions to the Action Yaml. it wouldnt save.

Also under actions in the UI the only Action type: Call Service - I can select is: RESTful Command: poolaction

Since the pump reports its current state back, can’t we use a helper to read the current status, so HA knows that then when you press a button send the new state?

@ThirtyDursty are you able to share your entire code? Config and Automations for the pool?

Is all a few posts above

To get rid of the error I added a default of zero to the integers

Just out of interest, what hardware do you need to be able to do basic home assistant integration?
We’re getting a pool installed in the next 12 months and will be getting an Astral Viron p320 pump + an Astral Viron V25 chlorinator. Do I also need viron connect or is there an easier method?

I basically just want to control lights + pump on/off.

I see you have a drop down for active favourites…how do you code that as an input select?..

would you mind sharing the config yaml…mine shows up as just a number 255 or 3 etc…Ive decided this is the best way to automate, since channels are pretty annoying…also see you have an All Auto and Daily filter switch…interested what you have done there to make them work…

im not too far off

you need a Connect10…the lights could probably be done with an RF blaster…V25 Chlorinator has bluetooth and an app…so maybe some opportunity there? not sure

Cheers mate.

Gee, there’s been some activity here since I was here last!

Anyhow it’s a little ugly, but I use input_select to create the drop down that then fires the command via automations - I basically put all the code in the post earlier in this thread ie: Rest Sensor receiving JSON - Astralpool - connectmypool.com.au - #24 by zagnuts

One minor issue with this, other than the time required to create the list and associated automation(s) is it does not show the actual state if you change it somewhere else ie if you change the favourite via the remote or wall control panel, the active favourite does not change in the drop down. There are no doubt ways to do this better, and some discussions about potential options above, but for me it’s good enough. :wink:

With those I hardwired a D1mini with a two channel relay to the controller - described that here: Rest Sensor receiving JSON - Astralpool - connectmypool.com.au - #59 by zagnuts. Personally I wouldn’t bother unless you just want to do it for the heck of it. The only real advantage to it rather than using the api is it does not go through the cloud. It only lets you choose between two favourites though.

actually minor update - I forgot to mention that (as it’s in the same general area anyhow) I’m also planning to use the D1 mini to monitor the HCL level via a non contact liquid sensor. Basically, my plan is to stick one (search for XKC-Y25 if interested) on the side of the container that’s feeding the chlorinator and setup an alert when it starts getting low. You could even stick a few on eg to let you know when it’s 75%, 50%, 25% but frankly a warning at 25% I suspect is good enough. FWIW - Have put the info here: Low HCL warning for automated salt water pool chlorinator system

Hi team, thought you’d be interested in this - have added these buttons into lovelace dashboard to control and show the status of the Pool Mode (All Off, All Auto, Pool Mode, etc).

Initially I was calling the REST command directly and bypassing the automation as above, but the 30 sec delay in updating the status was no good. Have found I can call the automation directly from the custom button card - and this is working well.

image

You need the custom button card to do it.

Code for lovelace card (once you’ve loaded the custom button card through HACs and then remember to add it through integrations as well)

title: Pool Mode
square: true
columns: 4
type: grid
cards:
  - type: custom:button-card
    icon: mdi:power
    entity: sensor.pool_active_favourite
    name: 'Off'
    show_name: true
    show_icon: true
    show_state: false
    styles:
      card:
        - height: 100px
    tap_action:
      action: call-service
      service: automation.trigger
      service_data:
        entity_id: automation.pool_favourite_all_off
    state:
      - value: All Off
        operator: '=='
        color: yellow
        icon: mdi:power
      - operator: default
        icon: mdi:power
  - type: custom:button-card
    icon: mdi:refresh-auto
    entity: sensor.pool_active_favourite
    name: Auto
    show_name: true
    show_icon: true
    show_state: false
    styles:
      card:
        - height: 100px
    tap_action:
      action: call-service
      service: automation.trigger
      service_data:
        entity_id: automation.pool_favourite_all_auto
    state:
      - value: All Auto
        operator: '=='
        color: yellow
        icon: mdi:refresh-auto
      - operator: default
        icon: mdi:refresh-auto
  - type: custom:button-card
    icon: mdi:pool
    entity: sensor.pool_active_favourite
    name: Pool
    show_name: true
    show_icon: true
    show_state: false
    styles:
      card:
        - height: 100px
    tap_action:
      action: call-service
      service: automation.trigger
      service_data:
        entity_id: automation.pool_favourite_pool
    state:
      - value: Pool Mode
        operator: '=='
        color: yellow
        icon: mdi:pool
      - operator: default
        icon: mdi:pool
  - type: custom:button-card
    icon: mdi:hot-tub
    entity: sensor.pool_active_favourite
    name: Spa
    show_name: true
    show_icon: true
    show_state: false
    styles:
      card:
        - height: 100px
    tap_action:
      action: call-service
      service: automation.trigger
      service_data:
        entity_id: automation.pool_favourite_spa
    state:
      - value: Spa Mode
        operator: '=='
        color: red
        icon: mdi:hot-tub
      - operator: default
        icon: mdi:hot-tub
1 Like

When you configure your Connect 10 using the touch screen, there is an option for each channel - “Allow Times to use this channel” - if you select “No” for this option is disables Auto mode. Basically auto = timer mode.

Has anyone been able to get a Thermostat going to control Temp? That would work really well with the HA → Homekit integration.

This thread talks about some reliability issues with their cloud service. How’s it been lately? Both outages and general latency in turning things on/off?

I have worked out how to get the Generic Thermostat working. My first attempt at coding in HA so please suggest any improvements.

Here is my Generic Thermostat Template:

- platform: generic_thermostat
  name: Pool Temperature Gauge
  heater: switch.pool_heater
  target_sensor: sensor.pool1_temperature
  min_temp: 10
  max_temp: 32
  precision: 1.0
  target_temp: 14
  ac_mode: false

I added 4 Automations.

  1. To set the temperature of the Thermostat based on the current pool temp:
- id: '1664278805395'
  alias: Set Pool Temp Thermostat
  trigger:
    platform: state
    entity_id: sensor.pool1_heaters0_settemp
  action:
    service: climate.set_temperature
    target:
      entity_id: climate.pool_temperature_gauge
    data:
      temperature: '{{ states.sensor.pool_status.attributes["heaters"][0]["set_temperature"]|float
        }}'

  1. To set the target temperature of the pool when you change the Temperature on the Thermostat:
- id: '1664287705395'
  alias: Pool Temp Thermostat moved
  trigger:
    platform: state
    entity_id: climate.pool_temperature_gauge
    attribute: temperature
  condition: []
  action:
    service: rest_command.poolaction
    data:
      action_code: 5
      device_number: 1
      value: '{{ state_attr(''climate.pool_temperature_gauge'', ''temperature'') |
        int }}'
      delay: 2
  1. Update the Thermostat to show the Heater is off when the Pool heater gets turned off:
- id: '1167287705395'
  alias: Pool Heater Turned Off
  trigger:
  - platform: state
    entity_id: sensor.pool1_heaters0_mode
    from: 'On'
    to: 'Off'
  action:
  - service: climate.set_hvac_mode
    data:
      hvac_mode: 'off'
    target:
      entity_id: climate.pool_temperature_gauge
  mode: single
  1. Finally, update the Thermostat to show the Pool heater as on when the Pool Heater gets turned on:
- id: '1267287705395'
  alias: Pool Heater Turned On
  trigger:
  - platform: state
    entity_id: sensor.pool1_heaters0_mode
    from: 'Off'
    to: 'On'
  action:
  - service: climate.set_hvac_mode
    data:
      hvac_mode: heat
      entity_id: climate.pool_temperature_gauge
  mode: single

Works Great. Integrated into Homekit as well so I can control it from Siri!

.

2 Likes

After being so popular this thread seems to have gone quiet.

Did anyone get a nice pool dashboard working? I started last year but the problem I kept running into is not being able to send a command for a state. i.e. Auto > High > Med > Low… because the Connect10 couldn’t accept the command you needed to toggle through each one to get the setting you wanted, which was useless.

Also, suddenly I no longer get pool temperature, it just shows 0 c. What is reporting your temperature, is it the spa heater?

Did anyone ever work this out and could you share your code?

Thank you!

Have been reading this whole thread with great interest, and am currently setting up favourites so I can jump to direct “modes” eg. only pump on, only light on etc rather than cycling through a channel.

What I cannot work out is how (if even possible) to select ALL AUTO via the API. I note that when in ALL AUTO mode, my pool_status sensor has the active_favourite state attribute as 255, but if I try to set it to that via a rest_command / API then it won’t set it to that.

I am thinking you can’t do it and that could then mean the only way is to use the hardware option and something like a D1 to do it.

Hi,
Newish to HA and no coding experience to coding. This looks great and now know part of how I will be spending my summer!
But also wondering if anyone has tried setting it so the heat pump turns on if solar generation is exceeding consumption for the rest of the house?
Wish I thought of this during the Vic lockdowns! (is when I started with HA)
Thanks

How did you integrate to HomeKit?

Juste export the sensor in the HomeKit config.

It will just show up