withings-sync on debian buster

Since Withings migrates to OAuth 2.0 by 2021-09, I felt it was time to update the flaky sync solution I had running so far.

Now running https://github.com/jaroslawhartman/withings-sync with debian’s virtualenv:

apt install virtualenv python3-virtualenv
virtualenv -p python3 withings-sync
source withings-sync/bin/activate
pip install withings-sync
export WITHINGS_USER=you
withings-sync

(get token, then set up a regular job to sync)

$ cat sync.sh
#!/bin/bash
source withings-sync/bin/activate
export WITHINGS_USER=you
export GARMIN_USERNAME=you-but-on-garmin
export GARMIN_PASSWORD=your-garmin-password
withings-sync
$ chmod 700 sync.sh
crontab -e
12 4 * * * cronic /home/you/sync.sh