Be Smart, Go Local.

How To Flash Custom Firmware on Xiaomi Thermometer 3

This guide details how to flash the Xiaomi Thermometer 3 [MJWSD05MMC] with PVVX BLE firmware, improving battery life, accuracy, and enabling custom screens.

The Xiaomi Thermometer 3, also known as model MJWSD05MMC, is a Bluetooth temperature and humidity sensor with a 62.6×53.2mm screen. It’s powered by a single button cell CR2450 battery which should last about one year according to the manufacturer.

Flashing Xiaomi Thermometer 3 with custom BLE firmware: Featured Image

I’ve had this device shelved for about a year now, still in its package and not in use. In this guide, I’m flashing the MJWSD05MMC with a custom BLE firmware to improve battery life, measurement accuracy and enable custom display modes.

The Xiaomi Thermometer 3‘s price floats around $10-$11 on AliExpress.

Relevant: Previous models of Xiaomi Thermometers can be flashed with Zigbee firmware.
See the guides here: LYWSD03MMC & CGDK2.

About PVVX custom firmware

If you are just joining this party, you might want to read up on this awesome custom firmware for Telink devices. This firmware is actively developed and maintained by Victor (pvvx) and is a fork of the original ATC_MiThermometer firmware.

There are many benefits of flashing the pvvx firmware, but a few stick out from the rest:

  • Extended battery life (over a year)
  • Improved measurement accuracy and extended format in 0.01 units
  • Adjustable correction offsets and Comfort zones
  • 3 LCD Display modes
  • Support for 4 beacon formats: Xiaomi, ATC, Custom, BTHome v2 and encrypted options.
  • Flashing third-party OTA files.

Flashing this custom firmware enhances the battery life of supported BLE thermometers, improves measurement accuracy, and adds customization options like multiple LCD screens and encryption. It also enables integration with Home Assistant via various platforms (ESP32 Bluetooth Proxies, Passive BLE monitor, BTHome) and allows for easy over-the-air (OTA) updates without opening the device.

At the moment, it supports the following devices:

  • Xiomi Mijia LYWSD03MMC [Bluetooth, Zigbee]
  • Xiaomi Mijia MJWSD05MMC [Bluetooth]
  • Xiaomi Mijia MHO-C401 [Bluetooth, Zigbee]
  • Qingping Temp & RH Monitor CGG1 [Bluetooth]
  • Qingping Temp & RH Monitor Lite CGDK2 [Bluetooth, Zigbee]
  • Meawow MHO-C122 [Bluetooth, Zigbee]
  • Tuya devices [TH03Z, TZ3000, ZTH01, ZTH02 + SoC PHY62x2 chip] [Bluetooth, Zigbee]

Flashing the PVVX firmware

Before the firmware can be flashed, we need to #enable-experimental-web-platform-features in Chrome, Opera or Edge. This is necessary in order to get the MAC Address of the device. Copy the following links for the browser you use and paste it into the address bar and select Enable:

  • Chrome: chrome://flags/#enable-experimental-web-platform-features
  • Opera: opera://flags/#enable-experimental-web-platform-features
  • Edge: edge://flags/#enable-experimental-web-platform-features

The browser will ask you for a relaunch, confirm and then follow this process to flash the Xiaomi Thermometer 3:

  1. Press and hold both buttons until the screen blinks (reset)
  2. Short-press the top button and then short-press the bottom button
  3. The Bluetooth icon will start blinking, meaning the device is in pairing mode
  4. Open the Telink Web flasher:
  5. Check Get Advertising MAC and click Connect
Flashing Xiaomi Thermometer 3 with custom BLE firmware: Step 1: connecting
Connect to MJWSD05MMC
  1. Select the MJWSD05MMC  from the list of Bluetooth devices and click Pair
  2. Press the Do Activation button and wait
  3. Click Custom Firmware: BTH_v47.bin
  4. Click Start Flashing
Flashing Xiaomi Thermometer 3 with custom BLE firmware: Step 2: Activation
Activate and select firmware

Wait for the process to finish, which should not take more than 2 minutes. Monitor the logs for issues or disconnects. Once done, the device will automatically reboot and the web-flasher will display Disconnected at the top.

Here’s how the full log should look like, start to finish:

Flashing Xiaomi Thermometer 3 with custom BLE firmware: Step 3: Done flashing
Done

Configuring the new firmware

Once the device reboots, you can reconnect to it and change some configuration settings. I needed to reset it again at this point, since it seems it’s already paired to the flasher. Once I connected, the web flasher gave me a bunch of custom options for the MJWSD05MMC thermometer.

Flashing Xiaomi Thermometer 3 with custom BLE firmware: Temperature Reading
Temperature reading on main position
Flashing Xiaomi Thermometer 3 with custom BLE firmware: Humidity Reading
Humidity reading on main position

I tested all of them, cycling through the different modes and tinkering with custom reporting intervals. Here’s a summary of what each one does:

  • Set Time: You can synchronize the current time with the device for display on the screen. Use Set Time to push the current computer time to the device.
  • Change time format: Change between 24 and 12-hour time format. AM/PM indicator will be displayed automatically. Use the 12-hour checkbox to change the format and click Send Config.
  • Change display mode: You can set the device to display clock, temperature, humidity, battery percentage or voltage.
  • Change Temperature Unit: Change between Fahrenheit (F°) and Celsius (C°). Use the dropdown to select the unit and click Send Config.
  • Add two decimals to measurement: Works only with BLE advertisements, not screen.
  • Add Temperature and Humidity Offset: You can enter a value to correct the offset of the temperature or humidity displayed. For example, entering -1.4 will decrease the temperature by 1.4°C.
  • Add Temperature and Humidity Slope: If the sensor is consistently reading too high or too low across a range of temperatures, you can apply a slope correction instead of an integer offset to adjust this. If the sensor reads a temperature that is consistently 2% too low, you could set a slope factor of 1.02 to increase all the temperature readings by 2%.
  • Change Bluetooth Advertising Interval: You can set the Bluetooth advertising interval to control how frequently the device broadcasts its data. Default value is 2500ms, recommended is 5000ms.
  • Change Measuring Interval: You can set the measuring advertising interval to control how frequently the device broadcasts its data. The measuring interval is X times the advertising interval. If you have 5000ms set for the advertising interval, set it to 1 to measure once every 5 seconds.
  • Change Advertising Type: The device supports multiple Bluetooth advertising formats, and you can choose between Xiaomi, ATC, Custom, BTHome v2, and encrypted formats. The Xiaomi format is the default BLE advertising type, whereas the PVVX (custom) needs to be set in order to change the advertising and measuring interval.
  • Change Smiley/Comfort Indicator: You can choose a static smiley or use the “Comfort” mode, where the smiley changes depending on the current temperature and humidity.
  • Set Comfort Parameters: You can change the lower (Lo) and upper (Hi) range for temperature and humidity, which will be interpreted as a comfort zone. A smiley will appear when values are within the defined range.
  • Change RF TX Power: Set the transmission power from -20 dB to +10 dB. Higher dB values will drain battery more quickly.
  • Enable LE Long Range: If you device is far away from your Bluetooth adapter, enable this to increase the advertisement range. Custom Component Passive BLE Monitor does not support Bluetooth 5.0 (LE Long Range).
Flashing Xiaomi Thermometer 3 with custom BLE firmware: 12 Hour Format
12-hour format
Flashing Xiaomi Thermometer 3 with custom BLE firmware: Battery Percentage
Battery percentage

The Xiaomi Thermometer 3 supports Bluetooth LE Long Range communication, allowing it to transmit signals up to 1 kilometer in open spaces. In comparison, standard BLE reaches around 100 meters. While BLE Long Range offers greater distance, it does come with a tradeoff—its data transmission speed is lower, around 125 kbps, compared to 1 Mbps on standard BLE.

However, the real advantage of BLE Long Range is its ability to penetrate walls more effectively, maintaining connectivity up to 200 meters in indoor environments. This makes it ideal if you’re planning to use the Xiaomi Thermometer 3 farther from your Bluetooth adapter. If you need it, it’s best to keep it off and save battery.

Adding the Xiaomi Thermometer 3 to Home Assistant

Flashing Xiaomi Thermometer 3 with custom BLE firmware: Added to Home Assistant
Added to Home Assistant via ESPHome

With the custom PVVX firmware, there are many ways to use the MJWSD05MMC with Home Assistant. My personal preference is using an ESP32 board flashed with ESPHome. The custom PVVX firmware has it’s own ESPHome integration, which makes things so much easier.

Here’s a basic configuration of adding the Xiaomi Thermometer 3 in Home Assistant with ESPHome:

# Example configuration entry
esp32_ble_tracker:

ble_client:
  - mac_address: A4:C1:38:BF:86:2E
    id: xiaomi_thermometer_3
sensor:
- platform: pvvx_mithermometer
  mac_address: A4:C1:38:BF:86:2E
  temperature:
    name: "Xiaomi Thermometer 3 Temperature"
  humidity:
    name: "Xiaomi Thermometer 3 Humidity"
  battery_level:
    name: "Xiaomi Thermometer 3 Battery-Level"
  battery_voltage:
    name: "Xiaomi Thermometer 3 Battery-Voltage"

The Xiaomi Thermometer 3 can be purchased on AliExpress for about $12.
AliExpress 1 | AliExpress 2 | AliExpress 3

4 thoughts on “How To Flash Custom Firmware on Xiaomi Thermometer 3”

  1. Semi related: One of my favorite hardware hacks for button cell powered devices is soldering on a holder for two AAA batteries. It’s a much cheaper way to supply 3v and often lasts much longer as well.

    Reply

Leave a Comment