Skip to content

About

⚖️ Nightly sync of Renpho smart scale weigh-ins to Garmin Connect, body composition included. Runs in Docker with cron.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚖️ Renpho2Garmin

Python Docker Garmin Connect Renpho

A small nightly job that syncs the weigh-ins of a Renpho smart scale to Garmin Connect, body composition included. No manual entry required.

Renpho2Garmin

Table of Contents

📋 Features and Description

Garmin Connect is the platform I use the most to track training and health, but my scale is a Renpho Wi-Fi scale, and Renpho does not integrate with Garmin. Neither of them offers a public API for personal use, so I built a small script that reads the weigh-ins from the Renpho cloud and uploads them to Garmin Connect every night.

Main features:

  • At most one weigh-in per day: the first (usually fasted) or the last one of the day
  • A day is uploaded only if Garmin has no weigh-in for that date yet: no duplicates and no local state file, Garmin itself is the source of truth
  • The metrics to share with Garmin are chosen in a YAML file
  • Backfill of past weigh-ins from any date with --date
  • Supports Garmin MFA: the first run asks for the code, then the saved tokens are reused and refreshed
  • Runs every night at 2:00 via cron and checks the last 3 days, so weigh-ins that reach the Renpho cloud late are not lost

Metrics mapping

Weight is always sent. Every other metric can be switched on or off in config/metrics.yaml.

Garmin Renpho Unit
weight weight kg
percent_fat bodyfat %
percent_hydration water %
bone_mass bone kg
basal_met bmr kcal
metabolic_age bodyage years
visceral_fat_rating visfat level
bmi bmi
muscle_mass muscle kg, computed as weight × skeletal muscle %

Metrics that Renpho reports as 0 (e.g. when weighing with socks on, so no impedance is measured) are not sent.

🛠️ Tech Stack

flowchart LR
  S[Renpho scale] -- Wi-Fi --> R[Renpho cloud]
  R -- renpho-api --> J[sync.py<br/>Docker + cron]
  G[Garmin Connect] -- days already weighed --> J
  J -- FIT upload<br/>garminconnect --> G
Loading

The system is composed of four main components:

  1. Renpho cloud: the scale uploads every weigh-in over Wi-Fi. The script reads them with the unofficial renpho-api library.
  2. sync.py: keeps one weigh-in per day, asks Garmin which days already have a weigh-in, and prepares the metrics enabled in the config.
  3. Garmin Connect: each weigh-in is uploaded as a FIT "weight scale" file with the unofficial garminconnect library, so it shows up exactly like a weigh-in from a Garmin Index scale.
  4. Docker + cron: the job runs in a container started by the host crontab, does its run and exits.

📂 Repo Structure

renpho2garmin/
├── app/
│   ├── sync.py            # Renpho -> Garmin sync (--date for backfill)
│   ├── requirements.txt   # Python dependencies
│   └── Dockerfile
├── config/
│   └── metrics.yaml       # weigh-in to pick and metrics to send
├── secrets/               # Garmin tokens (not committed)
├── docker-compose.yml
├── .env.example           # Renpho and Garmin credentials template
├── LICENSE
└── README.md

🚀 Getting Started

Requirements

To set up this system you need:

Setup

  1. Clone the repository and create the .env file with your credentials:
    git clone https://github.com/GppCalcagno/renpho2garmin.git
    cd renpho2garmin
    cp .env.example .env
  2. Choose the weigh-in to keep and the metrics to send in config/metrics.yaml.
  3. Build the image:
    docker compose build
  4. Run the first sync from a terminal to upload your past weigh-ins. It logs in to Garmin, asks for the MFA code if enabled and saves the tokens in secrets/:
    docker compose run --rm sync python sync.py --date 2026-01-01
  5. Schedule the nightly run with crontab -e:
    0 2 * * * cd /path/to/renpho2garmin && docker compose run --rm sync >> sync.log 2>&1
    
  6. ⚖️ Step on the scale and forget about it!

Usage

docker compose run --rm sync                                   # last 3 days up to yesterday
docker compose run --rm sync python sync.py --date 2026-01-01  # from a date up to yesterday

Notes

  • Both libraries are unofficial and rely on internal APIs, so an update from Renpho or Garmin can break them.
  • When the Garmin tokens expire, the script logs in again with your credentials. If MFA is enabled it needs the code, so the cron run fails: run the sync once from a terminal.
  • During a full login you may see messages like mobile+cffi returned 429: ... IP rate limited by Garmin. They can be ignored if the sync goes on: garminconnect tries several login strategies in a row, and only the last one needs to succeed. If every strategy fails, wait a while before retrying, because repeated logins make the rate limit last longer.
  • Days are computed in the Europe/Rome timezone: change LOCAL_TZ in sync.py and TZ in docker-compose.yml if you live elsewhere.

🤝 Contributing

This is a personal project, but suggestions and ideas are welcome! Feel free to open an issue or a pull request if you spot something that could be improved.

📄 License

Released under the MIT License.

About

⚖️ Nightly sync of Renpho smart scale weigh-ins to Garmin Connect, body composition included. Runs in Docker with cron.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages