[RELEASE] iAqualink Pool/Spa Driver

Hello everyone. I'm new to this community but wanted to toss out this Custom Driver I've created for the iAqualink controller for pool/spa systems. I wanted to integrate the iAqualink into my Hubitat and wasn't terribly satisfied with the drivers I could find out there.

The driver is available on my Github and via HPM. I've created a fairly-detailed README in the repository, but I'll repeat some of that here.

Intro

This driver aims to bring all of the functionality provided by the iAqualink device/app into Hubitat. Some functionality was missing from existing drivers, and the representation of the devices was not always ideal (IMHO). I had the following goals when building out this driver:

  • All status data available in the iAqualink mobile app should be available via the driver.
  • The parent device of the driver should contain all status data as attributes to simplify gathering all pool/spa status into Node-Red in one shot.
  • The pool and spa heater should be represented properly as Thermostat devices.
  • The air, pool, and spa current temperatures should be represented properly as Temperature sensors.
  • Support having multiple iAqualinks linked to the account (config option to pick which one to use)
  • Account username/password should be the only necessary config to get started (pull device serial number via api)
  • Customizable auto-refresh time interval
  • Minimize API calls where possible including reusing logged in session as long as possible
  • Customizable number of Aux Devices and OneTouch setups (I doubt many real users are using all of their aux devices or OneTouch slots.)
  • Customizable temperature units (F, C, or follow the hub's setting)
  • Uncluttered attributes (internal values held in state and attributes reserved for user-facing values useful for control/automation)
  • Good quality logging, preference, descriptions, etc for a good user experience


Overview

The driver creates a parent "iAqualink" device which provides no capabilities other than initialize to create the child devices. However, this parent device has attributes for all of the available data within the driver. This makes it an excellent choice to use via Maker API in other tools (e.g. Node-Red) to obtain a complete picture of your entire system from a single node.

The main filter pump, auxillary devices (e.g. spa jets, booster pumps, etc.), and OneTouch setups are setup as simple Switch (on/off) child devices. The switch for Spa mode and for a solar heater are also created as Switch child devices if enabled in preferences. The parent device has attributes for the current air, pool, and spa temperatures, but they can also be made available as Temperature sensor child devices via the preferences. Color-supporting lights are also supported at a very basic level (see Limitations below).

The pool and spa heaters (both if enabled in preferences) are created as Thermostat child devices. They correctly report mode, operating status, current temperature, and setpoint. Controlling them works like controlling any other Thermostat device to disable/enable the heater or set the target temperature. They will automatically enter the "emergency heat" mode if freeze protection is active on the Aqualink. For operating status, they report "idle" when the heater is disabled and either "pending heat" or "heating" while it is enabled based on whether or not the heater is actively running.

Limitations

My system does not have any of the following so I am unable to build or verify this functionality:

  • Variable Speed Pumps (VSP)
  • Dimmable Lights
  • Color Lights (included based on an existing Aqualink driver but I cannot verify functionality and can't build out proper color-based capabilities for them)

Special Thanks



I'm happy to hear any questions/comments/complaints or other feedback about the Driver. To anyone who goes diving into the code, note that this is my first time writing a Hubitat driver, and my first time with Groovy (and it's been ages since I used Java). There's a lot of explicitness in the code which is probably not very Groovy-like because I like to squash the warnings I get from IntelliJ. If you actually read all of this, what's wrong with you? Thanks.

4 Likes

I wanted to demonstrate part of why I wanted all of the status in the parent app for Node-RED. I have a custom Alexa request for "tell me about the pool" or "pool status report" that wants to pull almost all the information out of the iAqualink to have Alexa speak a passage about everything. Before this was a rather large and janky flow that had to hit every relevant child device individually (which is also more load on my hub as it's more calls through Maker API). With my driver, the parent app has everything so a single node can get all the status to prepare a detailed report.

Similarly I can use the parent device with "send events" active on the node to get all pool status changes into Node-RED with a single node. You can still use nodes for the child devices for specific use cases if necessary, but (for me at least) it's super handy being able to get it all at once.

I also use the parent node to dump the state of everything to Influx every 10 minutes so I can produce graphs in Grafana with all the data. This one shows air temp, pool temp, pool heat set point, and the state of the heater (the orange line kicking up to the top means the heater was actually heating during that time).

Thanks for this iAqualink integration - it's really well done. I am just starting to experiment with HE to see whether or not to make a full switch from ST. This is one of the hand full of Apps that I am testing out. Everything seems to be working fine with my setup so far. There is only one thing that I was hoping to have access to that I didn't see. I was hoping to view the active program name (not necessarily the schedule) with the ability to change it through automation. In my case, I have one program that I use in normal circumstances and another that I use when my home is running on battery backup (Tesla Powerwalls). It's not exposed in the mobile app - as you probably know it's defined and changed through the Web interface. Do you think what I am talking about is possible?

That should be possible. Anything you can do through the web part of the app should be possible. The other code I started from didn’t go that deep into it and I haven’t either. I’ve been meaning to do some more work on this (I have a VS pump now so can verify that functionality). I can at least investigate how difficult it would be to add what you ask…although it may be tough since my system is now closed for the winter. I’ll see if I can power it up enough for the app to work…but it won’t be for a bit over a week as I’m on vacation this weekend and have a business trip next week.

Thank you - I really appreciate it. Enjoy your vacation and safe travels!

I totally haven’t had time to look into this…it’s been a busy fall with travel for work and now the holidays. I only just today on Thanksgiving actually got all my patio furniture out away in the shed. At least it was before any snow. :rofl:. I just wanted you to know I haven’t forgotten about this… I’ll be doing work on it eventually for sure because I want the variable speed pump functionality since I have one of those now.

No worries. I have created a program mode with a filter/pump schedule and another without - which I have made active for now. This way, I control the filter/pump schedule in HE with the precondition of being in grid mode. But, I would still like to view and switch the program mode and would definitely like more VSP control. So, I will be looking out for you upgrade next spring!

Hey @Vyrolan,

Great driver! Thank you... Looking forward to the VSP integration... Question. Have you played with aqualinkD and local control? I just got it up and running on a Pi hidden inside my Jandy pool control box. It has an open local API but I'm not sure what is exposed vs the internet API... If you get a chance to play with it, maybe this version could be forked?

I haven’t messed around with it. I do like the idea of local control, but I don’t have a great way to get a wire from inside out to my system…and you can’t find Pi at a decent price right now anyway. I could see trying it at some point but it’s not a priority.

Thanks for the reply!

Yes, I was surprised to see the crazy prices of everything Pi right now… I had a 3b+ just lying around collecting dust and figured I’d put it to use see what aqualinkD had to offer.

Thanks again for your work here… :slight_smile:

Good Morning @Vyrolan,

This driver collection has been working great and I've been using for a bit now... I installed it during the winter and wasn't using my solar heater... The driver found the solar attribute and installed it as a child device. In fact, looking at the parent device page, I can see the solar heater is on. (Turned it back on after all the cold weather passed.) Anyway, the actual child device the main driver created does not show a solar status and I cannot turn the solar heater on/off or do anything from that child device. Again, the main driver shows the solar status just fine, its the child that isn't working... Any idea what might be wrong?

Hey @Vyrolan,

I'm still having an issue with this... Any ideas? Here is the child device.

THANK YOU for this great driver! I'm pretty new to HE and was excited to find ways to control my iAqualink. I even put a ZB switch inside the control box to handle the lights, but the steel box blocked communications. Then I tried a virtual switch and Alexa routines but never got it to really work well though! This is great!

I also would be interested in VS controls, how's that coming along?

@Vyrolan: Another suggestion to be added to the list:
I have a Hayward Aquarite salt water generator for chlorine generation. I just found a product that can integrate that device into the iAqualink app. http://chlorinatortranslator.com/

It'd be GREAT to have the ability to access and control the SWG from within my automation software using your driver. Are you taking requests?