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

Thanks for the information, I am going to look into this further. I didn’t actually know you could do zigbee OTA so this is great. I don’t run zigbee2mqtt but zha. It does sound possible though. Thanks for pointing me in the right direction.

Hello. I’m new here and I don’t know how to code at all. Always doing copy and paste. I’m trying to use homeassistant, please help me. I installed the LYWSD03MMC model device comfortably on homeassistant. I receive the data via bluetooth. I read the temperature and humidity values comfortably. However, I want to turn the heater on and off by establishing an esp32 connection with these values. I can’t do it. I want to set the temperature value I want from the screen, not with code. Can you help me in detail by writing code?

Translated with DeepL.com (free version)

HAVCmode

Please start a new question to ask about this. It’s not take related to this tutorial, I don’t know anything about what you’re trying to do.

I flashed pvvx firmware on this sensor and I set “advertising interval” to 5000ms while “measure interval” is 25, which gives 125sec. HA logs every two minute temperature change, but I would like to increase it to 10-15mins and I don’t need it to log every 2 mins.

Is it safe to set “advertising interval” to 6690ms and “measure interval” to 90 in order to get around 600 seconds?

You can set the values to anything you like that the interface will accept.

Is anyone else finding these sensors become unreliable after they’ve been outside for 6 months or a year, even after changing the batteries? I have two sensors outside, one only sending measurements back every few hours or sometimes only every 12 hours the other is sending back measurements as expected.

I’m looking to see if I can find a more reliable sensor. I may change to yolink sensors, I have a few already, the range is incredible and batteries last a long time. The downsides are they cost quite a bit more, and they are not a local integration, they rely on internet. I’ve been running them for at least a year and rarely get failures fetching data.

You can set the values to anything you like that the interface will accept.

Unfortunately, it doesn’t work that way. I set it up to be 600sec i.e. 10 min, but as soon as I send config, it defaults to 250sec.

Exactly, you have chosen values that the interface won’t accept so you can’t make those settings.

All you can do is keep changing settings higher until they stop increasing when you save. I think the values that I’ve got in the screenshots above are the maximums at the time I was doing the tutorial.

I’m trying to do this on one of mine that has the Firmware version: 2.1.1_0159 but it’s not working.
Are you still able to do it?

I reflashed a few units with the newest firmware recently, and a few months ago I flashed some new ones, so I think it’s working fine. Suggest you follow the instructions as precisely as you can, and if you need help please give us a bit of detail about what’s not working, including screenshots if relevant.

@limayankee
Tried using your method without custom firmware as I am stuck on: (!) Version: 2.1.1_0159 is temporarily not supported (!)
At no point does it accept my Bindkey.
At one point it randomly gets added without a bindkey but does not accept the bindkey with reconfigure

Im having difficulty with one sensor. Most of mine use ATC and connect directly via bluetooth to my RPi, but i have a couple further away that i need to use via an esphome proxy. My intention is to replace the ATC firmware with pvvx and set it to BT Home, as that has worked on one sensor.

The problem i have is changing from ATC to pvvx - when i go to the pvvx flasher page at Telink Flasher v8.0 and connect it tells me it’s found custom firmware and sends me to a different flasher page which does connect, but asks me to provide a firmware bin file. Rather unhelpfully though, the pvvx github page just says:

The download of the appropriate firmware for your device will be presented automatically in TelinkMiFlasher.html. Downloading files from this repository is not required.

which isn’t the case. Can anyone point me to a bin file i can use to flash my ATC device at Telink OTA ?

Try this one:

Thanks @francisp - you’ve nailed it.

I flashed that version on using the2nd lonk in my post, then i was able to use the 1st link in my post to connect to and activate the sensor, then pick a firmware from a series of buttons which were previously not visible. Installing the latest non-beta version has given me the ability to set the sensor to BTHomev2 (seems to be default actually)

Thanks again!

Hi, I’ve flashed the new firmware and set a frequency of 180 seconds and it works correctly, unfortunately i’ve notice that the sensor have a big fluctuation in the order of 0.5 degree, any one have the same issue?

1 Like

Same here. Only one from the two do this although the other do this in smaller size.


Also the battery draining fast…

None of mine do that. The lines are much smoother.

Hello! Sorry for offtop. how can I display two different devices on the same graph?

have different configuration?
anyone have the same issue?

Just click on + Add entity button.