Ecobee API Changed?

Is it just me, or did something change in the Ecobee API? This is showing up in my logs:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyecobee/", line 564, in _request
  File "/usr/local/lib/python3.7/site-packages/requests/", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url:<token>&client_id=<client_id>

At first, I thought it was because I hadn’t updated 112 yet, but this still shows up after upgraded to the latest HA.

Are your entities showing unavailable on the front end or can you still read sensors and change the setpoints?

They’re all unavailable.

Try removing the integration, deleting the app from the ecobee developer site under your account, then go through the steps to add the integration back in.

I don’t understand it fully (and this may or may not be related) but if you search github issues you’ll find there is one for ecobee and it has to do with requesting a token refresh. Something happens and it either fails to refresh the token or it does it too many times within a period of time and this issue occurs. The fix I know of is redoing the integration. I haven’t had the issue in a long time but when I would restart frequently while testing other stuff it would happen to me.

This happens to me every 3 to 4 days.
Always get log errors for ecobee. Very unstable for me.

That did it. Thanks @squirtbrnr. If I had to do that before it would have been a long time ago as I don’t remember it. If I had to do that every 3-4 days like @carltonb , I’d get it working through the HomeKit Controller integration.

Though I have heard of Homekit, never investigated it.
Can you explain what it would do for me? I currently have no Apple devices. Android and Linux user.
Since you got my alarmdotcom working better than ever I value your opinion.

@carltonb The HomeKit Controller makes Home Assistant “look like” something that any other HomeKit-capable device can look to. You don’t need an Apple device – HA does all the work. You register a HomeKit-capable device to it like you would to an iPad, Apple TV or other HomeKit controller device. Ecobee supports HomeKit and the HomeKit Controller supports climate devices – so… they might be more stable than the crap you have to go through to keep it working.

“All gotta do is…” (famous last words, I know) activate the HomeKit Controller integration in HA. Then connect connect Ecobee and HA using it. When MyQ went through an API update back in May, I switched it over to use the HomeKit Controller integration instead of using the Home Assistant MyQ integration directly. It’s pretty well documented in the HomeKit Controller documentation online. You can also take a look at MYQ not working again for the specific steps I took for MyQ, although you’ll need to adapt it for Ecobee where appropriate. My post was on May 7.

I hope that helps. If Ecobee starts giving me fits with the direct integration, then I’ll switch it over to HomeKit instead. But for now, all is good.

Thanks. Will see what I can do.

FYI, I got this email from Ecobee regarding how it will change as of 1-Dec-2020.

Reminder: Upcoming API Changes Effective December 1, 2020

We are in the process of updating our authentication systems to better serve our customers and protect their privacy.

Please review this email closely as it outlines several changes that may affect how your systems are integrated with the ecobee API.

Upcoming API Changes Effective December 1, 2020

The following changes will go into effect on December 1, 2020. If you are unsure whether these changes will have an impact on your solution today, we encourage you to discuss it with your technology team, program manager, other stakeholders and ecobee partners.

Access/Refresh Token Format Changes

Starting from December 1, 2020, ecobee access tokens will no longer be returned as opaque 32-character strings. Access tokens will now be JWTs, which are considerably longer and uses a wider character set. Our JWTs follow the RFC7575 standard for JSON Web Signature tokens.

To ensure your application will continue to work, you will need to ensure that your application supports the following changes:

Access tokens will be up to 7KB in length, and includes upper/lower case alphanumeric characters, hyphens, underscores, and periods.
Refresh tokens can be of varying lengths and can contain non-alphanumeric characters.
Authorization Code Changes

The Redirect URI associated with your registered application should be a semi-colon separated list of absolute URLs that start with https://. We do not accept http:// protocol links.
PIN Authorization Changes

PINs will become 10 character alphanumeric strings.
This flow is only recommended in situations where a user is interacting with a device that cannot easily use a web-based login form; we recommend migrating to the Authorization Code strategy for a better user experience.
Click here for more ecobee developer documentation.

Early Access Program

For developers who would like to switch over to the new authorization flows before the December 1st deadline, there is an Early Access Program (EAP) available immediately. To gain access to this program, please submit a ticket on our Help Center and our Developer Relations team will reach out to you with next steps.

Next Steps

If you have any questions about these upcoming changes to the ecobee API, please submit a ticket on our Help Center and the Developer Relations team will get in touch with you.

Here’s a link the JWT information: JWT Introduction

The integration does not appear to be affected, except the tokens refresh/expire differently now and the PIN and Keys will have a different format.

See here:

1 Like