Jandy iAqualink Pool Integration

0.89.2
Testing configuration at /config
Failed config
General Errors:
- Component not found: aqualink
Successful config (partial)

Did you clone the git repo or downloaded a tarball from github? If so, where did you place it? You should end up with an aqualink/ directory with all the python files under custom_components/. That last directory typically lives next do configuration.yaml.

All up and running. Excellent work.

1 Like

I don’t have the iqpump01 so I won’t easily be able to add support for it.

As for the chlorine generator, I have Aquapure which doesn’t show up in my web interface although I’ve found threads online with people who seem to have iAqualink support it. Maybe a newer generation than mine (installed 2017).

I’ve got a bunch of changes in testing locally, namely:

  • Rewrote most of the parsing code to be more robust and support more than the initial sensor/switch/lights.
  • Support for Dimmable lights.
  • Support for Thermostat (Set Temperatures). Still trying to figure out the semantics of HA climate components and how to make it work with Solar Heating.
  • Initial support for unit testing.

I will be hopefully able push them out in the next week or so once I’m happy with the code and the amount of testing done.

2 Likes

Thank you for your contribution to this! I am fairly new to HA but really impressed by this community and all of the possibilities that are emerging.

I installed the code, but clearly I have something not configured correctly. Here is the error:

Invalid config for [aqualink]: expected a dictionary for dictionary value @ data[‘aqualink’]. Got [OrderedDict([(‘username’, ‘XXXXXXXXXX’), (‘password’, ‘XXXXXXXX’)])]. (See /config/configuration.yaml, line 22). Please check the docs at https://home-assistant.io/components/aqualink/

Here is my entry in configuration.yaml (I have tried with and without the platform line with the same result)

aqualink:
  - platform: custom_component
    username: !secret aqualink_username
    password: !secret aqualink_password

Hey Guys, now that the weather is nice I came back to this… I started a similar effort doing a hass integration but this one looks much farther along…

A few things I think we can merge that I dont see here are:

  1. Pool states (Freeze Protection, etc)
  2. Selection of the light effect for color lights
  3. Climate control for the heat

Happy to help out.

Can someone send the detailed config for switches and lights? I dont see it documented and it looks like the code expects it.

Actually, just realized this scrapes the web…

I have their API info, thats what I’ve been using. Can share that if it helps.

Hey,

Yeah, API would help tremendously. Happy to update the code I have locally to use documented API instead and push that.

Florent

Never replied to your message. Remove the platform line, don’t use a dash.

Alright, it took a while because I started too many things at once but I’ve just pushed a bunch of changes.

Here’s the commit message:

Support for thermostat and dimmable lights along with a bunch more changes

- Updated AqualinkLight and HassAqualinkLight to support dimmable lights
- Added new AqualinkThermostant and HassAqualinkThermostat.
- Added type hints to all files.
- Started test suite.
- Added some logging.
- Code is a lot more stable overall.

Note: I've removed the '_state' suffix from a bunch of entities so the
UI configuration on the HA side will have to be updated to reflect the
change.

To update, either download a new tarball or run git pull.

Dimmable lights seem to be fine. Because the UI only lets us change in 25% increment, there are some smarts in the code to round the values to the nearest allowed value.

The thermostat is pretty basic and will show heating purely based on the state of the appropriate heater toggle and will not reflect whether the pool/spa are actually heated. I’ve tried various combinations but I couldn’t find a good way to represent the state of the system that took into account whether pumps were actually running and whether solar was turned on. As an alternative, there is a generic_thermostat component that’s available for people to use. Just point to the right toggle and sensor in the config and you’ll be on your way.

I think this will do for now. I have a bunch of changes lined up (see README.md) and will look into using the API that @mcnutter1 mentioned if/when he gets back to me.

As usual, let me know if you have any issues.

1 Like

Sending you a private note on the API notes I have. I can send you my entire code for how I did the aqualink integration if youd like also but its messy :slight_smile:

1 Like

That removed the error - thank you. Now it is on me to get up get acquainted with it.

I hope this can be made with the api since any components that are accepted into the base need to use an api instead of web scraping. I hope this can eventually be part of home assistant.

I’ve rewritten most of the non-HA code to be async and use the API that @mnutter1 pointed out to me. I’m currently testing the updated HA code and will push everything to a separate ‘dev’ branch hopefully soon,.

1 Like

Would love this as part of HA - unsure if there’s an ‘official’ way to vote to help get it added, but if so, let me know any happy to throw support towards it.

1 Like

I don’t think there’s any vote necessary.

The code needs to be in better shape before it is included. At least, API needs to be moved to a separate repo and distributed via PyPI. Once that’s done and people here have tested the new code, I’ll submit a pull request for home-assistant.

This past weekend has been pretty busy. I’m still trying to figure something out (some odd behavior with threading.Lock() in async mode) but the new API is working pretty well. Expect an update before the end of the week.

1 Like

I’m sorry for the newb question, but I love the idea of using HA to control my Jandy (their web interface is just horrible) – but I’m trying to get a better idea whether this is something that sends RS-485 commands using an adapter connected to the HA server – or whether this sends API commands to an iAqualink system (Internet-enabled -vs- the regular serial-based Aqualinks?

Thank you in advance :slight_smile:

This uses iAqualink via cloud access.

I’ve pushed the new code using the API to a separate ‘api’ branch. If you want to test it, run “git fetch && git checkout api” and restart HA. There is preliminary support for dimmable and color lights but this hasn’t been tested since I don’t have the equipment. Happy to test/fix it if given temporary access.

Note: You will have to adjust some entity names (e.g. filter_pump is now pool_pump).

Let me know how it goes!