-
-
Save ggreen88/116555a821bd67d06ab990c5dedcde13 to your computer and use it in GitHub Desktop.
Access data collected by your Greater Goods Weight Gurus scale
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# So I asked Greater Goods if they would point me in the direction of their API. So I could get data | |
# from their WiFi scale without the limitations of their Weight Gurus app. They said they don't give | |
# that out. So my options are to return the scale to Amazon because it is useless to me without an | |
# API or I figure it out myself. Anyway, I figured it out so you don't have to return your scale. | |
# This isn't an API but from here you can atleast access the data. | |
# If you don't already have the scale you can find it on Amazon | |
# UPC 875011003964 | |
# ASIN B01IFYLARO | |
# Model 0396 | |
# https://www.greatergoods.com/0396 | |
# You must first setup the scale with their app. Good luck with that. It didn't work with my old | |
# SlimRom 6.0 phone. Maybe one of these days I'll figure out their registration process and update | |
# this gist. | |
import requests | |
import json | |
import hashlib | |
password="hiding your API is bad business" # change to your password | |
data = { | |
'email': '[email protected]', # change to your email | |
'password': hashlib.sha256(password.encode('utf-8')).hexdigest() | |
} | |
# Login and get the auth token | |
req=requests.post('https://api.weightgurus.com/v2/user/login', data=data).text | |
#grab all your data | |
data= { | |
"auth_token":json.loads(req)["auth_token"], | |
"start":"1262325600000" # old timestamp so you get everything, should be changed in your program | |
} | |
req=requests.post('https://api.weightgurus.com/v2/entry/list', data=data).text | |
scaledata=json.loads(req) | |
print(json.dumps(scaledata,indent=2,sort_keys=True)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment