{"id":15018223,"url":"https://github.com/yinhangcode/homebridge-mi-airpurifier","last_synced_at":"2025-10-12T05:19:31.884Z","repository":{"id":38375777,"uuid":"102880129","full_name":"YinHangCode/homebridge-mi-airpurifier","owner":"YinHangCode","description":"XiaoMi air purifier plugins for HomeBridge.","archived":false,"fork":false,"pushed_at":"2024-05-30T16:21:51.000Z","size":70,"stargazers_count":113,"open_issues_count":38,"forks_count":34,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-08-09T07:57:27.930Z","etag":null,"topics":["airpurifier","homebridge","homebridge-plugin","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-08T16:08:13.000Z","updated_at":"2025-05-31T18:07:58.000Z","dependencies_parsed_at":"2024-09-16T13:42:27.934Z","dependency_job_id":null,"html_url":"https://github.com/YinHangCode/homebridge-mi-airpurifier","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":"0.045454545454545414","last_synced_commit":"deeaca0a7f08ee10e3c0ea56194f735ce60e8735"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YinHangCode/homebridge-mi-airpurifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-airpurifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-airpurifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-airpurifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-airpurifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YinHangCode","download_url":"https://codeload.github.com/YinHangCode/homebridge-mi-airpurifier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YinHangCode%2Fhomebridge-mi-airpurifier/sbom","scorecard":{"id":154853,"data":{"date":"2025-08-11","repo":{"name":"github.com/YinHangCode/homebridge-mi-airpurifier","commit":"deeaca0a7f08ee10e3c0ea56194f735ce60e8735"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"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":"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 1/22 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":"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":"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 2 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:10.817Z","repository_id":38375777,"created_at":"2025-08-16T11:29:10.817Z","updated_at":"2025-08-16T11:29:10.817Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010337,"owners_count":26084738,"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-12T02:00:06.719Z","response_time":53,"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":["airpurifier","homebridge","homebridge-plugin","xiaomi"],"created_at":"2024-09-24T19:51:41.610Z","updated_at":"2025-10-12T05:19:31.868Z","avatar_url":"https://github.com/YinHangCode.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# homebridge-mi-airpurifier\n[![npm version](https://badge.fury.io/js/homebridge-mi-airpurifier.svg)](https://badge.fury.io/js/homebridge-mi-airpurifier)\n\nXiaoMi air purifier plugins for HomeBridge.   \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)), [licuhui](https://github.com/licuhui), [superszy](https://github.com/superszy), all other developer and testers.   \n\n**Note: I have only a part of these devices, so some devices don't have tested. If you find bugs, please submit them to [issues](https://github.com/YinHangCode/homebridge-mi-airpurifier/issues) or [QQ Group: 107927710](//shang.qq.com/wpa/qunwpa?idkey=8b9566598f40dd68412065ada24184ef72c6bddaa11525ca26c4e1536a8f2a3d).**   \n\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-airpurifier/master/images/MiAirPurifier.jpg)\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-airpurifier/master/images/MiAirPurifier2.jpg)\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-airpurifier/master/images/MiAirPurifierPro.jpg)\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-airpurifier/master/images/MiAirPurifier2S.jpg)\n![](https://raw.githubusercontent.com/YinHangCode/homebridge-mi-airpurifier/master/images/MiAirPurifierMAX.jpg)\n\n## Supported Devices\n1.MiAirPurifier(小米空气净化器)   \n2.MiAirPurifier2(小米空气净化器2)   \n3.MiAirPurifierPro(小米空气净化器Pro)   \n4.MiAirPurifier2S(小米空气净化器2S)   \n5.MiAirPurifierMAX(米家空气净化器MAX) ---- coming soon   \n\n## Pre-Requirements\n1.Make sure your IOS version is ios11 or later.   \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-airpurifier\n```\n\n## Configuration\n```\n\"platforms\": [{\n    \"platform\": \"MiAirPurifierPlatform\",\n    \"deviceCfgs\": [{\n        \"type\": \"MiAirPurifier\",\n        \"ip\": \"192.168.88.xx\",\n        \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n        \"airPurifierDisable\": false,\n        \"airPurifierName\": \"MiAirPurifier\",\n        \"silentModeSwitchDisable\": false,\n        \"silentModeSwitchName\": \"MiAirPurifier Silent Mode Switch\",\n        \"buzzerSwitchDisable\": true,\n        \"buzzerSwitchName\": \"MiAirPurifier Buzzer Switch\",\n        \"ledBulbDisable\": true,\n        \"ledBulbName\": \"MiAirPurifier LED Switch\",\n        \"airQualityDisable\": false,\n        \"airQualityName\": \"MiAirPurifier AirQuality\"\n    }, {\n        \"type\": \"MiAirPurifier2\",\n        \"ip\": \"192.168.88.xx\",\n        \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n        \"airPurifierDisable\": false,\n        \"airPurifierName\": \"MiAirPurifier2\",\n        \"silentModeSwitchDisable\": false,\n        \"silentModeSwitchName\": \"MiAirPurifier2 Silent Mode Switch\",\n        \"temperatureDisable\": false,\n        \"temperatureName\": \"MiAirPurifier2 Temperature\",\n        \"humidityDisable\": false,\n        \"humidityName\": \"MiAirPurifier2 Humidity\",\n        \"buzzerSwitchDisable\": true,\n        \"buzzerSwitchName\": \"MiAirPurifier2 Buzzer Switch\",\n        \"ledBulbDisable\": true,\n        \"ledBulbName\": \"MiAirPurifier2 LED Switch\",\n        \"airQualityDisable\": false,\n        \"airQualityName\": \"MiAirPurifier2 AirQuality\"\n    }, {\n        \"type\": \"MiAirPurifierPro\",\n        \"ip\": \"192.168.88.xx\",\n        \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n        \"airPurifierDisable\": false,\n        \"airPurifierName\": \"MiAirPurifierPro\",\n        \"silentModeSwitchDisable\": false,\n        \"silentModeSwitchName\": \"MiAirPurifierPro Silent Mode Switch\",\n        \"temperatureDisable\": false,\n        \"temperatureName\": \"MiAirPurifierPro Temperature\",\n        \"humidityDisable\": false,\n        \"humidityName\": \"MiAirPurifierPro Humidity\",\n        \"buzzerSwitchDisable\": true,\n        \"buzzerSwitchName\": \"MiAirPurifierPro Buzzer Switch\",\n        \"ledBulbDisable\": true,\n        \"ledBulbName\": \"MiAirPurifierPro LED Switch\",\n        \"airQualityDisable\": false,\n        \"airQualityName\": \"MiAirPurifierPro AirQuality\"\n    }, {\n        \"type\": \"MiAirPurifier2S\",\n        \"ip\": \"192.168.88.xx\",\n        \"token\": \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\n        \"airPurifierDisable\": false,\n        \"airPurifierName\": \"MiAirPurifier2S\",\n        \"silentModeSwitchDisable\": false,\n        \"silentModeSwitchName\": \"MiAirPurifier2S Silent Mode Switch\",\n        \"temperatureDisable\": false,\n        \"temperatureName\": \"MiAirPurifier2S Temperature\",\n        \"humidityDisable\": false,\n        \"humidityName\": \"MiAirPurifier2S Humidity\",\n        \"buzzerSwitchDisable\": true,\n        \"buzzerSwitchName\": \"MiAirPurifier2S Buzzer Switch\",\n        \"ledBulbDisable\": true,\n        \"ledBulbName\": \"MiAirPurifier2S LED Switch\",\n        \"airQualityDisable\": false,\n        \"airQualityName\": \"MiAirPurifier2S AirQuality\"\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.3 (2018-07-11)\n1.add MiAirPurifier, MiAirPurifier2, MiAirPurifier2S, MiAirPurifierPro FilterLife feature.   \n### 0.1.2 (2018-02-10)\n1.update 'package.json'.   \n### 0.1.1 (2018-01-21)\n1.remove feature of turn to manual mode when set rotation speed, because of it will affect HomeKit automation.   \n### 0.1.0 (2017-11-16)\n1.support for XiaoMi AirPurifier2S.   \n2.modify class name, reduce the probability of conflicts due to the same class name and other plugins.   \n### 0.0.9 (2017-10-28)\n1.fixed bug that XiaoMi AirPurifierPro power status display inaccurate.   \n### 0.0.8 (2017-10-12)\n1.fixed bug that XiaoMi AirPurifier can not work.   \n### 0.0.7 (2017-10-01)\n1.fixed bug that linkage issues between silent mode switch accessory and air purifier accessory.   \n### 0.0.6 (2017-09-22)\n1.fixed bug that silent mode switch accessory don't display.   \n2.fixed bug that XiaoMi AirPurifierPro led light accessory display brightness.    \n### 0.0.5 (2017-09-21)\n1.fixed bug that XiaoMi AirPurifier and XiaoMi AirPurifierPro air purifier accessory don't display.   \n### 0.0.4 (2017-09-11)\n1.optimized code.   \n### 0.0.3 (2017-09-10)\n1.fixed bug that air purifier accessory disable when set \"silentModeSwitchDisable\" value is true.   \n### 0.0.2 (2017-09-09)\n1.fixed bug that can not startup.   \n2.add setting silent mode switch disable feature.   \n3.optimized code.   \n### 0.0.1 (2017-09-09)\n1.support for XiaoMi AirPurifier.   \n2.support for XiaoMi AirPurifier2.   \n3.support for XiaoMi AirPurifierPro.   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinhangcode%2Fhomebridge-mi-airpurifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyinhangcode%2Fhomebridge-mi-airpurifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyinhangcode%2Fhomebridge-mi-airpurifier/lists"}