{"id":17256290,"url":"https://github.com/dhewg/esphome-miot","last_synced_at":"2025-04-06T19:10:58.187Z","repository":{"id":217694038,"uuid":"744575797","full_name":"dhewg/esphome-miot","owner":"dhewg","description":"ESPHome components for MIoT devices","archived":false,"fork":false,"pushed_at":"2025-03-06T08:46:29.000Z","size":183,"stargazers_count":77,"open_issues_count":1,"forks_count":22,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-03-30T18:07:57.180Z","etag":null,"topics":["esphome-component","home-assistant","iot","miot","smart-home"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhewg.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-17T15:26:25.000Z","updated_at":"2025-03-28T12:39:45.000Z","dependencies_parsed_at":"2024-12-27T02:06:39.746Z","dependency_job_id":"2fa9386a-e0cd-4e48-ba11-b5831a8ce617","html_url":"https://github.com/dhewg/esphome-miot","commit_stats":null,"previous_names":["dhewg/esphome-miot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhewg%2Fesphome-miot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhewg%2Fesphome-miot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhewg%2Fesphome-miot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhewg%2Fesphome-miot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhewg","download_url":"https://codeload.github.com/dhewg/esphome-miot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535516,"owners_count":20954576,"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":["esphome-component","home-assistant","iot","miot","smart-home"],"created_at":"2024-10-15T07:14:10.757Z","updated_at":"2025-04-06T19:10:58.165Z","avatar_url":"https://github.com/dhewg.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ESPHome components for MIoT devices\n\nThese [ESPHome](https://esphome.io/) components are designed for [MIoT devices](https://home.miot-spec.com/) which adhere to the [Xiaomi MIoT Serial Communication](https://github.com/blakadder/miot) protocol.\n\nSuch devices contain two microcontrollers, one actually controls the hardware (MCU), and the other acts as a LAN/cloud gateway.\n\nThese components allow you to replace the firmware on the latter, hence liberating your devices from the vendor cloud.\n\nSince this uses [ESPHome](https://esphome.io/), adding your liberated devices to [Home Assistant](https://www.home-assistant.io/) becomes a breeze with the [official integration](https://www.home-assistant.io/integrations/esphome/):\n\n![fan](screenshots/purifier-fan.png)\n![sensors](screenshots/purifier-sensors.png)\n![configuration](screenshots/purifier-configuration.png)\n![diagnostic](screenshots/purifier-diagnostic.png)\n\n## Supported devices\n\nThere are probably many more devices that could be supported, currently there are ESPHome configs for the following:\n\nDevice | Model Version | Wiki | ESPHome Config | MIoT Specification\n---|---|---|---|---\nMi Air Purifier 3/3H | zhimi.airpurifier.mb3 | [link](../../wiki/Xiaomi-Mi-Air-Purifier-3H) | [zhimi.airpurifier.mb3](config/zhimi.airpurifier.mb3.yaml) | [link](https://home.miot-spec.com/spec/zhimi.airpurifier.mb3)\nMi Air Purifier 3C | zhimi.airp.mb4a \u003cbr\u003e zhimi.airpurifier.mb4 |[link](../../wiki/Xiaomi-Mi-Air-Purifier-3C) | [zhimi.airp.mb4a](config/zhimi.airp.mb4a.yaml) | [link](https://home.miot-spec.com/spec/zhimi.airp.mb4a) \u003cbr\u003e [link](https://home.miot-spec.com/spec/zhimi.airpurifier.mb4)\nXiaomi Smart Air Purifier 4 | zhimi.airp.mb5 | [link](../../wiki/Xiaomi-Smart-Air-Purifier-4) | [zhimi.airp.mb5](config/zhimi.airp.mb5.yaml) | [link](https://home.miot-spec.com/spec/zhimi.airp.mb5)\nXiaomi Smart Air Purifier 4 Lite | zhimi.airp.rmb1 | [link](../../wiki/Xiaomi-Smart-Air-Purifier-4-Lite-(zhimi.airp.rmb1)) | [zhimi.airp.rmb1](config/zhimi.airp.rmb1.yaml) | [link](https://home.miot-spec.com/spec/zhimi.airp.rmb1)\nXiaomi Smart Air Purifier 4 Pro | zhimi.airp.vb4 |  | [zhimi.airp.vb4](config/zhimi.airp.vb4.yaml) | [link](https://home.miot-spec.com/spec?type=urn:miot-spec-v2:device:air-purifier:0000A007:zhimi-vb4:1)\nSmartmi Evaporative Humidifier 2 | zhimi.humidifier.ca4 |  | [zhimi.humidifier.ca4](config/zhimi.humidifier.ca4.yaml) | [link](https://home.miot-spec.com/spec/zhimi.humidifier.ca4)\nSmartmi Air Purifier | zhimi.airpurifier.za1 |  | [zhimi.airpurifier.za1](config/zhimi.airpurifier.za1.yaml) | [link](https://home.miot-spec.com/spec/zhimi.airpurifier.za1)\nMi Smart Standing Fan 2 | dmaker.fan.p18 |  | [dmaker.fan.p18](config/dmaker.fan.p18.yaml) | [link](https://home.miot-spec.com/spec/dmaker.fan.p18)\nMi Smart Standing Fan 2 Lite | dmaker.fan.1c | [link](../../wiki/Smart-Standing-Fan-2-Lite) | [dmaker.fan.1c](config/dmaker.fan.1c.yaml) | [link](https://home.miot-spec.com/spec/dmaker.fan.1c)\nXiaomi Smart Pet Food Feeder | mmgg.feeder.fi1 | [link](../../wiki/Xiaomi-Smart-Pet-Food-Feeder) | [mmgg.feeder.fi1](config/mmgg.feeder.fi1.yaml) | [link](https://home.miot-spec.com/spec/mmgg.feeder.fi1)\n\nSome of the devices have more than one model (like Mi Air Purifier 3C). If their MIoT specifications are compatible, the ESPHome config will be usable with all of them.\n\n## Unsupported devices\n\n- Devices without a dedicated MCU, using only the ESP chip to directly control the hardware.\n\n  As these components are designed around the communication protocol between the two microcontrollers they're of no use for such devices.\n- Devices using a proprietary Xiaomi WiFi microcontroller.\n\n  That hardware is currently unsupported by PlatformIO and hence ESPHome.\n- Devices that use the legacy `miio` protocol.\n\n  Such devices may have an ESP chip and a separate microcontroller, but the communication protocol is unsupported by these components.\n\n  If the device has the `miio2miot` tag on the [Xiaomi MIoT Spec](https://home.miot-spec.com/) site, or if you see messages like `props power \"on\"` on the serial bus, this is the case.\n\nKnown unsupported devices:\n\nDevice | Model Version | Reason | Link | MIoT Specification\n---|---|---|---|---\nMi Air Purifier 2S | zhimi.airpurifier.mc1 | Proprietary chip | [link](../../wiki/Xiaomi-Mi-Air-Purifier-2S)|[link](https://home.miot-spec.com/spec/zhimi.airpurifier.mc1)\nXiaomi Air Purifier 4 Lite (CN Model) | zhimi.airp.rma3 | No dedicated MCU | [link](../../issues/34)|[link](https://home.miot-spec.com/spec/zhimi.airp.rma3)\nXiaomi Smart Air Purifier 4 Compact | zhimi.airp.cpa4 | No dedicated MCU | [link](../../issues/22#issuecomment-2137163103)|[link](https://home.miot-spec.com/spec/zhimi.airp.cpa4)\nSmartmi Evaporative Humidifier| zhimi.humidifier.cb1 | Proprietary chip | [link](../../issues/26#issuecomment-2417148320)|[link](https://home.miot-spec.com/spec/zhimi.humidifier.cb1)\n\n## Building a firmware\n\nEither download an [ESPHome config](config/) or create your own (see below) and feed it to ESPHome to build the firmware.\n\nThere's no need to clone this repo, unless you plan to contribute - which would be very welcome!\n\n## Adding devices\n\nFirst, look up the desired device on the [Xiaomi MIoT Spec](https://home.miot-spec.com/) site.\n\nEach device defines its service (`SIID`) and property (`PIID`) IDs. You just have to add all the desired properties with their according IDs to your ESPHome yaml config.\n\nAlternatively, you can use the online\n[miot2esphome utility](https://cristianchelu.github.io/miot2esphome/) to\ntry to automatically generate a starter configuration for you, based on the\npublished device specs. You can then edit this to make sure everything works.\n\nFor examples, see the [supported devices](#supported-devices) table above and compare a config against its specification.\n\nOnce your newly added device is working, please open a PR to add its config here!\n\n## Feedback\n\nPlease feel free to open [issues](../../issues) and/or [pull requests](../../pulls) here.\n\nAlternatively, there's a [thread](https://community.home-assistant.io/t/esphome-components-for-miot-devices/686646) on the official ESPHome forums.\n\n## Inspired by\nhttps://github.com/jaromeyer/mipurifier-esphome\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhewg%2Fesphome-miot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhewg%2Fesphome-miot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhewg%2Fesphome-miot/lists"}