{"id":24571574,"url":"https://github.com/RobertWojtowicz/export2garmin","last_synced_at":"2025-10-04T23:30:33.363Z","repository":{"id":37470421,"uuid":"289458092","full_name":"RobertWojtowicz/export2garmin","owner":"RobertWojtowicz","description":"Export Miscale and Omron data to Garmin Connect","archived":false,"fork":false,"pushed_at":"2024-10-10T18:44:57.000Z","size":210,"stargazers_count":166,"open_issues_count":0,"forks_count":21,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-18T14:32:43.973Z","etag":null,"topics":["blood-pressure","bluetooth","esp32","fitness","garmin","garmin-api","garmin-connect","iot","miscale","miscale2garmin","mqtt","omron","raspberry","scale","wifi","xiaomi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RobertWojtowicz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"buy_me_a_coffee":"RobertWojtowicz"}},"created_at":"2020-08-22T09:24:28.000Z","updated_at":"2024-10-10T18:42:58.000Z","dependencies_parsed_at":"2022-07-14T10:48:31.540Z","dependency_job_id":"f5788c27-5b20-4dc1-8360-757b99688ecc","html_url":"https://github.com/RobertWojtowicz/export2garmin","commit_stats":null,"previous_names":["robertwojtowicz/export2garmin","robertwojtowicz/miscale2garmin"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertWojtowicz%2Fexport2garmin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertWojtowicz%2Fexport2garmin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertWojtowicz%2Fexport2garmin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobertWojtowicz%2Fexport2garmin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobertWojtowicz","download_url":"https://codeload.github.com/RobertWojtowicz/export2garmin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235325670,"owners_count":18971938,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blood-pressure","bluetooth","esp32","fitness","garmin","garmin-api","garmin-connect","iot","miscale","miscale2garmin","mqtt","omron","raspberry","scale","wifi","xiaomi"],"created_at":"2025-01-23T18:01:51.970Z","updated_at":"2025-10-04T23:30:33.357Z","avatar_url":"https://github.com/RobertWojtowicz.png","language":"Python","funding_links":["https://buymeacoffee.com/RobertWojtowicz","https://www.buymeacoffee.com/RobertWojtowicz"],"categories":["Tools"],"sub_categories":["Older resources"],"readme":"# Export 2 to Garmin Connect\n\n## 1. Introduction\n### 1.1. Miscale module (once known as miscale2garmin):\n- Allows fully automatic synchronization of Mi Body Composition Scale 2 (tested on XMTZC05HM) or Xiaomi Body Composition Scale S400 (tested on MJTZC01YM) directly to Garmin Connect, with following parameters:\n  - Date and Time (measurement, from device);\n  - Weight (**_NOTE:_ lbs is automatically converted to kg**, applies to Mi Body Composition Scale 2);\n  - BMI (Body Mass Index);\n  - Body Fat;\n  - Skeletal Muscle Mass;\n  - Bone Mass;\n  - Body Water;\n  - Physique Rating;\n  - Visceral Fat;\n  - Metabolic Age;\n  - Heart rate (Xiaomi Body Composition Scale S400 only, optional upload to blood pressure section).\n- Miscale_backup.csv file also contains other parameters (can be imported e.g. for analysis into Excel):\n  - BMR (Basal Metabolic Rate);\n  - LBM (Lean Body Mass);\n  - Ideal Weight;\n  - Fat Mass To Ideal;\n  - Protein;\n  - Data Status (to_import, failed, uploaded);\n  - Unix Time (based on Date and Time);\n  - Email User (used account for Garmin Connect);\n  - Upload Date and Upload Time (to Garmin Connect);\n  - Difference Time (between measuring and uploading);\n  - Battery status in V and % (ESP32 - Mi Body Composition Scale 2 only);\n  - Impedance;\n  - Impedance Low (Xiaomi Body Composition Scale S400 only).\n- Supports multiple users with individual weights ranges, we can link multiple accounts with Garmin Connect.\n\n### 1.2. Omron module: \n- Allows fully automatic synchronization of Omron blood pressure (tested on M4/HEM-7155T and M7/HEM-7322T Intelli IT) directly to Garmin Connect, with following parameters:\n  - Date and Time (measurement, from device);\n  - DIAstolic blood pressure;\n  - SYStolic blood pressure;\n  - Heart rate.\n- Omron_backup.csv file also contains other parameters (can be imported e.g. for analysis into Excel):\n  - Category (**_NOTE:_ EU and US classification only**);\n  - MOV (Movement detection);\n  - IHB (Irregular Heart Beat);\n  - Data Status (to_import, failed, uploaded);\n  - Unix Time (based on Date and Time);\n  - Email User (used account for Garmin Connect);\n  - Upload Date and Upload Time (to Garmin Connect);\n  - Difference Time (between measuring and uploading).\n-  Supports 2 users from Omron device, we can connect 2 accounts with Garmin Connect.\n\n### 1.3. User module:\n- Enables configuration of all parameters related to integration Miscale and Omron;\n- Provides export Oauth1 and Oauth2 tokens of your account from Garmin Connect (MFA/2FA support).\n\n## 2. How does this work\n- Miscale and Omron modules can be activated individually or run together:\n\t- Devices can run together (Mi Body Composition Scale 2 and Omron);\n\t- Devices can run together but there must be a sequence, first measuring blood pressure and then weighing (Xiaomi Body Composition Scale S400 and Omron);\u003cbr\u003e\n\t  This is because Xiaomi Body Composition Scale S400 requires continuous scanning, importing data from scale will allow you to go to Omron module.\n\t- Devices can run together in parallel but two USB Bluetooth adapters are required, one for scanning Xiaomi Body Composition Scale S400 and other for Omron;\u003cbr\u003e\n\t  This is an using separate processes, view section [2.6.4.](https://github.com/RobertWojtowicz/export2garmin/blob/master/manuals/about_BLE.md#264-using-two-ble-adapters-in-parallel)\n- Synchronization diagram from Export 2 to Garmin Connect:\n\n![alt text](https://github.com/RobertWojtowicz/export2garmin/blob/master/manuals/workflow.png)\n\n### 2.1. Miscale module | Mi Body Composition Scale 2 | BLE VERSION\n- After weighing, Mi Body Composition Scale 2 is active for 15 minutes on bluetooth transmission;\n- USB Bluetooth adapter or internal module scans BLE devices for 10 seconds to acquire data from scale;\n- Body weight and impedance data on server are appropriately processed by scripts;\n- Processed data are sent to Garmin Connect;\n- Raw and calculated data from scale is backed up on server in miscale_backup.csv file.\n\n**Select your platform and go to instructions:**\n- [Debian 12 | Raspberry Pi OS (based on Debian 12)](https://github.com/RobertWojtowicz/export2garmin/blob/master/manuals/Miscale_BLE.md);\n- [Windows 11](https://github.com/RobertWojtowicz/export2garmin/blob/master/manuals/all_BLE_win.md).\n\n### 2.2. Miscale module | Mi Body Composition Scale 2 | ESP32 VERSION\n- After weighing, Mi Body Composition Scale 2 is active for 15 minutes on bluetooth transmission;\n- ESP32 module operates in a deep sleep and wakes up every 7 minutes, scans BLE devices for 10 seconds to acquire data from scale, process can be started immediately via reset button;\n- ESP32 module sends acquired data via MQTT protocol to MQTT broker installed on server;\n- Body weight and impedance data on server are appropriately processed by scripts;\n- Processed data are sent to Garmin Connect;\n- Raw and calculated data from scale is backed up on server in miscale_backup.csv file.\n\n**Select your platform and go to instructions:**\n- [Debian 12 | Raspberry Pi OS (based on Debian 12)](https://github.com/RobertWojtowicz/export2garmin/blob/master/manuals/Miscale_ESP32.md);\n- [Windows 11](https://github.com/RobertWojtowicz/export2garmin/blob/master/manuals/Miscale_ESP32_win.md).\n\n### 2.3. Miscale module | Xiaomi Body Composition Scale S400 | BLE VERSION\n- After weighing, Xiaomi Body Composition Scale S400 transmits weight data for a short while on bluetooth transmission;\n- A USB Bluetooth adapter scans BLE devices continuously to acquire data from scale;\n- Data from scale is decrypted and parsed into a readable form;\n- Body weight and impedance data on server are appropriately processed by scripts;\n- Processed data are sent to Garmin Connect;\n- Raw and calculated data from scale is backed up on server in miscale_backup.csv file.\n\n**Select your platform and go to instructions:**\n- [Debian 12 | Raspberry Pi OS (based on Debian 12)](https://github.com/RobertWojtowicz/export2garmin/blob/master/manuals/S400_BLE.md);\n- [Windows 11](https://github.com/RobertWojtowicz/export2garmin/blob/master/manuals/all_BLE_win.md).\n\n### 2.4. Omron module | BLE VERSION\n- After measuring blood pressure, Omron allows you to download measurement data once;\n- USB bluetooth adapter or internal module scans BLE devices for 10 seconds to acquire data from blood pressure device (downloading data can take about 1 minute);\n- Pressure measurement data are appropriately processed by scripts on server;\n- Processed data are sent to Garmin Connect;\n- Raw and calculated data from device is backed up on server in omron_backup.csv file.\n\n**Select your platform and go to instructions:**\n- [Debian 12 | Raspberry Pi OS (based on Debian 12)](https://github.com/RobertWojtowicz/export2garmin/blob/master/manuals/Omron_BLE.md);\n- [Windows 11](https://github.com/RobertWojtowicz/export2garmin/blob/master/manuals/all_BLE_win.md).\n\n## 3. Mobile App\nI don't plan to create a mobile app, but I encourage you to take advantage of another projects (applies to Mi Body Composition Scale / Mi Scale / S400):\n- Android: https://github.com/lswiderski/mi-scale-exporter;\n- iOS | iPadOS: https://github.com/lswiderski/WebBodyComposition.\n\n## 4. Synchronizing data between different ecosystems\nA very interesting project called SmartScaleConnect synchronizes scale data (applies to Mi Body Composition Scale 2 / S400) from Xiaomi cloud to Garmin:\n- Linux | MacOS | Windows: https://github.com/AlexxIT/SmartScaleConnect.\n\n## If you like my work, you can buy me a coffee\n\u003ca href=\"https://www.buymeacoffee.com/RobertWojtowicz\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/default-orange.png\" alt=\"Buy Me A Coffee\" height=\"41\" width=\"174\"\u003e\u003c/a\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRobertWojtowicz%2Fexport2garmin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRobertWojtowicz%2Fexport2garmin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRobertWojtowicz%2Fexport2garmin/lists"}