Ecobee Plugin

Posted on
Mon Jul 16, 2018 3:25 pm
FlyingDiver offline
Posts: 2618
Joined: Jun 07, 2014
Location: Southwest Florida, USA

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: 14892
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: 2618
Joined: Jun 07, 2014
Location: Southwest Florida, USA

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: 2618
Joined: Jun 07, 2014
Location: Southwest Florida, USA

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: 2618
Joined: Jun 07, 2014
Location: Southwest Florida, USA

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: 359
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: 2618
Joined: Jun 07, 2014
Location: Southwest Florida, USA

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

Posted on
Sun Oct 28, 2018 6:08 pm
General Custer offline
Posts: 19
Joined: May 08, 2009

Re: Ecobee Plugin

The plug in no longer allows me to get a pin.

How do i fix this?

Ecobee Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Ecobee Error connecting to Ecobee. Possible connectivity outage.Could not request pin.
Ecobee Error connecting to Ecobee. Possible connectivity outage.Could not request pin.
Ecobee not authenticated to pyecobee yet; not initializing state of device NS52
Ecobee not authenticated to pyecobee yet; not initializing state of device PCY9
Ecobee not authenticated to pyecobee yet; not initializing state of device PCXN
Ecobee not authenticated to pyecobee yet; not initializing state of device PD8G
Ecobee not authenticated to pyecobee yet; not initializing state of device KYZJ
Ecobee not authenticated to pyecobee yet; not initializing state of device LZDX
Ecobee not authenticated to pyecobee yet; not initializing state of device PD8F
Ecobee not authenticated to pyecobee yet; not initializing state of device MYXL
Ecobee not authenticated to pyecobee yet; not initializing state of device MPR4
Ecobee not authenticated to pyecobee yet; not initializing state of device PCW5
Ecobee not authenticated to pyecobee yet; not initializing state of device 312999782420
Ecobee not authenticated to pyecobee yet; not initializing state of device 315671413951
Ecobee not authenticated to pyecobee yet; not initializing state of device 411940098686
Ecobee not authenticated to pyecobee yet; not initializing state of device 319215257669
Ecobee Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 168, in runConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/pyecobee/__init__.py", line 123, in refresh_tokens
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/api.py", line 111, in post
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/api.py", line 57, in request
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/sessions.py", line 477, in request
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/sessions.py", line 587, in send
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/adapters.py", line 491, in send
SSLError: EOF occurred in violation of protocol (_ssl.c:590)

Ecobee Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Ecobee Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 168, in runConcurrentThread
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/pyecobee/__init__.py", line 123, in refresh_tokens
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/api.py", line 111, in post
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/api.py", line 57, in request
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/sessions.py", line 477, in request
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/sessions.py", line 587, in send
File "/Library/Application Support/Perceptive Automation/Indigo 7.2/IndigoPluginHost.app/Contents/Resources/PlugIns/requests/adapters.py", line 491, in send
SSLError: EOF occurred in violation of protocol (_ssl.c:590)

Ecobee Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)

Posted on
Sun Oct 28, 2018 6:10 pm
FlyingDiver offline
Posts: 2618
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Ecobee Plugin

General Custer wrote:
The plug in no longer allows me to get a pin.

How do i fix this?


Upgrade to High Sierra or Mojave.

Four thermostats and eight remotes. You got me beat. I only have four and five.

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

Posted on
Sun Oct 28, 2018 6:20 pm
Jann offline
Posts: 80
Joined: Mar 12, 2006
Location: Santa Rosa, CA

Re: Ecobee Plugin

This hasn't happened recently but (for what it's worth) I only have 1 thermostat... and 7 remotes...that is one part of the problem for what I have experienced (in previous plugin releases)

PS: Using v1.2.3 now and found a way to stop the continual reset of the tokens, etc... I set an hourly timer to restart the plugin. I haven't had an issue since!

Here's what I did:
Create a schedule, every hour.
Embedded python script:

Code: Select all
ecobeeId = "com.drjason.ecobee"
ecobeePlugin = indigo.server.getPlugin(ecobeeId)
if ecobeePlugin.isEnabled():
   ecobeePlugin.restart()



Boom! Everything always works now! I am a really happy camper!

Posted on
Wed Oct 31, 2018 9:51 pm
evilsofa offline
Posts: 3
Joined: May 30, 2014

Re: Ecobee Plugin

FlyingDiver wrote:
General Custer wrote:
The plug in no longer allows me to get a pin.

How do i fix this?


Upgrade to High Sierra or Mojave.

Four thermostats and eight remotes. You got me beat. I only have four and five.


Interesting, Same issue with my setup that just started this afternoon and I am running High Sierra, NEW Suggestion please....

Thanks
Mike

Posted on
Thu Nov 01, 2018 6:54 pm
FlyingDiver offline
Posts: 2618
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Ecobee Plugin

evilsofa wrote:
Interesting, Same issue with my setup that just started this afternoon and I am running High Sierra, NEW Suggestion please....

Thanks
Mike


No work is being done on this plugin at all. It's going to be removed from the store as soon as the replacement plugin is done with beta testing.

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

Who is online

Users browsing this forum: No registered users and 1 guest