Ecobee integration: Unknown error has occurred

I recently bought an Ecobee thermostat. The Homekit integration works fine. But I would like to explore the Ecobee integration to see if it give me any more features. However, when I go to setup the integration, I am prompted for an API key. When I enter my API key, I get “Unknown error occurred” in the modal dialogue, and the javascript console indicates a 500 Internal Server Error.

My HA is setup with an external domain over https, which here I shall call “ha.mydomain.com”. I can see from the request headers that the authentication request originated from https://ha.mydomain.com.

When setting up my Application with ecobee to get my API key, I am required to specify redirect URIs. I have specified the following redirect URIs:

Any advice on how to get this working?

Thank you!

You may have already figured this out by now but incase anyone else stops by with the same question - Home Assistant needs ‘ecobee PIN’ to be selected as the authorization method. When you select this method it will not ask for redirect URI’s. I just ran into the same issue before noticing my mistake. There are some great instructions here.

From there HA will give you a code after you input the API key, you then go to the user dashboard on ecobee’s website and select ‘apps’ from the menu on the right hand side (hamburger menu) and click add, then enter it.

1 Like