LYWSD03MMC not showing any readings

hi all,

just got my first Xiaomi LYWSD03MMC sensor (firmware version is 0130) and tried to read it out.
unfortunately, this is the only MQTT message, that I get:

{
"topic":"ble/OpenMQTTGW2/BTtoMQTT/A4C13XXXXXXX",
"payload":
	{
	"id":"A4:C1:XX:XX:XX:XX",
	"name":"LYWSD03MMC",
	"rssi":-78
	},
"qos":0,"retain":false,"_msgid":"xxx"
}

the GW is ESP32 Module flashed yesterday via web and the config is:

{
"topic":"ble/OpenMQTTGW2/SYStoMQTT",
"payload":
	{
	"uptime":3483,
	"version":"v1.5.0",
	"discovery":false,
	"env":"esp32dev-ble",
	"freemem":102860,
	"mqttport":"1883",
	"mqttsecure":false,
	"tempc":49.44444,
	"freestack":1768,
	"rssi":-78,
	"SSID":"mySSID",
	"BSSID":"XX:XX:XX:XX:XX:XX",
	"ip":"192.168.x.xxx",
	"mac":"F4:CF:XX:XX:XX:XX",
	"lowpowermode":-1,
	"interval":55555,
	"intervalcnct":3600000,
	"scnct":53,
	"modules":["BT"]
	},
"qos":0,"retain":false,"_msgid":"xxx"
}

on the other hand, my Sonoff Dual R3 with Tasmota decodes the same broadcast packet and reports the readings correctly:

{
"topic":"tele/T-SDual2/SENSOR",
"payload":
	{
	"Time":"2023-03-28T15:55:10",
	"LYWSD03xxxxxx":
		{
		"mac":"a4c1xxxxxxxx",
		"Temperature":24.4,
		"Humidity":41,
		"DewPoint":10.3,
		"Battery":100,
		"RSSI":-76
		},
	"TempUnit":"C"
	},
"qos":0,"retain":false,"_msgid":"xxx"
}

what’s wrong?

/BR
ZoloN

Hi @ZoloN,

with OpenMQTTGatway and Theengs Decoder, which is being used for decoding BLE braodcasts, the LYWSD03MMC can only be decoded through its freely avaialble advertising boradcasts if it has ATC or PVVX firmware installed, as the original stock firmware only sends encrypted broadcasts.

which can be easily installed via the web Telink flasher

https://pvvx.github.io/ATC_MiThermometer/TelinkMiFlasher.html

P.S.: My bad, The stock firmware is also supported, but not through the encrypted broadcast, but by connection only. So the successful property retrieval then depends on your

"intervalcnct":3600000,

setting. Giving a reading only every 60 minutes at the moment. This can be changed with

For a longer battery life of your LYWSD03MMC one of the custom firmwares would be the preferred solution.

so, the statement “This device is out of the box compatible with OpenMQTTGateway / ESP32, the gateway connects to it every 10 minutes approximately so as to retrieve the temperature, humidity, battery and voltage data.” istn’t true?

my sensor sends out message every 5 minutes and Tasmota has no problems to decode it without any intervention/special handling/configuration/whatever…

/BR
ZoloN

If "intervalcnct" is set to 600000 it is true for every 10 minutes, if set to 300000, then every 5 minutes, if set to 10000 then every 10 seconds …

The default likely used to be every 10 minutes, but then users probably complained that this was depleting their batteries too quickly, so it was increased, but the description text not amended - that is what I assume.

It’s very certain that your LYWSD03MMC sends out broadcasts a lot more frequently than every 5 minutes, in encrypted format though, and unless you have retrieved its secret encryption key and entered it into Tasmota, Tasmota also uses the connection method to retrieve its values - likely only every 5 minutes because connecting to a device to get its properties is the most battery intensive way of getting this information.

Second to this would be active scanning. The most battery protecting way being passive scanning, only picking up what sensors freely broadcast anyway - which for LYWSD03MMC is only possible with the above mentioned firmwares.