Authentication token has expired. Refresh your tokens.

Posted on
Sun Dec 06, 2020 1:27 pm
bjmouton offline
Posts: 65
Joined: Jul 23, 2017

Authentication token has expired. Refresh your tokens.

I installed this plugin a few days ago and installation, setup & authentication went fine, I was able to read/write to thermostat just fine. I have not made any changes to the Indigo objects the plugin created, but now my thermostat data is no longer updating. The following are captures from the event logger as I issued setpoint changes from my mobile app:

Code: Select all
Ecobee 2                        Ecobee Hallway: set cool to: 74.5 and leave heat at: 68.5
   Ecobee 2 Warning                API 'set hold temp' request failed, result = {
  "status": {
    "code": 14,
    "message": "Authentication token has expired. Refresh your tokens. "
  }
}
   Ecobee 2                        Ecobee Hallway: set heat to: 69.5 and leave cool at: 73.5
   Ecobee 2 Warning                API 'set hold temp' request failed, result = {
  "status": {
    "code": 14,
    "message": "Authentication token has expired. Refresh your tokens. "
  }
}
   Ecobee 2                        Ecobee Hallway: set cool to: 75.5 and leave heat at: 69.5
   Ecobee 2 Warning                API 'set hold temp' request failed, result = {
  "status": {
    "code": 14,
    "message": "Authentication token has expired. Refresh your tokens. "
  }
}
   Ecobee 2                        Ecobee Hallway: set heat to: 70.5 and leave cool at: 74.5
   Ecobee 2 Warning                API 'set hold temp' request failed, result = {
  "status": {
    "code": 14,
    "message": "Authentication token has expired. Refresh your tokens. "
  }
}
   Ecobee 2                        Ecobee Hallway: set cool to: 76.5 and leave heat at: 70.5
   Ecobee 2 Warning                API 'set hold temp' request failed, result = {
  "status": {
    "code": 14,
    "message": "Authentication token has expired. Refresh your tokens. "
  }
}
   Ecobee 2                        Ecobee Hallway: set heat to: 71.5 and leave cool at: 75.5
   Ecobee 2 Warning                API 'set hold temp' request failed, result = {
  "status": {
    "code": 14,
    "message": "Authentication token has expired. Refresh your tokens. "
  }

Posted on
Sun Dec 06, 2020 1:40 pm
FlyingDiver offline
User avatar
Posts: 7216
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

Somehow the authentication was lost. Go through the process again in the device configuration dialog.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Dec 06, 2020 1:46 pm
FlyingDiver offline
User avatar
Posts: 7216
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

And if you still have problems, turn on debug level logging in the Plugin configuration, restart the plugin, then post the log from the restart.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Dec 06, 2020 1:48 pm
bjmouton offline
Posts: 65
Joined: Jul 23, 2017

Re: Authentication token has expired. Refresh your tokens.

I have already done that twice. It did not rectify the issue. Latest from logger after re-authentication:

Code: Select all
   Ecobee 2                        Ecobee Hallway: set heat to: 67.5 and leave cool at: 72.5
   Ecobee 2 Warning                API 'set hold temp' request failed, result = {
  "status": {
    "code": 14,
    "message": "Authentication token has expired. Refresh your tokens. "
  }
}
   Ecobee 2 Error                  updatable: Error obtaining ecobee account object
   Ecobee 2 Error                  updatable: Error obtaining ecobee account object
   Ecobee 2 Error                  updatable: Error obtaining ecobee account object
   Ecobee 2 Error                  updatable: Error obtaining ecobee account object
   Ecobee 2 Error                  updatable: Error obtaining ecobee account object

Posted on
Sun Dec 06, 2020 1:49 pm
FlyingDiver offline
User avatar
Posts: 7216
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

I'm going to need debug level logging of the whole authentication process.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Dec 06, 2020 1:52 pm
FlyingDiver offline
User avatar
Posts: 7216
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

Oh, crap, I just thought of something. You first set this up after Dec 1, right? They made an API change then, so maybe new authentications (since the change) are not getting saved properly. I looked at their proposed changes, and didn't see anything that would be a problem, but who knows? I really need to see those debug logs.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Dec 06, 2020 1:58 pm
FlyingDiver offline
User avatar
Posts: 7216
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

Well, I just re-authenticated the plugin on my development platform, so far so good. I'll see if it fails.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Dec 06, 2020 1:59 pm
bjmouton offline
Posts: 65
Joined: Jul 23, 2017

Re: Authentication token has expired. Refresh your tokens.

Here is log of authentication process:

Edit: deleted actual data

Posted on
Sun Dec 06, 2020 2:04 pm
FlyingDiver offline
User avatar
Posts: 7216
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

Yeah, that looks a lot like mine. The format of those two strings changed in the API update. I'm guessing that it fails when storing the refresh token string when it's got characters in it that Indigo doesn't like. I'll watch to see what happens on mine. I'll probably have to re-encode the string somehow.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Dec 06, 2020 2:09 pm
bjmouton offline
Posts: 65
Joined: Jul 23, 2017

Re: Authentication token has expired. Refresh your tokens.

OK, I will be on standby.

Thanks

Posted on
Wed Dec 09, 2020 7:01 am
FlyingDiver offline
User avatar
Posts: 7216
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

FYI. Have not seen the problem on my system yet. If you see it, please add the log info here: https://github.com/FlyingDiver/Indigo-Ecobee-2/issues/9

Specifically, I'm looking for the line like the following. The last occurrence before the errors start.

Code: Select all
   Ecobee 2 Debug                  Token Request OK, access_token = eyJhbGciOiJSU ... yuV_wPfAyczLNabEoykxdYZyMg, refresh_token = Ya04RRv3lzvUYSOO22_NWYsd-f6fyrFmb5o, expires_in = 3600


Might also look like:

Code: Select all
   Ecobee 2 Debug                  Token Refresh OK, new access_token = A96Cfz5yon9DMbrvs...5ogAoAj1J, new refresh_token = BMiRc8Dbj86w6NZ...Ui8goT5uQ69CR, expires_in = 3599

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest