Ecobee Plugin

Posted on
Mon Jul 16, 2018 3:25 pm
FlyingDiver offline
Posts: 2419
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Ecobee Plugin

Hmm. Just saw a plugin failure because the server request returned a 503 code. Which means "server unavailable", and indicated a server problem or throttling. That was causing the plugin to attempt to refresh the tokens, which also failed (because the server isn't responding).

So for now I'm going to tell it to ignore 5xx errors and just retry on the normal poll schedule. We'll see how that goes.

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

Posted on
Mon Jul 16, 2018 4:15 pm
jay (support) offline
Site Admin
User avatar
Posts: 14648
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Ecobee Plugin

FlyingDiver wrote:
Just saw a plugin failure because the server request returned a 503 code. Which means "server unavailable", and indicated a server problem or throttling. That was causing the plugin to attempt to refresh the tokens, which also failed (because the server isn't responding).


You might want to log it just so the user knows that the plugin can't talk to their server for some reason. The Honeywell plugin does this - it's how I know that they seem to have a hellofa time keeping their systems up regularly. It's one of the reasons I'm seriously considering dumping the Honeywell WiFI thermostat in favor of another Z-Wave (the Trane I have NEVER FAILS).

But, yeah, I'd recommend otherwise just retrying on the regular interval.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Jul 16, 2018 4:21 pm
FlyingDiver offline
Posts: 2419
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Ecobee Plugin

Oh, it'll be logged. :)

I had to edit a bunch of the log statements because for some reason only error level was getting logged. Not info level. And debug level dumps the JSON for every query into the log, which is way too much. But it's not a normal logging setup because most of the logging is in the embedded library, so I haven't tried to figure out how to fix it yet.

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

Posted on
Thu Jul 19, 2018 8:27 am
FlyingDiver offline
Posts: 2419
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Ecobee Plugin

Pre-release available.

viewtopic.php?f=216&t=21032

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

Posted on
Wed Jul 25, 2018 10:18 pm
koensayr offline
Posts: 62
Joined: Jul 10, 2013

Re: Ecobee Plugin

OTOH, I think I may know what the problem is with the current code. The authentication tokens expire after a certain amount of time. The API docs show 3599 (seconds) as an example of the expiration time that's returned by the API call. If the tokens are not refreshed BEFORE they expire, you have to start over with new tokens. You can't refresh expired tokens.


Where did you see this? I was on the phone with their developer support about this late last week and they insisted that you just need to simply renew the token.

I'm going to install the new version of the plugin tonight and see what changes (if needed) I can merge in...

Posted on
Thu Jul 26, 2018 5:12 am
FlyingDiver offline
Posts: 2419
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Ecobee Plugin

koensayr wrote:
Where did you see this? I was on the phone with their developer support about this late last week and they insisted that you just need to simply renew the token.

I'm going to install the new version of the plugin tonight and see what changes (if needed) I can merge in...


Turns out I was wrong about that. The refresh token is valid for a year. I think the problem was that if the request to the Ecobee servers failed for any reason (http 5XX response), then the plugin immediately tried to refresh the tokens. Which also failed. And then it was stuck. I'm reworking that so it doesn't toss the old tokens on a request failure.

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

Posted on
Fri Jul 27, 2018 9:59 am
mundmc offline
Posts: 252
Joined: Sep 14, 2012

Re: Ecobee Plugin

Your work is super-appreciated on this.


Sent from my iPhone using Tapatalk

Posted on
Fri Jul 27, 2018 10:45 am
FlyingDiver offline
Posts: 2419
Joined: Jun 07, 2014
Location: Cape Coral, FL

Re: Ecobee Plugin

Please remember discussion about the new plugin is over here: viewtopic.php?f=216&t=21032

I just posted another pre-release - 1.2.2.

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

Who is online

Users browsing this forum: No registered users and 0 guests