Skip to content

Instantly share code, notes, and snippets.

@MarkWalters-dev
Last active October 24, 2023 21:29
Show Gist options
  • Star 23 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save MarkWalters-dev/08ea0e8737e3e4d11f70427ef8fdc7df to your computer and use it in GitHub Desktop.
Save MarkWalters-dev/08ea0e8737e3e4d11f70427ef8fdc7df to your computer and use it in GitHub Desktop.
Access data collected by your Greater Goods Weight Gurus scale
#!/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': 'weightgurus@markwalters.pw', # 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))
@johnscillieri
Copy link

This works for the new API Version 3.

import requests

# Login and get the auth token
data = {"email": "user@email.com", "password": "your_password_here"}
login_response = requests.post("https://api.weightgurus.com/v3/account/login", data=data)
login_json = login_response.json()

# grab all your data
data_response = requests.get(
    "https://api.weightgurus.com/v3/operation/",
    headers={
        "Authorization": f'Bearer {login_json["accessToken"]}',
        "Accept": "application/json, text/plain, */*",
    },
)

scale_data_json = data_response.json()
for entry in scale_data_json["operations"]:
    print(entry)

@nucflash
Copy link

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/

@ethana2
Copy link

ethana2 commented Jun 12, 2020

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.

@kuwangr
Copy link

kuwangr commented Nov 3, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment