https://0l.de/blog/2025/11/xiaomi-humidifier/ Skip to content stv0g's weblog stv0g's weblog stv0g's weblog Search CtrlK Cancel CodebergMastodonLinkedInORCIDRSS * All posts * Featured posts + Running a Xilinx hw_server as Docker Container + Seminar: Camera-based PCB Analysis for Solder Paste Dispensing + Bachelor Thesis: Extended Abstract + tileLED * Recent posts + Freeing a Xiaomi Humidifier from the Cloud + This blog has joined the Fediverse + Fritz!DNS - An authoritative DNS server for AVM FRITZ!Box routers + Aachen wird Transparent! + A highly available WireGuard VPN setup + SSH Access for Netgear's Nighthawk M5 Mobile LTE/Router + Having a detailed look at the Netgear Nighthawk M5 Mobile LTE /Router + A 3D-printed wall mount for Netgear Nighthawk mobile 5G/LTE routers + Gaining Root Access on Netgear Nighthawk Mobile 5G/LTE Routers + Open-Data Lab Aachen * Tags + German (35) + Linux (19) + Study (18) + Electronics (15) + English (15) + Development (14) + Software (12) + C++ (11) + Project (10) + Microcontroller (9) + School (9) + Hacking (6) + Meta (6) + Networking (6) + Smart Meter (6) + Webdesign (6) + fnordlicht (5) + PHP (5) + Script (5) + Talk (5) + volkszaehler (5) + Blog (4) + Computer (4) + Event (4) + LED (4) + Netgear Nighhawk M5 (4) + TFA (4) + Thesis (4) + 3D (3) + Aachen (3) + Computer Science (3) + elektro-camp (3) + Geocaching (3) + Hardware (3) + Politics (3) + 3D Printing (2) + Cheatsheet (2) + Delphi (2) + DVBViewer (2) + FOJ (2) + Git (2) + LCD (2) + nulll (2) + Open Data (2) + OpenCV (2) + Qt (2) + Windows (2) + 2D (1) + Abstract (1) + ACS (1) + Art (1) + Assembler (1) + Award (1) + Bash (1) + Basic (1) + Casio (1) + Cologne (1) + Community (1) + crypto-party (1) + Decentralization (1) + Design (1) + DIY (1) + dn42 (1) + Docker (1) + EAGLE (1) + Ehrenamt (1) + ESPHome (1) + FAQ (1) + FPGA (1) + Fritz!Box (1) + Fuel Cell (1) + GitHub (1) + Go (1) + HTML (1) + Infrared (1) + Integration (1) + Javascript (1) + Job (1) + Logo (1) + Migration (1) + MTB (1) + Music (1) + Offenburg (1) + Open Source (1) + OSM (1) + Photos (1) + Python (1) + Reverse Engineering (1) + Review (1) + Robotics (1) + RYL (1) + Schule (1) + Security (1) + Security Token (1) + Seminar (1) + Smart Home (1) + Social Media (1) + Stuttgart (1) + Travel (1) + USB (1) + VPN (1) + WhatsApp (1) + Wiki (1) + Wireguard (1) + Workshop (1) + Xiaomi (1) + Xilinx (1) + XMPP (1) * RSS CodebergMastodonLinkedInORCIDRSS Freeing a Xiaomi Humidifier from the Cloud Home Assistant Logo I recently moved into a new apartment which I used as an opportunity to make our home a little smarter. As a big open source supporter I built my smart home platform with Home Assistant of course. Unfortunately, there are still far too few products that are directly compatible with Home Assistant. Especially in the area of humidifiers where I only found products that rely on a proprietary app or cloud from the manufacturer. Something that I would like to avoid at all costs. For one thing, such dependence is a certain form of planned obsolescence, as the product becomes useless as soon as the app loses its compatibility with new smartphone operating system versions or the manufacturer's cloud is no longer operated. Therefore, it was important for me to find a smart humidifier that integrates directly with my Home Assistant setup. To achieve this goal, I identified two options: 1. Add sensors / actuators to a classic humidifier to make it smart. 2. Replace the firmware of a smart humidifier with my own source code. I decided to use the second approach, because it required less effort, since I would have had to implement my own firmware anyway. ESPHome Logo Next, I was faced with the task of finding a suitable humidifier whose firmware I could easily replace. I specifically looked for devices that contained an ESP8266 or ESP32 microcontroller from Espressif, because for these I could easily create a new firmware with ESPHome. ESPHome is a system that allows you to control your ESP8266/ESP32 through simple but powerful configuration files and remotely control it through home automation systems. Xiaomi Mi Smart Antibacterial Humidifier Xiaomi Mi Smart Antibacterial Humidifier. Thanks to Soren Beye /Hypfer , I quickly became aware of the Xiaomi Mi Smart Antibacterial Humidifier, as Soren himself wrote his own firmware for this humidifier. Unfortunately, his original version of the customized firmware ( / Hypfer/esp8266-deerma-humidifier ) is no longer compatible with the current version of the producr, as Xiaomi has modified the internal communication protocol. Therefore, I decided to re-implement the firmware based on ESPHome as an "external component". You can find the code for this component here: /stv0g/esphome-config/ components/xiaomi_deerma_humidifier How to Hack your own Humidifier Section titled "How to Hack your own Humidifier" This section is going to walk you through the process of modifying your own Xiaomi Humidifier. 1. Find the correct model The internal Mi Model ID of the supported device is deerma.humidifier.jsq. The Model on the packaging being ZNJSQ01DEM. 2. Disassembly There are 4 Philips-head screws hidden under the rubber foot ring which can be easily pealed of. Its usually find to remove the rubber only in areas where the screws are located. That way you can easily reattach it later. Internals of the Humidifier Internals of the Humidifier. Bottom view of Humidifier. Screws are behind rubber foot ring Bottom view of Humidifier. Screws are behind rubber foot ring. In the inside, you will find a small Wifi module attached to the back of the housing. Remove the module and solder on the wires as shown in the picture below. 3. Wire UART Wifi board featuring an ESP-WROOM-02 module Wifi board featuring an ESP-WROOM-02 module. In the last picture, the colors of the wires correspond to the following: + Orange: GND + Grey: VCC (3.3 Volt!) + Yellow: GPIO0 + Brown: RX + Red: TX In order to flash the module, you will need to tie GPIO0 to GND and attach a 3.3V serial adapter to the RX, TX pins. I recommend to also to disconnect the module from the humidifier and power it via your Serial to USB adapter via the VCC pin. To flash the ESP8266 chip you can either use ESPHome's build-in web flasher or esptool.py. 4. Create backup of original firmware But before we flash the new firmware, I recommend to first make a backup of the original Xiaomi firmware by running: Terminal window esptool.py \ --chip esp8266 \ --baud 230400 \ --port /dev/tty.usbserial-31310 \ read_flash 0x0 0x200000 xiaomi-deerma-humidfier-original-2mb.bin 5. Flash new firmware Afterwards, we can flash the new firmware: Terminal window esptool.py \ --chip esp8266 \ --baud 230400 \ --port /dev/tty.usbserial-31310 \ write_flash 0x0 deerma.bin