HELP!- flash tuya-based XR3 contact sensor

Has anyone come across this board and managed to flash it over serial?
(I suspect someone has, since there’s an ESPHome template for it).

This board is inside a Mirabella Genio window/contact sensor.
It’s a Tuya-based XR3 module.
I’ve been racking my brain trying to flash this over serial with no success.


I’m using a USB to TTL device CP2102. It has light indicators next to its TX, RX, GND serials, and I can’t find a combination where both TX and RX are lit (which I suspect would mean they’re able to communicate with the board, I guess??)

I believe I’m meant to be using the 3V3 and GND pins on the bottom-right-hand side of the back of the board, and the RXD, TXD pins.
I get the following errors (during attempts at various pins)

Unexpected error: ESP chip Auto-Detection failed: Failed to connect to Espressif device: Invalid head of packet (0x00)
Unexpected error: could not open post 'COMS': PermissionError(13, 'A device attached to the system is not functioning.', None, 31)

Can anyone offer help here?
Otherwise, does anyone know another forum where I may have a better chance finding advice?
Thanks all

You cannot flash that chip with esphome. Esphome is for esp chips (the clue is in the name). Mirabella must have changed their design.

If the pinouts line up right, you can do chip replacement of the XR3 to an ESP chip digiblurdiy on youtube just put out a video of doing these types of replacements. Or you can check out this page Open source firmware for XR809 compatible with Tasmota HTTP/Home Assistant where a dude figured out how to start writing custom firmware for the XR3/XR809 chip using I think the same sensor you have. I’ve been messing with the same project for a water sensor