Simple 433Mhz RF Socket Control via Blynk and ESP8266-01

Hi Guys I know they are some existing projects, but I would like to share my too.
There is the setup:

And this is how the Blynk UI looks:

The code is simple and supports the device reconnecting in case the wifi connection gets lost. If you need a more detailed information about wiring etc. you can take a look on my blogg:

Have fun and share your projects with others.


Correct url


Just curious… why use 6 separate ON and OFF buttons, instead of 3 switches, which would have given you the added advantage of showing the current state?


      mySwitch.send(SWITCH_1_ON, PACKET_LENGTH);
      mySwitch.send(SWITCH_1_OFF, PACKET_LENGTH);

Hi Chrome1000, because my RF Sockets are also controlled by a regular remote controller. The connection is one way. That means the system can’t receive response messages from RF sockets. So you can never know if it’s currently switched on or off.

We have a special tool to ensure we know the status sent from the original IR and RF remote controls. Maybe @pavel might find it useful for his aircon project.

For details see here.

in this case if the switch is on (or off) so in the blynk app is “pushed down”, then the RF transmitter will be in transmission mode ( so it transmit the “ON” RF command ) constantly. That is terrible I think !

@mikekgr That would be true physical pins were involved, because Blynk writes them to a persistent state, in which they remain until written to again. Virtual pins work a little differently. Any code contained in BLYNK_WRITE() only runs when there is a change to the button state, so the code that I suggested would do exactly the same thing as the original code, but with a single button.

However, as noted by @af_bln, with no feedback loop, Blynk isn’t able to recognize changes made by a separate RF controller, and therefore, can’t update the widget state accordingly.

Very nice info @chrome1000 ! Sorry for my mistake but I thought that if one virtual key ( switch ) is held down then at each loop then will sent the command again and again… Literally speaking, this behaviour (to sent the command again and again) is the very obvious to me…

@af_bln Thank you for this project, it is really great.
I have one question, do you know why timer doesn`t work correct ? I observed that it works randomly, I have idea that maybe the problem is because when timer job is active, then V0 == 1 all time, so it is not like push button, is more like switch. Is it possible to modify somehow code and make pullup for V0 (like push button) when timer starts and pullup for V1 (like push button) when time ends ?

@Chris1982 Please take note of Time/Date stamp BEFORE posting, this is an OLD topic and much has changed since, so that might affect your timing issue.

If you are still having issues, then create you own topic, complete with your code and many details of what you have tried and the results.