Hello @gwithers105,
My ecobee Init is a smartapp that polls the My eccobee device(s) on a regular basis to ensure that the refresh token is renewed on a regular basis. Ecobee requires (contrary to some other cloud providers) to refresh its authorization token every 59 minutes for greater security. The code that I’ve developed is an interface between ST and ecobee, so there are some dependencies on both platforms.
The algorithm within MyEcobeeInit and MyEcobee device has been coded to renew automatically the token every 55 minutes or so. If it fails to renew the token, then the connection with ecobee will be lost.
As you can see, the algorithm will work the same after 1 hour or several days. So, if the smartapp works for more than 1 hour, it should work for days even months without issues provided that there are no other external factors (ex. connection issues between ST and ecobee or with your physical thermostat).
You can infer that there are 3 potential “points of failure”:
(1) It could be an issue on the ecobee side: there could be a temporary network issue or an issue with the ecobee servers.
(2) It could due to a (temporary) bad internet connection on your side. Ecobee thermostats connect thru wifi, so if the physical thermostat is not connected for a while, then you may not have control over the thermostat during that timeframe.
(3) It could also be an issue on the ST side. We’ve all experienced issues with ST scheduling. If the smartapp is not rescheduled every 20 minutes, and you don’t manually poll the thermostat thru ST, then the “refresh token” will not be obtained, and the authorization token will be lost.
In the logs, if one of these 3 potential points of failure happens, there will be an error msg such as
refresh_tokens> Authentication error, ecobee site cannot be reached
These points of failure are not easy to investigate.
I had myself a similar issue 3 days ago after months of continual operation.
For the point of failure no 3, in the IDE, you can check if the smartapp is rescheduled to run every 20 minutes by clicking on
https://graph.api.smartthings.com/location/list
And, then click on “smartapps” at the right for your location.
Then scroll down to My Ecobee Init, and click on it. You should see something like this:
If you don’t see any waiting “takeAction” or “pollHandler” job then it means that the job has not been rescheduled correctly.
P.S. You can also do the same for the ecobee3RemoteSensorInit smartapp, if you sensors are not updating within SmartThings, it could also be a connection issue (as stated above) or a ST scheduling issue.