{"id":22341370,"url":"https://github.com/lswiderski/miscalebodycomposition","last_synced_at":"2026-05-10T03:32:14.801Z","repository":{"id":65358903,"uuid":"458471995","full_name":"lswiderski/MiScaleBodyComposition","owner":"lswiderski","description":"Lib for calculate the body composition from data returned from Mi Body Composition Scale","archived":false,"fork":false,"pushed_at":"2023-03-18T14:14:32.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T11:20:33.815Z","etag":null,"topics":["csharp","dotnet","iot","mi","nuget-package","xiaomi","xiaomi-smart","xiaomi-smart-home"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lswiderski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-12T09:08:06.000Z","updated_at":"2022-02-17T16:57:35.000Z","dependencies_parsed_at":"2023-02-23T11:00:25.555Z","dependency_job_id":null,"html_url":"https://github.com/lswiderski/MiScaleBodyComposition","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lswiderski%2FMiScaleBodyComposition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lswiderski%2FMiScaleBodyComposition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lswiderski%2FMiScaleBodyComposition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lswiderski%2FMiScaleBodyComposition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lswiderski","download_url":"https://codeload.github.com/lswiderski/MiScaleBodyComposition/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245624929,"owners_count":20646044,"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":["csharp","dotnet","iot","mi","nuget-package","xiaomi","xiaomi-smart","xiaomi-smart-home"],"created_at":"2024-12-04T08:06:36.663Z","updated_at":"2026-05-10T03:32:14.734Z","avatar_url":"https://github.com/lswiderski.png","language":"C#","funding_links":["https://www.buymeacoffee.com/lukaszswiderski"],"categories":[],"sub_categories":[],"readme":"# MiScaleBodyComposition\n\nLib for calculate the body composition from data returned from Mi Body Composition Scale\n\n## Instalation\n\n- dotnet cli\n\n`dotnet add package MiScaleBodyComposition`\n\n- Package Manager\n\n`Install-Package MiScaleBodyComposition`\n\n## Usage\n\n```csharp\nusing MiScaleBodyComposition;\n```\n\n```csharp\nvar data = new byte[] {2,166,230,7,2,11,17,34,7,186,1,60,55};\n\nvar result = new MiScale().GetBodyComposition(data, new User(175, 25, Sex.Male));\n```\n\n## Byte Array description\n\nMine Mi Body Composition Scale return 15 bytes long array. Some other versions of scale can return 17 byte long array.\n\nOnly last 13 bytes are the important payload:\n\n- bytes 0 and 1: control bytes\n- bytes 2 and 3: year\n- byte 4: month\n- byte 5: day\n- byte 6: hours\n- byte 7: minutes\n- byte 8: seconds\n- bytes 9 and 10: impedance\n- bytes 11 and 12: weight (*100 for pounds and catty, *200 for kilograms)\n\n(source: https://github.com/wiecosystem/Bluetooth/blob/master/doc/devices/huami.health.scale2.md)\n\n## Used in\n\nhttps://github.com/lswiderski/mi-scale-exporter\n\n## Inspiration\n\n- https://github.com/RobertWojtowicz/miscale2garmin\n- https://github.com/lolouk44/xiaomi_mi_scale\n- https://github.com/rando-calrissian/esp32_xiaomi_mi_2_hass\n\n\n## Coffee\n\n\u003ca href=\"https://www.buymeacoffee.com/lukaszswiderski\" 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\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flswiderski%2Fmiscalebodycomposition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flswiderski%2Fmiscalebodycomposition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flswiderski%2Fmiscalebodycomposition/lists"}