[DEPRECATED] Universal Ecobee Suite, version 1.7.**

Here are the logs:

 app:36822019-05-18 06:19:56.541 pm traceauthPage() --> Valid OAuth token (biQYM8rmNaFG1iuaeJGTUclo0H8iekcR)
app:36822019-05-18 06:19:56.524 pm debugoauthInitUrl -  location: https://api.ecobee.com/authorize?client_id=NOpc6i5ooiLLi1VPtVlJ0uv9Nh5cCfcc&redirect_uri=https%3A%2F%2Fcloud.hubitat.com%2Foauth%2Fstateredirect&response_type=code&scope=smartRead%2CsmartWrite%2Cems&state=b75fcdcc-9dfb-4b73-9e88-3ff03aca524e%2Fapps%2F3682%2Fcallback%3Faccess_token%3Da7777194-4c12-4c31-820e-8ef15476c94d
app:36822019-05-18 06:19:56.444 pm debugoauthInitUrl with callback: https://cloud.hubitat.com/oauth/stateredirect
app:36822019-05-18 06:19:56.348 pm debugaccessToken: a7777194-4c12-4c31-820e-8ef15476c94d, a7777194-4c12-4c31-820e-8ef15476c94d
app:36822019-05-18 06:19:56.333 pm traceauthPage() --> Begin
app:36822019-05-18 06:19:24.003 pm debugswapped token: [access_token:biQYM8rmNaFG1iuaeJGTUclo0H8iekcR, token_type:Bearer, expires_in:3599, refresh_token:onrq3o1U9ZOMZPM45QJBAT42GBL4FDY4, scope:smartRead,smartWrite,ems]; atomicState.refreshToken: onrq3o1U9ZOMZPM45QJBAT42GBL4FDY4; atomicState.authToken: biQYM8rmNaFG1iuaeJGTUclo0H8iekcR
app:36822019-05-18 06:19:23.912 pm debugExpires in 3599 seconds
app:36822019-05-18 06:19:23.035 pm debugcallback()-->tokenURL: https://api.ecobee.com/token?client_id=NOpc6i5ooiLLi1VPtVlJ0uv9Nh5cCfcc&code=e69AMPpyxzBNTFLzx7N2o30GDT654SEX&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fcloud.hubitat.com%2Foauth%2Fstateredirect&state=b75fcdcc-9dfb-4b73-9e88-3ff03aca524e%2Fapps%2F3682%2Fcallback%3Faccess_token%3Da7777194-4c12-4c31-820e-8ef15476c94d
app:36822019-05-18 06:19:22.974 pm debugcallback() --> States matched!
app:36822019-05-18 06:19:22.969 pm debugcallback()>> params: [access_token:a7777194-4c12-4c31-820e-8ef15476c94d, code:e69AMPpyxzBNTFLzx7N2o30GDT654SEX, state:b75fcdcc-9dfb-4b73-9e88-3ff03aca524e/apps/3682/callback?access_token=a7777194-4c12-4c31-820e-8ef15476c94d], params.code e69AMPpyxzBNTFLzx7N2o30GDT654SEX, params.state b75fcdcc-9dfb-4b73-9e88-3ff03aca524e/apps/3682/callback?access_token=a7777194-4c12-4c31-820e-8ef15476c94d, atomicState.oauthInitState b75fcdcc-9dfb-4b73-9e88-3ff03aca524e/apps/3682/callback?access_token=a7777194-4c12-4c31-820e-8ef15476c94d
app:36822019-05-18 06:19:03.756 pm infoauthPage() --> RedirectUrl = https://api.ecobee.com/authorize?client_id=NOpc6i5ooiLLi1VPtVlJ0uv9Nh5cCfcc&redirect_uri=https%3A%2F%2Fcloud.hubitat.com%2Foauth%2Fstateredirect&response_type=code&scope=smartRead%2CsmartWrite%2Cems&state=b75fcdcc-9dfb-4b73-9e88-3ff03aca524e%2Fapps%2F3682%2Fcallback%3Faccess_token%3Da7777194-4c12-4c31-820e-8ef15476c94d
app:36822019-05-18 06:19:03.745 pm traceauthPage() --> Valid HE OAuth Access token (a7777194-4c12-4c31-820e-8ef15476c94d), need Ecobee OAuth token
app:36822019-05-18 06:19:03.719 pm debugoauthInitUrl -  location: https://api.ecobee.com/authorize?client_id=NOpc6i5ooiLLi1VPtVlJ0uv9Nh5cCfcc&redirect_uri=https%3A%2F%2Fcloud.hubitat.com%2Foauth%2Fstateredirect&response_type=code&scope=smartRead%2CsmartWrite%2Cems&state=b75fcdcc-9dfb-4b73-9e88-3ff03aca524e%2Fapps%2F3682%2Fcallback%3Faccess_token%3Da7777194-4c12-4c31-820e-8ef15476c94d
app:36822019-05-18 06:19:03.483 pm debugoauthInitUrl with callback: https://cloud.hubitat.com/oauth/stateredirect
app:36822019-05-18 06:19:03.319 pm debugaccessToken: null, null
app:36822019-05-18 06:19:03.309 pm traceauthPage() --> Begin
app:36822019-05-18 06:18:59.813 pm debugdevice handlers = true
app:36822019-05-18 06:18:30.357 pm debugtesting for device handlers

Yes - you're broken until I post new code. The uninstall/reinstall was for intended for @jrau272 - I messed up my responses.

Hang tight - almost there (I think).

i’m actually getting the same error on authentication as @JDogg016. it happened the first time I signed in too now that I think about it, but then everything seemed to work anyway. I just tried to re-auth and that 500 error came up.

Yes, I am able to select my thermostats and control them so I think the ‘500’ error is a bit of a red herring.

Everybody hang tight - I'll be posting updates to a lot of files soon to clean up MOST of the reported errors. I just have to finish coding around the fact that Hubitat reads currentValue from a cache and thus misses updates. Fortunately the fix is simple: (device.currentValue(attributeName, **true**), I just have to add a mountain of isST/isHE checks...

Universal Ecobee Suite Updates posted 19 May 2019 at 3:45pm

Spent a lot of time squashing bugs across the Suite, mostly related to data type handling in the Thermostat device. In the process, learned that Hubitat caches sendEvent data where SmartThings always returns the latest value. Fortunately, the fix is straightfoward, but it was tedious to catch all the possible escapes.

I also optimized the way data is being written to atomicState variables, which should both significantly reduce the writes sent to the backing store (state/atomicState). This will improve both performance and the longevity of the Flash storage on Hubitat.

Most (but not all) of the files where updated, so I advise just re-importing everything from the master repository at GitHub - SANdood/Ecobee-Suite: Universal Suite for integrating Ecobee thermostats & sensors with Hubitat and SmartThings home automation platforms (Free!).

@jrau272 & @JDogg016

I'm not quite sure what has been causing your login/authentication issues. I just posted an update that might help, but I can't be sure.

I have tried to recreate your problems, but I am able to re-authenticate without issue. There may be a big of confusion when you get to the page that says you're connected - I think it says "close this page and Click Done". For me, once I closed the page, I had to get back to the Hubitat Console page, and then re-run Ecobee Suite Manager. Clicked on "Ecobee API Authorization", then clicked "Next" and then finally "Done". Then when I re-enter Ecobee Suite Manager, everything works as it is supposed to.

Now that I'm done bug-killing, I'll be more readily available to work with both of you to get things running...my apologies for the delay and the frustration I am sure you have been experiencing.

no worries! really appreciate your hard work.

It actually seems to be working after the update. I re-authenticated and did not get the 500 error, instead I got a page that said I was now connected to smartthings. When I put the hub in away mode, it changes the ecobees and doesn’t throw any errors.

question: I don’t see a way to have it change program mode just based on time or presence (other than to have it change when the hub mode changes) is this correct? or am I missing something?

1 Like

Good News - thanks! I'm glad it's working for you now!

I added the Switches support to the Smart Mode/Switches/Program helper so that you could drive actions from just about anything. I would suggest using Rule Machine to turn on a Virtual Switch based on whatever criteria you would like, then configure a Smart Mode/Switches/Program helper that runs when the Virtual Switch is turned on.

I have 4 such Virtual Switches (Good Morning!, Goodbye!, I'm Back! and Good Night!)...for now, the switches are driven by my SmartThings Routines of the same names, but they turn on a Virtual Switch (via HubConnect) that lets my Hubitat handle the Activity...

Cool. That’s what I’m doing, I just wanted to make sure I wasn’t missing anything.

Thanks again!

1 Like

If you have any suggestions for better integration, let me know. What would make the Suite better?

I suppose time based changes and presence based changes would be nice to have in the app. those are basic things that the ecobee app can do, it would just be nice to have everything in one location for ease of use and simplicity.

The thermostat scheduler program that is built into hubitat does this as well, the problem with ecobee is that it uses this idea of program modes to set the schedule and hubitat does not support that.

don’t get me wrong - the suite is much better than the built in ecobee integration and it seems to be working well with lots of interesting features. just some food for thought.

1 Like

Great suggestions!

I generally try to avoid re-inventing the wheel, and so I have avoided implementing things like presence- and time-based changes directly (as so for notification engines and weather stations). Using the Ecobee app/website to manage schedules, for example, are significantly easier for the user than trying to cobble together a decent UI on either Hubitat or SmartThings. And since both platforms offer a plethora of means to trigger things (even if only to turn on a virtual switch), I have focused instead on making it easy to drive actions on the thermostat, rather than attempting to directly implement presence or timers.

You can of course use the Hubitat thermostat scheduler, but it really dumbs-down the Ecobee, preventing use of many of its advanced features (Smart Recovery, follow-me, auto-away, etc.). For me, when I pay over $200 a thermostat (for 7 of them at this point), I really don't want to turn them into HA versions of the old Honeywell wall puck :slight_smile: .

For me, ease of use in Home Automation is about connecting triggers into actions, so when I leave my house I want the doors to lock, lights & home entertainment to turn off, alarm monitoring turned on, and the temperature set back. The only thing I let my thermostat drive is Vacations: I schedule them on the Ecobee, and when it/they change to Vacation Mode (program), they also tell my house to go into Vacation mode. Other than that, my Ecobees are just another appliance to be automated...

I hope you enjoy the Ecobee Suite - lots of neat stuff that you can do with it, much of which has been driven by other users.

Bee Cool!!!

Universal Ecobee Suite updates posted 20 May 2019 at 11:15am EDT

Fixes include:

  • Ecobee Suite Manager version 1.7.06: Fixed deleteSensorFromProgram()
  • Ecobee Suite Thermostat version 1.7.06: More data type optimizations

These updates are recommended for ALL users

Universal Ecobee Suite update posted 20 May 2019 at 2:45pm
Fixes:

  • Ecobee Suite Contacts & Switches version 1.7.02. Fixes SmartThings initialization error

This update is recommended for ALL users

I think Mode helper is backwards. I have two thermostats that I set to different comfort modes when the mode switches to Night.

My upstairs thermostat is supposed to switch to sleep comfort mode when the house mode changes to night. Instead it behaves as the downstairs thermostat and switches in to away mode. The downstairs thermostat does the exact opposite of what it is supposed to do as well, that is to say instead of switching to away mode it switches to sleep mode.

I can't imagine how that could happen - an instance of the Mode/Switch/Program Helper can only send commands to the configured thermostat(s). I'm sure you've done this, but double-check that each of your Helpers is configured with the correct thermostat device and desired program.

You should also have the two Helpers scheduled to run perhaps 2-5 minutes apart, if only to help with the debugging.

If you run Live Logging to watch the thermostat while the Helpers are changing each thermostat's programs, you should see some messages about what is supposed to be happening, and any errors (the errors may also show up in the logs for Ecobee Suite Manager).

If you can see/find any Error or Warning messages in the logs, please PM them to me and I'll try to figure out what's wrong...

I will watch the logs when I switch modes tonight.

You don't have to wait - can test it by manually changing your location mode from the Hubitat Console/Settings/Location and Modes/Modes

Universal Ecobee Suite updates posted 21 May 2019 at 4:45pm EDT

Fixes include:

  • Ecobee Suite Manager version 1.7.07:
    • More main loop optimizations
    • Added a "Check Wifi" notice on the label if Ecobee reports the wifiAlert to us
  • Ecobee Suite Thermostat version 1.7.06:
    • Fixed setFanMinOnTime()
  • Ecobee Suite Mode/Switches/(Routines)/Program Helper version 1.7.05
    • Fixed thermostatHold type comparison

These updates are recommended for ALL users!

1 Like