Quick update - things are still slowly moving along after I got some good time with it last night. I am pushing the SmartThings (limited) groovy implementation to the absolute limits of what it was designed to do. At first I messed around with the native SmartThings smartapp oauth flow, but MyQ’s oauth implementation is super locked down and is for sure not going to do the redirect that would be needed for that.
So that leaves me with replicating the flow in a much more tedious way. The first step was spinning up my own endpoint that would generate pkce a challenge/verify pair - that piece is working great, and I can get the data from within the SmartApp now. I’m glad to keep that endpoint up for this as it’s not super expensive, and for sure those of you who have kindly donated will support that cost.
The next step was getting to the MyQ login page. But the hardest part of that was parsing it to get the verification string out of the HTML. The HttpGet method in groovy is really not set up well to easily deal with an html response. Thankfully, after a few lucky searches through the ST forums, I found enough related old posts that pointed me in the right direction to see how to traverse the hierarchy that gets created in the response.
That’s where I am now. I still have about 3 more steps before I get the oauth login token. If I can get to that point, I will be able to say for certain we’ll be good to go. I do have a fallback plan in mind involving an .exe people could run to get a token, but I hope it doesn’t come to that.