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

Offline fullmoonguru

  • Full Member
  • ***
  • Posts: 192
  • Karma: +0/-1
Re: Plug-in for ecobee thermostats in development
« Reply #705 on: August 30, 2018, 12:11:54 pm »
denwood, the green icon turns grey and Ecobee is not connected to Vera, right? Happens all the time. I thought I had to get a new pic and re-establish the communication but I noticed recently that it was fixed when I reloaded the Vera engine. Thinking about using PLEG to schedule a reboot every day.

Offline charettepa

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +3/-0
Re: Plug-in for ecobee thermostats in development
« Reply #706 on: August 30, 2018, 12:30:22 pm »
i have not had this problem since before 2018
on the vera plus it rarely happened but did sometimes and on the vera secure it has never happened
if there is a network or power outage, it does disconnect
but it reconnects on its own without issue

Online rafale77

  • Hero Member
  • *****
  • Posts: 1248
  • Karma: +62/-23
Re: Plug-in for ecobee thermostats in development
« Reply #707 on: August 30, 2018, 08:56:59 pm »
I recently observed something strange with the API. I got a rejection error from the API if I send a command to change the house mode making the plugin think it is disconnected. Then if you resend exactly the same command to the API, it connects back and the command is accepted. It appears to have stopped doing at some point this week. I had mitigated it by adding a second command in my scenes 5s after the first one but it appears no longer necessary. It appears to be on the ecobee side since I have not touched the code for several months.
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline denwood

  • Sr. Newbie
  • *
  • Posts: 34
  • Karma: +3/-0
Re: Plug-in for ecobee thermostats in development
« Reply #708 on: September 01, 2018, 10:00:33 am »
Fullmoon, I typically re-request a PIN code and "reinstall" the app from the Ecobee side.  If  a LUUP reload works, I'll try that.

Charettepa, I've never seen the Ecobee's reconnect by themselves (we have nine of them) ..have always had to request a PIN from the Vera app, then remove/re-add the app from the Ecobee app interface on their website.

Rafale77, was that recent change last week?  That's when it started going a bit crazy on our end.  I am using about 20 odd Ecobee3 stats/sensors to determine if all tenants had left the building, and then auto-arming our DSC panel.  I've added some DSC sensors + time limits so the PLEG logic also uses door opening/motion events to decide if the various zones should be armed.  The DSC sensors are all exposed to VERA using an EVL4 interface...and that has been dead reliable.  I may just add a few more DSC motion sensors and stop using Ecobee sensors...

Cheers,
Dennis.



« Last Edit: September 01, 2018, 10:02:07 am by denwood »

Online rafale77

  • Hero Member
  • *****
  • Posts: 1248
  • Karma: +62/-23
Re: Plug-in for ecobee thermostats in development
« Reply #709 on: September 01, 2018, 12:26:16 pm »
I have observed the problem for a couple of weeks and it makes it look like the plugin reconnects by itself if you send a second command. In reality it never disconnected. The device just assumes that it is because the API sent an error. It is still occurring this week but much less frequently. The sensor polling does not seem to be the problem. It is the house mode change which can cause an occasional bad response from the API.
openLuup (97 devices, 134 scenes, 20 apps) controlling HomeAss + VeraPlus (138 zwave nodes, 8 Zigbee nodes, 205 devices, 20 scenes , 2 app) Bridged to Homekit and Alexa. VeraPlus ExtRooted!

Offline denwood

  • Sr. Newbie
  • *
  • Posts: 34
  • Karma: +3/-0
Re: Plug-in for ecobee thermostats in development
« Reply #710 on: September 04, 2018, 09:44:46 pm »
ok..thanks.

Offline charettepa

  • Sr. Member
  • ****
  • Posts: 293
  • Karma: +3/-0
Re: Plug-in for ecobee thermostats in development
« Reply #711 on: September 27, 2018, 09:52:11 am »

Charettepa, I've never seen the Ecobee's reconnect by themselves (we have nine of them) ..have always had to request a PIN from the Vera app, then remove/re-add the app from the Ecobee app interface on their website.



it depends what knocked it out and if the token is still good
if you have a temporary internet outage and the token has not expired
they do come back up

if the token expired and the vera unit did not get the new token
you will need to get a new pin

what i am saying is that on the vera plus it was rare
and
on the vera secure this has yet to happen

i think what happens is if the token changes and the unit is busy doing something else or reloading luup
it never processes the new token
you need to remember that the vera edge is very slow (600mhz)

even the plus (800mhz) and the secure  (800mhz x2) cpu's leave alot to be desired
a raspberry pi can outperform it
its time that vera use cpu's that are reasonable for todays needs especially in 350$ model


Offline watou

  • Hero Member
  • *****
  • Posts: 872
  • Karma: +43/-12
Re: Plug-in for ecobee thermostats in development
« Reply #712 on: September 27, 2018, 10:08:33 am »
if the token expired and the vera unit did not get the new token
you will need to get a new pin

Just to add to your comment charettpa:

There is an access token and a refresh token.  The access token is only good for an hour, but the refresh token is good for a year unless it's been replaced.  The problem with needing to go through the PIN process again is when the Vera fails to correctly store the tokens when they are refreshed and are thus lost.  If the Vera reboots or restarts the Lua process without first persisting the device variables that hold the tokens to "disk" storage, then they are lost and you need to go through the PIN process again.  This has historically been a long-standing Vera bug.   I was encouraged to work around the Vera bug by writing directly to a disk file, but I was hoping the developers would be motivated to instead fix their bug that loses device variables.  If your Vera is frequently restarting the Lua process, then it's creating more opportunities to lose the latest tokens.

watou

Offline ruster34

  • Sr. Newbie
  • *
  • Posts: 25
  • Karma: +0/-0
Re: Plug-in for ecobee thermostats in development
« Reply #713 on: October 13, 2018, 10:13:06 am »
Apologies in advance if this was posted, I searched and didn't find any answers.

I've got a single ecobee3 in primary home with vera plus. Then I have just purchased 2 additional (per zone) ecobee3 thermostats and have them integrated with a second vera plus in a second home. I have configured the specific thermostats for each home which is perfect. However, I'm having a bear to keep them both authorized. I know the pin already has struggles, but when I go to authorize the plugin on one controller, it's not long before the other controller looses authorization.

Is there any work around to get both plugins authorized via the same pin???

TIA

Offline watou

  • Hero Member
  • *****
  • Posts: 872
  • Karma: +43/-12
Re: Plug-in for ecobee thermostats in development
« Reply #714 on: October 13, 2018, 10:35:26 am »
when I go to authorize the plugin on one controller, it's not long before the other controller loses authorization.

Do you have a scientifically strong basis to suggest a causative relationship between actions on one controller leading to a problem on the other?  If the LuaUPnP process is restarting often, it is increasing the possibility that it's losing the tokens so on restart it can't continue.  One fix is to stop whatever is causing frequent LuaUPnP process restarts (a buggy plugin, for example).

Is there any work around to get both plugins authorized via the same pin???

No; each plugin instance (on separate controllers) does its own token management.  Once authorized and if there is no loss of device variables due to Vera bugs, you should not have to authorize them again.

Some programmer could change the plugin to finally sidestep the unreliable storage of device variables by doing file I/O in the loadSession/saveSession functions, essentially giving up on the prospect that Vera programmers would ever fix this long-standing bug.

Offline ruster34

  • Sr. Newbie
  • *
  • Posts: 25
  • Karma: +0/-0
Re: Plug-in for ecobee thermostats in development
« Reply #715 on: October 13, 2018, 11:25:31 am »
Thanks for the quick reply! I don't have any evidence, just trying to guess based on patterns. I've only recently added the second home's 2 ecobees so managing it this way is new to me.

I've been doing many new scenes and PLEG conditions on the new controller, so frequent restarts of the luup engine are definitely occuring. I'll leave it alone for a while to validate. I just re-authorized the primary controller's plugin and it seems they are both working at the moment. I'll keep an eye on it - I have a PLEG action to notify me if my primary controller has status of 0 for more than 5 minutes. I've not setup a similar action in the secondary controller, so will just monitor by logging in and validating variable manually.

Thanks again,
Ryan