Skip to content

prometheus exporter for Withings HealthCare(measurement, activity, sleep)

License

Notifications You must be signed in to change notification settings

legnoh/withings-exporter

withings-exporter

Badge ci

Prometheus exporter for Withings Health Mate (For Public Cloud).

Usage

Registration

At first, create withings app for yours.

Start(Docker)

The simplest way to use it is with Docker.

# set env
export WITHINGS_CLIENT_ID="YOURCRIENTID"
export WITHINGS_CONSUMER_SECRET="YOURCLIENTSECRET"

# run get_token.py
docker run -p 8000:8000 \
    --env WITHINGS_CLIENT_ID \
    --env WITHINGS_CONSUMER_SECRET \
    legnoh/withings-exporter uv run get_token.py

# paste your generated data to .env (and edit TZ)
vi .env

# run exporter(with above .env file)
docker run -p 8000:8000 \
    --env-file='.env' \
    legnoh/withings-exporter

Start(source)

Alternatively, it can be started from the source.

# clone
git clone https://github.com/legnoh/withings_exporter.git && cd withings_exporter
uv sync

# prepare env file for your apps
cp example/example.env .env

# input WITHINGS_CLIENT_ID, WITHINGS_CONSUMER_SECRET
code .env

# exec get_token.py(in your browser)
uv run get_token.py

# paste your env to .env 3rd block (and edit TZ)
code .env

# run exporter
uv run main.py

Metrics

please check metrics.yml or example

Disclaim

  • This script is NOT authorized by Withings.
    • We are not responsible for any damages caused by using this script.
  • This script is not intended to overload these sites or services.
    • When using this script, please keep your posting frequency within a sensible range.

About

prometheus exporter for Withings HealthCare(measurement, activity, sleep)

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6