ESPHome components for MIoT devices

Hey there,

I recently created a couple of components for my air purifier. Since they’re not limited to that appliance class, I hope they’re useful for others for all kinds of devices.

It’s a young project, so the currently tested device list is rather short, but I suspect there are many more devices on which these components can be used on.

Check it out at

2 Likes

Nice one. Thanks for sharing.

Are you aware of this? Is it similar? Edit: nevermind, I see the “Inspired By”…

Yupp, I’m aware. In fact I used that for my device first, see the bottom of the README :wink:

But that one hardcodes the device specific SIIDs/PIIDs, so it’s not reusable, each device would need it’s own matching code and config. That and the fact that it relies on the deprecated custom components is why I started from scratch.

But it’s the project that inspired me to try to make it reusable, with the idea that new devices would only need a yaml config without any code changes. So far there’s a pet feeder and a rice cooker in the works, so it looks like it might work out, time will tell :smiley:

2 Likes

Cool. Probably I’ll move over to you component sometime.

@dhewg After having successfully flashed my Air Purifier 4 Lite with your ESPHome files I’ve now ordered a mi-smart-standing-fan-2 - Specifications - Mi Global Home - BPLDS02DM - dmaker.fan.p18 - Mi Smart Standing Fan 2 - 产品规格 - Xiaomi Miot Spec (miot-spec.com) - of which I’m confident that it will also use an ESP32 (someone already found out it seems: Esphome? · syssi/xiaomi_fan · Discussion #150 (github.com) )

I do have PCBite equipment which I have used to flash several ESP32 already (Yeelight ceiling lamps with the help of this great repository: syssi/esphome-yeelight-ceiling-light: ESPHome custom firmware for some Yeelight Ceiling Lights (github.com)). syssi also maintains this repository: syssi/xiaomi_fan: Xiaomi Mi Smart Fan integration for Home Assistant (github.com) but I really want to be cloud-free :pray: :muscle:

Searching for esp32 mi fan - Google Search reveals a couple of more standing fan models with ESP32.

Hello. How to adapt your code for use with these types of miot commands?

down get_prop “power”, “mode”, “pm25”, “co2”, “temperature_outside”, “favourite_speed”, “control_speed”, “ptc_on”, “ptc_status”, “child_lock”, “sound”, “display”, “filter_intermediate”, “filter_inter_day”

<<< “get_prop “ptc_level”\r”
<<< “result “low”\r”

It looks like string parameter names are used instead of digital ssid piid.

I’ve only just come across your component and just wanted to pop in to say thanks! Definitely makes local access a lot tidier/mentally pleasing lol

For any future travellers… I forgot to take pics but I had a Air Purifier 4 with a revision 3 PCB and the pinout was the same. The top quarter/third of the board is a bit different, otherwise the important bits are the same.