esphome-miot
esphome-miot copied to clipboard
Support for dmaker.fan.p18 and dmaker.fan.p33
Hi,
I have here a dmaker.fan.p18 and a dmaker.fan.p33 (Mi Smart Standing Fan 2 and Mi Smart Standing Fan 2 Pro). Difference between the two is that one has a battery, otherwise they should be the same. The specs differ slightly though:
https://home.miot-spec.com/s/dmaker.fan.p18 https://home.miot-spec.com/spec?type=urn:miot-spec-v2:device:fan:0000A005:dmaker-p18:1
https://home.miot-spec.com/s/dmaker.fan.p33 https://home.miot-spec.com/spec?type=urn:miot-spec-v2:device:fan:0000A005:dmaker-p33:1
Screenshots of the app show that there are differences regarding accessible controls through the app. The control name for speed adjustment differs:
(dmaker.fan.p18 / Mi Smart Standing Fan 2)
(dmaker.fan.p33 / Mi Smart Standing Fan 2 Pro)
These are pictures of the dmaker.fan.p33 / Mi Smart Standing Fan 2 Pro version (for the other one I haven't done the sull teardown yet but I could see inside that it's an ESP-WROOM-02D for both):
Unlike the Air Purifier devices that are already supported in this project these fans don't seem to have an easily accessible UART port so one probably has to flash directly on the pins of the ESP-WROOM-02D.
I checked plenty of contacts combinations for continuity but for the ESP-WROOM-02D I could only find test points for IO13 and IO15 on the backside of the PCB (marked in the pictures above) + 3.3V and GND. My hope is that IO13 and IO15 would work if I use them in the ESPHome config:
uart: tx_pin: GPIO15 rx_pin: GPIO13 baud_rate: 115200
For Air Purifier 4 Lite the config looks like this:
uart: tx_pin: GPIO17 rx_pin: GPIO16 baud_rate: 115200
and the docucmentation (ESP32-WROOM-32D - https://www.espressif.com/sites/default/files/documentation/esp32-wroom-32d_esp32-wroom-32u_datasheet_en.pdf) states this :
This is from the ESP-WROOM-02D documentation ( https://www.espressif.com/sites/default/files/documentation/esp-wroom-02u_esp-wroom-02d_datasheet_en.pdf ):
As a next step I will try backing up the original firmware and flashing the chip with ESPHome, starting with only a basic config and as a next step I would try if e.g. a switch added to the config would work. I'd be happy though if - in the meantime - maybe one of the pros here could share their opinion if these things I've summarized here make sense. Thank you!