Lennox iComfort S30, E30 or M30 thermostat API?

Not saying this is your issue, but while doing my debugging I get back empty homes lists if I don’t have the proper password :-).

I will add some more foo around the login to check for the “bad password” dialogs (they are javascript popup things, so not a simple redirect detection).

Found a bug, but it was not your bug. However, I think I see what’s going on (or I have a guess):
Whenever I try to log in with the script WHILE I am logged in via a browser, I get a login redirect. I believe this is not correctly caught on the script side yet (I will look at adding this check).

In any case, this means two things:

  1. Make sure you are logged out everywhere while you are testing the script or the serve will return a logout/redirect, and
  2. We will need to find a way to work around this in production or you can’t check your thermostat manually when the script could be running.

I will investigate how they are doing their duplicate session detection and work on some mitigations.

Ben,

Let’s move further code/troubleshooting discussion to Github. I’ll open a new issue on icomfort3-scraper and we can continue on there.

And BTW - I greatly appreciate all the attention you have been giving to this project!

Hi @BenMenchaca ,

I just wanted to know if there has been any further progress this past month. I’m happy to continue with any further testing if needed.

Thanks!

No progress. I am researching how to start hooking up the PyPi module into the climate framework for HA…if there are any experts listening that can give me pointers, that would be great!

Thanks for the update Ben.

I think it would be unlikely that you would get any development pointers from this thread. I wish I could help you with this, but do please consider posting a request for assistance to https://community.home-assistant.io/c/development

I just stumbled upon this discussion for the S30 and would be willing to help out with any testing. I was excited to see Homekit climate support added to Homeassistant only to find out the S30 wouldn’t play nicely with it.

the issue with the homekit controller seems to be the way the thermostat randomly generates a pin code…

made a fork of jlusardi’s code https://github.com/jakeapp/homekit_python and it works to put a code on the screen for longer than shooting a incorrect code with the configurator (also removed some lines in some places to get discovery to work better-- something to do with feature flags)…

Using the configurator with the code on the screen throws off a BusyError

Some sort of change to the homekit_python code would be required to initiate a pin call, wait for a while, and in the same session to be able to send one as well… it’s not there yet, and with a bit more effort it could be…

Really wish that Lennox would do like every other connected thermostat maker and have some sort of public API (looks like they use Microsoft Azure)… Maybe if we all nagger Lennox they’ll get around to it.

It’s really great you are trying to update the HA Homekit component to work with the Lennox S30 series. I sure hope you can figure out the pin code handshake and get it working.

I discovered another possibility recently. There is an opensource Homebridge server on Github that emulates the iOS Homekit API. It also supports plugins to control various devices, including a plugin for the Lennox iComfort! Unfortunately, the docs don’t say if this is for iComfort Wifi or S30.

EDIT: I received a reply from the dev that it supports the iComfort WiFi unit only.

@BenMenchaca’s “web scraper” test code was actually working quite well to read and configure S30 settings. His last comment was that he was needing help with hooking up the PyPi module into the climate framework for HA. It would be great if he could get that help and get this implemented.

Nice work @BenMenchaca! I’ll have to try this out

@jakeapp - I see that you have made some additional updates to your homekit code for PIN support a month ago. Is it working with the iComfort S30 now? Thanks for posting any news about it.

There hasn’t been any further work on @BenMenchaca 's code that I can see on Github, so it’s looking more hopeful for Homekit integration than anything else.

Just an FYI - there is a completed PR for a new iComfort WiFi component that will be in the next version. This will NOT support the S30/E30/M30.

Patiently waiting here. Really.

Yeah, me too.

@jakeapp - please let us know if you’ve made any progress with this, and if not, if you have any plans to work on it any more. I’ll sure be happy to help you test it.

This thread has apparently reached a dead end.

It looks hopeful though… follow this work-in-progress for the pairing problem via Homekit…

Is there a working solution for S30 integration as of yet? Seems new May software updated added some more connection features (ex. IFTTT, Google Assistant).

The new Lennox S30 IFTTT integration has intriguing possibilities with HA’s IFTTT component for remote control. I don’t see how this integration could be used to retrieve data from the T-stat though.

As mentioned above, the most promising solution is to leverage the Lennox Homekit integration with HA’s Homekit controller component. There is work in progress to fix pairing issues with T-stats that require a PIN (Ecobee, S30) which also required updates to python-Homekit.

HASS .93 will contain many updates to the Homekit controller component, but not until the .94 version is S30 pairing expected to be working seamlessly according to @jc2k in this thread.

Hi everyone

Here is an update on the HomeKit controller roadmap.

0.93 contains the groundwork for the config entry support coming in 0.94. It has a bunch of fixes that are relevant to all HomeKit thermostats.

0.94 is so far just config entry support. Config entry support means your homekit accessories appear in “Integrations”. They should also start working after a HA restart without much delay (there is currently a delay of 30ish seconds before they are discovered). The pairing UI is better, and translated.

I’m currently working on a folow up PR that properly uses the device registry API so HA knows how entities found on a bridge are grouped together in devices.

After that I will be concentrating on polishing up the pairing fix. The basic code is written and in my patch queue, but there are a few edge cases it introduces that I need to look at. I’m hoping this is ready for 0.94, but it might slip to 0.95.

2 Likes

For anyone landing here to find out the latest status of this Lennox iComfort x30 HASS integration - good news!

The Homekit Controller component is working nicely to pair and control the iComfort S30/E30/M30 thermostats. When using HASS versions > .95, the inconsistent pairing issues seem to have been solved with the latest iComfort x30 firmware update (version: 3.55.626).

With this firmware update, an iOS device and the “WAC” Wi-Fi setup option is no longer required for pairing. Just be sure the thermostat has been cleared of a previous pairing (via either the Homekit factory reset or the new clear pairings option on the thermostat).

All that is needed in configuration.yaml is the inclusion of zeroconf: which should automatically detect the thermostat via its bonjour broadcast and create a notification flag in HASS of a pending iComfort integration. The random pairing code displayed on the thermostat is then entered via the HASS integration menu.

The current Homekit non-commercial API provides only a basic set of supported features for any Homekit-compatible thermostat as can be seen from the following HASS states listing…

entity:  climate.icomfort_s30
state: heat  (or any hvac_mode)
hvac_modes:  heat, cool,  heat_cool, off
current_temperature: 69
min_temp: 40
max_temp: 90
temperature: 70
current_humidity: 54
hvac_action: heating
friendly_name: iComfort S30 Thermostat
supported_features: 1

I just flashed a fresh image of hassio and was able to add the icomfort via homekit. Thus far it’s working great with essentially no config. Just a heads up to anyone else looking for a solution.

Once I figured out how to get bonjour and docker to get along, I can see my E30 just fine.

hvac_modes:
  - 'off'
  - heat
  - cool
  - heat_cool
current_temperature: 72
min_temp: 40
max_temp: 90
temperature: 72
current_humidity: 37
hvac_action: idle
friendly_name: iComfort E30
supported_features: 1

However, whenever I try to change the temp either by calling climate.set_temperature or using the thermostat widget in the UI, HA shows the new value until the next time homekit_controller polls and then it goes back to the current set temp. I have homeassistant.components.homekit_controller set to debug, but not seeing anything in the logs. Not sure what component I should be looking at for errors.