Vera - Smarter Home Control Forum

General => Temperature Monitoring & HVAC Control => Topic started by: chadsell on March 20, 2015, 09:39:43 pm

Title: Ecobee3 control from VeraEdge UI7
Post by: chadsell on March 20, 2015, 09:39:43 pm
I have my Ecobee3 connected to my VeraEdge via the Ecobee plugin. I can see data from the Ecobee, but I can't seem to make any changes to the set points or system heat/off/cool settings. Whenever I try to use the ecobee in a scene, the settings show up, but are all faded/greyed out and can't be changed.

I'm trying to set it up so that the thermostat shuts off (or goes to significantly lower set point) when the front door has been open for ore than a 30 seconds. I think I've got everything else set up right, but the inability to change the actual settings has proven to be quite the road block!

Does anyone else use an ecobee with UI7 and/or VeraEdge? Any tips?
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: watou on March 20, 2015, 11:10:14 pm
I can reproduce your experience using the published Ecobee plugin on UI7 1.7.1018 on a VeraEdge.  I can change the mode from Off to Heat (for example) from the UI, but not when trying to define a scene, as the choices are greyed out.  The plugin does not have this issue on UI5, so I would say this is a UI7 bug that Vera ought to fix. 

My only advice is to report this bug to Vera and hope they fix it.  If they don't fix the bug in a reasonably short timeframe, there are other home automation products (including free and open source) that work with Ecobee that don't have this sort of issue.

watou
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: chadsell on March 20, 2015, 11:56:37 pm
Thanks, Watou. I'll let the support at micasaverde know about the bug.

Do you have recommendations for other home automation platforms that might be worth looking into?
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: watou on March 21, 2015, 12:30:37 am
Thanks, Watou. I'll let the support at micasaverde know about the bug.

Do you have recommendations for other home automation platforms that might be worth looking into?

It's hard to recommend one over the other without knowing a lot more about your objectives, but...  Ecobee can be monitored and controlled with Vera, SmartThings, IFTTT, and OpenHAB (and maybe others).  I'm personally interested in OpenHAB because it's free, open-source, very capable, runs on lots of different hardware, and is not a "black box" controlled by a private company.  (I also wrote the Ecobee and Nest bindings for it.)  That being said, it's a bit technical to set up in its current form and requires more computer knowledge to get going than pre-packaged commercial products.

watou
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: tomgru on March 21, 2015, 12:45:52 pm
Watou,

Don't leave us man! 😊

You still planning on supporting this at some point?  I'm still waiting for Ecobee to give access to the remote sensors so 'you' can incorporate into the plugin  ;D
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: watou on March 21, 2015, 01:09:11 pm
I'm still hanging around, and hoping that someday the Vera developers get UI7 back to the point UI5 achieved, where a plugin author can make a thermostat plugin that works correctly (i.e., can respect the various setpoints of the actual device) and looks like the "native" thermostats (has the current temperature in the right place and other UI basics).  I'm much in the same frame of mind as other plugin developers you've probably heard from in other threads.  I worry about releasing plugin updates that only fix/improve the shrinking list of things I have control over, only to be critiqued that setpoints, scenes and UI features are still obviously broken.  I continue to marvel at the state of UI7 with respect to plugins.

I hope to add support for remote sensors to the Ecobee plugin, but it's always disappointing to see the limits in UI7 that weren't there in UI5.

watou

Watou,

Don't leave us man! 😊

You still planning on supporting this at some point?  I'm still waiting for Ecobee to give access to the remote sensors so 'you' can incorporate into the plugin  ;D
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: chadsell on March 21, 2015, 08:18:58 pm
I just stumbled across this alternate UI:
http://forum.micasaverde.com/index.php/topic,30310.0.html

I'm going to install it now and see if it fixes the problem with thermostats. The author thinks it should, but doesn't have a 'stat to test with.

Fingers crossed!
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: chadsell on March 22, 2015, 12:04:18 am
Well, I can't seem to create new scenes in AltUI at all, yet. Not sure it it's my problem, or the UI's.

However...

Back on UI7, I tried setting up my trigger/scene with PLEG. When I got to the action, I used the "Advanced" function to "SetCurrentSetpoint." And it totally worked!

Moral of the story: Control of the ecobee3 in scenes totally works, but you have to use luup codes and/or PLEG to make it happen. No GUI buttons.
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: amg0 on June 06, 2015, 04:47:13 pm
Since then,  ALTUI scene editor is finished, you may want to give it another trial
http://forum.micasaverde.com/index.php/topic,30310.0.html

Good luck
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: watou on June 08, 2015, 08:33:51 pm
I am currently testing the changes described in the issues for the v1.2 version of the plugin:

https://github.com/watou/vera-ecobee/issues?q=is%3Aopen+is%3Aissue+milestone%3Av1.2 (https://github.com/watou/vera-ecobee/issues?q=is%3Aopen+is%3Aissue+milestone%3Av1.2)

11. Point to official api.ecobee.com endpoints
12. Repoint external icon references to http://watou.github.io/vera-ecobee/icons/*.png
13. Map home/away buttons to set hold for named climates for non-EMS thermostats
14. Add temperature, humidity and/or motion devices for remote sensors
16. Change min poll frequency to 3 minutes per API docs

When I think it's solid enough, I will submit it to the apps site for Vera and post same here.

A later v1.3 will have minor improvements when running on UI7, but the above changes are disruptive enough that I decided to release them first.

watou
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: tomgru on June 08, 2015, 11:35:07 pm
I am currently testing the changes described in the issues for the v1.2 version of the plugin:

https://github.com/watou/vera-ecobee/issues?q=is%3Aopen+is%3Aissue+milestone%3Av1.2 (https://github.com/watou/vera-ecobee/issues?q=is%3Aopen+is%3Aissue+milestone%3Av1.2)

11. Point to official api.ecobee.com endpoints
12. Repoint external icon references to http://watou.github.io/vera-ecobee/icons/*.png
13. Map home/away buttons to set hold for named climates for non-EMS thermostats
14. Add temperature, humidity and/or motion devices for remote sensors
16. Change min poll frequency to 3 minutes per API docs

When I think it's solid enough, I will submit it to the apps site for Vera and post same here.

A later v1.3 will have minor improvements when running on UI7, but the above changes are disruptive enough that I decided to release them first.

watou

Such a good line: 

but the above changes are disruptive enough that I decided to release them first   :-)

Assume you are not ready for us to beta test?
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: NickTheGreat on June 09, 2015, 02:35:09 am
I am currently testing the changes described in the issues for the v1.2 version of the plugin:

https://github.com/watou/vera-ecobee/issues?q=is%3Aopen+is%3Aissue+milestone%3Av1.2 (https://github.com/watou/vera-ecobee/issues?q=is%3Aopen+is%3Aissue+milestone%3Av1.2)

11. Point to official api.ecobee.com endpoints
12. Repoint external icon references to http://watou.github.io/vera-ecobee/icons/*.png
13. Map home/away buttons to set hold for named climates for non-EMS thermostats
14. Add temperature, humidity and/or motion devices for remote sensors
16. Change min poll frequency to 3 minutes per API docs

When I think it's solid enough, I will submit it to the apps site for Vera and post same here.

A later v1.3 will have minor improvements when running on UI7, but the above changes are disruptive enough that I decided to release them first.

watou
I like the sound of being able to use the remote sensors in Vera
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: rafale77 on June 09, 2015, 05:37:01 am
All of this is pretty exciting news! That would enable coordination of the Econet registers to the ecobee!
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: watou on June 09, 2015, 06:44:07 am
@tomgru: As long as you and other users don't disagree with the descriptions of these changes (at github), I don't see the need to have a beta test.  I will probably feel ready to upload v1.2 later today, and then it will take the Vera people some time to review the changes.

@anhman and @NickTheGreat: The remote Ecobee sensors appear as standard motion and temperature sensors, so you ought to be able to automate with them.  Please note that if your wireless remote sensor goes offline, the device will set CommFailure to 1 and CurrentTemperature to -500 (if using Fahrenheit, or equivalent in Celsius).  Also, the motion sensors can take up to 3 minutes to trip (the new minimum polling cycle), and stay tripped until 30 minutes after last motion (according to Ecobee).

watou
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: watou on June 09, 2015, 04:25:38 pm
I've submitted v1.2 of the Ecobee plugin to the app store, and updated the documentation:

http://watou.github.io/vera-ecobee/ (http://watou.github.io/vera-ecobee/)

The docs have a quick screen shot of some sensor devices in UI5.

Hopefully v1.2 will be made available soon.  Once it installs, it will take one or two 3-minute polls before your sensors start to show up, and then you will probably have to refresh your browser.

Please let me know detailed problem reports in case I missed something.

Regards,
watou
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: slief on June 09, 2015, 04:51:58 pm
Thank you very much Watou for your efforts and contributions! I removed the original plugin after the polling issue you posted recently just to insure I was contributing to the Ecobee spamming issue. As such I am looking forward to getting it installed and actually being able to take advantage of my new Ecobee3 in conjunction with my Vera and new Econet vents.

Thanks again for your hard work!
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: watou on June 09, 2015, 04:57:57 pm
Thank you very much Watou for your efforts and contributions! I removed the original plugin after the polling issue you posted recently just to insure I was contributing to the Ecobee spamming issue. As such I am looking forward to getting it installed and actually being able to take advantage of my new Ecobee3 in conjunction with my Vera and new Econet vents.

Thanks again for your hard work!

You're welcome!  Please let me know if there are plugin problems once you have it installed and running.
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: slief on June 09, 2015, 05:43:17 pm
Thank you very much Watou for your efforts and contributions! I removed the original plugin after the polling issue you posted recently just to insure I was contributing to the Ecobee spamming issue. As such I am looking forward to getting it installed and actually being able to take advantage of my new Ecobee3 in conjunction with my Vera and new Econet vents.

Thanks again for your hard work!

You're welcome!  Please let me know if there are plugin problems once you have it installed and running.

Will do. I will be keeping an eye out on the App interface and here for news on the new Apps release. As soon as it's available, I will install it. Thanks again!
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: Sig on February 04, 2016, 11:17:06 am
Bumping this thread...

@watou - through trial and error, I've figured out (I think) that the plugin (or rather Ecobee) will only support one instance of the plugin for a single Ecobee account, meaning, in my case, I have two thermostats (two homes) that I have setup through a single Ecobee account, and when I authorize one Vera to control Ecobee by securing a PIN and putting it into the Ecobee interface, it knocks my other Vera off.  So it seems that in order to control both thermostats through Vera, I would need to have both thermostat controls exist in only one of my Vera instances (i.e. primary home + vacation home both on my primary home's dashboard), because Ecobee is only maintaining one PIN code to allow Vera control.  Not ideal, but doable.

Question: Have I reached the correct conclusion, or is something else going on and should I be able to control each thermostat in each of my two separate Vera instances?  Extending that, do I need to decide if I want to control my Ecobee thermostats in a single Ecobee account, or a single Vera dashboard, but cannot do both?

Also, I'm now contemplating an upgrade to UI7.  Is the plugin working in UI7 these days?

Thank you.
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: watou on February 04, 2016, 11:38:02 am
Bumping this thread...

@watou - through trial and error, I've figured out (I think) that the plugin (or rather Ecobee) will only support one instance of the plugin for a single Ecobee account, meaning, in my case, I have two thermostats (two homes) that I have setup through a single Ecobee account, and when I authorize one Vera to control Ecobee by securing a PIN and putting it into the Ecobee interface, it knocks my other Vera off.

It's not supposed to work that way.  The OAuth flow is confusing and hidden from users, but a PIN is "exchanged" for a unique auth token, from which are produced refresh and access tokens which are rotated once an hour.  You don't want to copy any of those three tokens to other plugin instances, because one instance will rotate the tokens, pulling the rug out from the other instance.  So pressing "Get PIN" on one Vera, entering the PIN at ecobee.com, and then doing those same steps on the other Vera, should not cause any conflict.

do I need to decide if I want to control my Ecobee thermostats in a single Ecobee account, or a single Vera dashboard, but cannot do both?
No; you should be able to use any number of Veras to control any number of Ecobee thermostats through any number of Ecobee accounts (subject to Ecobee's limits of registering a thermostat with only one ecobee.com account, and whatever limit they have for number of thermostats per account).

Also, I'm now contemplating an upgrade to UI7.  Is the plugin working in UI7 these days?

It works, but the UI is wrong because of the incompatible change to setpoints in UI7, and a lack of documentation on how to update a working UI5 thermostat plugin for UI7 (unless it's quietly appeared in the meantime and I'm not going to go hunt for it).

Title: Re: Ecobee3 control from VeraEdge UI7
Post by: Sig on February 04, 2016, 11:42:44 am
Thanks @watou. 

Clearly I must have something else going on then.  Right now, my weekend home Vera is successfully maintaining a connection to my Ecobee and has been for at least a couple months.  Not the case for my primary home.  And when I go in and get a new PIN for my primary home Vera, it seems to knock out the weekend home.  Odd...

I will try one more time setting a PIN for my primary home and keep a close watch and report back.
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: kevink619 on August 26, 2016, 03:28:35 pm
Hi,

I've installed the latest version (1.6), but when I attempt to create a scene, all options are grayed out. Also, I don't see any option to control the fan. I have added, removed, and re-added and authorized my Ecobee probably 20 times already, but no such like. Do I need to do a factory reset of of my Vera and Ecobee?  What am I doing wrong? Are there any other Ecobee plug-ins that I should try?
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: kevink619 on August 26, 2016, 10:08:11 pm
Are there ANY plugins that support Ecobee under UI17?  I'm stuck with the latest firmware and have not be successful in downgrading to 1.5.622. Ready to return this piece of junk!
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: Sig on August 26, 2016, 10:30:54 pm
Yes, there is an Ecobee plugin in the App store.  It works.  I use it.  Install it, click the "Get PIN" button, and when the PIN returns, register that PIN as an authorized app in the app control settings in your Ecobee web interface.

The only issue I have with the plugin is that sometimes my thermostat will "un-register" from Vera (i.e. Vera no longer communicates with it) and I have to re-register using the above process.  But I think (and this is just a guess) that this has something to do with the fact that I have two Ecobee thermostats in my Ecobee account (one in my primary home, one in my weekend home).  One will occasionally de-register (seems to fluctuate between the two homes with no rhyme or reason) but the other will remain fine.  This seems to happen every couple of months or so.  I reported it to the app developer, but he hadn't heard of the issue with any other users, so again, there must be something unique about my setup/configuration.  But generally speaking, it works.

Good luck.
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: kevink619 on August 27, 2016, 08:37:36 pm
Well, after MUCH frustration, I discovered a workaround:

The free beta VeraMobile app for Windows 10 lets me successfully create an event with the Ecobee plugin! And I can still keep the latest UI otherwise.

https://www.microsoft.com/en-us/store/p/veramobile-beta/9nblggh1rl9l

Kevin
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: gleech on October 03, 2017, 10:58:17 am
Bumping this thread.

I'm on UI7 and just purchased Nest Protect. I'm creating a scene using the Nest Protect as trigger and then change the state of the Ecobee to OFF. I can control the state of the Ecobee on the dashboard but whenever I tried using it on the scene, I cannot select the state of the Ecobee or even change the temperature on the scence.

Any workaround? MY ecobee plugin is version 1.8
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: RoyR on January 05, 2018, 04:11:15 pm
Please update this for UI7...thanks.

I've submitted v1.2 of the Ecobee plugin to the app store, and updated the documentation:

http://watou.github.io/vera-ecobee/ (http://watou.github.io/vera-ecobee/)

The docs have a quick screen shot of some sensor devices in UI5.

Hopefully v1.2 will be made available soon.  Once it installs, it will take one or two 3-minute polls before your sensors start to show up, and then you will probably have to refresh your browser.

Please let me know detailed problem reports in case I missed something.

Regards,
watou
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: rafale77 on January 05, 2018, 05:43:38 pm
I know it is working for me but I am using Lua code rather than the scene editor. I think it would be fairly easy for me to fix by adding the ecobee housemode device to be accessible by the scene editor but in the meantime try

Code: [Select]
luup.call_action("urn:ecobee-com:serviceId:Ecobee1","SetClimateHold", {HoldClimateRef = "mode"},ecobid)
where ecobid is the device number of your ecobee house mode device
"mode" is "home", "away", "night" or "smart1"
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: azharakbari77 on January 16, 2018, 04:03:53 pm
Hi,

I was able to successfully add Ecobee Plugin on Veraplus (UI7). I tried creating scene for the motion detector in the thermostat and noticed that it only work intermittently (I am sending email notification and turning on a light upon motion detection). Has anyone tried using the thermostat's motion detector to trigger a scene?

Thanks
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: dbwiddis on January 19, 2018, 01:27:44 am
I know it is working for me but I am using Lua code rather than the scene editor.
I am able to set home/away/vacation/etc. in UI7 (with one of the many thermostat devices that has appeared) but not adjust temperature setpoints.
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: tbrock47 on February 04, 2018, 04:28:16 am
Somewhat new to lua scripting, but I've accomplished quite a bit with my dimmers.
However, when I query ecobee motion sensor variables, I get multiple values back.

For Example:
Code: [Select]
print( luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1","Tripped",64) )
1 1517733365
So its returning '1' as expected stating that the sensor is tripped, however it also includes the LastTrip time as well.

If I query LastTrip, I actually get two times back. The last two trips I assume...
Code: [Select]
print( luup.variable_get("urn:micasaverde-com:serviceId:SecuritySensor1","LastTrip",64) )
1517733119 1517733365

Can anyone explain this behavior and explain how to extract each of those variables independently?

On a side note, the last trip times are unreliable. They don't appear to update unless the device is changing from a not tripped state to a tripped state (still testing this). It doesn't update the time stamp if the device is currently tripped. It only appears to maintain the tripped state as long as it sees motion and keeps the timestamp of when tripped last flipped from 0 to 1.

The only way to get more a more current status is by querying both tripped and LastUpdate and use them together. However, last update has the same problem of maintaining two values in one variable. I need to be able to separate the two.

Thanks in advance.
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: watou on February 04, 2018, 09:01:33 am
The source code to the plugin here:

https://github.com/watou/vera-ecobee/blob/master/src/I_Ecobee1.xml#L809

shows that the LastTrip time is only coming from what is observed from using the API.  The API does not give a trigger time itself, only the current state.  I recall seeing Z-Wave PIR motion sensors do something similar, where they don't repeatedly report being tripped until their pre-set time of no motion has ended.  This is particularly good for battery-powered sensors.

In order to implement urn:micasaverde-com:serviceId:SecuritySensor1 for ecobee remote sensors, these device variables had to be provided with the closest possible values.  Ecobee's remote sensors don't have an API to report when the last motion occurred.

https://www.ecobee.com/home/developer/api/documentation/v1/objects/RemoteSensorCapability.shtml

For the openHAB plugin I wrote,  I gave an example of tracking last occupancy using ecobee remote sensors:

https://docs.openhab.org/addons/bindings/ecobee1/readme.html#tracking-last-occupancy

I hope this helps.
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: tbrock47 on February 05, 2018, 10:02:47 pm
Thanks. I'll look over your links likely tomorrow and see if that helps my understanding.
I did figure out how to assign both results from the query to their own variable after some quick googling. (Embarrassingly simple)

I do have a question about the result order. Using lastupdate as an example, it provides the older of the two times in the first position. Can those be reordered in the plug-in or is that just how the API provides it? I say that because if someone only assigns that output to a single variable, they end up with the older of the two times rather than the more valid data of the two.

Sent from my LG-H918 using Tapatalk

Title: Re: Ecobee3 control from VeraEdge UI7
Post by: watou on February 05, 2018, 11:23:44 pm
Using lastupdate as an example, it provides the older of the two times in the first position. Can those be reordered in the plug-in or is that just how the API provides it? I say that because if someone only assigns that output to a single variable, they end up with the older of the two times rather than the more valid data of the two.

The code is setting LastUpdate this way:

Code: [Select]
       ["LastUpdate"] = function(t) return tostring(toSeconds(t.runtime.lastModified)) end,

According to the ecobee API documentation, lastModified should be set in the format YYYY-MM-DD HH:MM:SS.  The toSeconds function takes that format and turns it into seconds:

Code: [Select]
    -- convert "2013-02-20 23:23:44" to number of seconds since 1/1/1970
    local function toSeconds(dateString, useLocal)
      useLocal = useLocal or false
      local year, month, day, hour, min, sec = string.match(dateString, "(%d+)%-(%d+)%-(%d+) (%d+):(%d+):(%d+)")
      local offset = useLocal and 0 or (os.time() - os.time(os.date("!*t")))
      return os.time{year=year, month=month, day=day, hour=hour, min=min, sec=sec} + offset
    end

If there is an error in the toSeconds function that is producing this result of two long numbers instead of the correct result, I can't see it (but maybe keener eyes can).

Title: Re: Ecobee3 control from VeraEdge UI7
Post by: cybrmage on February 06, 2018, 01:08:30 am
I do have a question about the result order. Using lastupdate as an example, it provides the older of the two times in the first

You need to (re)read the function documentation for the variable_get function...

The variable_get function returns two values... The first value is the content of the variable, the second value is the timestamp of the last modification of the variable...

It is a coincidence that the variable you are reading is itself a timestamp value, so the function IS returning two timestamp values, but the first timestamp value is the valid value you want... The second value is the timestamp for when the variable was updated...

IE: The ecobee API reads the status of the thermostat at 1517955300... That becomes the "lastupdate" value... The plugin polls the ecobee API at 1517955588 and stores the processed data... You then call the variable_get function... The first return value,  "1517955300", is the variable value - The second return value, "1517955588" is the time that the variable was last set.
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: tbrock47 on February 06, 2018, 06:01:50 pm
Hmm... Interesting. I guess that is the first time I've noticed variable_get return more than one value.
Still have not had a chance to look over all of this yet. Maybe this weekend.
Title: Re: Ecobee3 control from VeraEdge UI7
Post by: fullmoonguru on April 09, 2018, 06:27:42 pm
I had this problem and found a solution thanks to understanding that the cause is a bug in UI7. You can create a scene that works in AltUI like this:

Open AltUI

Create Scene

Header = Ecobee Heat On

Trigger = Outside Temp Goes Below 65

Action = SetModeTarget (under HVAC_UserOperatingMode1)

   NewModeTarget = HeatOn