{"id":13534662,"url":"https://github.com/YinHangCode/homebridge-mi-gateway-security","last_synced_at":"2025-04-01T23:31:50.393Z","repository":{"id":57265631,"uuid":"108555725","full_name":"YinHangCode/homebridge-mi-gateway-security","owner":"YinHangCode","description":"XiaoMi Gateway Security plugin for HomeBridge.","archived":false,"fork":false,"pushed_at":"2018-02-10T15:06:21.000Z","size":36,"stargazers_count":30,"open_issues_count":15,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-15T06:09:10.066Z","etag":null,"topics":["aqara","gateway","homebridge","homebridge-plugin","security","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-10-27T14:24:06.000Z","updated_at":"2025-02-01T21:06:51.000Z","dependencies_parsed_at":"2022-08-25T02:20:36.539Z","dependency_job_id":null,"html_url":"https://github.com/YinHangCode/homebridge-mi-gateway-security","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-gateway-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-gateway-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-gateway-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-gateway-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YinHangCode","download_url":"https://codeload.github.com/YinHangCode/homebridge-mi-gateway-security/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246729399,"owners_count":20824363,"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","gateway","homebridge","homebridge-plugin","security","xiaomi"],"created_at":"2024-08-01T08:00:34.736Z","updated_at":"2025-04-01T23:31:50.157Z","avatar_url":"https://github.com/YinHangCode.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# homebridge-mi-gateway-security\n[![npm version](https://badge.fury.io/js/homebridge-mi-gateway-security.svg)](https://badge.fury.io/js/homebridge-mi-gateway-security)\n\nXiaoMi Gateway Security 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-security/issues) or [QQ Group: 107927710](//shang.qq.com/wpa/qunwpa?idkey=8b9566598f40dd68412065ada24184ef72c6bddaa11525ca26c4e1536a8f2a3d).**   \n\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-gateway-security/master/images/Gateway.jpg)\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-gateway-security/master/images/mi-acpartner.jpg)\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-gateway-security/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-security\n```\n## Configuration   \n```\n\"accessories\": [{\n    \"accessory\": \"MiGatewaySecurity\",\n    \"ip\": \"192.168.88.xx\",\n    \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n    \"name\": \"Security\",\n    \"disable\": false,\n    \"switchName\": \"Security Switch\",\n    \"switchDisable\": true\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.1.1 (2018-02-10)\n1.update 'package.json'.   \n### 0.1.0 (2018-01-21)\n1.add switch control security state.   \n2.remove the superfluous security state.   \n### 0.0.5 (2017-12-11)\n1.set default state is off.   \n### 0.0.4 (2017-10-31)\n1.add setting nightTime feature.   \n### 0.0.3 (2017-10-29)\n1.fixed bug that keep loading.   \n### 0.0.2 (2017-10-28)\n1.change rule: Home is close.   \n### 0.0.1 (2017-10-27)\n1.support for gateway.   \n2.support for mi ac partner.   \n3.support for aqara ac partner.   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYinHangCode%2Fhomebridge-mi-gateway-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FYinHangCode%2Fhomebridge-mi-gateway-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FYinHangCode%2Fhomebridge-mi-gateway-security/lists"}