Author Topic: Ecobee 3 Plugin --> How long does a PIN last?  (Read 155 times)

Offline gniknalu

  • Full Member
  • ***
  • Posts: 118
  • Karma: +3/-1
Ecobee 3 Plugin --> How long does a PIN last?
« on: February 12, 2018, 12:37:59 pm »
I updated my ecobee 3 plugin's PIN number the middle of last week. This morning Vera is saying, "ecobee : Not yet authorized. Press 'Get PIN' once; wait for PIN; enter at ecobee.com." Yet in the Ecobee web interface - it shows that Vera is still authorized.  How long does this authorization last? IF this is a Vera error, where do I look to find out why it is not retaining the authorization?

Thanks!

Offline Mike Yeager

  • Sr. Member
  • ****
  • Posts: 476
  • Karma: +6/-12
Re: Ecobee 3 Plugin --> How long does a PIN last?
« Reply #1 on: February 13, 2018, 08:20:16 pm »
The PIN is simply to authorize the device to the Ecobee website. What happens is that the plugin needs a new access token from time to time and it's supposed to happen without any user interaction. If, for some reason, it misses the new token (or reboots before it's committed to storage), then you get the message you describe. There's more to it than this, but that's the jist of it. Remove the "app" from the Ecobee web page and use the new PIN to authorize it again. Used to happen to me fairly often, now it's rare. Reboots seem to be the usual cause, at least for me...

Offline gniknalu

  • Full Member
  • ***
  • Posts: 118
  • Karma: +3/-1
Re: Ecobee 3 Plugin --> How long does a PIN last?
« Reply #2 on: February 15, 2018, 10:59:49 pm »
The PIN is simply to authorize the device to the Ecobee website. What happens is that the plugin needs a new access token from time to time and it's supposed to happen without any user interaction. If, for some reason, it misses the new token (or reboots before it's committed to storage), then you get the message you describe. There's more to it than this, but that's the jist of it. Remove the "app" from the Ecobee web page and use the new PIN to authorize it again. Used to happen to me fairly often, now it's rare. Reboots seem to be the usual cause, at least for me...

I just came back from "fixing" it by deleting the app(s) and reinstalling them. Then reauthorized it and was enjoying the functionality for at least 3 - 5 days before this informative message.

Yes - there was a forced reboot but it was Saturday - many days after the authorization.

Will go thru the delete/re-add procedure once again. . . . Thanks for responding.

Offline Mike Yeager

  • Sr. Member
  • ****
  • Posts: 476
  • Karma: +6/-12
Re: Ecobee 3 Plugin --> How long does a PIN last?
« Reply #3 on: February 17, 2018, 08:59:43 pm »
The Vera is likely rebooting without your knowledge. Mine still does it from time to time for reasons I haven't determined as of yet. It was doing it several times a day and that appeared to be caused by the ERGY plugin (that is installed by default). All it takes is one reboot at the wrong time. Hope you get this ironed out before you get too frustrated. I haven't had to reauthorize in weeks...

Offline rafale77

  • Hero Member
  • *****
  • Posts: 786
  • Karma: +39/-20
Re: Ecobee 3 Plugin --> How long does a PIN last?
« Reply #4 on: February 17, 2018, 09:00:47 pm »
I have been going for months without this problem. The big factor is to not have the vera reload luup right at the time the token is changing. The API changes the token on a regular basis. For example if you load a config from backup on your vera, you are very likely to have renew your token.
I have been able to stabilize the vera enough to go weeks between a luup restart by moving a lot of my plugins and scenes/automation to Openluup. You can track the reboots by installing the system monitor plugin and set it to send a notification every time luup reloads.
Openluup (22 devices, 58 scenes, 11 apps) and iobroker controlling VeraPlus with 117 zwave nodes, 8 Zigbee nodes, 7 apps, 246 vera devices, 80 scenes; VeraEdge (0 node, 26 devices, 6 App, 0 scene); Bridged to Homekit and Alexa.

Offline gniknalu

  • Full Member
  • ***
  • Posts: 118
  • Karma: +3/-1
Re: Ecobee 3 Plugin --> How long does a PIN last?
« Reply #5 on: February 19, 2018, 02:08:10 pm »
I have been going for months without this problem. The big factor is to not have the vera reload luup right at the time the token is changing. The API changes the token on a regular basis. For example if you load a config from backup on your vera, you are very likely to have renew your token.
I have been able to stabilize the vera enough to go weeks between a luup restart by moving a lot of my plugins and scenes/automation to Openluup. You can track the reboots by installing the system monitor plugin and set it to send a notification every time luup reloads.

I think the issue is the stability of my Vera Secure. It seems when I have hard reboots, when it awakes everything is screwed up. Wondering if the PIN persists somewhere that is volatile and when I have to do a forced reboot, it is erased.

Well, I've reset it yet again. Thanks for everyone's feedback.