[DEPRECATED] Ecobee DTH and Helper SmartApps

  1. v1.0.13 of Ecobee Thermostat should solve the problem - thanks for finding that one!

  2. Seems like a bug in the Mobile App - scrolling up/down is not handled (or even known) to a DTH. Which platform are you using (iOS or Android)? Either way, I would report it to SmartThings support, especially since they just released a new update to the Mobile App on both platforms.

The freezing is happening within Android. I can live with that for now.

Still having issues though with using the arrows to set temperature after upgrading. New errors this time:

d2277b64-93ac-468e-8b54-7d4809d4bbb8 ā€Ž1ā€Ž:ā€Ž25ā€Ž:ā€Ž44ā€Ž ā€ŽPM: error groovy.lang.MissingMethodException: No signature of method: static java.lang.Math.floor() is applicable for argument types: (java.lang.String) values: [5]
Possible solutions: floor(double), log(double), find(), acos(double), cos(double), cosh(double) @ line 1517
d2277b64-93ac-468e-8b54-7d4809d4bbb8 ā€Ž1ā€Ž:ā€Ž25ā€Ž:ā€Ž44ā€Ž ā€ŽPM: debug deltaTemp = 1
d2277b64-93ac-468e-8b54-7d4809d4bbb8 ā€Ž1ā€Ž:ā€Ž25ā€Ž:ā€Ž43ā€Ž ā€ŽPM: error groovy.lang.MissingMethodException: No signature of method: static java.lang.Math.floor() is applicable for argument types: (java.lang.String) values: [5]
Possible solutions: floor(double), log(double), find(), acos(double), cos(double), cosh(double) @ line 1564
d2277b64-93ac-468e-8b54-7d4809d4bbb8 ā€Ž1ā€Ž:ā€Ž25ā€Ž:ā€Ž43ā€Ž ā€ŽPM: debug deltaTemp = -1

This oneā€™s going to take me a bit longer to solveā€¦

v1.0.14 Ecobee Thermostat should fix the errors at lines 1517 and 1564.

Thank you for your patienceā€¦and assistance.

Ok. Iā€™m no longer getting any errors when using the arrows, but Iā€™m not sure if the changes itā€™s making are working correctly.

My current schedule is set to keep temps between 69 and 80. If I press up, it puts a hold on my ecobee to be between 79-84.

If I reset it back to 69-80, and press down, it puts the hold between 78-84. Is this behavior normal?

One other function that Iā€™m looking for that Iā€™m not sure is available in this DTH, is if I do change the temperature, to allow the hold to be held for 2 or 4 hours. The only hold options now are permanent or to the next scheduled time. Manually in the ecobee, it allows us to set the hold default option to be for 2hr, 4hr, next schedule time, permanent or to ask. Could there be an option to use the ecobee the other options or ecobeeā€™s default?

The up/down arrows have historically been problematic, especially when adjusting the temps while in Auto mode. Thatā€™s why we added the slider bars down below in the control panel - they give much more precise control (or they used to before the latest updates to the mobile app -things seem a little wonky now and then).

FWIW, when you are in Auto mode, the code is trying to set a temp range with the current temperature in the middle. Not sure why, but thatā€™s the way itā€™s been since before I started meddling with things. It is indeed difficult to determine what the arrows should be doing when you are in Auto mode (do you want to raise the heating setpoint or the cooling setpoint?).

As for the other options, those arenā€™t exposed by the API, so they would have to be implemented within Ecobee (Control), which can be a challenge given the limited number of scheduled events that can be used in a SmartApp. Itā€™s also very difficult to implement interaction of ā€œAskā€. That said, Iā€™ll have a look and see whatā€™s possible.

Understood. Iā€™ll use the sliders going forward. Keep up the good work.

Thanks for the great device handler. I am having problems with the ecobee Open Contacts app. I think line 77 needs to be changed from:
if ((contactSwitches != null) && (theSwitches != null)) {
to:
if ((contactSensors != null) || (theSwitches != null)) {
Because the name of the variable above is Sensors not Switches, and the section should only require one of them to be set, not both. Also, I think you should add submitOnChange: true to lines 64 and 71 so that the visible settings update without exiting the app. Thanks!

Grab the latest v1.0.6 version - fixed the errors you found, and made the whole experience a little more robust.

Thanks for finding the problems!!!

Thanks for the quick response @storageanarchy but I still canā€™t get this smartapp to work. As near as I can tell the sensorOpened routine never does anything because state.openedState is always null. The specific error I get in my live logging is below, but it seems to stem from the fact that state.thermSavedState never gets set.

My test set up is simply a fresh install (yesterday) of your device handler from scratch and a simulated switch to use as a trigger. When I turn the switch On nothing happens. When I turn it off, it errors out because thereā€™s no previous state to return the ecobee to. Iā€™m just getting my feet wet with SmartApps, and Iā€™m still learning the language, so I canā€™t see how to fix this one myself.

Thanks again.

Logs:
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:13:47 PM: error java.lang.NullPointerException: Cannot get property ā€˜71c64f5d-dca7-4f78-860e-fd8ca3608873ā€™ on null object @ line 302
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:13:47 PM: debug Open Contacts Handler Working on thermostat: Ecobee3 Thermostat
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:13:47 PM: debug Open Contacts Handler Restoring to previous state
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:13:47 PM: debug Open Contacts Handler whichAction contains HVAC
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:13:47 PM: debug Open Contacts Handler turnonHVAC() entered
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:13:47 PM: debug Open Contacts Handler Delay is zero, turning on nowā€¦
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:13:47 PM: debug Open Contacts Handler The on delay is 0 from 0
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:13:47 PM: debug Open Contacts Handler All Contact Sensors are now closed, initiating actions.
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:13:47 PM: debug Open Contacts Handler Returning true
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:13:47 PM: debug Open Contacts Handler Event name received (in lowercase): off
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:13:47 PM: debug Open Contacts Handler sensorClosed() entered with evt: physicalgraph.app.EventWrapper@fa56d5b
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:11:44 PM: debug Open Contacts Handler sensorOpened() entered with event Simulated Switch switch: on
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:11:11 PM: debug Open Contacts Handler initialize() exiting
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:11:11 PM: debug Open Contacts Handler initialize() entered
57f8eeae-01df-44c8-aff7-ab6d07deea00 6:11:11 PM: debug Open Contacts Handler installed() entered

Near total rewrite of Open Contacts (Contacts & Switches) is underway - new version available soonā€¦

I understand your frustration. After trying to sort this code out, I decided it would be faster and more reliable to simply rewrite it, so I did.

Get version 1.0.7 of ecobee-open-contacts.groovy.

I havenā€™t tested out 100% of the options combinations, but I have done enough to be pretty sure itā€™s all working. Let me know if you still have problems/issuesā€¦

Just in case anyone else is getting a disconnected message from STā€¦ I think ecobee is having site issues, as even their main site wonā€™t come up right now. @storageanarchy can correct me, but I think his app will reconnect when the site comes back up.

has anyone successfully got the open contacts to work correctly yet?

Have you installed the updated version I posted two days ago (v1.0.7)?

If that doesnā€™t work, please PM me with the symptoms/issuesā€¦

yes i have updated to the latest version.

So, can you please describe for me what isnā€™t working?

Thanks!
Barry

Hi,
I am seeing this in the IDEā€¦ I updated to the latest version.

d45c9fc4-18ef-427e-ab51-b3420a8d1b38  8:57:07 PM: info generateEventLocalParams() - updating API status
d45c9fc4-18ef-427e-ab51-b3420a8d1b38  8:57:07 PM: error refreshAuthToken() - HttpResponseException occurred. Exception info: groovyx.net.http.HttpResponseException: Bad Request StatusCode: 400
d45c9fc4-18ef-427e-ab51-b3420a8d1b38  8:56:37 PM: info generateEventLocalParams() - updating API status
d45c9fc4-18ef-427e-ab51-b3420a8d1b38  8:56:37 PM: error refreshAuthToken() - HttpResponseException occurred. Exception info: groovyx.net.http.HttpResponseException: Bad Request StatusCode: 400
d45c9fc4-18ef-427e-ab51-b3420a8d1b38  8:56:23 PM: trace Sent alerts (3ms)
d45c9fc4-18ef-427e-ab51-b3420a8d1b38  8:56:22 PM: error pollEcobeeAPI() - Auth_token refresh failed

Try re-authorizing with Ecobee in the (Connect) app - even if it doesnā€™t say that you need to. Your connection is lost for some reason ( the Ecobee cloud has been flaky for a couple of days).

Thanks!
Barry

@storageanarchy Hi Barry,
Would it be an easy thing to do to add an option to the ā€œEcobee Awayā€ helper app to not change to ā€œaway modeā€ if the Thermostat is already in Vacation Mode, but just leave it. I use an ST Routine to trigger ā€œEcobee Awayā€ and there isnā€™t a way to restrict it from running based on Ecobeeā€™s mode.

On a related note, I would still want the ā€œEcobee Resumeā€ app to resume the Ecobee from Vacation Mode, which it currently does.

The only work around that I can think of is to make sure Vacation Mode is set to kick in after we both leave.