Sync the Wyze scale with Garmin connect v2.0.0
The python script collect the data from your Wyze account and create the .fit file to be uploaded to Garmin. The script leverage Garth, and Wyze_SDK to automatically upload the last measurement you took on your Wyze smart scale to Garmin Connect.
The V2.0.0 is 100% python based and doesn't require anymore a shell script. Support 2FA for Garmin and Wyze and scale auto-discovery. Python package is not yet available but docker version is available on alpine python based image.
Wyze authentication Login/Pass/TOTP is not working anymore Wyze requires an API key and id to log in Visit the Wyze developer API portal to generate an API ID/KEY: https://developer-api-console.wyze.com/#/apikey/view
Garmin authentication For Garmin authentication with 2FA : First run the docker compose this way :
docker compose run --rm wyzegarminconnect
You ll be prompted for the 2FA code, enter it, this will create the token that will be valid for one year. Once the token is created you don't have to authenticate again as long as the token is valid and you can run the
docker compose run -d
docker compose logs -f
Docker image is now available for amd64, arm64 and arm.
Download the docker-compose.yml and add your credentials:
version: "3.9"
services:
wyzegarminconnect:
image: svanhoutte/wyzegarminconnect:latest
stdin_open: true # docker run -i
tty: true # docker run -t
restart: unless-stopped
network_mode: "host"
environment:
WYZE_EMAIL: "wyze username"
WYZE_PASSWORD: "wyze password"
WYZE_KEY_ID: "ID"
WYZE_API_KEY: "KEY"
Garmin_username: "garmin username"
Garmin_password: "garmin password"
volumes:
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- "./tokens:/wyze_garmin_sync/tokens"
The volumes are mounted to sync logs in the containers and the host. Then do the
docker compose up -d
docker compose logs -f
This requires Python 3.8 and above. If you're unsure how to check what version of Python you're on, you can check it using the following:
Note: You may need to use
python3
before your commands to ensure you use the correct Python path. e.g.python3 --version
python --version
-- or --
python3 --version
You ll need also a Linux environment most of the recent distribution should work.
$ pip install wyze_sdk
$ pip install garth
First clone the repository
git clone https://github.com/svanhoutte/wyze_garmin_sync.git
Provide and export your credentials in your shell environment
WYZE_EMAIL=
WYZE_PASSWORD=
WYZE_TOTP=
WYZE_KEY_ID=
WYZE_API_KEY=
Garmin_username=
Garmin_password=
export WYZE_API_KEY
export WYZE_KEY_ID
export WYZE_EMAIL
export WYZE_PASSWORD
export Garmin_username
export Garmin_password
In your working directory add the execution right on the script
chmod +x ./scale.py
Then run ./scale.py
and if all goes well you should be able to see your data in Garmin connect.
This should be done at least once before setting up the cron as if you have 2FA for Garmin to allow you to enter the 2 step of authentication.
Will run the script every 10 min to get if a new measurement has been made on the scale.
*/10 * * * * path_to_script/scale.py 2>&1 | /usr/bin/logger -t garminsync