Skip to content

Retrieve withings device information through REST dashboard private API

Notifications You must be signed in to change notification settings

CyrilPeponnet/withings-devices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python library for the Withings devices

While withings provide a nifty API to fetch body metrics, http://oauth.withings.com/api/doc

there is actually no way to retrive other information about a dedicated device (in this case the scale W-50).

So here is a simple class using the web dashboard api (undocumented). Works for my personnal usage.

Installation:

pip install git+https://github.com/CyrilPeponnet/withings-devices.git

Usage:

from withingsdevices import WithingsDevices

my_devices = WithingsDevices('YOUR_EMAIL', 'YOUR_PASSWORD')

# fetch the devices
my_devices.fetch_devices()

print my_devices.devices
{12342: {'batt_lvl': 42, 'name': u'My Scale', 'lastseen': 1421528371}}

#with 12342 as the deviceid

# fetch the data last recorded data
my_devices.fetch_data()

print my_devices.devices
{12342: {'batt_lvl': 42, 'name': u'My Scale', 'data': {'co2': [{u'date': 1421528371, u'value': 1155}], 'temperature': [{u'date': 1421528371, u'value': 19.6}]}, 'lastseen': 1421528371}}

# fetch a speficic device and ask for a full period of data
my_devices.fetch_data(deviceid=12342,last_days=200)

...

Enjoy

About

Retrieve withings device information through REST dashboard private API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages