Home Asssistant Xiaomi Mijia LYWSD03MMC Temperature and Humidity Sensor Tutorial September 2022

Thanks for all the useful information in this thread. I’ve just received a bunch of these devices and have just finished setting up my first one successfully!

I used the Telink flasher and tried flashing the 3.8 firmware with pvvx advertising method, but HA wouldn’t see the device, so I changed it to BTHome and HA discovered it as a BTHome device straight away. All 4 entities were there but reading unavailable until I restarted HA, and I now have all 4 readings. My hardware was reported as B2.0 when flashing. Not sure why others would be missing the signal strength in BTHome though, unless it’s to do with the HA environment. I’m running HA OS latest on my Intel NUC using the built in Bluetooth hardware. I expect I’ll need a USB BT adapter with antenna eventually though as the signal doesn’t reach my furthest away room, but I’ll experiment with the RF TX power first and see if increasing that works and isn’t too detrimental to battery longevity. Thanks @tomwaldnz :+1:

The built in BT integration seems to be improving. One of my sensors has appeared in BTHome as well, though I can’t see any data from it… not sure why. Since Passive BLE Monitor is working fine I’ll stick with that for now :slight_smile:

Pleased to hear this is helping others :slight_smile:

Since I use the new method, with the Bluetooth integrated into HA, the updates are not as regular as before (the old method via HACS), sometimes nothing for hours, it’s horrible.

Anyone have this problem too? (since the BT is integrated into HA, I’ve done all the updates for weeks and nothing)

I have the same problem with my two LYWSD03MMC. I use a Raspberry Pi 4 with BT integred.

image

I have one sensor using the BTHome integration, rather than the Passive BLE Monitor. I just checked it and I’m getting updates every 5 minutes, which is about what I configured in the sensor. I’m using HA 2022.11.4 - I tend to stay a month behind as that way it seems more stable.

Is it in a location with a stable temperature? The hardware doesn’t send updates if the temperature doesn’t change. Have you set the update period longer? Other than that I’m not sure.

I haven’t tried this myself but may be worth a look if you need to extend your range.

I got a Bluetooth proxy… it was basically useless. It didn’t seem extend range at all. Instead I got a Bluetooth adapter with an antenna, which extends range well. The proxies might work in some circumstances, but you’d really want one with an external antenna.

That’s reassuring - I’m waiting on a usb bluetooth dongle with aerial to arrive. I wondered if I should have tried the proxy route instead as I have some esp boards lying around, but sounds like I’ve done the right thing.

My Intel NUC has built in BT and I’ve flashed and paired 6 of these Xiaomi thermometers fine, however sbiut 1 metre outside of the room that my NUC is in, the devices broadcasts aren’t able to be picked up, even setting the RF Tx to +3dBm. Hopefully the dongle will solve this :slight_smile:

Mine are fine through for walls up to about 10m, or in a fridge through three walls. The aerial on the USB adapter helps a lot. It took a fair bit of work to get going though

That sort of range should be fine to cover all of my devices - possibly even the garage too. I’ve just read through your post about setting up the ZEXMTE adapter which is also the one I have ordered.
I’ll follow the info in that post, and hopefully disabling the internal BT should be easier as I can do this from the BIOS.

If there’s differences with the NYC please post on that thread, I’ll link to your post from your first post. I suspect it will be simpler if you’re using Windows, drivers should be automatic.

Greetings.

I finding connecting to sensors to reflash them using TelinkMiFlasher unreliable / flakey / hit and miss. Tried android,Windows and two different browsers. I will next take sensor outside to see if a less noisy environment helps. Any suggestions?

Also, I understand the signal strength options, but what does the LowPower mode option do?

Flashing them is a little bit unreliable for me, but it usually just takes 1-2 times to connect and flash a sensor. I have Bluetooth on my main PC but I find my Android Pixel 4a works best, so long as it’s close to the sensor.

I don’t know what Low Power mode does, I did a bit of a search but nothing clear came up. If you search for “pvvx low power” you might find something.

Trying to add this sensor with the new Skyconnect, anyone succeed with ?

Not me. You should probably start a new thread about SkyConnect.

Thx anyway :slight_smile:

Hello… I loaded the integration for the Xiaomi BLE in Home Assistant and the integration found my Xiaomi Temperature/Humidity Sensor F3FE (LYWSD03MMC) which appeared to be awesome.

Only issue, despite the integration loading and discovering the sensor… this is what the integration shows.

Literally the only parameter it shows is the signal strength of the sensor? I have no idea why it would do this? I haven’t loaded any customer firmwares on the sensor, so is that possibly why? The connection to the Xiaomi Temperature/Humidity Sensor F3FE is via an ESP32 acting as a BLE proxy, but I dont see why that would be an issue?

Open to suggestions on what I may have missed, or what I could do to resolve the issue?

I do use BT on the HA host and BTHome integration, but have experienced what you described. You may have to wait for up to 60 minutes for the sensors to publish it’s data, and I could not find a way to change this on the stock firmware. My recommendation would be to flash the PVVX firmware and see how you get on with it then; much better in my experience.

Please follow the guide above, particularly the part flashing the sensors with custom firmware. Once you’ve followed the guide from start to finish, if you have problems please post and we’ll try to help.

Thanks. Due to a series of updates in HA there is zero need to load custom firmware, as HA supports the encryption key for the Xiaomi Temperature/Humidity Sensor. For me I prefer not to load custom firmware, so I followed the setup in this video which is much less complex.

https://youtu.be/5BEhAQwM0A0

I’d recommend the options for non-firmware update and firmware update be spelled out, as some folks may not be that thrilled about changing firmwares.

Interesting. I tried the new BT features a couple of months back, they weren’t working quite right yet. I’ll update at some point and try them again.

Once you have this working properly perhaps you could write up a guide and post a link here. I’ll give it a shot and post a link to it.