[Release] Lennox iComfort Thermostat App and Driver

Any chance you can integrate with the iComfort S30. It was done for home assistant here - https://github.com/PeteRager/lennoxs30

Thanks in advance!

were you able to figure it out, i have an S30 and trying to do the same things

Also very much interested in this working also.

It’s a shame with the new HomeKit integration that’s its not two way, otherwise that would solve it.

@brianspranger I just found your app and decided to use it in place of a somewhat convoluted setup I had set up. I was using a custom device driver to create a polling device that connected to Lennox to update a virtual thermostat every minute, I then used Rule Machine to send http requests to Node Red to handle outbound requests to the Lennox API. All in all, it was pretty complicated and once in a while it would miss a command due to timing issues.

I ran into a couple speed bumps getting your app/driver set up on my hub, and I wanted to pass on the steps I took in case they help others with the Lennox iComfort WiFi, or in case you want to update the code to eliminate the need for any extra steps.

I ran into 3 related issues:

  • The thermostat device that was created by this app wouldn't sync to GH.
  • When I added the thermostat to the Hubitat dashboard, the mode and fan mode buttons didn't respond when clicked.
  • When making a rule in Rule Machine, I couldn't use the "Control HSM, Garage Doors, Locks, Valves, or Thermostats" option in Rule Machine as the "setlect Thermostat Mode" drop-down box was empty. (I could work around this by using 'Set Variable, Mode or File, Run Custom Action to run a custom action).

When I compared the thermostat created by the app to the default Hubitat virtual thermostat that I had been using, I noticed that there were some attributes missing from the app-created device. Specifically, those were hysteresis, supportedThermostatFanModes, and supportedThermostatModes.

Using a tip I found on a distantly related forum thread, I changed the device type to 'virtual thermostat' and saved the device. Using that driver gave me commands for "Set supported thermostat modes", "set supported thermostat fan modes" and a preference drop-down for hysteresis. I set each of these:

supported thermostat modes = ["auto",cool","heat","off"]
supported thermostat fan mdoes = ["auto","circulate","on"]
hysteresis = 0.1

After issuing those commands and saving the hysteresis preference, I switched the driver back to the Lennox iComfort Thermostat type and those attributes were retained by the device.

With those extra attributes set, the device now syncs to Google Home, the buttons on the dashboard work, and I can use the "set Thermostat" option in Rule Machine to change modes.

Thanks for putting this app/driver out there. I wish I had found it sooner!

1 Like

@brianspranger I don't know if you are actively updating this app, but I found I was getting some unhandled exception errors when the polling failed.

app:1094 2023-01-11 05:37:22.421 error java.net.SocketTimeoutException: Read timed out on line 257 (method refresh)

I think I was able to solve this by adding a specific catch for this error.
I added

catch (java.net.SocketTimeoutException e) {
        log.warn "Lennox connection timed out"
    }

So the section around line 257 now looks like this:

// HTTP GET call
private apiGet(apiPath, apiParams = [], callback = {}) {	
	// set up parameters
	apiParams = [ uri: getApiURL(), path: apiPath, headers: [Authorization : getApiAuth()] ] + apiParams
	
	try {
		httpGet(apiParams) { response -> callback(response) }
	} catch (Error e)	{
		logDebug "API Error: $e"
    } catch (java.net.SocketTimeoutException e) {
        log.warn "Lennox connection timed out"
    }
    
}

I also added an option for descriptive text logging in the device driver since I wanted to log the actions it was taking. I'm logging the setPresence(awayStatus), setThermostatFanMode and setThermostatData (both thermostatData and thermostatResult).

Hi @Alan_F,
I have made some updates to my driver and committed it to git hub. I mentioned you in the commit log as helping. I had tried for a very long time to fix the issue with Google Home and I never got it. So thank you very much for the feedback!

Glad I could help. I ran into that issue with Google Home when setting up some Sengled RGBW lights. I had to run them through specific modes to get them to list all the attributes that Google Home wanted. If one of the attributes was missing, GH wouldn't take the device. Luckily when the thermostat wouldn't sync I made the connection.

I'll take a look at the updates on GitHub.

@brianspranger

I think I noticed a small issue with the driver. Just sent you a pull request on GitHub that fixed it for me.

I merged your pull request. Thanks!

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.