Jandy iAqualink Pool Integration

  1. Ahh yep I needed to do that too. I must have forgotten to bring it back to dev and push it. Sorry about that…
  2. Thanks for the reports - when I get a chance I’ll finish the vsp_speed processing and make it check that it and the heater exist.

What was the issue you had when you removed the heater code? At a quick glance I can’t see where the component would fail?

Yes it would be nice but I think it’s encrypted with certificates. :frowning: Even just using a MQTT client and connecting to AWS would be simpler…

Does anyone know how to set the color of the lights through this Jandy interface? I can make the lights turn on, but, they will just turn on and become ‘white’ which is my first color. We have 8 colors total I think on our system. Thank you!

any chance we could see EXO support sometime soon?

Thanks!!

1 Like

EXO user here. Does anyone know what the references to MQTT are? maybe there’s a way to enable it?
Also, I didn’t know there was a PH sensor on my unit, I’m getting values that seem accurate. I can’t find out what ph_sp is though…

"debug": {

                "RSSI": -57,

                "OTA fail": 0,

                "OTA State": 0,

                "Last error": 65278,

                "Still alive": 2,

                "OTA success": 2,

                "MQTT connection": 2,

                "OTA fail global": 0,

                "Version Firmware": "V85W4B0",

                "Nb_Success_Pub_MSG": 2,

                "Nb_Fail_Publish_MSG": 0,

                "Nb_Success_Sub_Receive": 0,

                "MQTT disconnection total": 1,

                "OTA fail by disconnection": 0,

                "Nb reboot du to MQTT issue": 65

}

Hi Whytey,

I’ve just started in Home Assistant and getting all my automations added.

I’ve got an iAqualink TRi and a Hyrioxinator iQ pH and looking at adding it into HA.

I’ve got the iAqualink TRI but have no idea how to get the Hydroxinator iQ into HA. Any chance you can give me some help please. Complete noob at this!

This totally worked.

For anyone who needs help with this:
Add that simple script to the scripts.yml - you can do this by enabling the visual basic code add-on under supervisor > Add on store > Studio Code Server. Look for the scripts.yml file in the tree of files, and simply add this with changing the Alias, Effect, entity_id (based on the name of the ijandy light, you have to figure that out, one way is through developer tools; mine was called “light.1_light”.) The list of light affects to chose from are:
NONE
ALPINE_WHITE
SKY_BLUE
COBALT_BLUE
CARIBBEAN_BLUE
SPRING_GREEN
EMERALD_GREEN
EMERALD_ROSE
MAGENTA
VIOLENT
SLOW_COLOR_SPLASH
FAST_COLOR_SPLASH
USA
FAT_TUESDAY
DISCO_TECH

These correlate to the options I have in my iaqualink phone app. So, if you want a “switch” for each of these options, you need to add a script for each, changing the alias and effect to match the option you want.

Then once you do this (maybe just test one first, like Alpine White), go and reload your scripts in configuration > server controls, or just restart HA all together. Then you can go to scripts, Configuration > Scripts, and hen run the script and see what happens! If it works, your lights should turn on and be white. This will turn them on, and then select the color effect you chose. If you want to change the color once they are already on, just go ahead and run the script associated with the different effect and it will work just fine.

For HomeKit, go ahead and make sure you enable scrips in the HomeKit Integration Configuration, then restart HA (I don’t have luck with just restarting HomeKit, not sure why), and it should present as a switch in HomeKit. So you end up with a switch for the lights (which just defaults to Alpine White for me), and then you can create “switches” for each additional color, which when pressed will switch to that color. That switch will not “stay on” like a normal light seeing as it is just a toggle switch that effectively gets toggled to on and back off, but the default lights button will remain on, it makes enough sense once you do it - screenshot of my setup attached. I only switch between Alpine White and Caribbean Blue, so you can see I have those “switches” next to my lights button.

Screenshot of the scripts.yml that is associated with this. Really not hard at all, hopefully a few folks out there who read these words and don’t quite understand their meanings would be able to follow this albeit crappy guide and get it working for themselves :slight_smile:

Funny thing when you post screenshots - you realize you spelled Caribean with one to few “b”'s in the script alias, and likely just fixed it in homekit once you realized… nice.

Just upgraded my HA and needed to add version # to the manifest.json seems that’s a known issue, but now I’m getting 403 error. Did jandy change this again? I recall back in the summer they made some change that broke this. Anyone having the issue?

Ooops ID10T error, looks like I made a custom change to the integration back in June, leaving me on an obsolete code base… oopsies!

Happy new year everyone! I come bearing gifts!

See eXO Support · Discussion #16 · flz/iaqualink-py · GitHub for details.

Does anyone using this integration know if you can have the lights default to the same color every time the light is turned on? If I previously had the light set to blue, and then I turn the lights on, it will flash to blue for a split second, then turn off and reset to white.

I know I can select the blue color again with the integration, but that involves the script cycling through the color combinations to get to the desired color.

Put another way, if the color was previously blue and I turn it on, it goes blue, then off for a few seconds, then defaults to white. Then, I select blue and it does the turn on / turn off dance until it recycles back to blue. Seems just calling the light to turn on would just default to whatever it was last.

Thoughts/ideas/suggestions?

is it possible to integrate an inverter? Z550iQ?
i get this message in Home assistant:
“zs500 is not a supported system type”

The general rule of thumb is that, if the behavior is different from the iaqualink app, there’s most likely something we can improve/fix on the integration side.

So, with the integration, you do turn on → set blue → turn off → turn on and it flashes blue and goes to white? Does the same thing happen if you go through the same process with the iaqualink app?

Most likely possible but not currently supported.

As I mentioned in the i2d issue on GitHub:

As the message says, that’s expected. The API isn’t documented and I don’t have access to one of those.

Depending on your technical abilities, you might be able to reverse engineer it by setting up a proxy (e.g. mitmproxy, CharlesProxy) and intercepting requests coming from the mobile app. I can also offer to do it for you if you give me access to it.

Either way, I won’t have time to add support in the near future. The free time I have is spent getting the current codebase into shape and making it easier for people to contribute to.

1 Like

@LIGISTX @SteveOnorato
I followed this exactly and I cannot get the color to be selected no matter what I do. Any ideas? If I remove the color portion the light will turn on and off. I have also tried different colors and I dont have any luck that way either…

Logger: homeassistant.components.websocket_api.http.connection
Source: components/iaqualink/utils.py:14
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 5:22:54 PM (1 occurrences)
Last logged: 5:22:54 PM

[140566835602192] 'SKY_BLUE'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 192, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1636, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1673, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 282, in service_handler
    await script_entity.async_turn_on(
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 386, in async_turn_on
    await coro
  File "/usr/src/homeassistant/homeassistant/components/script/__init__.py", line 412, in _async_run
    return await self.script.async_run(script_vars, context)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1243, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 349, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 367, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 570, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1636, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1673, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 671, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 949, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 708, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 504, in async_handle_light_on_service
    await light.async_turn_on(**filter_turn_on_params(light, params))
  File "/usr/src/homeassistant/homeassistant/components/iaqualink/__init__.py", line 202, in wrapper
    await func(self, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/iaqualink/light.py", line 59, in async_turn_on
    await await_or_reraise(self.dev.set_effect_by_name(effect_name))
  File "/usr/src/homeassistant/homeassistant/components/iaqualink/utils.py", line 14, in await_or_reraise
    await awaitable
  File "/usr/local/lib/python3.9/site-packages/iaqualink/device.py", line 374, in set_effect_by_name
    effect_num = self.supported_light_effects[effect_name]
KeyError: 'SKY_BLUE'

I can shed some light on this (excuse the pun), I have the same lights but rather than driving them from my Exo, I drive them from ESP and HA + NR.

The behaviour of the lights is:

  1. Turn On for 2s and then Off for 3s and then On - reset to white.
  2. Turn On for 1s and then Off for 1s and then On - rotate colour.

Here is my Node Red flow for illustration:

Here is the NR function that works out how many rotations are needed to get from one colour to another:

var strOldColour = msg.data.old_state.state;
var strNewColour = msg.data.new_state.state;

var dictColours = { "Alpine White":0,
                    "Sky Blue":1,
                    "Cobalt Blue":2,
                    "Caribbean Blue":3,
                    "Spring Green":4,
                    "Emerald Green":5,
                    "Emerald Rose":6,
                    "Magenta":7,
                    "Violet":8,
                    "Slow Color Splash":9,
                    "Fast Color Splash":10,
                    "America":11,
                    "Fat Tuesday":12,
                    "Disco Tech":13};

var numOldColour = dictColours[strOldColour];
var numNewColour = dictColours[strNewColour];

if (numOldColour <= numNewColour) {
    numRotation = numNewColour - numOldColour;
} else {
    numRotation = numNewColour - numOldColour + 14;
}

msg.rotations = numRotation;

return msg;

Hope that helps.

Sorry if this isnt the right place, but I am having trouble with my color changing lights, they just wont turn on. Does anyone have an example as to how to control them from home assistant cards?

Did you ever get your light working?

Not really. It’ll go onto white, but my light is also 15 years old at this point and needs replaced and I (to date) haven’t been willing to bite the bullet and spend the $600+ to replace it - so I just settle w/ on/off with a white color… :man_shrugging:

My lights work but I had to do some fudgery to get it right. I have the Hayward Universal lights that have to switch on and off to change colors. One thing, be careful when testing, if you turn on and off in a specific sequence they go into programming mode where you sync lights, this can force them to only show one color.
I created an input select box to pick the color from then I use an automation to change the color. I found the colors in the API do not match the colors in iAqualink, so I used this to ‘translate’ the colors. As for turning on and off, if you just turn them on and off like a switch they will go back to last color. But I turn mine off using a Sonoff 4 way connected to the Spa Remote input (btw @flauran this is how I got my chiller to work).

EDITED: Noticed that they changed the Effect names, so here it is updated, tested and working as of 6/5/22

From configuration.yaml:

input_select:
  pool_color:
    name: Pool Color
    options:
      - Voodoo Lounge
      - Deep Blue Sea
      - Royal Blue
      - Afternoon Skies
      - Aqua Green
      - Emerald
      - Cloud White
      - Warm Red
      - Flamingo
      - Vivid Violet
      - Sangria
      - Twilight
      - Tranquility
      - Gemstone
      - USA
# Current iAqualink only has 15 effects but my lights have 17
#      - Mardi Gras
#      - Cool Cabaret

My Automation:

alias: 3 Pool Lights
description: ''
trigger:
  - platform: state
    entity_id: input_select.pool_color
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Voodoo Lounge
        sequence:
          - service: light.turn_on
            data:
              effect: Voodoo Lounge
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Deep Blue Sea
        sequence:
          - service: light.turn_on
            data:
              effect: Deep Blue Sea
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Royal Blue
        sequence:
          - service: light.turn_on
            data:
              effect: Royal Blue
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Afternoon Skies
        sequence:
          - service: light.turn_on
            data:
              effect: Afternoon Skies
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Aqua Green
        sequence:
          - service: light.turn_on
            data:
              effect: Aqua Green
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Emerald
        sequence:
          - service: light.turn_on
            data:
              effect: Emerald
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Cloud White
        sequence:
          - service: light.turn_on
            data:
              effect: Cloud White
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Warm Red
        sequence:
          - service: light.turn_on
            data:
              effect: Warm Red
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Flamingo
        sequence:
          - service: light.turn_on
            data:
              effect: Flamingo
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Vivid Violet
        sequence:
          - service: light.turn_on
            data:
              effect: Vivid Violet
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Sangria
        sequence:
          - service: light.turn_on
            data:
              effect: Sangria
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Twilight
        sequence:
          - service: light.turn_on
            data:
              effect: Twilight
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Tranquility
        sequence:
          - service: light.turn_on
            data:
              effect: Tranquility
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: Gemstone
        sequence:
          - service: light.turn_on
            data:
              effect: Gemsotone
            target:
              entity_id: light.pool_lights
      - conditions:
          - condition: state
            entity_id: input_select.pool_color
            state: USA
        sequence:
          - service: light.turn_on
            data:
              effect: USA
            target:
              entity_id: light.pool_lights
    default: []
mode: single

Im trying understand if there has been updates to supporting

exo systems as i getting this error

Logger: iaqualink
Source: /usr/local/lib/python3.10/site-packages/iaqualink/system.py:65
First occurred: 9:25:48 am (1 occurrences)
Last logged: 9:25:48 am

exo is not a supported system type.