My controller looks pretty much the same as there.
I forst replaced the WBR3 with an ESP32-12F module but got some soldering issues and pads were destroyed. I then soldered a ESP8266 board instead, with nice wires, and flashed it with ESPHome.
It boots up nicely and is seen is HomeAssistant.
However, as i see in the logs collected in HA, the ESP sends a heartbeat packet on TX but never receives anything on RX, and i get error "[E][tuya:489]: Initialization failed at init state 0 "
Any idea why the tuya MCU wouldn’t respond at all?
My next step is to sniff traffic on the original WBR3 module but i thought someone misht have an insight…
Hi,
i’ve tried several things:
1- connect the GND-TX-RX pins to an USB to serial converter, with no ESP involved. I sent 0x55AA00000000FF and got responses (tuya-like)
2- connect the ESP board’s TX to the USB2serial → i can see 0x55AA00000000FF being sent repeatedly (in bursts of 5 or so) as expected
3- connect the ESP’s TX to the tuya MCU. Connect the RX to the USB2serial only → I can see the responses from the MCU!
4- connect the ESP’s TX+RX (“normal” connection) and look in the ESPHOME logs → it tells me that device is stuck in init state 0, no data received on RX
5- in adition to 4, solder the RX of the USB2serial to “spy” the RX wire → now i don’t see traffic anymore
It seems that when the RX is connected to the ESP, there is no traffic anymore. I cannot figure out why this could be.
… any idea?
(NB : using GPIO 13+15 fried a chip, and i cannot figure out why neither)
I guess that the RX (GPIO3) is internally pulled UP in the ESP8266, in a way that is not compatible with the Tuya MCU + board resistors. It is the only explanation i found to the RX traffic “disappearing” when the ESP is connected.
I switched to GPIO 4 and 5, as software UART is ok at 9600 bauds and i don’t need a faster serial link for simple fan control.