Ecobee Binding - Token Auth Failure

openHABian running 3.3

I removed the Ecobee Account Thing from a system I manage because it wasn’t connected but then learned that the Ecobee was actually not on the house wifi network. So I reinstalled it but can’t get the pin. I removed all of the Ecobee Things, the binding, rebooted, same issue.

So then I removed the binding again, logged in with Putty, and did this:

sudo /bin/systemctl stop openhab.service 

sudo openhab-cli clean-cache

sudo rm /var/lib/openhab3/jsondb/StorageHandler.For.OauthClientService.json

sudo reboot

Still can’t get connected. Here is the error:

logreader:reader:LogReader:newErrorEvent triggered 2022-09-15 09:51:11.750 [ERROR] [oauth2client.internal.OAuthConnector] - grant type refresh_token to URL failed with error code invalid_grant, description The authorization grant, token or credentials are invalid, expired, revoked, do not match the redirection URI used in the authorization request, or was issued to another client.

I was able to get a pin after installing the binding on a different system so I know the API is working. What can I do?

Your timing is kind of odd since I also lost my ecobee PIN just yesterday while doing the update from OH3.4.0 M1 to M2. I wonder if ecobee did something to prompt a re-authentication?

At any rate you need to login to the ecobee site and re-issue a new PIN for your openhab app. Instructions to do so are on the openhab site under the ecobee binding documentation.


Wow I can’t believe that worked! I created a second API and it works for this system. So even though my first API is working fine for new systems, it can’t be used again if I have had Ecobee installed a system previously? Weird.