Custom Firmware For Even Cheaper Bluetooth Thermometers

Readers may recall when we first covered the $5 Xiaomi LYWSD03MMC temperature and humidity sensor back in 2020. Prolific hacker [Aaron Christophel] wrote a custom firmware for the affordable gadget that was so capable and well implemented that it kicked off a whole new community.

It’s recently been brought to our attention that the Xiaomi thermometer has become so popular that clones have started popping up. Often sold under the Tuya brand, these versions look very similar to Xiaomi’s offering but can be had for as little as $1 each from the usual Chinese importers. Even better, they’ve got their very own open-source custom firmware.

The firmware comes from [pvvx], who also helms the most active fork of [Aaron]’s original firmware for the Xiaomi thermometer. Doing a bit of spot-checking between the repositories, it’s not immediately clear that any meaningful code is shared between the two projects. However, once installed, they offer similar capabilities to the user, such as integration with Home Assistant. Perhaps the most significant difference between the two projects is that, at least for the initial flash, you need to hook the Tuya units up to your computer with a USB serial adapter. Considering that one of the highlights of the Xiaomi custom firmware was its exceptionally easy wireless installation, this is a considerable step backward.

Below is a video from a few months back that [Maker’s Fun Duck] put together, where he takes apart one of these clones and shows the installation process for the custom firmware. Our overall impression is that it’s probably worth the few extra dollars to get the original Xiaomi hardware, although the display on the clone seems much brighter. In any event, we’re always happy to see the community coming up with free and open-source firmware for an otherwise locked-down gadget.

Thanks to [ThoriumBR] for the tip.

18 thoughts on “Custom Firmware For Even Cheaper Bluetooth Thermometers

  1. What matters most to me is whether the flashed firmware can survive a battery change. If so, I’ll replace all of my old devices immediately – having to reflash 2x per year (even wirelessly) is a pain once you have a number of devices

  2. My problem with BLE TRh sensors is that I can connect 10 of those to my ThinkPad, but I would need 12 or more. As far as I know that is a restriction of the Bluetooth chip in the ThinkPad. Do you you happen to know a Bluetooth USB dongle that could connect to more of those sensors?

    1. You don’t need to connect to these sensor, they advertise the data. You can connect to get a history of the data, but you can perfectly use them without having to connect to the even once

    2. One option: could use ESP32 or similar to do the wireless communication with modules, then use its UART over USB for getting data to PC.

      Not perfect, but if just pulling basic sensor readings, should be fine.

      1. It can depend on wether they have continuous active connection or periodic connection. E.g. ESPHome has a limit of 3 continuous connections, but no limit on periodic, according to documentation. I do not know which category these belong to, i just got 3 of these, but i don’t have the HW to program them currently.

    3. The original Xiaomi firmware (and I suppose all the others) uses BLE advertisements, which do not use connections. It just broadcasts the data to anyone who is listening.

      In the case of Xiaomi firmware, you have to set up an encryption key first, as the advertisements are encrypted.

  3. Even original Xiaomi devices can’t be initially flashed using a web tool anymore as Xiaomi introduced new version of the for water that does cryptographic verification of new firmwares.

  4. I have six of these with this custom firmware on my Home Assistant setup. They’re all over the house including one outside. Some use a Bluetooth proxy to communicate. After 14 months, they’ve been 100% reliable and accurate. I changed the batteries at the one year point, but they could’ve lasted a few more months. Home Assistant tracks battery levels, temperature, and humidity.

  5. I’ve got 30+ of the original Xiaomi thermometers, I like even cheaper thermometers. It’s also pretty easy to go print up and adapter and switch them over to double a or AAA so you get massively extended runtime.

  6. In his videos he shows them on Aliexpress for only a dollar. But the ones he shows are the welcome deals. So you can buy only one of these for a dollar no? Unless you maybe register 10 times under different names or something.

    Are these available for 1$ with regular deals?

    1. In Aliexpress Bundle I did buy 2 of them for 1,49€ and paid with the 2€/3€ reduction 1,18€ for each Tuya Sensor. They are precise and running fine, I do not need Bluetooth.
      I get from friends this e-Cigaretts and use the LiIon-Cells to drive all kind of devices. Remote control for my water-heater, AC and this temperature devices or microcontroller.

      As a undervoltage protection I use this little LiIon-protection-PCBs with an TC4056 charging chip and USB-C connecor. I paid per PCB 12 cent in the Bundle offers at Aliexpress.
      I added a shottky diode on the PCB, so that the charging voltage is only 4.0V and reduced the charging current to 25mA.

      I know it is a bit overdoing, because the Cells can be recharged every year and will last 4 ever. But I have a lot of this LiIon-Cells and so I can use them. And it is fun to do this, I think this is the main reason.

  7. After quick review of offers I don’t think those are cheaper than Xiaomi ones but seems to have worse chips inside. Especially after looking the pvvx github where is clearly written: (!) It is not recommended to buy Tuya thermometers with CHT8305 sensors and/or BL55028 LCD driver chips. They have increased consumption and are not compatible with battery operation. This is a dummy thermometer from Tuya.
    Also I like the Xiaomi one because it’s temp/humidity sensor is very accurate as it’s good quality Sensirion SHTC3. I’ve dozen of those. Three are even converted to Zigbee as they are too far for my Bluetooth adapter.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.