Jandy iAqualink Pool Integration

If you have it working, can you post your directory structure? Because you’re suggesting it should be /config/iaqualink/iaqualink/const.py which doesn’t sound like that would work (and doesn’t when I tested it).

To add a custom component, you need to do a lot more than drop random config files into your directory. You also need to add the integration to your config.yaml, but there is no documentation on this custom integration because it’s deprecated in favor of the official HA one.

1 Like

You are correct. I just updated my post with the correct files. You need to copy the files from /src/iaqualink/* to /config/iaqualink/* for this to work. Not just the const.py file. I had originally stated the files fro src to iaqualink and missed the subfolder in github. Can you try again to see if this works for you also or if it was a fluke for me? Nothing needs to be done in config.yaml as these files override original component which is already enabled. Just need to be sure to call it the same thing “iaqualink”.

Works for me I used dannyh’s example and put the files in /config/iaqualink and rebooted then readded the integration because I deleted it put in my username/pass and its up and running.

For us noobs that won’t manual update the config. When will the UI version be available/updated?

Most likely today.

See 2021.6.2 by balloob · Pull Request #51488 · home-assistant/core · GitHub

3 Likes

Thank you Flauran.

2021.6.2 fixed it for me.

2 Likes

You sir, are a gentleman and a scholar. Thanks for the very fast, efficient work on this.

1 Like

Thank You! Thank You! Way to quickly get this turned around! I am back working again. BTW, where is the proper place enhancement requests? I would like to get my Heat Pump working (different than a gas heater)

1 Like

The upstream repository is the best place for that. I won’t personally invest time in it given the API is private (and needs reverse engineering) and I don’t have access to the equipment. There’s always a chance somebody else will though!

I am getting the following error:

Logger: homeassistant.components.climate
Source: components/iaqualink/climate.py:133
Integration: Climate (documentation, issues)
First occurred: 10:16:56 (2 occurrences)
Last logged: 10:16:56

  • Error adding entities for domain climate with platform iaqualink
  • Error while setting up iaqualink platform for climate

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 383, in async_add_entities await asyncio.gather(*tasks) File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 588, in _async_add_entity await entity.add_to_platform_finish() File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 615, in add_to_platform_finish self.async_write_ha_state() File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 368, in async_write_ha_state self._async_write_ha_state() File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 402, in _async_write_ha_state state = self._stringify_state() File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 374, in _stringify_state state = self.state File “/usr/src/homeassistant/homeassistant/components/climate/init.py”, line 176, in state return self.hvac_mode File “/usr/src/homeassistant/homeassistant/components/iaqualink/climate.py”, line 70, in hvac_mode state = AqualinkState(self.heater.state) File “/usr/src/homeassistant/homeassistant/components/iaqualink/climate.py”, line 133, in heater return self.dev.system.devices[heater] KeyError: ‘swc_heater’

Does anyone have a solution?

Thanks

1 Like

and here is another one that showed up two minutes later;
Logger: homeassistant.util.logging
Source: util/logging.py:105
First occurred: 10:17:27 (5 occurrences)
Last logged: 10:19:27

Exception in async_write_ha_state when dispatching ‘iaqualink’: () Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 368, in async_write_ha_state self._async_write_ha_state() File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 402, in _async_write_ha_state state = self._stringify_state() File “/usr/src/homeassistant/homeassistant/helpers/entity.py”, line 374, in _stringify_state state = self.state File “/usr/src/homeassistant/homeassistant/components/climate/init.py”, line 176, in state return self.hvac_mode File “/usr/src/homeassistant/homeassistant/components/iaqualink/climate.py”, line 70, in hvac_mode state = AqualinkState(self.heater.state) File “/usr/src/homeassistant/homeassistant/components/iaqualink/climate.py”, line 133, in heater return self.dev.system.devices[heater] KeyError: ‘swc_heater’

1 Like

Do you have some sample code for this? Would be great not having to use polling for this like I am doing right now.

Hey, got a chance to looki at this again.

If you send me the format of the output you’re getting, I might be able to put up a test version of the library for you to use.

I think /config/conf/aqualink.json and what you’re getting from the last curl command (setting the swc to on/off) would help to start with.

I started cobbling something together but abandoned it after I realised I could achieve the same result and not deviate the existing iAqualink library too much…

I’ve pushed where I left it back to GitHub for you if you’re interested…

2 Likes

This is the response I get when I turn on/off the chlorinator:

{"state":{"desired":{"equipment":{"swc_0":"production":1}}}},"deviceId":"xxxx","clientToken":xxxxx","ts":xxx}

And this is the aqualink.json I get for ph/orp:

{
  "state": {
    "reported": {
      "vr": "V85W4",
      "aws": {
        "status": "connected",
        "timestamp": xxx,
        "session_id": "xxxx"
      },
      "hmi": {
        "ff": {
          "fn": "/fluidra-ota-prod/exo/V85W4_OTA.bin",
          "vr": "V85W4",
          "ts": xxx,
          "pg": {
            "fs": 507300,
            "bd": 507300,
            "ts": xxx,
            "te": xxx
          }
        },
        "fw": {
          "fn": "/fluidra-ota-prod/exo/V85W4_OTA.bin",
          "vr": "V85W4"
        }
      },
      "main": {
        "ff": {
          "fn": "/fluidra-ota-prod/exo/V85R67_OTA.bin",
          "vr": "V85R67",
          "ts": xxx,
          "pg": {
            "fs": 402328,
            "bd": 402328,
            "ts": xxx,
            "te": xx
          }
        }
      },
      "debug": {
        "RSSI": -26,
        "OTA fail": 1,
        "OTA State": 0,
        "Last error": 65278,
        "Still alive": 2,
        "OTA success": 9,
        "MQTT connection": 2,
        "OTA fail global": 0,
        "Version Firmware": "V85W4B0",
        "Nb_Success_Pub_MSG": 463,
        "Nb_Fail_Publish_MSG": 0,
        "Nb_Success_Sub_Receive": 2,
        "MQTT disconnection total": 1,
        "OTA fail by disconnection": 0,
        "Nb reboot du to MQTT issue": 669
      },
      "state": {
        "reported": {
          "debug_main": {
            "tr": 100
          }
        }
      },
      "equipment": {
        "swc_0": {
          "vr": "V85R67",
          "sn": "xxxxx",
          "amp": 1,
          "vsp": 1,
          "low": 0,
          "swc": 50,
          "temp": 1,
          "lang": 2,
          "ph_sp": 74,
          "sns_1": {
            "state": 1,
            "value": 75,
            "sensor_type": "Ph"
          },
          "aux_1": {
            "type": "none",
            "mode": 0,
            "color": 0,
            "state": 0
          },
          "sns_2": {
            "state": 1,
            "value": 780,
            "sensor_type": "Orp"
          },
          "sns_3": {
            "state": 1,
            "value": 29,
            "sensor_type": "Water temp"
          },
          "aux_2": {
            "type": "none",
            "mode": 0,
            "state": 0,
            "color": 0
          },
          "boost": 0,
          "orp_sp": 830,
          "aux230": 1,
          "ph_only": 1,
          "swc_low": 0,
          "version": "V1",
          "exo_state": 1,
          "dual_link": 1,
          "production": 1,
          "error_code": 0,
          "boost_time": "24:00",
          "filter_pump": {
            "type": 1,
            "state": 1
          },
          "error_state": 0
        }
      },
      "schedules": {
        "sch9": {
          "id": "sch_9",
          "name": "Aux 1",
          "timer": {
            "end": "00:00",
            "start": "00:00"
          },
          "active": 0,
          "enabled": 0,
          "endpoint": "aux1"
        },
        "sch1": {
          "id": "sch_1",
          "name": "Salt Water Chlorinator 1",
          "timer": {
            "end": "00:00",
            "start": "00:00"
          },
          "active": 0,
          "enabled": 0,
          "endpoint": "swc_1"
        },
        "sch3": {
          "id": "sch_3",
          "name": "Filter Pump 1",
          "timer": {
            "end": "00:00",
            "start": "00:00"
          },
          "active": 0,
          "enabled": 0,
          "endpoint": "ssp_1"
        },
        "sch4": {
          "id": "sch_4",
          "name": "Filter Pump 2",
          "timer": {
            "end": "00:00",
            "start": "00:00"
          },
          "active": 0,
          "enabled": 0,
          "endpoint": "ssp_2"
        },
        "sch2": {
          "id": "sch_2",
          "name": "Salt Water Chlorinator 2",
          "timer": {
            "end": "00:00",
            "start": "00:00"
          },
          "active": 0,
          "enabled": 0,
          "endpoint": "swc_2"
        },
        "sch10": {
          "id": "sch_10",
          "name": "Aux 2",
          "timer": {
            "end": "00:00",
            "start": "00:00"
          },
          "active": 0,
          "enabled": 0,
          "endpoint": "aux2"
        },
        "supported": 6,
        "programmed": 0
      }
    }
  },
  "deviceId": "xxx",
  "ts": xxx
}

Hope it helps.

1 Like

Thanks for putting the code up!

I’m going to leave the AWS stuff aside for now but will use the rest of the changes as inspiration.

Pleasure. Here’s my mods to support eXO chlorinators without the AWS library.

I haven’t used it in anger yet (waiting for Australian summer) but it seems to run okay in dev.

Hi there,

Do you plan to get your changes merged into iaqualink-py? I only recently realized my Zodiac hydroxinator has inbuilt iAquaLink and got it configured this week but was bummed that the integration in hass doesn’t support it. Wondering how much to hack at stuff to get it working for me, over just waiting for it to get merged.

Also excitedly waiting for our Aussie summer - first full one with the pool!

Cheers,
Whytey

Loose plans…
I haven’t tinkered in a while but it seems to be functioning okay. A few minor issues yet to be ironed out, mainly around commands being lost when a refresh is pending.

If you want to have a play, take a copy of the component from here and place it in your custom_components directory. That’s how I’ve currently got it installed anyway…

-Martin

Thanks heaps. I currently have it up and running though needed to hack a couple of things:

  1. the custom_component needed a version number in the manifest.yaml, otherwise it wouldn’t load.
  2. I had to fork your iaqualink-py repo to hack a couple of things in system.py; the ‘vsp_speed’ hack had to be commented out - that element doesn’t exist in my unit and I also don’t have a heater so had to hack that part out - which causes a couple of issues in the custom_component but it is functioning.

I don’t have a good environment for playing with this, so I am falling back to making edits directly in GitHub and running them in prod :open_mouth:

I have some output in the shadow response that indicates it utilising MQTT onboard - wouldn’t it be nice to just play with that locally instead :smiley:

Thanks again - hopefully I get to play more and report back