Ecobee App/Driver Port from SmartThings

So I spent a little time getting storageanarchy 's ecobee SmartApp/DTH ported over to Hubitat. It's still very early and I've only tested using the status values so far. It's a huge code base with a ton of features I still haven't used all myself with it running on ST. There are a few errors with conversion to int with weather info I've seen in the logs but basic functionality seems to work.

I needed to change the OAuth method to PIN authentication from the original redirecting to ecobee's site. I wasn't able to get the redirect function to work on Hubitat and it makes sense since it's a local device and the domain name wouldn't match for the OAuth parameters.

I have a fork on Github with the current version:
https://github.com/mattw01/Ecobee-Suite/tree/hubitat-dev

Let me know how it works!

2 Likes

Thanks. Just installed the two drivers and the 9 apps (Main app plus 8 ‘helper’ apps). PIN is authorized on the Ecobee site. I did reboot the Hub after installation.

I have two thermostats and a total of 12 sensors. When I select the thermostats, it does say there are two available ‘[0/2]’ but only one shows and can be selected? It also shows that there are seven sensors ‘[0/7]’ and only one shows and can be selected? The one thermostat that does show is the one that has seven sensors associated with it (the second thermostat that is not showing has five sensors associated with it.)

I only did OAUTH on the main Ecobee Suite Manager app. Is that correct? Or do I not use OAUTH with the PIN access?

Thanks for finding that. I have a minimal setup with one thermostat and sensor so I didn’t see that issue. I was able to reproduce it with a test app. There was an extra level on the thermostat and sensor map so it was only showing the first element. I updated the github repository. Only the manager app needs to be updated. Hopefully that fixes it.

Yep, the main manager app is the only one that needs OAuth.

It’s a long process installing all 9 apps manually without github integration. I haven’t tested but it’s possible that the manager app and 2 drivers are the only ones required. It shouldn’t use any of the helper apps unless you go into that menu in the manager app. I’m not 100% sure but it might be worth trying if anyone else just needs the basic functions.

Great. That worked. I have it installed. I’ll see what I can do with it now. Thanks for this.

1 Like

I do use the Contacts and the Mode/Routine/Program helper apps. Neither of those work right now.

Great start. Looking forward to seeing all the progress on Hubitat Apps & Drivers.

I haven’t looked into the helper apps yet, but I’m assuming Contacts is tied in with ST notifications and contact book. Might be able to reproduce some of the other functionality with Rule Machine and custom commands on the thermostat.

Contacts is as in ‘Door Contact’ or ‘Window Contact.’ It allows the thermostat to be shut off if the contact is left open for X minutes. I did look at RM but I was having an issue there that is was not allowing me to create a Custom Command to set the Mode of the Ecobee to Home/Away/Sleep. I will try to create a rule for the Contact part I was using.

Hey Matt,

Got it installed and a basic setup to turn on A/C when temp gets to high :slight_smile:

It took me a while to figure out since the user manual doesn’t have any Hubitat info. Would it be too much to update for us noobs?

Thanks again
Rick

Thanks all installed without any issues.

Installed drivers
Installed Apps
Ran the App to get pin
Logged into ecobee to add App with pin
Rebooted Hub
Ran app and setup :slight_smile:

1 Like

Anyone else seeing these error?

app:6902018-03-30 07:38:00.591:warnpollEcobeeAPI returned false

app:6902018-03-30 07:38:00.584:errorpollEcobeeApi() _ Auth_token refresh failed

Anyone else seeing these?

Looks like an authorization error? Run through the setup instructions again.

I did exactly this, got past the PIN, but after reboot where I go to enter credentials, I get a 500 error.

I removed app and remvoed from ecobee site a few times, but not getting anywhere.

Do I need OATH for the app (I belive so, and have set that), thats the only thing I can think of

Removed the devices. Removed the authorization from ecobee site, and started over. Got it to work this time. I have 2 ecobee’s and 6 sensors. All seem to be working great. I’ve just started recreating some pistons from WC to change modes of the thermostats based on location modes in HE. It looks like it should work fine, as it did in ST.

Has anyone using this app and device drivers had any issues?

The API has been staying connected and updating without any issues for me. I still haven’t done anything too complex with it yet, but I did find an issue with setThermostatProgram('[ProgramName]'). This method is trying to access the hold type and has an error. It looks like Hubitat has a different syntax for accessing settings on the parent app. Instead of parent.settings.settingName it’s parent.settingName. There’s another thread here too that references this difference. I’ll update the Github repo soon with this fix.

Thanks for all the work. I’ve finally got all my devices other than door locks moved over. Started working on pistons, and realized that one of mine which changes ecobee mode to match HE mode was not working, came here to check and see if others are having the same issue, and sure enough, this was the last post. Exactly what I was looking for. :slight_smile:

I’ll keep an eye out for future updates. Thanks again!

In the thermostat driver on line 2565 there is an error.

Changing parent.settings.holdType to parent.holdType fixes. This was stopping me from being able to set the temperature on the thermostat.

Actually, parent.settings is referenced a lot throughout the code. I think it may need to be updated.

I made the parent.settings. --> parent. change in all the ecobee devices and apps. I also changed the thermostat driver around lines 702-708 where the ‘options:’ is used and added additional hard brackets “[ ]”.
options:[["Permanent"], ["Temporary"], ["Hourly"], ["Parent"], ["Thermostat"]]
and
options:[[2],[4],[6],[8],[12],[16],[24]]

I also changed line 1124 from
def avg = ((device.currentValue('heatingSetpointDisplay').toDouble() + device.currentValue('coolingSetpointDisplay').toDouble()) / 2.0).toDouble().round(precision.toInteger()).toString()
to
def avg = ((device.currentValue('heatingSetpointDisplay').toFloat() + device.currentValue('coolingSetpointDisplay').toFloat()) / 2.0).toFloat().round(precision.toInteger()).toString()

That seems to have eliminated the errors I was seeing.

Still testing. Will report back any errors or items not working.

I am finding that many of the errors I see in the logs are because the 'States" value is Null. I have two thermostats, both use the same driver. One shows 73 ‘States’ populated with values, the other shows ‘43’ states populated with values? Errors show up much more frequently with the thermostat that is only showing 43 stats populated and most of those are because the value it is looking for is Null. Both thermostats are Ecobee3 (same model purchased at the same time) and on the same account.

Is there some command or method to force a polling of all the states so they get populated initially? I wonder if that would help?

UPDATE: I just went into the EcoBee website and update the thermostat name (no other changes). I came back into the Ecobee Service Manger app and selected the new name. Now both thermostats are showing all (I think) states. Maybe my connection to the Ecobee API was somehow incomplete??? Looks good now.

One additional change to the app. Since Hubutat has limited 'runEvery' commands:

I changed line 1319 from:

if ((pollingInterval < 5) && (pollingInterval > 1)) { // choices were 1,2,3,5,10,15,30
to

if ((pollingInterval < 5) && (pollingInterval > 0) && (pollingInterval == 10)) { // choices were 1,2,3,5,10,15,30

I was getting an error when I set the interval to one minute because the code was using runEvery1Minute, which is not valid in Hubitat. The change above allows the correct scheduling using the cron scheduling format.

Download the Hubitat app