-
-
Save MarkWalters-dev/08ea0e8737e3e4d11f70427ef8fdc7df to your computer and use it in GitHub Desktop.
#!/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)) |
Thanks for sharing this!
While you were figuring this out, have you, by any chance, ran into what other network requests the smart scale does and to where? I'm trying to gather as much info about it before buying one but data is scarce. I found that some smart scales ring websites that are questionably related to the actual use of a smart scale, to say the least; see for example https://www.checkmarx.com/blog/smart-scale-privacy-issues-iot/
nucflash, you won't have to worry about that if you use https://github.com/oliexdev/openScale. I'm working on bringing up support for the bar code based appSYNC scales in it now which is why I came across your question.
Thanks for sharing this!
While you were figuring this out, have you, by any chance, ran into what other network requests the smart scale does and to where? I'm trying to gather as much info about it before buying one but data is scarce. I found that some smart scales ring websites that are questionably related to the actual use of a smart scale, to say the least; see for example https://www.checkmarx.com/blog/smart-scale-privacy-issues-iot/
The only network activity I've seen is to api.weightgurus.com and pool.ntp.org. Basically, it checks the time before it uploads your measurement. That's over the course of a week of network logging via DNS proxy.
This works for the new API Version 3.