There are two separate microcontrollers inside the device: one STM32F4 which actually controls the device, and one ESP32 which only acts as a gateway to the internet/local network. This config replaces the firmware running on the ESP32 and implements the proprietary serial protocol used to communicate with the STM32.
- turning the purifier on/off
- exposing PM2.5, humidity, temperature, and remaining filter life as sensor values
- switching modes
- controlling speed in manual mode
- changing various settings (display brightness, beeper, lock)
- sending custom commands using the
esphome.mipurifier_send_command
service (e.g. sendingdown set_properties 5 1 false
disables beeping)
Flashing this firmware does NOT change anything about how the remaining filter life is read/managed. However you can easily reset your filter to continue using it by following this video for example.
The following devices are known to work with this library (this list is not exhaustive)
- Air Purifier 3 (2019) (zhimi.airpurifier.ma4)
- Air Purifier 3H (2019) (zhimi.airpurifier.mb3)
Please don't hesitate to expand this list by opening a pull request if your device also works with this library! Make sure to backup the original firmware on your device's ESP32 before flashing ESPHome.
Connect any USB-to-serial adapter and power on the ESP32 while GPIO0
and GPIO2
are pulled low.