Xiaomi seems to have a newer type of BLE temperature sensor, that is very cheap. I purchased a bundle of 4 for less than €13 at a well-known Chinese webstore. It is quite a bit more compact than the original one and works from a coin cell battery.
Unfortunately it does not seem to work at this moment with the mitemp_bt integration. It makes itself known by “LYSWSD03MMC” which is different than “MJ-HT-V1” and for me already an indicator of trouble. I added its MAC address to the configuration yaml file, but I get a warning that no data could be retrieved.
Does anyone have experience with these sensors and know how to get it to work with HA? I don’t have any experience in reading out raw data from the device.
did you try this custom component, your device is supported:
LYWSD03MMC
(small square body, segment LCD, broadcasts temperature and humidity once in about 10 minutes and battery level once in an hour, advertisements are encrypted, therefore you need to set the key in your configuration, see for instructions the encryptors option)
I have 2 small square “LYWSD03MMC” sensor but cant get the ID for the encryptors. When use the packet capture app, for example, to get the ID, at the MI HOME APP i have an error when trying to pair the device.
@Sergio_Sereno@AcmeUK@Bart_Huitsing@elRadix.
Hey guys! I am arriving here after a forum search. What is your experience of the new square device, in terms of battery longevity and reporting frequency? I’m in the UK looking for cheap easy small temp sensors - not bothered about humidity but at a few £ each these look a great option.
I have two of this xiaomi and i have nome now to SONOFF SNZB-02, because this works with mqtt or zigbee with im my case it’s important. My home have zones witch are far away from HomeAssistant NUC. But if distancy (5 mts) is not a problem they work’s fine.
@Sergio_Sereno many thanks for the reply.
I have since purchased and installed these Xiaomis through the house. My home has three floors. The BLT controller in my home is BluetoothV4.1 in a Raspberry Pi 3B+. It is about 25metres away from the furthest Xiaomi sensor, and that is through 4 walls and 2 floors. It works perfectly. Not sure why you advise of 5 metre limit ? I would get your controller / environment checked out pal.
Edit
I was guessing the distance. I’ve just unravelled a roll of string an measured the ‘step by step’ distance through the house. It is 13.8 metres. Not quite my 25 metres guess , but a darn much more than 5 metres
With bluetooth 4, 10 meters is the maximum distance between the server and the sensor. The walls in my house are in concrete with isolation, and also have two floors. With mqtt (SONOFF SNZB-02) in can have the problem solve because it runs over the wifi network and are more efficient than the bluetooth
Hi
I have multiple xiaomi_lywsdcgq sensors over 3 levels with concrete floors. Tried ESP32s and although the wifi connection was good, the BLE to the Xiaomi sensors at best 4 meters if on opposite wall and less than 2 meters if on same wall as sensor. In the end I used 2 Raspberry Zero W(via LAN) with home assistant and remote_homeassistant on my main homeassistant and it works very well. RPIZeroW can connect >5 meters though 1 concrete wall. This has also allowed me to connect by BLE to multiple EQ3 TRV on each level and the RPIZeroW share the load so all the EQ3 respond much faster.
You are right theoretical ble can reach up to 30 mtrs, but in the xiami app you will get a message telling that the sensor needs to be in 10 mtrs range but i cant connect them in the secound floor to my HA. The solutions was nove to mqtt platform.
This is my experience with then, they are good but i prefer use the same protocol to all my devices.
TBH, I gave up with the custom f/w flash. I tried the original hack + others who forked the github repo.
Once the sensors were flashed, they could not be discovered on my PC, and Raspberry Pi3 and a Pi4. Reflash OEM and it was fine. The hack OTA flash tool could still connect to them though. Wiered. Not looked at the source code but the lowest BLT version Im using is 4.1 so they should be fine.
Anyway, using OEM for now and much further than 10m btw everyone.
Well that is bummer… well they are still a good value at 4 bucks. You could give a try to my little c program on your raspberry pi and see if it will see the custom firmware Xiaomi’s. Additionally, you have a number of options with other sensors as well, my code and a number of other folks code work with other Xiaomi devices and Govee devices.
One thing I learned, is that the manufacture life of some of these devices can be short. So if you find something that works, quickly buy a supply. Devices will go out of manufacture, or undocumented hardware change under the covers, or firmware change/lockdown…
Mmm. but I don’t need mqtt, BT protocol works fine in HA, so why use nqtt? Seems to me ostensibly just more resources and config , for what? I’m not seeing the point.