So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By Sawadee
#81392 There may be another solution. I have three of these and 1st flashed Tasmota 6.5 on one. Communication to tasmota is good but no control of relays (I have the X2 - two relay version) with SIO0 and SIO2. And the LED (in the case D6) flashes about every 2sec (slow).
With a 2nd new out of the bag moduld I was able to follow the document below: (this document supports both single and dual relay modules)

[url]file:///D:/Downloads/ESP8266%202-Road%20WIFI%20Relay/5V%20ESP8266%202-Road%20WIFI%20Relay.pdf[/url]

and get the module working properly on my router with control of both relays and D6 not blinking. The document is not written well but can be followed.
You will also have to download and install on a Android phone or other device two programs.
(The document calls one EASYTCP_20 but it is EASYTCP in the Playstore. The other is ESP8266 SmartConfig.) The EasyTCP program will control the module in its new(unprogrammed) state at 192.168.4.1. The LED will still be blinking (D6 for dual relay board)
The other program will allow connecting to your router and get a IP address on your network and input your router password to the relay device. The password will only take if the LED is blinking fast, about 0.5 second blink. (I spent over two hours with this part)
Once you have the password installed and the relay module is connected properly on your network, the LED will be on solid. If and only if you use the EasyTCP control program indicated in the document.
So in the document it states that the LED blinking (slow) indicates the module is waiting for a password... But once you have all this done and you are connected to your router and and using the the EasyTCP to control the module, the LED will be solid.
Now after all this, it you install another control program like ESP2relay Controller you will be able to control the relays and be connected to your router but the LED will be blinking slowly.
This tells me that the IC that we all think needs reprogramming to get this LED to stop blinking does not need to be reprogrammed. It looks to me that we just don't understand with other connection requirements that are needed to get the LED to stop blinking (slow). But the good news is that all will work if the LED is blinking. I just would like to be able to have Tasmota installed and controlling this module so I can get MQTT info sent from the relay module.
Any help would be appreciated..
User avatar
By rickgtx
#81907 I followed the same rabbit hole as the rest of you, How does it work? Then find out it doesn't work and needs to be program. pilol34's program loads but the relay does nothing.

https://www.hackster.io/makerrelay/esp8 ... ome-e8a437 has the schematics and the last comment points to https://github.com/libretto/RelayMCU where the MCU program is in c and has instructions on how to compile it. I complied it and finally got the STC15F104 responding to the (A00101A2 open relay, A00100A1 closed relay) codes.

I added simple one letter commands: C-close, O-open, T-toggle, S-status. It returns an ASCII 0 or 1 for open or close. A00101A2, A00100A1 still work. I can control the relay from my PC command line (echo "C" > /dev/ttyUSB0) or with putty.
Code: Select all:0400000002001132B7
:03000B0002017D72
:03006A0002000E83
:03000E0002006D80
:20006D0075415575425075B10075B204C2B2753B00753D00C2041201ECE4F53FF540E53F04
:20008D002441F9E7FF600F8F821201E0053FE4B53FEC054080E810030302016A85223CE59C
:2000AD003B24FC500302016AE53B75F003A49000BF730200CB02012502013302014A74A09E
:2000CD00B53C05053B02016A7443B53C10D2B2A2B2E4332430F5821201E002016A744FB526
:2000ED003C10C2B2A2B2E4332430F5821201E002016A7454B53C0FB2B2A2B2E4332430F5BD
:20010D00821201E080577453B53C52A2B2E4332430F5821201E080457401B53C04053B8064
:20012D003C753B0080377401B53C028004E53C7007053B853C3D8025753B00802074A2B58D
:20014D003C0B7401B53D06D2B2D204800D74A1B53C08E53D7004C2B2D204753B0010040342
:20016D000200A3A2B2E433F5821201E00200A322C0E0C0D0300120D52628752603D52809E9
:20018D00852422C201D2038019E524C313F52430B010432480800B20B008D201752604753D
:2001AD002809D52529752503300023E527700AC2B18521237527098015E523C313F523D527
:2001CD002708D2B1C200D2028004A2D792B1D0D0D0E032AF8210020280FB8F21D20022752F
:2001ED009850C2AFC2B9C2A9C28C758900758E80758A80758CFED28CD2A9D2B9D2AFC200BF
:0D020D00C201D202C2037525007526002231
:06004000E4787FF6D8FD14
:20001E007900E94400601B7A0090021E780175A000E493F2A308B8000205A0D9F4DAF27568
:02003E00A0FF21
:200046007800E84400600A790175A000E4F309D8FC7800E84400600C7900900001E4F0A3B8
:04006600D8FCD9FAEF
:0D00110075814212021AE582600302000EA2
:04021A0075820022C7
:00000001FF

I programed the second relay MCU with lowercase commands and I can control both on the same serial connection.
User avatar
By Rennan Ribas
#82224 Hi, pilol34, in midle of 2019 i still have the same problem that you have, my relay module is flashing led and relay too.

I trying to do what you did, but i have a problem: when i click in download/program, shows "Checking target MCU ... " and no move from this point.
Did your know how i could fix this problem? thanks for now! (and sorry about my english)



pilol34 wrote:Hello;

I too was very disappointed when buying this module. When I connected it for the first time, it is flashing as shown on this link (https://www.youtube.com/watch?v=5Le9kNT_Bm4) and it was not responding at any of my orders.

After a rechere on the web, I found on the website of the manufacturer http://www.chinalctech.com/index.php?_m ... &p_id=1204
this note:
For this wifi relay module, because there are some counterfeit on other sales platform. So if the LED on-board (D2) are blink constantly (I guess the reason is the STC15F104W have not been programmed), it means the module were not produced in our factory, maybe you need to contact the seller directly. Best regards!

And then I realized that I had to program the module to solve the problem (I not found the original firmware).

Here are the results of my work after several days of work.

ATTENTION, The programming and or the alteration is under your resposability because it is always possible to do an error or mishandling that may endanger the module.

1. An FTDI232 interface is required to connect the USB protector to the module's RX TX pins. Here we use an interface to 5V.

2. Software is required to program the module's STC15F104W. Here I used stc-isp.exe (v6.86E) found on the site http://www.stcmicro.com/rjxz.html (Hey yes, I work under windows).

3. Create a program and compile it in .HEX format. Here I create a .asm program that I compile thanks to the AS31.exe utility from Paul's 8051 Tools at https://www.pjrc.com/tech/8051/index.html.

4.The program must be transferred to the module. It is necessary to think to cross the cables TX RX and one does not branch 5V power supply.

With the programe STC-ISP.exe we load the proramme .hex, we set the clock at 11.0592 MHz, and press the button DOWNLOAD / PROGRAM, Connect the 5V power supply of the module and wait until the transfert is finished.

5. In the COM Helper tab, test the module with commands A0 01 01 A2 and A0 01 00 A1 in HEX-Mode.

6. If the led lights up but the relay does not work, it will alter the module by swapping the resistors R3 and R4. This is probably the most delicate operation you will have to do.

7. Afterwards, follow the setup for the ESP-01 module.


To speed up your work, I give you my version of the program in .HEX format Which will save you from making the item 3. This program is transmitted as-is and without guarantee. I have not done advanced testing and it is not optimized.

I added to the program relay status reading commands.

B0 01 01 B2 -> Reading relay in text format ("ON" and "OFF" ending with a linefeed).
B0 01 00 B1 -> Relay reading in binary format (00 = ON and 01 = OFF).

B0 00 01 B1 -> Reading the firmware version in text format ending with a linefeed.

You just have to copy and paste into a text file with the extension .hex.

File: LcWifiRelayUartV1_0_9600_11mhz.hex

Code: Select all:0300000002017387
:03000B00020100EF
:10010000C0D0C0E075D00820010B20B019D2017D0D
:10011000047F092126DD0F7D03A2B0EB13FBDF0670
:1001200033F9C201D203DC1D7C03300018EE7009E4
:10013000C2B1880A7E09020145EAD313FA92B1DE00
:1001400004C200D202D0E0D0D032F5F0E52305237E
:10015000543F2434F8E5F0F622E4936006A312013C
:100160004A215922C200C201D202C203E4750C0323
:10017000F50D22787FE4F6D8FD75817F75D0107576
:100180008900758E80758A80758CFED28CD2A9D23A
:10019000B9D2AF12016475B1FB75B203C2B23002BD
:1001A00017E5226523543F600FC202E52205225461
:1001B0003F2434F88608D20030036CC203E5217076
:1001C00010A909B9A004C2054125B9B077D20541EB
:1001D00025147010AA09E509C3137068200546BAF2
:1001E0000162412514700CAB09E509C313705592E7
:1001F000044125AC09E92A2B6C7049200506A204AC
:1002000092B24144BA0122BB0008E4A2B233314A9F
:10021000414420B20890025D1201594144900259B4
:1002200012015941440521219EBB0010900262E455
:1002300093A312014AE49312014A414490026412CA
:1002400001594144752100219EA00101A2A0010095
:10025000A1B00100B1B00000B04F4E0A004F4646B9
:100260000A0001004C4320576966692052656C61A1
:1002700079202D206669726D776172652056312E66
:1002800030206279204C6F7569732050696C6F6EF5
:020290000A0062
:00000001FF


Now it's up to you to do the rest.

Good luck.