I have a whole bunch of Aqara sensors in use that work with the ZigBee protocol. The small multi-sensor in particular is a simple and affordable solution if you want to measure temperature, humidity and air pressure. Recently, I also got 3 of the Xiaomi Mijia BLE BLEBluetooth Low Energy – energy-efficient Bluetooth variant for sensors. Xiaomi Mijia temperature sensors and hygrometers use BLE, for example sensors, which don’t measure air pressure (you only need one sensor for that anyway - air pressure is the same everywhere), but have an LC display and are incredibly cheap.
However, you now have to note that for orders directly from China, the exemption limit of previously 22 euros for import VAT no longer applies since July. It is only not charged if it is under 1 euro, which means that the order including shipping costs (!) may be a maximum of 5 euros. Beyond that, additional handling fees from DHL of 6 euros may apply. An order worth 22 euros including shipping costs thus comes to 4.18 € import VAT plus 6 euros handling fees (for shipping via DHL) and therefore costs 32.18 €.
⚠ [affiliate] Keine Produkte mit Cache für home-assistant.
Bitte affiliate-sync --lang en ausführen.
There is a calculator for this here: Calculator for customs and import taxes (paketda.de)
This probably also led to providers like Gearbest going bankrupt and the prices for these sensors also rising sharply at Chinese providers like Ali Express , so that ordering there is hardly worthwhile anymore. If you want to save yourself additional fees and hassle, it’s best to order directly from Amazon. You can currently get a 3-pack for about 20 euros and with a bit of patience even for 15 euros.

BLE means that they work with the Bluetooth Low Energy standard. However, you need a corresponding Bluetooth interface with at least Bluetooth standard 4.0. If you run Home Assistant, for example, with a current Raspberry PI, then you have this on board. However, Home Assistant runs on a server in the utility room for me, which doesn’t have a Bluetooth interface, and BLE only has a range of about 10 meters. In contrast to the ZigBee sensors, the BLE devices also don’t network with each other to increase the range, but require direct access to a Bluetooth access point.
Flashing Xiaomi BLE sensors with alternative firmware
You can operate the Xiaomi sensors with the manufacturer’s firmware, or flash alternative firmware. The latter allows various configuration options, for example to show or hide displays on the screen or to set offsets for temperature and humidity. The alternative firmware as well as instructions can be found here: GitHub - atc1441/ATC_MiThermometer: Custom firmware for the Xiaomi Thermometer LYWSD03MMC and Telink Flasher via USB to Serial converter
However, you don’t need to solder anything here, etc., but can flash the alternative firmware via this web tool: Telink Flasher (atc1441.github.io)

To do this, have a computer that has a Bluetooth 4.0 (or higher) interface search for Bluetooth devices by clicking “Connect” and wait until a device with “ATC” in the name appears. This is paired, you click “Do Activation” and can then flash the firmware via the web tool. The tool also allows you to flash back the original firmware.

In the TE-Link Flasher, you can also set the Advertising Interval, i.e. the period with which the sensor sends data. If you use it purely for temperature and humidity measurement in rooms, you can confidently set 10 minutes here and thus reduce battery consumption. If you also want to detect a temperature drop when windows are open in winter, you can either choose shorter intervals, but there is also the option for the sensor to send data immediately upon a change by a configurable value via Sensor instant Advertising.
Bluetooth Low-Energy Bridge with ESPHome
If, like me, you don’t have a Bluetooth interface in the Home Assistant computer or if it is positioned too far away from the sensors, you can build a BLE bridge for Xiaomi BLE sensors with ESPHome ESPHomeFramework for configuring ESP32/ESP8266 microcontrollers that automatically integrate into Home Assistant. Ideal for DIY sensors and actuators . For this, you need an ESP32 WROOM board , the ESPHome integration in Home Assistant and some code, which looks like this for two connected sensors in my case:
|
|
You can find the MAC address of the sensors either via the Bluetooth settings of Windows, Linux or macOS, or flash the code above only up to sensor: onto your ESP board and call up its logs in the ESPHome administration, because all found Bluetooth devices in the vicinity including MAC address are listed here.
By the way, the bridge doesn’t pair with the sensors, but simply passively forwards their Advertisement Packets, which saves energy. Once recognized, the sensors are available as normal entities in Home Assistant. Since battery level and voltage are also reported, you can, for example, also immediately build an automation that indicates an upcoming battery change.

With this bridge, practically all other BLE sensors from Xiaomi can be connected, including the affordable soil moisture sensors (which are, however, only conditionally suitable for outdoor use). A list of supported sensors as well as further application examples can be found here: Xiaomi Mijia BLE Sensors — ESPHome
Due to the low cost of an ESP WROOM board, you can distribute multiple bridges throughout the house so that each sensor has optimal reception conditions. In addition, the board can also be used for additional tasks, not just as a BLE bridge. You could, for example, also integrate a display that shows the values of the Xiaomi sensors directly at the bridge, gives ventilation recommendations via LED display, or or or …
The following posts of mine are also interesting in this context:
How accurate is the LYWSD03MMC sensor?
A few months ago, I bought three of the LYWSD03MMC sensors for 10 euros, which is incredibly cheap. So I was interested in how accurately the humidity is measured. To do this, I placed the sensor with a small dish containing about 20 grams of moist table salt (a kind of paste should form, so the salt should be well soaked but not dissolved) in an airtight sealable box (can also be a sealable freezer bag, etc.) and waited a few hours. This results in a relative humidity of exactly 75%. However, you must ensure that the temperature in the room is as constant as possible.
After 4-5 hours, the sensors all showed exactly 75% and the temperature also deviated from my reference by a maximum of only 1.5%. A surprising and excellent result! Even a deviation of 5% in relative humidity is considered normal. Two of the sensors directly next to each other show almost identical values:

Home Assistant once again shows here that it is the best smart home hub with the most integrations and connections. The integration of ESP controllers in particular is solved very elegantly with ESPHome and enables countless applications, including the use of these affordable BLE sensors.
What do you think? Leave a comment!
Share your thoughts, questions or experiences with the community.