Flashing Tasmota firmware on Tuya IR Trasmitter/Recevier manual
Updated on 22/8/2020
I must say, this is the tools I used, you can buy from other sellers or similar tools.
All the equipment cost about 10$ and the device about 11$.
esptool
flashing tool from here or directly from the official repo at GitHub.Create a folder and copy to it the downloaded files
tasmota-ir.bin
and e sptool.exe
.
Let assume the folder is C:\flasing
Connect the USB to Serial
converter to the PC.
wait until drivers automatically installed by Windows.
(if its not work automatic go here or here)
In Windows search look for device manager
and select the first results, or press Windows Key
+ R
and in the input insert devmgmt.msc
.
In the device manager look for the device serial port COMX
.
We will need it in the next step. In my case, it was COM6
.
Open the command line in the directory C:\flasing
.
(If you don't know-how, look here)
On the command line write the following command:
esptool.exe -vv -cb 115200 -cp COM6 -ca 0x00000 -bz 1M -bm dout -cf tasmota-ir.bin
Note that the COM6
should be replaced by your device port from earlier.
Do not press 'Enter' yet, keep the command ready to use for the next step
Disconnect the USB to Serial
converter from the PC.
Now move to the next step:
First of all, unplug the device from the power, and do not connect it until flashing process finished
The device consists of two parts, the bottom to which the chip is attached with screws, and the glossy lid that is not attached with screws.
Remove the cover gently, you can use a screwdriver but open it slowly and carefully because it is very fragile.
At the end the device should look like this:
We need to connect the device (while not connected to power!!!) to the PC via the converter.
The connection diagram is:
3v3
of the device to the 3v3
of the converter.TXD
of the device to the RXD
of the converter.RXD
of the device to the TXD
of the converter.GND
of the device to the GND
of the converter.IO0
of the device to the GND
of the converter.the connections need to be like shown in the following pictures:
Make sure again that all wires are well connected.
Now the flashing is ready.
Connect the USB to Serial converter to the PC, then in the command line press 'Enter'.
The command line and the converter shuld look like this:
Assuming all worked properly and flush complete
displayed on the command line,
remove the converter from the PC, remove the wires from the device, and return the device cover.
The flashing is finished!
Make sure that all wires removed, and the cover is in his place, then connect device to the power.
Wait a few seconds and then should be a new network named sonoff-xxxx
(tasmota-xxxx
in the new versions) in the WiFi list on PC or smartphone.
Connect to the new network.
Open the browser and open 192.168.4.1
.
Enter your home SSID and the password (Tasmota support two networks)
And then press 'Save'
The device should reboot and connect to your home network.
Connect back to the home network, enter to the home router to get the new device IP address.
Each router has a different UI but all should have somewhere a table of network devices IPs.
In my router (ASUS RT-xxxxxx) its look like this:
After you know the new device IP (in my case 192.168.1.36
)
Open the browser and press the IP in the URL bar.
Then in the Web interface press Configuration
and then Configure Other
.
Replace the 'Template' content with:
{"NAME":"YTF IR Bridge","GPIO":[255,255,255,255,56,51,0,0,0,17,8,0,0],"FLAG":0,"BASE":62}
(From the template project, IR Bridge page)
And press on the 'Activate' checkbox to be 'V'.
Then press 'Save'.
The device should reboot again.
And that is it. you finished.
Now you can use the device.
When you send an IR signal you can see the IrReceived message on the console. The message should look like:
{"IrReceived":{"Protocol":"GREE","Bits":64,"Data":"0x0x190C6050000000F0","Repeat":0,"IRHVAC":{"Vendor":"GREE"............},"RawData":[9084,4338,740,1622,.........],"RawDataInfo":[139,139,0]}}
Note that if the raw data is too long the only way to get the full list is by using the MQTT interface.
You can sent it using the console/MQTT, by using the IRsend or IRhvac commands. Put the following command on the console input and press enter:
By IRsend
IRsend {"Protocol":"GREE","Bits":64,"Data":"0x0x190C6050000000F0","Repeat":0}
By IRhvac
IRhvac {"Vendor":"GREE", ..... (put here all the properties from the IrReceived.IRHVAC object ) .....}
By RawData
IRsend 0 9084,4338,740,1 ...... (put here all number from the IrReceived.RawData array ) ........
For more information you see the tasmota documentation sending IR commands sending raw IR and to send this commands using MQTT
If you need to convert from the IrRaw format to the Broadlink format you can use my npm package implementation broadlink-ir-converter
If you want to receive the IrRaw payload in the console/mqtt, go to the web-ui console and press
SetOption58 1
.
I recommend to see the full Tasmota IR documentation here.
Photo by Enisa Abazaj from Burst