Pool iAqualink driver

@KakaduDreamer Thanks, added a try catch for the rest of them. Guess they have alot of varying models and features.

1 Like

Any chance you could expose power and rpm?

1 Like

@jon1 I dont currently see that data being returned in the API currently.

I'm trying to figure out how to turn my pump on/off. I only have the lights and cleaner that show up under the child devices. I can manually toggle the pump on/off from the parent device, but have no idea how to do it through a rule...?

Mike, GREAT driver and stable as hell. Thanks! I've got everything working, but one thing. I can't figure out how to programmatically change the heater temperature set points. I can do it manually from the Parent device by typing in a value and pressing Set Heater, verified by the Aqualink interface itself. However, if I run a custom action to do the same thing, nothing happens. My guess is that because the Set Heater button takes in both an enum and a string it's failing? Custom actions can only set one data value. I tried specifying them as an array [spa,98], but that didn't work either. Any thoughts? This is literally the LAST piece of the puzzle. Thanks in advance!

Both are strings, just put them in separately. add the first parameter and then add an additional parameter.

@mike10 -

I've had this installed and working for many months but happened to notice yesterday, not sure how long it's been like this, but I'm getting these type of errors in the log. Any suggestions?

EDIT: I also deleted the parent and child devices, rebooted the hub, then added a new instance of the parent Aqualink driver. After entering the serial, email, password I click Initialize and get the same error in the log. No child devices created either.

I took a look at line 590 in the parent driver code, seems this error is happening in the GetDevices function:

def GetDevices() {

def wxURI2 = "https://iaqualink-api.realtime.io/v1/mobile/session.json?actionID=command&command=get_devices&serial=${serial_number}&sessionID=${session_id}"

def requestParams2 =
[
	uri:  wxURI2,
]
httpGet(requestParams2)
{
  response ->
	if (response?.status == 200)
	{
        if (logEnable) log.info response.data
		return response.data
	}
	else
	{
		log.warn "${response?.status}"
	}
}

Same here. Been working 100% of the time up until about 2 weeks ago, then intermittently, now no connection whatsoever and none of my Aqualink devices work from Hubitat. I've tried rebooting the Aqualink, Hubitat, Re-Initializing the driver, all no luck. I wonder if Jandy changed their API or interface?

Glad it's not just me! I'm also thinking something has changed with the API, as the error seems to be associated with the uri parameter.

@mike10 or anyone else care to chime in with your recent experiences with this Aqualink integration?

That function is working for me, what version of hubitat are yall running? I just tested on 2.2.4.145 on a C-5.

Version 2.2.4.145 on a C-7.

I added your Aqualink driver via Hubitat Package Manager. I know it was working fine up until recently.

When I removed it and re-added a new instance of the parent driver, I entered the serial number, user id (email address), and password. Saved preferences. Unfortunately the HttpResponseException on line 590 is still happening. I see this error when I click either Initialize or Update. No child devices are created. Is there any other step I'm missing in setting up this driver?

@KakaduDreamer I found an issue with the GetSerial function and updated that, I also added an additional dubug output to test the GetDevices function if you can run that.

Thanks for looking into this! I updated the driver code. Made some progress. See screenshot of logs below. I had never used the "GetSerial" function before today, I had always manually entered the serial number. Interestingly enough, I had always entered the serial number with dashes (because that's the way it appears on the Aqualink website when I login there to check the pool status). When I omit the dashes in the serial, all the sudden the "Update" and "Initialize" functions work, at least partially.

You can see there are still errors, and it may be related to the fact that the "Filter Pump" wasn't added properly. All other child devices have shown up.

@KakaduDreamer Looks like your system has fewer aux ports so when it went to create the childs it failed. I put in some try catches to solve that in a new version just posted. I think you will need to remove parent and childs and re-add them.

Will do, I'll remove parent/child devices, not a big deal at this point. Yes, I only have a few aux ports that are active, it's a relatively simple pool system at this point - filter pump, booster pump, pool light, cascade (waterfall).

@mike10 -

Looks like the latest code changes fixed things for me. Keeping the dashes out of the serial number was probably one of the issues (user error on my part I guess). The log still shows some "warns" for these aux ports, but all my child devices have shown up now. Thank you for your help!

dev:46352020-11-23 07:32:45.326 pm warnaux_7 failed: Cannot get property 'aux_7' on null object

dev:46352020-11-23 07:32:45.322 pm warnaux_6 failed: Cannot get property 'aux_6' on null object

dev:46352020-11-23 07:32:45.319 pm warnaux_5 failed: Cannot get property 'aux_5' on null object

dev:46352020-11-23 07:32:45.316 pm warnaux_4 failed: Cannot invoke method getAt() on null object

@mike10 - first a great implementation - Thank You!

Second, I noticed recently that if I operate the spa via the iAqualink app or other methods, the hubitat corresponding child device status does not update to on.

I traced the issue to an index dupe in your updatedeviceinfo() function in the parent driver for both FilterPump and SpaPump children. Seems like this issue has been there for a long time.

Given that the pool_pump is index 12 in the return response and spa_pump is index 11, the fix would be in line 257 of the current parent driver:

From:

if(SpaPump){
try { notifychild("Spa_Pump",devices.home_screen[12].spa_pump, "SpaPump", "SpaPump", "0" ) } catch (Exception e) { log.warn "Spa Pump failed: ${e.message}" }
}

To:

if(SpaPump){
try { notifychild("Spa_Pump",devices.home_screen[11].spa_pump, "SpaPump", "SpaPump", "0" ) } catch (Exception e) { log.warn "Spa Pump failed: ${e.message}" }
}

Thanks again & Happy Thanksgiving, Avi

@9369292f1992a7d0e654 Thanks, I don't have a spa so it has not been part of my tests. I have updated it in the latest version.

This driver has been awesome for me and I appreciate the hard work on it... Recently, and noticeably after the latest hub updates, I'm getting this error message....

error (http://.../device/edit/615)groovy.lang.MissingMethodException: No signature of method: user_driver_aqualink_Pool_Aqualink_Parent_539.UpdateAqualinkStatus() is applicable for argument types: () values: [] (UpdateAqualinkStatus)

@SuperDupe are you running the latest version?