{"id":21148531,"url":"https://github.com/yinhangcode/homebridge-mi-fan","last_synced_at":"2025-10-11T21:40:18.668Z","repository":{"id":57154360,"uuid":"102482134","full_name":"YinHangCode/homebridge-mi-fan","owner":"YinHangCode","description":"XiaoMi fan plugins for HomeBridge.","archived":false,"fork":false,"pushed_at":"2024-06-01T09:00:42.000Z","size":65,"stargazers_count":62,"open_issues_count":7,"forks_count":17,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-19T08:35:40.113Z","etag":null,"topics":["fan","homebridge","homebridge-plugin","mi","xiaomi","zhimi"],"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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-05T13:05:22.000Z","updated_at":"2024-10-30T00:57:34.000Z","dependencies_parsed_at":"2024-11-20T10:26:43.860Z","dependency_job_id":"6af2de1e-cc3e-4164-8956-73ddbd6882be","html_url":"https://github.com/YinHangCode/homebridge-mi-fan","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YinHangCode/homebridge-mi-fan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-fan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-fan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-fan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-fan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YinHangCode","download_url":"https://codeload.github.com/YinHangCode/homebridge-mi-fan/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-fan/sbom","scorecard":{"id":154855,"data":{"date":"2025-08-11","repo":{"name":"github.com/YinHangCode/homebridge-mi-fan","commit":"57dbc286dd76e8b6ab53e76966bf1e3d74b9e8e8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":6,"reason":"Found 2/3 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T11:29:11.505Z","repository_id":57154360,"created_at":"2025-08-16T11:29:11.505Z","updated_at":"2025-08-16T11:29:11.505Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008837,"owners_count":26084517,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["fan","homebridge","homebridge-plugin","mi","xiaomi","zhimi"],"created_at":"2024-11-20T09:27:04.153Z","updated_at":"2025-10-11T21:40:18.653Z","avatar_url":"https://github.com/YinHangCode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# homebridge-mi-fan\n[![npm version](https://badge.fury.io/js/homebridge-mi-fan.svg)](https://badge.fury.io/js/homebridge-mi-fan)\n\nXiaoMi fan plugins 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)), [ABC](https://github.com/hassbian-ABC), 小马哥, all other developer and testers.   \n\n**Note: If you find bugs, please submit them to [issues](https://github.com/YinHangCode/homebridge-mi-fan/issues) or\nQQ Group: [245480](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027\u0026k=gZitewfJ7tC8UBPco-vHE-lWlQ2MSFj4\u0026authKey=vM9HTpEBVpb6vVIHtwnRxFdsUKN0dh1A%2FUihq0BnOtLzEykzEaBZVQjbYINWucxd\u0026noverify=0\u0026group_code=245480)\n(~~previous [15987618](https://qm.qq.com/cgi-bin/qm/qr?k=ZiAkKhlOCyjpSq94Xb6-MsiKCxLtoDAJ\u0026jump_from=webapi)~~)\n(~~previous [107927710](//shang.qq.com/wpa/qunwpa?idkey=8b9566598f40dd68412065ada24184ef72c6bddaa11525ca26c4e1536a8f2a3d)~~).**\n\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-fan/master/images/ZhiMiDCVariableFrequencyFan.jpg)\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-fan/master/images/ZhiMiNaturalWindFan.jpg)\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-fan/master/images/MiDCVariableFrequencyFan.jpg)\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-fan/master/images/DmakerFan.jpg)\n\n\n\n## Supported Devices\n1.ZhiMiDCVariableFrequencyFan(智米直流变频落地扇 799RMB)   \n2.ZhiMiNaturalWindFan(智米自然风风扇 599RMB)   \n3.MiDCVariableFrequencyFan(米家直流变频落地扇 399RMB)   \n4.DmakerFan(米家风扇1X 299RMB)  \n5.DmakerFanp5c(新款米家智能直流变频落地扇1X)\n\n\n## Pre-Requirements\n1.Make sure your IOS version is ios11 or later.   \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-fan\n```\n## Configuration\n```\n\"platforms\": [{\n    \"platform\": \"MiFanPlatform\",\n    \"deviceCfgs\": [{\n        \"type\": \"ZhiMiDCVariableFrequencyFan\",\n        \"ip\": \"192.168.1.xxx\",\n        \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n        \"fanName\": \"room fan\",\n        \"fanDisable\": false,\n        \"temperatureName\": \"room temperature\",\n        \"temperatureDisable\": false,\n        \"humidityName\": \"room humidity\",\n        \"humidityDisable\": false,\n        \"buzzerSwitchName\": \"fan buzzer switch\",\n        \"buzzerSwitchDisable\": true,\n        \"ledBulbName\": \"fan led switch\",\n        \"ledBulbDisable\": true\n    }, {\n        \"type\": \"ZhiMiNaturalWindFan\",\n        \"ip\": \"192.168.1.xxx\",\n        \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n        \"fanName\": \"room fan\",\n        \"fanDisable\": false,\n        \"temperatureName\": \"room temperature\",\n        \"temperatureDisable\": false,\n        \"humidityName\": \"room humidity\",\n        \"humidityDisable\": false,\n        \"buzzerSwitchName\": \"fan buzzer switch\",\n        \"buzzerSwitchDisable\": true,\n        \"ledBulbName\": \"fan led switch\",\n        \"ledBulbDisable\": true\n    }, {\n        \"type\": \"MiDCVariableFrequencyFan\",\n        \"ip\": \"192.168.1.xxx\",\n        \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n        \"fanName\": \"room fan\",\n        \"fanDisable\": false,\n        \"temperatureName\": \"room temperature\",\n        \"temperatureDisable\": false,\n        \"humidityName\": \"room humidity\",\n        \"humidityDisable\": false,\n        \"buzzerSwitchName\": \"fan buzzer switch\",\n        \"buzzerSwitchDisable\": true,\n        \"ledBulbName\": \"fan led switch\",\n        \"ledBulbDisable\": true\n    }, {\n        \"type\": \"DmakerFan\",\n        \"ip\": \"192.168.1.xxx\",\n        \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n        \"fanName\": \"room fan\",\n        \"fanDisable\": false,\n        \"buzzerSwitchName\": \"fan buzzer switch\",\n        \"buzzerSwitchDisable\": true,\n        \"ledBulbName\": \"fan led switch\",\n        \"ledBulbDisable\": true\n    },\n    {\n        \"type\": \"DmakerFanP5c\",\n        \"ip\": \"192.168.1.xxx\",\n        \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n        \"deviceId\":\"xxxxxxx\",\n        \"fanName\": \"room fan\",\n        \"fanDisable\": false,\n        \"buzzerSwitchName\": \"fan buzzer switch\",\n        \"buzzerSwitchDisable\": true,\n        \"ledBulbName\": \"fan led switch\",\n        \"ledBulbDisable\": true\n    }]\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.1.2 (2024-04-24)\n1.add support for DmakerFanP5c.\n### 0.1.1 (2019-06-03)\n1.add support for DmakerFan.\n### 0.1.0 (2018-07-11)\n1.add support for Mi DC VariableFrequency Fan.   \n2.add support for ZhiMi NaturalWind Fan.   \n### 0.0.5 (2018-02-10)\n1.update 'package.json'.   \n### 0.0.4 (2017-09-11)\n1.optimized code.   \n### 0.0.3 (2017-09-09)\n1.optimized code.   \n### 0.0.2 (2017-09-09)\n1.fixed bug that led switch error.   \n### 0.0.1 (2017-09-05)\n1.support for ZhiMi DC VariableFrequency Fan.   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinhangcode%2Fhomebridge-mi-fan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyinhangcode%2Fhomebridge-mi-fan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinhangcode%2Fhomebridge-mi-fan/lists"}