I have HA and ESPHOME using esp32 motherboard
i have 2 xiaomi LYWSD03MMC sensors.
the one i flashed the custom firmware and the other is with default firmware.
i got the bindkeys for both and made the following script in esphome
Are you obscuring the MAC addresses here or does your script have ------'s?
I found i had to run the custom firmware and set the advertising flag to “mi like”. Works a treat and I just use a random bind key the same for each of my sensors.
i managed to get connected to the sensors and read data.
but i get disconnects from esp32. is it normal?
the connection between esp32 and the sensors is not stable.
i have read that esp32 is not stable yet with ble sensors. but i don’t know if this is the case.
I have two ESP32’s doing BLE gateway duty. One is flakey as anything…falls over all the time for no obvious reason. The other has been running for weeks with no glitches. I think it just comes down to sometimes getting a crappy board.
This code restarts the ESP32 every day so it is always fresh. Its been going good for months.
I did have some issues as I was not patient enough and I kept removing the battery from the modules to reboot them before they had time to registered themself. Power cycling wipes out the parameters including “my like”
Figured out what was happening. It seems that my Mac was connecting to the Xiaomi devices after I flashed the custom firmware onto them. This prevented the esp32 from connecting to the Xiaomi. When I disconnected the Mac from the Xiaomi it came right up in esphome.
Hello,
I have been using the sensors flashed with the ATC firmware together with ESP32 devices that read the infos and then forward via WiFi to my HA.
But after I replaced the batteries I can’t see them anymore, in the esphome Logs I see that their bindkey is unknown.
I tried to reactivate them from the page where I flashed the firmware but I can’t find them.
I tried to add them as Bluetooth devices and this works, I can see their MAC addresses.
Any idea what I need to do to make them work with my esphome devices again?
These days I think the best option for using these sensors is to use the ble_monitor in HA (via HACS). Then you can configure as many esp32s you want around the house as listeners using their ble_gateway in ESPHome. I have 4 esp32s around my house listening to broadcasts from 20+ sensors and relaying what they hear back to HA. That way you don’t have to assign a sensor to any one esp32.
Hi
I have come across the same problem. The custom firmware wont allow it to boot after battery change.
The only way I could get the display to work was to reflash the original firmware to get the display up and running again and the put the custom firmware back on.
I’ve experienced this same behavior, hence my question. I flashed them OTA but after putting the battery back in and getting the blank screen I can’t flash them over Bluetooth. Are you soldering to pins on the pcb?