Honeywell Lyric Thermostat

Thanks, things are going ok, you can help testing once I’m done (almost)

What type of thermostat do you have and can it cool and heat?
I own a T5R that can only heat, so would be nice to have a Round that can cool as well :slight_smile:

I have the T5 that can both heat and cool. Are you sure yours cannot cool? I am guessing once you get the basics ready (auth, device details), it should be easy to add the other features. Let me know when it is ready to test.

Yeah, if have the europe version… We are limited :frowning:

I think I’ll have something you can test tomorrow… If I can find the time.

Teaser:

That is super cool. Look forward to trying it.

I have a honeywell t5 if you need another tester. Thank you for working on this.

The more the merrier!

It seems like there are a lot of variables in the output depending on device and region, so most of it works for me now, but with your setup that might be different! Let’s see what happens!

Download the 2 lyric.py files from my fork: components/lyric.py and climate/lyric.py (sensors and binary_sensors will follow) and place them in your Home Assistant components folder.

  1. Visit Honeywell Developers, and sign in. Create an account if you don’t have one already.
  2. Fill in account details.
  3. Submit changes
  4. Click “My Apps” at top of page, under your account.
  5. Click “Create New App
  6. Fill in details:
  • App name. Can be anything, I use Home Assistant.
  • In the “Callback URL” enter the adress to your Home Assistant instance: “https://yourhomeassistant:8123/api/lyric/authenticate”. If you have base_url in your http config, use this url. Otherwise use your local ip.
  1. Click “Save Changes”
  2. On the apps page, click on the just created app.
  3. The “Consumer Key” and “Consumer Secret” are shown now. These will be used as client_id and client_secret below.
  4. Once Home Assistant is started, a configurator will pop up asking you to log into your Lyric account.

###Configuration

# Example configuration.yaml entry
lyric:
  client_id: CLIENT_ID
  client_secret: CLIENT_SECRET
# Example configuration.yaml entry to show only devices at your vacation and primary homes
lyric:
  client_id: CLIENT_ID
  client_secret: CLIENT_SECRET
  locations:
    - Vacation
    - Primary

Configuration variables:

  • client_id (Required): Your Lyric developer client id.
  • client_secret (Required): Your Lyric developer client secret.
  • locations (Optional): The location or locations you would like to include devices from. If not specified, this will include all locations in your Lyric account.

Reboot Home assistant and you should see a Lyric configuration box!

2 Likes

Isn’t it better to put them in the custom_components folder for now?

That should work too, I’m quite new to Home Assistant. This is the first project i’ve did in Home Assistant and python, so got a few things to learn still :slight_smile:

Just tried it…I got the configurator. But when I click continue, I see the error Failed to configure, please try again.. I am using my test setup for this one that uses the local ip (192.168.2.149) address.

On clicking “Request authorization”, I see {"fault":{"faultstring":"Execution of BuildLoginPageUrl failed with error: Exception thrown from JavaScript : Invalid Request: Invalid Redirect URI. (build_login_url_js#34)","detail":{"errorcode":"steps.javascript.ScriptExecutionFailed"}}}

In the Lyric developer app, have you entered your 192.168.2.149 address as return uri?

And how does the link from “Request authorization” look?

Yes, here is the URL in the Developer App

https://192.168.2.149:8123/api/lyric/authenticate

Here’s the Request Authorization link:

https://api.honeywell.com/oauth2/authorize?response_type=code&client_id=qNZwqG6aRvGL8ybDxsC3OQraFi1iz2ZA&redirect_uri=http%3A%2F%2F192.168.2.149%3A8123%2Fapi%2Flyric%2Fauthenticate&state=j8RQBnex45F0aMM7k6GvL1MzzJ9hi3&app=Home+Assistant

You have https in you developer app, but you hass is running on http, could you change the return url to http

Ok…that worked :slight_smile:

Couple of things:

The temperature 16-28 F is probably in celcius. The Target temperature slider also seems to be in celcius.

Mmm yeah, that’s the away setting, haven’t completely thought out how to deal with that and the lyric. It’s hard coded for now… Will change that.

Are you away right now? Or is your geofence off?

No geofence. It is on scheduled away (the thermostat is in the bedroom, so I put it to Away mode during the day; may be should change that).

Couple of comments on the code:
Are you sure T5 provides the humidity information? I guess, it may still be fine to keep it just in case future models provide humidity information.

Why do you specify self._eco_temperature = [16, 28]?

The T5 does not, the Round does. Should make it conditional.

The eco_temperature should be changed, haven’t found a way to activate the away mode without turning geofence off. So will have to set it to a temperature or something, but the API does not return the temperature setting for away mode unfortunately.

Haven’t looked at all at scheduling and what the API does then, since I do use geofence, will look in to that tomorrow.

The fan has to be implemented as well still (again not supported here) but again no clear signal from the API I don’t have a fan.

Dual setpoints is another one I have to look in to…

This is a great start and look forward to further improvements :slight_smile:

Great work!

Thank you! I got everything running last night. I didn’t have much time to play around with it, but the component was reporting all the proper temperatures and status. Ill tinker with it some more tonight to try to get you some better feedback.

I pushed a quick update that should fix most of the problems you had @arsaboo

Yeah…the temperature issue is gone :thumbsup:

I tried to set away mode true using developer tool using {"away_mode": "true","entity_id": "climate.lyric"} and using the switch on the card, but none of them worked. Also, wondering which services are working?