Authentication token has expired. Refresh your tokens.

bjmouton
Posts: 65
Joined: Sun Jul 23, 2017 4:01 pm

Authentication token has expired. Refresh your tokens.

Post by bjmouton »

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. "
  }
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

Post by FlyingDiver »

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
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

Post by FlyingDiver »

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
bjmouton
Posts: 65
Joined: Sun Jul 23, 2017 4:01 pm

Re: Authentication token has expired. Refresh your tokens.

Post by bjmouton »

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
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

Post by FlyingDiver »

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
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

Post by FlyingDiver »

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
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

Post by FlyingDiver »

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
bjmouton
Posts: 65
Joined: Sun Jul 23, 2017 4:01 pm

Re: Authentication token has expired. Refresh your tokens.

Post by bjmouton »

Here is log of authentication process:

Edit: deleted actual data
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

Post by FlyingDiver »

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
bjmouton
Posts: 65
Joined: Sun Jul 23, 2017 4:01 pm

Re: Authentication token has expired. Refresh your tokens.

Post by bjmouton »

OK, I will be on standby.

Thanks
User avatar
FlyingDiver
Posts: 7830
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Authentication token has expired. Refresh your tokens.

Post by FlyingDiver »

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
Post Reply

Return to “Ecobee”