We have moved at community.getvera.com

Author Topic: Plug-in for ecobee thermostats in development  (Read 230588 times)

Offline denwood

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +3/-0
Re: Plug-in for ecobee thermostats in development
« Reply #765 on: October 25, 2018, 08:19:37 pm »
Rafale, as I'm in the same boat as everyone else..but with nine ecobee stats and a pile of automations...thanks!!

Is there any way I can help test? 

This is super important to me at least due to the 27 odd ecobee devices I have as part of automations.

"No you won't lose your device configs. If you had installed the plugin as a new plugin then yes, it would have created new devices. If you just replace your existing files and reload the luup engine, it won't."

to be clear, I just need to do this:

Try downloading from GitHub and install drag the files (json, Lua, xml only) into your vera UI Apps/develop apps/ luup files screen and click upload.

The rest of the instructions are on the Github readme as you will need to setup an ecobee dev account.


..but will this work with Vera's LUA, or do I need to install openLUUP?
« Last Edit: October 25, 2018, 08:24:43 pm by denwood »

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Plug-in for ecobee thermostats in development
« Reply #766 on: October 25, 2018, 08:45:22 pm »
@denwood

Let me try to make it as clear as possible since I am getting a lot of questions:

1. If running on openLuup, You can just follow my instructions from here
https://github.com/rafale77/vera-ecobee
These are without using the ALTAppStore.

2. If the AltAppstore was used to install on either a vera of openLuup, a simple update from your ALTUI Plugin screen should get you running. On a vera you can also decide to install ALTUI and install the plugin through the ALTAppStore. Absolutely make sure to choose version 2.1. I should really be deleting all the other versions now that I think about it.

3. If you are running on a vera with only UI7 the instructions are somewhat different:
 a. Download the repo from GitHub by going to the right of the GitHub page and download, unzip the file.
 b. Go to your vera apps tab under develop Apps, Luup files.
 c. Upload all the .xml, .lua, .json files you downloaded. The vera will run a Luup reload.
 d. Now that the plugin is installed, you will need to go into the plugin device (Should be the same dev number one you had before) and insert the API key you have obtained following the instructions from the GitHub page.
 c. You now have the same or similar plugin as before except you are not going through Watou's dev API account but your own to connect to your Ecobee. You can get a pin. and insert that pin into your Ecobee account.

If this fails on the vera, you will have to install luarocks on it. I can help you do that if needed.
« Last Edit: October 25, 2018, 08:50:21 pm by rafale77 »
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Plug-in for ecobee thermostats in development
« Reply #767 on: October 25, 2018, 09:31:24 pm »
@watou, I think you should be able to publish with the fix. I verified that on the current firmwares the vera UI uses "luasec - 0.5.1-10" which supports tlsv1_2.
To verify, I ran
Code: [Select]
opkg list-installed
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline denwood

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +3/-0
Re: Plug-in for ecobee thermostats in development
« Reply #768 on: October 25, 2018, 10:04:22 pm »
@denwood

Let me try to make it as clear as possible since I am getting a lot of questions:

1. If running on openLuup, You can just follow my instructions from here
https://github.com/rafale77/vera-ecobee
These are without using the ALTAppStore.

2. If the AltAppstore was used to install on either a vera of openLuup, a simple update from your ALTUI Plugin screen should get you running. On a vera you can also decide to install ALTUI and install the plugin through the ALTAppStore. Absolutely make sure to choose version 2.1. I should really be deleting all the other versions now that I think about it.

3. If you are running on a vera with only UI7 the instructions are somewhat different:
 a. Download the repo from GitHub by going to the right of the GitHub page and download, unzip the file.
 b. Go to your vera apps tab under develop Apps, Luup files.
 c. Upload all the .xml, .lua, .json files you downloaded. The vera will run a Luup reload.
 d. Now that the plugin is installed, you will need to go into the plugin device (Should be the same dev number one you had before) and insert the API key you have obtained following the instructions from the GitHub page.
 c. You now have the same or similar plugin as before except you are not going through Watou's dev API account but your own to connect to your Ecobee. You can get a pin. and insert that pin into your Ecobee account.

If this fails on the vera, you will have to install luarocks on it. I can help you do that if needed.

That did work more or less on UI7 as you instructed :-)  Thanks so much!  I'll try this out for a bit.

I did as follows:

1. copied the files to UI7 (vera apps tab under develop Apps, Luup files) after grabbing from your github.
2.  registered as you described at ecobee as a developer with an API.
3.  requested a pin using the API in vera, and added the app again at ecobee.com

Seems to work fine.
« Last Edit: October 25, 2018, 10:07:43 pm by denwood »

Offline denwood

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +3/-0
Re: Plug-in for ecobee thermostats in development
« Reply #769 on: October 25, 2018, 10:24:43 pm »
Rafale, Watou, what is the file and line change require to the orginal app files?  Can i just try this?

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Plug-in for ecobee thermostats in development
« Reply #770 on: October 25, 2018, 10:35:22 pm »
Rafale, Watou, what is the file and line change require to the orginal app files?  Can i just try this?

Unfortunately no, the logic file is encoded in watou's original plugin.

What issues are you having?
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline watou

  • Community Beta
  • Hero Member
  • ******
  • Posts: 889
  • Karma: +44/-12
Re: Plug-in for ecobee thermostats in development
« Reply #771 on: October 26, 2018, 02:24:37 am »
I've submitted a v1.9 of the plugin to apps.mios.com for approval, whose only change from v1.8 ought to be changing tlsv1 to tlsv1_2.  I've not yet received empirical evidence that this change will work, but there are reasons to believe it will.  I am unable to perform any kind of testing on my end.  I made a small mistake in submitting the version for approval (it says "Any to any" for supported versions instead of "to any", so if anyone knows who is running apps.mios.com these days and can make sure that doesn't become a problem, please pass that along.  You also might want to ping them in the case that this change will be approved sooner.

watou


Offline niharmehta

  • Sr. Member
  • ****
  • Posts: 377
  • Karma: +17/-0
Re: Plug-in for ecobee thermostats in development
« Reply #772 on: October 26, 2018, 04:38:58 am »
Editing the post. I guess I spoke too soon. Although the temp did update once i entered pin and reloaded, changes did not seem to propagate when changing a setting on the vera.   When clicking a setting change, unfortunately started to get this error:


Code: [Select]
01 10/26/18 1:54:02.132 LuaInterface::CallFunction_Job device 392 function SHVACUserOperatingMode1_HVAC_UserOperatingMode1_SetModeTarget_run failed [string "    local MSG_CLASS = "ecobee"..."]:1640: attempt to index global 'ecobee' (a nil value) <0x6e799520>
\01 10/26/18 1:54:44.527 LuaInterface::CallFunction_Job device 392 function SHVACUserOperatingMode1_HVAC_UserOperatingMode1_SetModeTarget_run failed [string "    local MSG_CLASS = "ecobee"..."]:1640: attempt to index global 'ecobee' (a nil value) <0x6e999520>
01 10/26/18 1:55:16.606 LuaInterface::CallFunction_Job device 392 function SHVACUserOperatingMode1_HVAC_UserOperatingMode1_SetModeTarget_run failed [string "    local MSG_CLASS = "ecobee"..."]:1640: attempt to index global 'ecobee' (a nil value) <0x6df80520>

c01 10/26/18 1:55:32.103 LuaInterface::CallFunction_Job device 392 function STemperatureSetpoint1_TemperatureSetpoint1_Cool_SetCurrentSetpoint_run failed [string "    local MSG_CLASS = "ecobee"..."]:1600: attempt to index global 'ecobee' (a nil value) <0x6e799520>


However, when a scene executes and changes settings, it looks like the mode change does occur.  Could this be a GUI issue between the old and new code ? (Watou vs. rafale77)
« Last Edit: October 26, 2018, 05:01:42 am by niharmehta »
2x VeraLite; 2xTrane Tstats; 45 x Switches/Dimmers/Appliance Modules; 4x Everspring Water Sensors; DSC Integration; 2 x Zwave Door Locks; 1x Ted5K; 1x Rainforest Eagle; Onkyo AVR; 6x Squeezebox;

Offline watou

  • Community Beta
  • Hero Member
  • ******
  • Posts: 889
  • Karma: +44/-12
Re: Plug-in for ecobee thermostats in development
« Reply #773 on: October 26, 2018, 05:09:18 am »
The Vera folks responded very quickly, publishing 1.9 of the Ecobee plugin in record time!  Now if someone is willing to upgrade from 1.8 to 1.9 and see if it works, that would be much appreciated.  I don't want too many people upgrading before there is empirical evidence that it actually fixed the problem!

Offline rafale77

  • Community Beta
  • Hero Member
  • ******
  • Posts: 1749
  • Karma: +101/-27
  • HA ≠ IoT as a blue sky is cloudless.
Re: Plug-in for ecobee thermostats in development
« Reply #774 on: October 26, 2018, 05:17:37 am »
Editing the post. I guess I spoke too soon. Although the temp did update once i entered pin and reloaded, changes did not seem to propagate when changing a setting on the vera.   When clicking a setting change, unfortunately started to get this error:


Code: [Select]
01 10/26/18 1:54:02.132 LuaInterface::CallFunction_Job device 392 function SHVACUserOperatingMode1_HVAC_UserOperatingMode1_SetModeTarget_run failed [string "    local MSG_CLASS = "ecobee"..."]:1640: attempt to index global 'ecobee' (a nil value) <0x6e799520>
\01 10/26/18 1:54:44.527 LuaInterface::CallFunction_Job device 392 function SHVACUserOperatingMode1_HVAC_UserOperatingMode1_SetModeTarget_run failed [string "    local MSG_CLASS = "ecobee"..."]:1640: attempt to index global 'ecobee' (a nil value) <0x6e999520>
01 10/26/18 1:55:16.606 LuaInterface::CallFunction_Job device 392 function SHVACUserOperatingMode1_HVAC_UserOperatingMode1_SetModeTarget_run failed [string "    local MSG_CLASS = "ecobee"..."]:1640: attempt to index global 'ecobee' (a nil value) <0x6df80520>

c01 10/26/18 1:55:32.103 LuaInterface::CallFunction_Job device 392 function STemperatureSetpoint1_TemperatureSetpoint1_Cool_SetCurrentSetpoint_run failed [string "    local MSG_CLASS = "ecobee"..."]:1600: attempt to index global 'ecobee' (a nil value) <0x6e799520>


However, when a scene executes and changes settings, it looks like the mode change does occur.  Could this be a GUI issue between the old and new code ? (Watou vs. rafale77)

This is odd. Let me look into it though it may not be immediate since I need to sleep and work tomorrow. The logs seem to indicate something very simple. Seems like a variable not properly declared in the code somewhere. I have not seen this on openLuup so it maybe some specific vera syntax.

Edit: I found where I messed up. I updated the repo. You can just download the I_Ecobee1.xml which contains the fix. I also edited v2.1 hoping not too many people downloaded it. The thermostat should work now. Thank you for testing and reporting it.
« Last Edit: October 26, 2018, 06:30:04 am by rafale77 »
openLuup (79 devices, 141 scenes, 19 apps) master to VeraPlus (142 zwave nodes, 8 Zigbee nodes, 221 devices,  20 scenes , 2 apps) +  Hubitat (15 Zigbee nodes) + Home-Assistant (API Integrations). Bridged to Siri and Alexa. Homewave. VeraPlus ExtRooted and mios server independent.

Offline charettepa

  • Sr. Member
  • ****
  • Posts: 314
  • Karma: +5/-0
Re: Plug-in for ecobee thermostats in development
« Reply #775 on: October 26, 2018, 07:19:31 am »
@rafale77 sorry i did not proceed any further i was offline after my last question, thank you for providing your findings to Watou

@watou
not only did mine auto update over night to 1.9

i did not need a new pin
it just started working automatically
it reconnected on its own

this is great, thank you
« Last Edit: October 26, 2018, 07:55:29 am by charettepa »

Offline bobgor

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Plug-in for ecobee thermostats in development
« Reply #776 on: October 26, 2018, 08:46:54 am »
1.9 is working for me under UI7.

Thanks guys.

(BTW this plugin also works with my Carrier Cor.)

Offline hmspain

  • Hero Member
  • *****
  • Posts: 528
  • Karma: +16/-8
Re: Plug-in for ecobee thermostats in development
« Reply #777 on: October 26, 2018, 08:51:58 am »
The Vera folks responded very quickly, publishing 1.9 of the Ecobee plugin in record time!  Now if someone is willing to upgrade from 1.8 to 1.9 and see if it works, that would be much appreciated.  I don't want too many people upgrading before there is empirical evidence that it actually fixed the problem!

Many thanks Watou!  I think this fix has to be a record in terms of finding the fix and getting a new app published!
VeraPlus, Nest Cameras (6), Siren, Hue Bulbs/Strips/Blooms (65), Fan Dimmer (6), Aeon 4-in-1s (10), Water Sensors (3), Z-Wave Switches (20), Nest Smoke/CO Protects (5), Ecobee 3, HEM Gen2s (2)

Offline denwood

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +3/-0
Re: Plug-in for ecobee thermostats in development
« Reply #778 on: October 26, 2018, 09:32:23 am »
Watou, 1.9 works perfectly..many thanks for doing this so quickly!!  Will the plugin change potentially affect the daily PIN requests I was having to make?  It was only in the last two weeks or so it started to do this...

Rafale, thanks to you as well.  Your files just copied into the UI7 setup did get me the home/away functionality that most of my automations use, however GUI changes to temp in Vera did not "reach" the actual ecobee stats.  I'll keep the files tucked away in case we need them :-)

Offline watou

  • Community Beta
  • Hero Member
  • ******
  • Posts: 889
  • Karma: +44/-12
Re: Plug-in for ecobee thermostats in development
« Reply #779 on: October 26, 2018, 10:02:34 am »
Watou, 1.9 works perfectly..many thanks for doing this so quickly!!  Will the plugin change potentially affect the daily PIN requests I was having to make?  It was only in the last two weeks or so it started to do this...

Rafale, thanks to you as well.  Your files just copied into the UI7 setup did get me the home/away functionality that most of my automations use, however GUI changes to temp in Vera did not "reach" the actual ecobee stats.  I'll keep the files tucked away in case we need them :-)

The only difference between 1.8 and 1.9 is what @rafale77 confirmed, that TLS 1.0 is no longer supported, so the plugin now has to use TLS 1.2.  I have no idea what other side effects this might show, but I am not aware of any.  Thanks to @rafale77 for confirming the issue and many others for testing and contributing.  Hopefully the plugins (both the AltUI one and the old one) quiet down now...

watou