Other

项目介绍

dhewg/esphome-miot 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 Other 许可证,目前获得 228 个 Star、52 次 Fork。

仓库全名
dhewg/esphome-miot
开源许可证
Other
Star 数
228
Fork 数
52
未关闭 Issue
8

README 摘要

ESPHome components for MIoT devices These ESPHome components are designed for MIoT devices which adhere to the Xiaomi MIoT Serial Communication protocol. Such devices contain two microcontrollers, one actually controls the hardware (MCU), and the other acts as a LAN/cloud gateway. These components allow you to replace the firmware on the latter, hence liberating your devices from the vendor cloud. Since this uses…

完整内容见 GitHub 原始 README 或本页 。

常见问题

esphome-miot 用什么语言开发?

主要使用 C++ 编写,采用 Other 许可证,目前有 228 个 Star。

esphome-miot 可以免费商用吗?

仓库标注的许可证为 Other,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 esphome-miot 的源码?

可以直接克隆仓库:git clone https://github.com/dhewg/esphome-miot.git,默认分支为 main;安装与运行步骤见仓库 README。

esphome-miot 最近还在维护吗?

仓库最近一次更新为 5月19日,当前有 8 个未关闭 Issue;Star 数为 228,可作为社区活跃度的参考。

关于

ESPHome components for MIoT devices

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
342
价值分
152
活跃状态
活跃

README

ESPHome components for MIoT devices

These ESPHome components are designed for MIoT devices which adhere to the Xiaomi MIoT Serial Communication protocol.

Such devices contain two microcontrollers, one actually controls the hardware (MCU), and the other acts as a LAN/cloud gateway.

These components allow you to replace the firmware on the latter, hence liberating your devices from the vendor cloud.

Since this uses ESPHome, adding your liberated devices to Home Assistant becomes a breeze with the official integration:

fan sensors configuration diagnostic

Supported devices

There are probably many more devices that could be supported, currently there are ESPHome configs for the following:

Device Model Version Wiki ESPHome Config MIoT Specification
Mi Air Purifier 3/3H zhimi.airpurifier.mb3 link zhimi.airpurifier.mb3 link
Mi Air Purifier 3C zhimi.airp.mb4a
zhimi.airpurifier.mb4
link zhimi.airp.mb4a link
link
Xiaomi Air Purifier Pro H zhimi.airpurifier.va1 link zhimi.airpurifier.va1 link
Xiaomi Smart Air Purifier 4 zhimi.airp.mb5
zhimi.airp.mb5a
link zhimi.airp.mb5 link
link
Xiaomi Smart Air Purifier 4 Lite zhimi.airp.rmb1 link zhimi.airp.rmb1 link
Xiaomi Smart Air Purifier 4 Pro zhimi.airp.vb4 zhimi.airp.vb4 link
Xiaomi Smart Air Purifier Elite zhimi.airp.meb1 link zhimi.airp.meb1 link
Mi Smart Antibacterial Humidifier deerma.humidifier.jsq5 deerma.humidifier.jsq5 link
Smartmi Evaporative Humidifier 2 zhimi.humidifier.ca4 link zhimi.humidifier.ca4 link
Smartmi Air Purifier zhimi.airpurifier.za1 zhimi.airpurifier.za1 link
Mi Smart Standing Fan 2 dmaker.fan.p18 dmaker.fan.p18 link
Mi Smart Standing Fan 2 Lite dmaker.fan.1c link dmaker.fan.1c link
Mi Smart Standing Fan 2 Pro dmaker.fan.p33 dmaker.fan.p33 link
Xiaomi Smart Pet Food Feeder mmgg.feeder.fi1 link mmgg.feeder.fi1 link

Some 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.

Unsupported devices

  • Devices without a dedicated MCU, using only the ESP chip to directly control the hardware.

    As these components are designed around the communication protocol between the two microcontrollers they’re of no use for such devices.

  • Devices using a proprietary Xiaomi WiFi microcontroller.

    That hardware is currently unsupported by PlatformIO and hence ESPHome.

  • Devices that use the legacy miio protocol.

    Such devices may have an ESP chip and a separate microcontroller, but the communication protocol is unsupported by these components.

    If the device has the miio2miot tag on the Xiaomi MIoT Spec site, or if you see messages like props power "on" on the serial bus, this is the case.

Known unsupported devices:

Device Model Version Reason Link MIoT Specification
Mi Air Purifier 2S zhimi.airpurifier.mc1 Proprietary chip MHCW02P link link
Mi Air Purifier 2H zhimi.airpurifier.mc2 Proprietary chip MHCW02P link link
Xiaomi Air Purifier 4 Lite (CN Model) zhimi.airp.rma3 No dedicated MCU link link
Xiaomi Smart Air Purifier 4 Compact zhimi.airp.cpa4 No dedicated MCU link link
Smartmi Evaporative Humidifier zhimi.humidifier.cb1 Proprietary chip MHCWB2P link link
Smartmi Evaporative Humidifier 3 zhimi.humidifier.ca6 No dedicated MCU link link
Xiaomi Smart Tower Fan dmaker.fan.p39 Proprietary chip MHCWB4P-B link link
Xiaomi Smart Tower Fan 2 xiaomi.fan.p45 Proprietary chip MHCWB5G-B link link
Xiaomi Smart Pet Food Feeder 2 xiaomi.feeder.iv2001 Proprietary chip MHCW05P-B link link
Xiaomi Smart Graphene Heater xiaomi.heater.ma8 No dedicated MCU link link
Xiaomi Smart Evaporative Humidifier xiaomi.humidifier.3lite Proprietary chip MHCWB5G-B link link

Building a firmware

Either download an ESPHome config or create your own (see below) and feed it to ESPHome to build the firmware.

There’s no need to clone this repo, unless you plan to contribute - which would be very welcome!

Adding devices

First, look up the desired device on the Xiaomi MIoT Spec site.

Each 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.

Alternatively, you can use the online miot2esphome utility to try to automatically generate a starter configuration for you, based on the published device specs. You can then edit this to make sure everything works.

For examples, see the supported devices table above and compare a config against its specification.

Once your newly added device is working, please open a PR to add its config here!

Feedback

Please feel free to open issues and/or pull requests here.

Alternatively, there’s a thread on the official ESPHome forums.

Inspired by

https://github.com/jaromeyer/mipurifier-esphome

评论

暂无评论