{"id":21148532,"url":"https://github.com/yinhangcode/homebridge-mi-gateway-fm","last_synced_at":"2025-10-31T00:31:56.770Z","repository":{"id":57265627,"uuid":"100849932","full_name":"YinHangCode/homebridge-mi-gateway-fm","owner":"YinHangCode","description":"XiaoMi Gateway FM plugin for HomeBridge.","archived":false,"fork":false,"pushed_at":"2018-02-10T15:07:23.000Z","size":58,"stargazers_count":42,"open_issues_count":5,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-09T13:44:44.359Z","etag":null,"topics":["aqara","fm","gateway","homebridge","homebridge-plugin","mi","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YinHangCode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-20T09:02:18.000Z","updated_at":"2024-05-31T08:31:11.000Z","dependencies_parsed_at":"2022-08-25T03:40:45.278Z","dependency_job_id":null,"html_url":"https://github.com/YinHangCode/homebridge-mi-gateway-fm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YinHangCode/homebridge-mi-gateway-fm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-gateway-fm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-gateway-fm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-gateway-fm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-gateway-fm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YinHangCode","download_url":"https://codeload.github.com/YinHangCode/homebridge-mi-gateway-fm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-gateway-fm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262145433,"owners_count":23265923,"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":["aqara","fm","gateway","homebridge","homebridge-plugin","mi","xiaomi"],"created_at":"2024-11-20T09:27:05.027Z","updated_at":"2025-10-31T00:31:51.750Z","avatar_url":"https://github.com/YinHangCode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# homebridge-mi-gateway-fm\n[![npm version](https://badge.fury.io/js/homebridge-mi-gateway-fm.svg)](https://badge.fury.io/js/homebridge-mi-gateway-fm)\n\nXiaoMi Gateway FM plugin for HomeBridge.   \n   \nThanks for [nfarina](https://github.com/nfarina)(the author of [homebridge](https://github.com/nfarina/homebridge)), [OpenMiHome](https://github.com/OpenMiHome/mihome-binary-protocol), [aholstenson](https://github.com/aholstenson)(the author of [miio](https://github.com/aholstenson/miio)), all other developer and testers.   \n   \n**Note: If you find bugs, please submit them to [issues](https://github.com/YinHangCode/homebridge-mi-gateway-fm/issues) or [QQ Group: 107927710](//shang.qq.com/wpa/qunwpa?idkey=8b9566598f40dd68412065ada24184ef72c6bddaa11525ca26c4e1536a8f2a3d).**   \n\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-gateway-fm/master/images/Gateway.jpg)\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-gateway-fm/master/images/mi-acpartner.jpg)\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-gateway-fm/master/images/aqara-acpartner.jpg)\n\n## Installation\n1. Install HomeBridge, please follow it's [README](https://github.com/nfarina/homebridge/blob/master/README.md).   \nIf you are using Raspberry Pi, please read [Running-HomeBridge-on-a-Raspberry-Pi](https://github.com/nfarina/homebridge/wiki/Running-HomeBridge-on-a-Raspberry-Pi).   \n2. Make sure you can see HomeBridge in your iOS devices, if not, please go back to step 1.   \n3. Install packages.   \n```\nnpm install -g homebridge-mi-gateway-fm\n```\n\n## Configuration\n```\n\"accessories\": [{\n    \"accessory\": \"MiGatewayFM\",\n    \"name\": \"MiGatewayFM\",\n    \"ip\": \"192.168.88.xx\",\n    \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"\n}]\n```\nIf you want play your own channel, you can set the following in the config.   \n```\n\"accessories\": [{\n    \"accessory\": \"MiGatewayFM\",\n    \"name\": \"MiGatewayFM\",\n    \"ip\": \"192.168.88.xx\",\n    \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n    \"url\": \"http://live.xmcdn.com/live/1005/64.m3u8\"\n}]\n```\n\n## Get token\n### Get token by miio2.db\nsetup MiJia(MiHome) app in your android device or android virtual machine.   \nopen MiJia(MiHome) app and login your account.   \nrefresh device list and make sure device display in the device list.   \nget miio2.db(path: /data/data/com.xiaomi.smarthome/databases/miio2.db) file from your android device or android virtual machine.   \nopen website [[Get MiIo Tokens By DataBase File](http://miio2.yinhh.com/)], upload miio2.db file and submit.    \n### Get token by network\nOpen command prompt or terminal. Run following command:   \n```\nmiio --discover\n```\nWait until you get output similar to this:   \n```\nDevice ID: xxxxxxxx   \nModel info: Unknown   \nAddress: 192.168.88.xx   \nToken: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx via auto-token   \nSupport: Unknown   \n```\n\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\" is token.   \nIf token is \"???\", then reset device and connect device created Wi-Fi hotspot.   \nRun following command:   \n```\nmiio --discover --sync\n```\nWait until you get output.   \nFor more information about token, please refer to [OpenMiHome](https://github.com/OpenMiHome/mihome-binary-protocol) and [miio](https://github.com/aholstenson/miio).   \n\n## Version Logs\n### 0.2.6 (2018-02-10)\n1.update 'README.md'.   \n### 0.2.5 (2018-02-10)\n1.optimized code.   \n### 0.2.4 (2018-02-10)\n1.update 'package.json'.   \n### 0.2.3 (2017-09-11)\n1.optimized code.   \n### 0.2.2 (2017-09-05)\n1.optimized code.   \n### 0.2.1 (2017-08-27)\n1.optimized code.   \n### 0.2.0 (2017-08-26)\n1.fixed bug that homebridge not works when device is not responding.   \n2.add support for aqara ac partner FM.   \n### 0.1.1 (2017-08-26)\n1.optimized code.   \n### 0.1.0 (2017-08-24)\n1.add support for mi ac partner FM.   \n### 0.0.3 (2017-08-22)\n1.optimized code.   \n### 0.0.2 (2017-08-22)\n1.optimized code.   \n### 0.0.1 (2017-08-20)\n1.Switch on/off XiaoMi Gateway FM.   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinhangcode%2Fhomebridge-mi-gateway-fm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyinhangcode%2Fhomebridge-mi-gateway-fm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinhangcode%2Fhomebridge-mi-gateway-fm/lists"}