{"id":13630504,"url":"https://github.com/vshymanskyy/miband-js","last_synced_at":"2025-04-05T13:03:50.098Z","repository":{"id":50508202,"uuid":"126977707","full_name":"vshymanskyy/miband-js","owner":"vshymanskyy","description":"MiBand 2 JS library for Node.JS and HTML5 (WebBluetooth)","archived":false,"fork":false,"pushed_at":"2022-03-14T15:23:51.000Z","size":636,"stargazers_count":339,"open_issues_count":23,"forks_count":71,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-04-14T18:08:00.822Z","etag":null,"topics":["miband","miband2","nodejs","webbluetooth","xiaomi"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/vshymanskyy.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":"2018-03-27T11:42:03.000Z","updated_at":"2024-04-11T17:50:56.000Z","dependencies_parsed_at":"2022-08-26T05:01:18.098Z","dependency_job_id":null,"html_url":"https://github.com/vshymanskyy/miband-js","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshymanskyy%2Fmiband-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshymanskyy%2Fmiband-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshymanskyy%2Fmiband-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vshymanskyy%2Fmiband-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vshymanskyy","download_url":"https://codeload.github.com/vshymanskyy/miband-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247339153,"owners_count":20923014,"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":["miband","miband2","nodejs","webbluetooth","xiaomi"],"created_at":"2024-08-01T22:01:45.371Z","updated_at":"2025-04-05T13:03:50.069Z","avatar_url":"https://github.com/vshymanskyy.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct.svg)](https://vshymanskyy.github.io/StandWithUkraine)\n\n[![NPM version](https://img.shields.io/npm/v/miband.svg)](https://www.npmjs.com/package/miband)\n[![NPM download](https://img.shields.io/npm/dm/miband.svg)](https://www.npmjs.com/package/miband)\n[![GitHub issues](https://img.shields.io/github/issues/vshymanskyy/miband-js.svg)](https://github.com/vshymanskyy/miband-js/issues)\n[![GitHub license](https://img.shields.io/github/license/vshymanskyy/miband-js.svg)](https://github.com/vshymanskyy/miband-js)\n\n# Mi Band 2 JS library\n\nA clean implementation of [**Mi Band 2**](http://www.mi.com/en/miband2/) library for Browsers and Node.js, using WebBluetooth API.\n![demo](https://github.com/vshymanskyy/miband-js/raw/master/public/demo.png)\n\n## Setting up\n\nIt's best to unbind your Mi Band 2 from MiFit App first.  \nYou should be able to bind it back again, but no guaranee here ;)\n\n### Browser\n\n[![LIVE DEMO](https://github.com/vshymanskyy/miband-js/raw/master/public/live-demo-btn.png)](https://tiny.cc/miband-js)\n\nYou need a browser with [WebBluetooth support](https://github.com/WebBluetoothCG/web-bluetooth/blob/master/implementation-status.md). Tested with:\n- Chrome on OS X (Yosemite or later)\n- Chrome on Android (6.0 Marshmallow or later)\n- Chrome on Linux (the `chrome://flags/#enable-experimental-web-platform-features` flag must be enabled)\n\n### Node.js\n\n```sh\nnpm install miband -g\nmiband-test\n```\n\nThis should work on Windows, Linux and OSX.  \nOn Linux, you need to grant Bluetooth access for Node.js:\n```sh\nsudo setcap cap_net_raw+eip $(eval readlink -f `which node`)\n```\n\n## Features\n\n- Authentication\n- Device info: time, battery status, hw/sw versions, etc.\n- Button tap event\n- Notifications: message, phone, vibrate\n- Heart Rate Monitor\n- Realtime data (soon)\n\n## API usage example\n\n```js\nconst MiBand = require('miband');\n\nconst device = await bluetooth.requestDevice({\n  filters: [\n    { services: [ MiBand.advertisementService ] }\n  ],\n  optionalServices: MiBand.optionalServices\n});\n\nconst server = await device.gatt.connect();\n\nlet miband = new MiBand(server);\nawait miband.init();\n\nlog('Notifications demo...')\nawait miband.showNotification('message');\n```\n\nHere you can find [more API examples](https://github.com/vshymanskyy/miband-js/blob/master/src/test.js)\n\n---\n## Contributing\n\nPlease check out [DEVELOPMENT.md](https://github.com/vshymanskyy/miband-js/blob/master/DEVELOPMENT.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvshymanskyy%2Fmiband-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvshymanskyy%2Fmiband-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvshymanskyy%2Fmiband-js/lists"}