Well, most browsers have developer tools typical f12 to access. They usually have a network tab that logs the requests and responses between the server and browser.
From those interactions one can reverse the browser interaction with user and server and then recreate it in a smart app using the httpget/post/put functions and getting the responses and session and cookies to get at whatever data the browser presents.
My first recommendation is to split the OAuth code out of the Device Type. The general practice is the OAuth/authentication code is built into a Smart App called a Connect app. It basically handles the cloud-to-cloud access, and then a child Device Type represents the individual devices (so, in this case, the trackers and scales and whatnot). Check out my Lockitron code for an idea: https://github.com/dkirker/smartthings-lockitron
Hi all. I just gave up on waiting for the UP3 to ever be released and purchased a FitBit Charge HR. I’d love to help with SmartThings integration if no one here has had any luck yet. Let me know what the current status is and I’ll see what I can do.
I am waiting for FitBit to release their OAuth 2.0 public beta access. OAuth 1 doesn’t work with ST. It has been mentioned in this thread that you can probably write an external interface to the OAuth 1 that ST could access but OAuth 2.0 will be much easier to maintain.
@Ron I spent an hour last night looking at it. I was hoping it would have been as easy as the solar system where you use a combination of a secret and id. It doesn’t appear to be the case… seems more like a federated model.
@DrHill I gave up on it after monitoring the Oauth 2.0 which said “coming soon” for way too long. I don’t even know if it is Oauth 2.0 yet, if not then it will not work with ST.
Hey @Ron, looking over there site, the Oauth 2.0 has been available for a while on the site. Do you happen to know of any examples where this has been one with other apps? I’m more than willing to give it a try if there are other exmaples out there.
I did my own Emphase Solar integration but that one just used a URL with 3 variables… Oauth 2.0 looks to be more involved where you exchange keys and then return a URL with a session.
Not sure why fitbit seems more difficult, but sorry no time to look into this.
Also given the complete instability of ST these days I am not working on any device code. Too frustrating to spend hours on my code thinking I have an issue only to learn that the problem is on the server side.