I lost connectivity this morning, around 5:30 am Central Time. My log is below. My log was filled with the not authenticated messages every minute. Upon restarting the plugin everything seems to be working again.
Jul 31, 2018, 5:29:10 AM
Ecobee Error connecting to Ecobee. Possible connectivity outage.
Ecobee no thermostats found; authenticated?
Ecobee Error connecting to Ecobee while attempting to get thermostat data. Refreshing tokens and trying again.
Ecobee Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 164, in runConcurrentThread
File "plugin.py", line 320, in updateAllDevices
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/ecobee_devices.py", line 160, in updateServer
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/ecobee_devices.py", line 118, in updatable
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/pyecobee/__init__.py", line 158, in get_thermostats
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/pyecobee/__init__.py", line 130, in refresh_tokens
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/pyecobee/__init__.py", line 88, in request_pin
KeyError: 'code'
Ecobee Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Ecobee not authenticated to pyecobee yet; not initializing state of device G5PH
Ecobee not authenticated to pyecobee yet; not initializing state of device 314784831377
Ecobee not authenticated to pyecobee yet; not initializing state of device 173448830954
Ecobee not authenticated to pyecobee yet; not initializing state of device 150992022817
Trigger Ecobee Auth Event
Pushover Debug Auth Failure Event
Pushover Debug Ecobee Sync
Pushover Debug Result: {"status":1,"request":"d1c0f799-27f1-4065-b867-dde0561eff0b"}
I've taken out all the places where the underlying Ecobee library would get an error and try to force a re-authentication. So right now the plugin refreshes the tokens on a schedule.
If a real error occurs it'll just fail until it can actually refresh tokens. I think this is actually safer and more stable, since I think almost all the authentication fails are actually caused by temporary Ecobee server outages.
This is marked as a pre-release until it gets some testing time.
I tried ver 1.2.1
Adding my device via the Ecobee web interface with the provided pin worked. When I clicked "Refresh Credentials," the log started showing errors as follows (please let me know if you need more specific data (and how to get it)):
Stopped plugin "Ecobee 1.2.1"
Starting plugin "Ecobee 1.2.1" (pid 87633)
Ecobee Error pyecobee::get_thermostats(): Error connecting to Ecobee while attempting to get thermostat data
Ecobee Error Status code = 500
Ecobee Error pyecobee: refreshing tokens; current authentication flag is False
Ecobee Error pyecobee: NOT authenticated after refreshing tokens
Ecobee Error Status code = 400, error = The request is malformed. Check parameters.
Ecobee Error Please authorize your ecobee developer app with PIN code ymy8
Goto https://www.ecobee.com/consumerportal/index.html, click
My Apps, Add application, Enter Pin and click Authorize.
After authorizing, call request_tokens() method.
Ecobee Error pyecobee: finished refreshing tokens; authenticated flag is False
Ecobee Error pyecobee::get_thermostats(): refresh_tokens() failed.
Ecobee Error Ecobee device requires authentication; open plugin configuration page for info
Started plugin "Ecobee 1.2.1"
Ecobee Starting Ecobee
Ecobee not authenticated to pyecobee yet; not initializing state of device VWSF
Ecobee added remote sensor VWSF
Ecobee not authenticated to pyecobee yet; not initializing state of device VWXG
Ecobee added remote sensor VWXG
Ecobee not authenticated to pyecobee yet; not initializing state of device VWWX
Ecobee added remote sensor VWWX
Ecobee not authenticated to pyecobee yet; not initializing state of device 511892028983
Ecobee added thermostat 511892028983
Ecobee added smart thermostat 411980329199
Ecobee not authenticated to pyecobee yet; not initializing state of device VWSF
Ecobee not authenticated to pyecobee yet; not initializing state of device VWXG
Ecobee not authenticated to pyecobee yet; not initializing state of device VWWX
Ecobee not authenticated to pyecobee yet; not initializing state of device 511892028983
Ecobee not authenticated to pyecobee yet; not initializing state of device 411980329199
Aug 2, 2018, 10:40:27 PM
Ecobee Error pyecobee: requesting tokens; current authentication flag is False
Ecobee Error Error while requesting tokens from ecobee.com.
Ecobee Error Status code = 401, error = Waiting for user to authorize application.
Ecobee Error pyecobee: finished requesting tokens; authenticated flag is False
Sorry if this is human error.
The irony is this plugin was working for me (albeit a hacky workaround).
Last edited by mundmc on Thu Aug 02, 2018 8:46 pm, edited 1 time in total.
Aug 7, 2018, 10:03:22 PM
Ecobee Error connecting to Ecobee. Possible connectivity outage.
Ecobee Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 163, in runConcurrentThread
File "plugin.py", line 319, in updateAllDevices
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/ecobee_devices.py", line 159, in updateServer
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/ecobee_devices.py", line 56, in _get_thermostat_json
TypeError: 'NoneType' object is not iterable
Ecobee Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Aug 7, 2018, 10:03:22 PM
Ecobee Error connecting to Ecobee. Possible connectivity outage.
Ecobee Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 163, in runConcurrentThread
File "plugin.py", line 319, in updateAllDevices
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/ecobee_devices.py", line 159, in updateServer
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/ecobee_devices.py", line 56, in _get_thermostat_json
TypeError: 'NoneType' object is not iterable
Ecobee Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Can you create an issue for that on GitHub? The problem is as logged in the first line, something failed talking to the servers. But the plugin should recover better.
I'm pretty darn excited to see my fan events working as expected and no apparent disconnects for about a day now!!!! One oddity and this is probably my misunderstanding: I downloaded the plugin to my indigo machine and let it "update" itself, then followed (sort of reflexively) the "get pin, go to ecobee site, remove app, re-add app, return to indigo, get keys" move and encountered a log full of errors. I noticed in the log entries it seemed the plug-in reached out and got it's own 4-character pin that was different from the one I got when using the configuration dialog box? It seemed to settle in and work from then on out after I repeated the process using that different 4 character pin that I caught going by in the log entries.
I kind of like the "get it's own pin" maneuver...is that the new way coming going forward?
wmldwilly wrote:
I kind of like the "get it's own pin" maneuver...is that the new way coming going forward?
No, that's a holdover from the original development of an underlying library that the plugin uses. I don't want anyone to have to dig through the logs to get the PIN. It should all work from the config dialog.
A good stretch of a day and a half or so with no issues, then early this morning:
Aug 16, 2018, 7:34:07 AM
Ecobee Error connecting to Ecobee while attempting to get thermostat data. Refreshing tokens and trying again.
Z-Wave received "Console area - Temperature" sensor update to 79.77 °F
Z-Wave received "Console area - Humidity" sensor update to 57.37%
Z-Wave received "Console area - Luminance" sensor update to 1.21%
Z-Wave received "002 - Console area - Motion Sensor" status update battery level 5%
Ecobee Error Error in plugin execution runConcurrentThread:
Traceback (most recent call last):
File "plugin.py", line 164, in runConcurrentThread
File "plugin.py", line 318, in updateAllDevices
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/ecobee_devices.py", line 272, in updateServer
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/ecobee_devices.py", line 118, in updatable
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/pyecobee/__init__.py", line 158, in get_thermostats
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Ecobee.indigoPlugin/Contents/Server Plugin/pyecobee/__init__.py", line 123, in refresh_tokens
File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/api.py", line 111, in post
File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/api.py", line 57, in request
File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/sessions.py", line 477, in request
File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/sessions.py", line 587, in send
File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/adapters.py", line 467, in send
ConnectionError: ('Connection aborted.', error(54, 'Connection reset by peer'))
Ecobee Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Ecobee not authenticated to pyecobee yet; not initializing state of device M8RV
Ecobee not authenticated to pyecobee yet; not initializing state of device LG78
Ecobee not authenticated to pyecobee yet; not initializing state of device DJ8Z
Ecobee not authenticated to pyecobee yet; not initializing state of device DJ7V
Ecobee not authenticated to pyecobee yet; not initializing state of device FNJR
Ecobee not authenticated to pyecobee yet; not initializing state of device 310135690846
Ecobee not authenticated to pyecobee yet; not initializing state of device 315601667399
...but this is using v 1.2.3. I'm assuming you'd want me to install 1.2.4 (which I'm about to do) but just wanted to doublecheck.