<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>MiThermometer on Zwindler's Reflection</title><link>https://blog.zwindler.fr/en/tags/mithermometer/</link><description>Recent content in MiThermometer on Zwindler's Reflection</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Licensed under CC BY-SA 4.0</copyright><lastBuildDate>Sat, 15 Nov 2025 12:00:00 +0200</lastBuildDate><atom:link href="https://blog.zwindler.fr/en/tags/mithermometer/index.xml" rel="self" type="application/rss+xml"/><item><title>Flash Your Xiaomi Mijia Thermometers to Extend Battery Life by a Year</title><link>https://blog.zwindler.fr/en/2025/11/15/flash-your-xiaomi-mijia-thermometers-to-extend-battery-life-by-a-year/</link><pubDate>Sat, 15 Nov 2025 12:00:00 +0200</pubDate><guid>https://blog.zwindler.fr/en/2025/11/15/flash-your-xiaomi-mijia-thermometers-to-extend-battery-life-by-a-year/</guid><description>&lt;img src="https://blog.zwindler.fr/2025/11/accueil-ha.webp" alt="Featured image of post Flash Your Xiaomi Mijia Thermometers to Extend Battery Life by a Year" /&gt;&lt;h2 id="2-thermometers-that-become-a-financial-drain"&gt;€2 Thermometers That Become a Financial Drain
&lt;/h2&gt;&lt;p&gt;From time to time I tell myself I should get into home automation. After an attempt 4 years ago (&lt;a class="link" href="https://blog.zwindler.fr/2021/10/04/jeedom-dans-un-container-lxc/" &gt;with Jeedom, I didn&amp;rsquo;t really get into it in the end&lt;/a&gt;), I got back into it with HomeAssistant a little over a year ago.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll detail the setup in another article (spoiler: it&amp;rsquo;s a VM on &lt;a class="link" href="https://blog.zwindler.fr/2024/05/19/mon-nas-en-2024-jonsbo-n100-part2/" &gt;my homemade 2024 NAS&lt;/a&gt;, with a Bluetooth card with a USB passthrough antenna). For now, know that I started simple with just thermometers in each room.&lt;/p&gt;
&lt;p&gt;Note: you can see that one room has run out of batteries, and that Home Assistant had been down for 10 days without me noticing haha.&lt;/p&gt;
&lt;p&gt;Like many people who want to graph just about everything, even their house (guilty as charged), I started by buying a pack of &lt;strong&gt;Xiaomi Mijia thermometer-hygrometers&lt;/strong&gt; (reference LYWSD03MMC for those in the know).&lt;/p&gt;
&lt;p&gt;The main advantage of these little connected thermometers is that they&amp;rsquo;re &lt;strong&gt;very inexpensive&lt;/strong&gt;: between €1 and €4 depending on sales on AliExpress. Mainly because these are Bluetooth thermometers, much more widespread (and therefore less costly) than Zigbee, Z-Wave equivalents, etc.&lt;/p&gt;
&lt;p&gt;You can very easily pair them with a smartphone (Xiaomi provides an app to make it easier) or integrate them into any home automation platform. But the smartphone app is very limited and requires being at very close range (of course).&lt;/p&gt;
&lt;p&gt;So, like any self-respecting home automation hobbyist, I connected them to my Home Assistant.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;And that&amp;rsquo;s when the drama started.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As soon as you activate Bluetooth to integrate them with Home Assistant, the CR2032 battery (standard button cell) lasts about 3 months. You very quickly spend more on batteries than on thermometers&amp;hellip;&lt;/p&gt;
&lt;h2 id="pvvx-to-the-rescue"&gt;PVVX to the Rescue
&lt;/h2&gt;&lt;p&gt;Fortunately, the open source community found the solution!&lt;/p&gt;
&lt;p&gt;There are two main projects:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;ATC&lt;/strong&gt; project by atc1441&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;PVVX&lt;/strong&gt; fork (which improves the ATC project)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By flashing your sensors&amp;rsquo; firmware with the PVVX version, you can &lt;strong&gt;go from a few weeks to over a year of battery life&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;I can confirm this: it&amp;rsquo;s now been about a year (last August) since I migrated all my sensors and I &lt;strong&gt;haven&amp;rsquo;t changed a single battery yet&lt;/strong&gt;! It&amp;rsquo;s pretty crazy when you think about it.&lt;/p&gt;
&lt;p&gt;Non-negligible bonus: the new firmware uses the &lt;strong&gt;BTHome v2&lt;/strong&gt; protocol, which drastically simplifies integration with Home Assistant (no more fiddling with HACS and stuff; those who know, know).&lt;/p&gt;
&lt;h2 id="required-hardware"&gt;Required Hardware
&lt;/h2&gt;&lt;p&gt;What&amp;rsquo;s cool about this tutorial is that you don&amp;rsquo;t need much:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;smartphone&lt;/strong&gt; (Android or iOS) with Bluetooth&lt;/li&gt;
&lt;li&gt;Your &lt;strong&gt;Xiaomi thermometers&lt;/strong&gt; (LYWSD03MMC)&lt;/li&gt;
&lt;li&gt;An &lt;strong&gt;Internet connection&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That&amp;rsquo;s it! No computer, USB-UART cable, soldering iron, or specialized equipment needed. This is really &amp;ldquo;flashing for dummies&amp;rdquo; (myself included).&lt;/p&gt;
&lt;h2 id="flashing-procedure-simpler-than-it-seems"&gt;Flashing Procedure: Simpler Than It Seems
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Step 1: Open the Web Flasher&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Go to the PVVX flasher site with your smartphone:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html" target="_blank" rel="noopener"
&gt;https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The flasher works entirely in the browser (not great on Firefox from memory, but 100% OK on Chrome) thanks to the &lt;a class="link" href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API" target="_blank" rel="noopener"
&gt;Web Bluetooth API&lt;/a&gt;. No app to install, everything happens in the browser. It&amp;rsquo;s quite magical when you think about it 🤔.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 2: Connect the Sensor&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Click on the &lt;strong&gt;&amp;ldquo;Connect&amp;rdquo;&lt;/strong&gt; button.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Possible confusion&lt;/strong&gt;: you might think you need to first select the sensor from a dropdown list or something, but no! It&amp;rsquo;s after clicking &amp;ldquo;Connect&amp;rdquo; that a popup opens.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;A Bluetooth selection window opens with the list of detected devices nearby.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.zwindler.fr/2025/11/ATC1.avif"
loading="lazy"
&gt;&lt;/p&gt;
&lt;p&gt;Select your thermometer (it should be called &lt;strong&gt;LYWSD03MMC&lt;/strong&gt; or something similar with numbers) then click &lt;strong&gt;&amp;ldquo;Pair&amp;rdquo;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 3: Wait for Connection&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once paired, the sensor information will display on the web page.&lt;/p&gt;
&lt;p&gt;From experience, it can take a few seconds, or even require a few attempts. Watch the logs at the bottom of the page to see progress. Bluetooth is finicky sometimes (understatement).&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.zwindler.fr/2025/11/ATC2.avif"
loading="lazy"
&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: I didn&amp;rsquo;t really understand if I needed to click &amp;ldquo;Login&amp;rdquo; and/or &amp;ldquo;Activation&amp;rdquo;. When in doubt, I did both 🤡. It seems to work in all cases, so&amp;hellip;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Step 4: Flash the Firmware&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once connected, the list of available firmwares appears.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.zwindler.fr/2025/11/ATC3.avif"
loading="lazy"
&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Leave the default choice&lt;/strong&gt;: &lt;code&gt;ATC_v47.bin&lt;/code&gt; (or the most recent version displayed, at the time I&amp;rsquo;m writing this draft, it was version v47).&lt;/p&gt;
&lt;p&gt;Click on &lt;strong&gt;&amp;ldquo;Start Flashing&amp;rdquo;&lt;/strong&gt; and&amp;hellip; wait with fingers crossed.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.zwindler.fr/2025/11/ATC4.avif"
loading="lazy"
&gt;&lt;/p&gt;
&lt;p&gt;For me, the flash took between &lt;strong&gt;45 and 65 seconds&lt;/strong&gt; depending on the sensors. Don&amp;rsquo;t touch anything during this time! Especially don&amp;rsquo;t leave the web page, otherwise you have to start all over.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step 5: Verification&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Once the flash is complete, the device will temporarily disconnect (a few seconds) then &lt;strong&gt;reappear with a new name&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Instead of &lt;code&gt;LYWSD03MMC&lt;/code&gt;, it will now be called &lt;strong&gt;&lt;code&gt;ATC_XXXXXX&lt;/code&gt;&lt;/strong&gt; (where XXXXXX is a unique identifier based on the MAC address).&lt;/p&gt;
&lt;h2 id="firmware-configuration"&gt;Firmware Configuration
&lt;/h2&gt;&lt;p&gt;Once the sensor is reconnected with its new firmware, you can &lt;strong&gt;modify advanced settings&lt;/strong&gt; if you wish.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.zwindler.fr/2025/11/ATC5.avif"
loading="lazy"
&gt;&lt;/p&gt;
&lt;p&gt;The default values are probably optimal in most cases and you can leave them as is. &lt;strong&gt;But&lt;/strong&gt; if you&amp;rsquo;re like me and you like to tinker, here&amp;rsquo;s what I personally modified.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Advertising Interval: Save Even More&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I &lt;strong&gt;reduced the frequency&lt;/strong&gt; at which the device does its &amp;ldquo;advertising&amp;rdquo; (Bluetooth data broadcast).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Default value: ~2.5 seconds&lt;/li&gt;
&lt;li&gt;My value: ~7.5 seconds&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Advertising Type: BTHome v2 (DON&amp;rsquo;T TOUCH)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Leave the &lt;strong&gt;Advertising Type&lt;/strong&gt; on &lt;strong&gt;BTHome v2&lt;/strong&gt; with the AdFlags box checked.&lt;/p&gt;
&lt;p&gt;This is the standard protocol promoted by Home Assistant that greatly simplifies communication. With BTHome v2, your sensors will be &lt;strong&gt;auto-discovered&lt;/strong&gt; in Home Assistant without additional configuration.&lt;/p&gt;
&lt;p&gt;This wasn&amp;rsquo;t why I flashed the sensors originally, but it&amp;rsquo;s really the killer feature!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Beware of Advanced Bluetooth Parameters&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Don&amp;rsquo;t touch BT5+ and LE Long Range options unless you &lt;strong&gt;really&lt;/strong&gt; know what you&amp;rsquo;re doing.&lt;/p&gt;
&lt;p&gt;You risk making your sensor incompatible with your existing installation, and you&amp;rsquo;ll have to reflash in recovery mode&amp;hellip; Not fun.&lt;/p&gt;
&lt;h2 id="integration-with-home-assistant"&gt;Integration with Home Assistant
&lt;/h2&gt;&lt;p&gt;With the PVVX firmware and BTHome v2, integration into Home Assistant is &lt;strong&gt;trivial&lt;/strong&gt; (for once we can say that):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Make sure you have the &lt;strong&gt;BTHome&lt;/strong&gt; integration enabled (it&amp;rsquo;s native since 2023)&lt;/li&gt;
&lt;li&gt;Enable Bluetooth on your Home Assistant server&lt;/li&gt;
&lt;li&gt;Your sensors will appear &lt;strong&gt;automatically&lt;/strong&gt; in detected devices&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There you go, you can graph the temperature in your house, it&amp;rsquo;s cool, we&amp;rsquo;re happy :). As promised, I&amp;rsquo;ll also (someday) write an article on the more complete configuration on the HomeAssistant side (VM installation, USB passthrough, creating the nice &amp;ldquo;card&amp;rdquo;).&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.zwindler.fr/2025/11/accueil-ha.avif"
loading="lazy"
&gt;&lt;/p&gt;
&lt;p&gt;In the meantime. Have fun&lt;/p&gt;</description></item></channel></rss>