Vera-openLuup Ecobee Plugin
-
Likely it is missing from the original plugin call. I will look at it and update. Sorry about this. I didn't know the async module required it and thank you @akbooer for pointing it out. I am a bit swamped with work but will get to it.
-
Thanks guys
-
@prophead, I posted an updated version on GitHub. Please let me know if it works.
@akbooer, I was wondering if this header could be made optional. I looked at the API docs and it doesn't appear to me that they actually require this field in the header. They use a token for authorization using another field. -
I tried it, same result:
2020-06-05 20:31:47.669 luup_log:13: ecobee: debug: Fetching revisions...
2020-06-05 20:31:47.670 openLuup.context_switch:: ERROR: [dev #13] ./openLuup/http_async.lua:174: bad argument #1 to 'gsub' (string expected, got nil)
2020-06-05 20:31:47.670 luup.delay_callback:: function: 0x185ca10 ERROR: ./openLuup/http_async.lua:174: bad argument #1 to 'gsub' (string expected, got nil) -
Ok try this again.
-
well a little different this time, but can't get PIN code:
2020-06-06 12:11:22.004 luup_log:13: ecobee: debug: Attempting to getPin...
2020-06-06 12:11:22.004 luup_log:13: ecobee: task: Trying to getPin
2020-06-06 12:11:22.004 luup.task:: status=2 ecobee : Trying to getPin
2020-06-06 12:11:22.004 luup.variable_set:: 13.urn:ecobee-com:serviceId:Ecobee1.TSK was: Error: nil: no valid JSON value (reached the end) now: Trying to getPin #hooks:0
2020-06-06 12:11:22.042 luup_log:13: ecobee: Error: nil: no valid JSON value (reached the end)
2020-06-06 12:11:22.042 luup_log:13: ecobee: task: Error: nil: no valid JSON value (reached the end)
2020-06-06 12:11:22.042 luup.task:: status=2 ecobee : Error: nil: no valid JSON value (reached the end)
2020-06-06 12:11:22.042 luup.variable_set:: 13.urn:ecobee-com:serviceId:Ecobee1.TSK was: Trying to getPin now: Error: nil: no valid JSON value (reached the end) #hooks:0 -
Hmm this is a different problem indeed. I may need to move the authorization call to not be asynchronous. Sorry it is more complicated than I initially thought.
-
Well the authorization is done attended so thats no big deal. I’m more concerned about it hanging when it’s unattended.
-
I am somewhat biased towards trying to find a way to prevent openLuup from hanging on a socket wait rather than working plugins one by one to circumvent this. I just had an event today which I think was due to some network problems causing my pioneer plugin to wait for a response from the receiver. This plugin uses the io module and lua socket directly and is not an http request so the problem is definitely deep in the lua socket...
-
Got sick of ecobee plugin hanging my openluup box so I built a new pi just for the ecobee plugin and a scene which pushes values onto my main openluup box.
-
I'd be curious to see if the new box hangs too... Even when the cloud service had problems, I don't remember having these issues but I indeed had other cases of openLuup hanging only up to recently.
-
This strategy has proved fruitful. 48 hours with no hangs.
-
Interesting. So it could be that your main openLuup installation may have some plugin somehow bogging the luasocket or conflicting with the ecobee plugin?
-
Donno but my dehang script recorded the ecobee plugin as the last log line before hang every single time. Either getting updates or revisions found
-
I vote that we move this to a new Subheading under "Hardware" entitled "Ecobee". That's where I eventually intend to discuss the ezlo-authored ecobee plug-in as well as @Watou's old one.
I've been contemplating making the move from Watou/Rafale over to ezlo just because it's "the latest thing" (not because my current setup isn't working or anything). -
I don't really agree. This thread was intended to discuss a plugin for openLuup/vera so I think it belongs here. The hardware section is more to discuss hardware setups and choices. I also don't see ecobee as large enough of a product to warrant its own section. We could for example start a section called Thermostats or HVAC under hardware where we could compare the different approaches.
-
In that light, yes of course you are correct. I always seem to ignore the "OpenLuup" aspect of things posted, and that's only because I've never made the leap to OL myself.
Sorry for the intrusion.
Beyond that, I do concur about the potential need for "THERMOSTATS" under hardware, since so many users have them in their workflow. Thanks!
-
Just FYI, seems there's a nationwide outage in the OAuth system and/or ecobee server, such that Vera and the various plug-in editions are incapable of authenticating thermostats. Been like that for a few hours, according to https://downdetector.com/status/ecobee/
RESOLVED as of 6pm CDT 4/20/21