Configure your scale with Zepp Life App on your mobile device (tested on Android 10-14);
Retrieve scale's MAC address from Zepp Life App (Profile > My devices > Mi Body Composition Scale 2);
Turn off weigh small object in Zepp Life App (Profile > My devices > Mi Body Composition Scale 2) for better measurement quality:
3. Setting correct date and time in Mi Body Composition Scale 2
Launch Zepp Life App, go to scale (Profile > My devices > Mi Body Composition Scale 2);
Start scale and select Clear data in App;
Take a new weight measurement with App, App should synchronize date and time (UTC);
Script import_data.sh detects time zone and includes this as a time offset;
If time is still not synchronized correctly, check NTP synchronization on server or change time offset in import_data.sh file (offset parameter);
You should also synchronize scale after replacing batteries;
Script import_data.sh detects same weighing done in less than 30 seconds (protection against duplicates);
Script import_data.sh have time difference detection of more than 20 minutes (between scale data and os).
4. How does this work
Synchronization diagram from Mi Body Composition Scale 2 to Garmin Connect:
4.1. BLE VERSION
After weighing, Mi Body Composition Scale 2 is active for 15 minutes on bluetooth transmission;
USB bluetooth adapter or internal module (tested with bluetooth versions 4.0/4.1 and 5.0/5.1/5.3) scans for BLE device every 1 minute for 10 seconds and queries scale for data;
Body weight and impedance data on server are appropriately processed by scripts;
Processed data are sent to Garmin Connect (MFA/2FA support);
Raw and calculated data from scale is backed up on server in backup.csv file;
backup.csv file can be imported e.g. for analysis into Excel.
After weighing, Mi Body Composition Scale 2 is active for 15 minutes on bluetooth transmission;
ESP32 module operates in a deep sleep and wakes up every 7 minutes, scans for BLE device for 10 seconds and queries scale for data, process can be started immediately via reset button;
ESP32 module sends acquired data via MQTT protocol to MQTT broker installed on server;
Body weight and impedance data on server are appropriately processed by scripts;
Processed data are sent to Garmin Connect (MFA/2FA support);
Raw and calculated data from scale is backed up on server in backup.csv file;
backup.csv file can be imported e.g. for analysis into Excel.