Prometheus exporter for Withings Health Mate (For Public Cloud).
At first, create withings app for yours.
- Register with Withings Public API | Withings
- I recommend
http://localhost:8000/to Callback URI. - Please note
CLIENT IDandCONSUMER SECRET.
- I recommend
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
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.pyplease check metrics.yml or example
- 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.