Honeywell Lyric Thermostat

I’ve been using the homekit method, but it doesn’t have the ‘away’ mode available. Your reply at the end of the thread says the custom component is working well on 0.80.1 so I thought I’d give it another go. The link to @arsaboo’s github custom_components is broken. Is your configuration available, or what is the best source?

1 Like

Hi shaun-adam; I’m not using the away mode so can’t comment if that works. I have an automation that set’s the temp back and resumes program when someone comes home.

Unfortunately I cannot post the .py files on the forum. Send me a private message with you email and I will mail them to you

Hello,

I’ve tried implementing the Lyric thermostat, but upon authorizing Home Assistant via the Honeywell API, get this error:

2018-10-25 08:36:35 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/aiohttp/web_protocol.py", line 390, in start
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.6/dist-packages/aiohttp/web_app.py", line 366, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.6/dist-packages/aiohttp/web_middlewares.py", line 106, in impl
    return await handler(request)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/http/static.py", line 66, in staticresource_middleware
    return await handler(request)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
    return await handler(request)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/http/ban.py", line 66, in ban_middleware
    return await handler(request)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/http/auth.py", line 68, in auth_middleware
    return await handler(request)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/http/real_ip.py", line 34, in real_ip_middleware
    return await handler(request)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/http/ban.py", line 66, in ban_middleware
    return await handler(request)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/http/auth.py", line 68, in auth_middleware
    return await handler(request)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/http/view.py", line 113, in handle
    result = await result
  File "/usr/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/lyric.py", line 200, in get
    data = request.GET
AttributeError: 'Request' object has no attribute 'GET'

Any idea as to how to fix this?

Change line 201 of lyric.py to this:
data = request.query

That worked, thanks a bunch! Do you have a solution for this next problem as well?
I’ve now succesfully linked the thermostat, and the lyric.conf exists.

2018-10-29 09:09:37 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.climate.lyric. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/loader.py", line 92, in get_component
    module = importlib.import_module(path)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/root/.homeassistant/custom_components/climate/lyric.py", line 15, in <module>
    from custom_components.lyric import DATA_LYRIC, CONF_FAN, CONF_AWAY_PERIODS
ModuleNotFoundError: No module named 'custom_components.lyric'
2018-10-29 09:09:37 ERROR (MainThread) [homeassistant.loader] Error loading homeassistant.components.climate.lyric. Make sure all dependencies are installed
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/loader.py", line 92, in get_component
    module = importlib.import_module(path)
  File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/local/lib/python3.6/dist-packages/homeassistant/components/climate/lyric.py", line 15, in <module>
    from custom_components.lyric import DATA_LYRIC, CONF_FAN, CONF_AWAY_PERIODS
ModuleNotFoundError: No module named 'custom_components.lyric'
2018-10-29 09:09:37 ERROR (MainThread) [homeassistant.loader] Unable to find component climate.lyric
2018-10-29 09:09:37 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform climate.lyric: Platform not found.
2018-10-29 09:09:39 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: Object of type 'function' is not JSON serializable

Ok, here you go:

This are the versions of the files that work on my hass.io installation (i’m now at 0.81.1)

1 Like

Thanks! That works :slight_smile:

Also can confirm, dropping those files in custom_components and following the instructions from the earlier posts for setting up the API with honeywell worked, and this is on the latest version 82.0. Great job! Oh, I did have to put in the local IP address for the oauth authorization flow, for some reason my external https to HA didn’t go through. It said something about how the URL differs.

Is there a change required to get this custom component able to expose to Google Assistant?

If this custom component is working well, what would it take to make it official?

1 Like

Hi Guys! Everything works well, but I’ve got 500 internal server error in authentication flow after I choose my thermostat, click connect, than send me back to my HA URL:

http://xxxxxxxxxx.duckdns.org:8123/api/lyric/authenticate?code=WkF5pupl&scope=&state=pwUt1hMkZ5X4Qqh1D61mr78vWDjmBb

Whats wrong?

If you’re referring to the call back IP, I had to use my private internal IP of http://192.168.76.12:8123/api/lyric/authenticate...in your URL it appears you’re trying to use your public IP.

Problem solved! Thanks!
My problem was I used old lyric.py files.

image

I want to start using this component, but missing the basics. The URL’s in the .py files mentioned here are not working. Can somebody tell me what to setup in my configuration file?

Use these: Honeywell Lyric Thermostat
(direct link to @cheelio -s comment)

I used these files. I cannot authenticate. I get a “You must accept the End User Licensing Agreemnt (EULA).” from Honeywell but it gives me nowhere to do that

Any ideas?

Did you set up an account with Honeywell Developers per the following post?

I believe that’s where you accept the license…although it’s been a couple of months now since I set up mine and can’t be sure that’s where I did it.

I’m having the same issue. Were you able to get this sorted out?

Is anyone on the latest (84.2) hass version and all still working? I’m on 82.1 all works however I have below in the logs:

  File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/parameters.py", line 389, in validate_token_parameters
raise MissingTokenError(description="Missing access token parameter.")
oauthlib.oauth2.rfc6749.errors.MissingTokenError: (missing_token) Missing access token parameter.
2018-12-16 04:11:57 ERROR (MainThread) [homeassistant.helpers.entity] Update for climate.thermostat fails
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/requests_oauthlib/oauth2_session.py", line 330, in request
http_method=method, body=data, headers=headers)
  File "/usr/local/lib/python3.6/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 196, in add_token
raise TokenExpiredError()
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired)

Update: is working on 84.6

It happens in my config as well, on the latest you mention. But I had it before as well.

edit: somehow it fixed itself. I’ve changed the scan interval to 600 by the way, since I don’t need the update of temperature that often. Main purpose is to switch heating on/off on presence.