Page 12 of 12

Re: Ecobee Plugin

PostPosted: Mon Jul 16, 2018 3:25 pm
by FlyingDiver
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.

Re: Ecobee Plugin

PostPosted: Mon Jul 16, 2018 4:15 pm
by jay (support)
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.

Re: Ecobee Plugin

PostPosted: Mon Jul 16, 2018 4:21 pm
by FlyingDiver
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.

Re: Ecobee Plugin

PostPosted: Thu Jul 19, 2018 8:27 am
by FlyingDiver
Pre-release available.

viewtopic.php?f=216&t=21032

Re: Ecobee Plugin

PostPosted: Wed Jul 25, 2018 10:18 pm
by koensayr
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...

Re: Ecobee Plugin

PostPosted: Thu Jul 26, 2018 5:12 am
by FlyingDiver
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.

Re: Ecobee Plugin

PostPosted: Fri Jul 27, 2018 9:59 am
by mundmc
Your work is super-appreciated on this.


Sent from my iPhone using Tapatalk

Re: Ecobee Plugin

PostPosted: Fri Jul 27, 2018 10:45 am
by FlyingDiver
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.

Re: Ecobee Plugin

PostPosted: Sun Oct 28, 2018 6:08 pm
by General Custer
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)

Re: Ecobee Plugin

PostPosted: Sun Oct 28, 2018 6:10 pm
by FlyingDiver
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.

Re: Ecobee Plugin

PostPosted: Sun Oct 28, 2018 6:20 pm
by Jann
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!

Re: Ecobee Plugin

PostPosted: Wed Oct 31, 2018 9:51 pm
by evilsofa
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

Re: Ecobee Plugin

PostPosted: Thu Nov 01, 2018 6:54 pm
by FlyingDiver
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.

Re: Ecobee Plugin

PostPosted: Mon Mar 11, 2019 11:44 am
by jaj737@gmail.com
I am having the same problem with Sierra , I cannot get the pin?? I will be installing on new iMac tomorrow with Mojave. Anyone getting results with adding ecobee 4 thermostats?

Re: Ecobee Plugin

PostPosted: Mon Mar 11, 2019 2:47 pm
by jay (support)
This plugin has been deprecated in favor of the new Ecobee plugin. The old plugin to which this topic refers will no longer validate against the Ecobee API so will not work.

I've locked this topic, please post over in the new Ecobee Plugin Forum.