Convert Xiaomi LYWSD03MMC From Bluetooth To Zigbee

After flashing the Zigbee firmware the battery percentage went down rapidly from about 80 to about 40. But now the cool feature of the firmware comes to life: wireless auto battery charging :rofl: see below chart.

1 Like

Had this working in Z2M in HA on my VM.
Now i want to pair these on my HA green via Z2M (same ha sky dongle) but it doesnt pair/connect :frowning:

Already removed the battery to try put it in pair mode, tried to connect the reset+gnd with a tweezer/paperclip. But it wont pair anymore :frowning:

Any other tips?

Love it. Yes, it does jump around a bit. The first one I modified is now at 77%, and the second has dropped from 100% to 86%. Obviously the battery level is just an indication as opposed to an absolute, and I definitely think that it is also influenced by ambient temperature. Whatever the case, I’m satisfied that the battery will actually last a decent length of time - at least 6 months - so at some point I’ll probably modify a few more although that will be a pain due to them running the newer firmware.

I switched to the Zigbee firmware as well. Everything is working, the switch to C/F etc is working as well, however the device keeps reporting humidity and temperature as null. The display shows them correctly. Other people with that problem as well? I might try to reflash again using UART soon. Already waited for several days, but still everything null.

I have 2 already on bluetooth so purchase 5 more, I have just flashed one of them to Zigbee. Looking at the update timing its every 4 mins, can this changed to 5 mins?

I’m experiencing the same kind of issue.
Thee sensors worked fine when I was running ZHA. Then I wanted to migrate Z2M before my zigbee network became too large.
But the LYWSD03MMC sensors does not show up in Z2M.

I have tried to remove the battery so it can enter the pairing mode and I have tried to reset the sensor. But no luck.

I’ve decided to convert it back to bluetooth, however this has turned out to be quite a challange.

I’m out of my depth on this one, any help would be greatly appreciated as I’ve never flashed a device with ZHA.

I had this issue with one sensor. In the end I reflashed it a couple of times before it would pair.

I have 12 of these converted to zigbee and talking to zigbee2mqtt using a sonoff dongle-p. They have been rock solid for me

2 Likes

So did anybody pair it via ZHA, in the end?

I am thinking of getting one and converting it.

Edit: I now see in the article that it should pair with ZHA no problem

@IbRuthless Did you have any luck converting back to bluetooth? I have 6 of them that I flashed with zigbee but the battery life was really bad. I would like to go back to bluetooth if possible.

I had 10 of these working no problems with Z2M on running Conbee 2 hardware but have just moved to Sonoff ZB Dongle P hardware instead, but now they won’t pair to the new dongle.

All other 30 devices have re-paired no problem (and kept their user-friendly names and sent messages downstream to HA no problems).

For these temp/humidity sensors no amount of battery removal, connecting the reset terminals etc would make them appear, and they are not appearing on the Z2M logs even when set to Debug level.

I then got a new one out of the box and flashed it to Zigbee and tried to pair, and manages to pair somewhat. It appears on the device list but gives an error “Exception while calling fromZigbee converter: Definition ‘LYWSD03MMC-z’ has not endpoint defined}” and no temp/humidty readings are shown.

Any ideas what to do next? As they don’t connect to Z2M I can’t reflash them to BT and start again. I am suspecting there is something in the residual config of the firmware that might be stopping the old devices from reconnecting.

1 Like

how you flashed back to bluetooth?

No it’s still sitting on my desk.

I have had a similar problem.

I used Telink Flasher fra pvvx.

I think I flashed the same firmware as you. My Zigbee2MQTT found it but said “Not Supported”.

From the Zigbee2MQTT website I followed this guide.

From pvvx’ github I got lywsd03mmc-z.js

More precise I found the Zigbee2MQTT folder (in the config folder of your HA installation).
Added the lywsd03mm-z.js file.
Added

external_converters:
  - lywsd03mmc-z.js

to the Zigbee2MQTT configuration.yaml.
Restarted Zigbee2MQTT.
2 minuts later it was running fine.

Hope it will work for you as well.

From my ESPHome log: Xiaomi LYWSDCGQ
Is this a differnet model then the one mentioned in the smarthomescene.com article?

Please link to the article - not just the site.

See this Github for supported devices.

Hi,
i flashed the -z Firmware, installed the .js and added the Converter.
The Item shows up and is accessible.
Switching the Smiley on and off works within 5-10 Sec.
But the Readings are wrong.
The Display shows 22,7°C and 54%, but the HA shows 27,48° and 61,23%.
What went wrong and how to fix?

Ever since I switched to Zigbee, HA receives the temp/humidity at completely randon times. From a few minutes, to 20/30 minutes to an hour+.

image

Last one currently is 20 minutes ago. While the above RSSI is 2 minutes ago. Humidity 10 minutes ago. So what’s going on?

I can’t seem to get my external converter to load properly. In the Zigbee2MQTT log I get this:

Failed to load external converter file 'lywsd03mmc-z.js' (batteryPercentage is not a function)

I’m just using the lywsd03mmc-z.js file which begins like this:

const {
    batteryPercentage,
    temperature,
    humidity,
    enumLookup,
    binary,
    numeric,
    quirkAddEndpointCluster,
} = require('zigbee-herdsman-converters/lib/modernExtend');

What’s going on here?