Reading Data from the Tuya Universal Smart IR Remote Control
The Tuya UFO-R1 is a smart infrared universal remote control from Tuya, a company known for mass production and distribution of smart devices under various brand names.
Inside the device is a TYWE3S Wi-Fi module, which is based on the ESP8266 microcontroller from Espressif Systems. This specific microchip comes with 1 MiB of built-in flash and a full TCP/IP stack. The low-cost and very few external components on the module make it attractive platform for many smart device manufacturers.
After opening the device we can see an interface to which we can solder wires to and connect a standard TTL serial adapter module. I used a USB to TTL adapter with a FTDI FT232RL chipset that supports both 3.3V and 5V. We need to power this device with 3.3V and implement TTL serial communication commonly found in UART transmission methods.
esptool is a python-based tool used to communicate with the ROM bootloader on ESP82** chips. It began as a community project and is now fully supported by Espressif Systems. After wiring up the module we can use to this tool to read and write to the chip.
$ ./esptool.py flash_id
esptool.py v2.8
Found 1 serial ports
Serial port /dev/ttyUSB0
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: 84:f3:eb:00:00:00
Uploading stub...
Running stub...
Stub running...
Manufacturer: c8
Device: 4014
Detected flash size: 1MB
Hard resetting via RTS pin...
References⌗
- esptool - https://github.com/espressif/esptool
- Flashing Tasmota firmware - https://github.com/arendst/Tasmota/releases
- Tasmota IR documentation - https://github.com/arendst/Tasmota/wiki/Commands#irremote
- Tuya OTA - https://github.com/arendst/Tasmota/wiki/Tuya-OTA
- Tuya TYWE3S WiFi Module - https://fccid.io/2AFNL-TYWE3S/User-Manual/Users-Manual-3525098
- https://fccid.io/2ANDL-UFOR1/Internal-Photos/Internal-photo-4123499