Viron Astral Pool - Connect 10 API Integration

I’m trying to integrate my Pool Controller - Astral Pool Connect 10 with Home assistant. I have managed to get Home assist to connect but am stuck. I think the next steps i need is to create devices. I have the following code in Configurtion.yaml (I changed API Key for post);

# Astral Pool YAML Configuration Test Code
sensor:
  - platform: rest
    name: Astral Pool
    resource: https://www.connectmypool.com.au/api/poolstatus
    method: POST
    payload: '{ "pool_api_code": " BCD2NP-XXXXXXX" }'
    force_update: true
    json_attributes:
    #- pool_spa_selection
    #- heat_cool_selection
    #- temperature
    - active_favourite
    #- heaters
    #- solar_systems
    - channels
    - valves
    - lighting_zones
    value_template: 'OK'
    scan_interval: 35
    verify_ssl: true
    headers:
      User-Agent: Home Assistant
      Content-Type: application/json
  - platform: template
    sensors:
      pool1_channels0_mode:
        friendly_name: Filter Pump
        value_template:   >-
          {{ ['Off', 'Auto', 'On', 'Low Speed', 'Medium Speed', 'High Speed'][states.sensor.pool_status.attributes["channels"][0]["mode"]|int] }}
      pool1_valves0_mode:
        friendly_name: WATERBLADES
        value_template:   >-
          {{ ['Off', 'Auto', 'On'][states.sensor.pool_status.attributes["valves"][0]["mode"]|int] }}
      pool1_light_status:
        friendly_name: Pool
        value_template:   >-
          {{ ['Off', 'Auto', 'On'][states.sensor.pool_status.attributes["lighting_zones"][0]["mode"]|int] }}
      pool2_light_status:
        friendly_name: Waterfall 1
        value_template:   >-
          {{ ['Off', 'Auto', 'On'][states.sensor.pool_status.attributes["lighting_zones"][1]["mode"]|int] }}
      pool3_light_status:
        friendly_name: Waterfall 2
        value_template:   >-
          {{ ['Off', 'Auto', 'On'][states.sensor.pool_status.attributes["lighting_zones"][2]["mode"]|int] }}
      pool1_active_favourite:
        friendly_name: Active Favourite
        value_template: '{{ states.sensor.pool_status.attributes["active_favourite"] }}'
    rest_command:
      poolaction:
        url: "https://www.connectmypool.com.au/api/poolaction"
        method: post
        content_type:  'application/json; charset=utf-8'
        payload: '{"pool_api_code": "BCD2NP-XXXXXXX","action_code": {{action_code}},"device_number": {{device_number}},"value": "{{value}}","wait_for_execution": false}'
      verify_ssl: true


There are no errors shown in code but I am unsure what to do next. Beginner level skills here for sure!

This is the API details in the Astral Pool Test Utility.

All i get is the following sensor and attributes.

Any help would be appreciated.

Did you have any luck figuring this out?

There is a another thread for this device did that help at all?

Thanks - It was beyond my ability so I didn’t progress past what I posted. Thanks for the link to other thread but I really struggled following it as there was a lot of iterations.

Unfortunately, I wasn’t able to show status or create switches to control it.

I did end up finding a very simple integration in HomeBridge that works fine. I was hoping to take HomeBridge offline but will leave it going now.

I also struggled with this for a long time especially setting specific pump speeds because the Viron Connect 10 cannot set a specific speed but cycles through them - ChatGPT created a code for me which I can use. But at the moment I have done it in an easier way.

  1. I have home assistant running
  2. I have homebridge running
  3. I created favourites for each execution type on the Connect10 panel and have just exposed these. So in Home Assistant the Favioutes show up and in Apple home they do to.

For example:

  1. Set Pool to Auto (Resets the pool back to auto and timer mode)
  2. Set Spa with Jets (Turns on the spa with jets - config in the Viron is Pool Pump High, Heater On, Spa Jets On.
  3. Set Spa without Jets (Turns on Spa without Jets and just creates a warm hot tub)

Etc…

Thanks for the prompt. After I fed some infor to chat GPT i managed to build a custom component in HAS. It works perfectly!!