"SONOFF Clone" - Mini-ESP8266 Power AC Relay Controller

Many Thanks All Working Done Many Thanks My Dear MAster For Great Help And Support …
i Want TO Add 16x2 LCD i2c It Will Show Like

My Room Bulb On/Off
Fan On /Off

Etc Is it Possible
Please Help Me Master How Can I Done This

1 Like

Sorry I dont have an LCD to test with so you will need to work on that on your own. Won’t be hard im sure as LCD’s are one of the Arduino 101 lessons.

1 Like

Ok Master
Actually I Found This One Thats Why I Ask For

1 Like

Looks like a lot of fun getting that to work! good luck :slight_smile:

1 Like

Hi all, I tried finding what Im looking for on the web, but was unsuccessful, so I came here.
So I have a similar setup to what some of the guys here have posted pictures of. My relay conntects/disconnects the hot wire (220V). However, where I live we have these kind of plugs: plug. So as you can see, the neutral and live wires can be reversed and plugged in to the wall socket. In this case my relay will be disconnecting the neutral wire, instead of the hot wire, which can lead to bad consequences. How do I make sure it doesnt matter which way I plug my cord into the socket?

Are you switching from inside the outlet or outside? By your explanation I take it that you are switcing on the outside and then you could switch both hot and neutral for “extra” safety.

Thank you for the reply, @Fettkeewl. I am switching on the outside like this: post by @jamin. I had the same thing in mind, but I wanted to get away with just 1 relay.
I actually have a chinese smart plug by broadlink, and I tested how it works. when I plug it in the wall either upside down or the correct way I cannot detect a hot wire when the switch is off, which means that they somehow implemented it with just 1 relay (I know that there is only 1 relay inside of the chinese thing).

It can be a relay which switches 2 pins simultaneously. Its common in household switches and known as 2 pole switch

I cannot however find a suitable version of it on ebay.

edit: This is some that seems suitable but I cannot find any information on the control signal

Hi Ben, I used your QR code to get the app.
How do you assign the same virtual pin V5 to multiple ‘Labeled Value’ widgets?
Once I have assigned virtual pin V5 to a widget, it says Busy on other widgets and does not allow me to select it in subsequent widgets.


You need to set up multi devices… each device is a clone of the hardware but with a difference auth code. Then you can select V5 on X device… and V5 will be free on Y device.

1 Like

many thanks!


v1.3 - https://github.com/jaminNZx/ESP8266-Remote-Blynk-Switch/releases/latest

  • Shorthand SimpleTimer code now being used.
  • Lowered overall line count.
1 Like

Just curious. When you can buy the SONOFF for about $4 (USD), completely assembled and ready to go, why would you bother building a clone?

1 Like

Because learning?
Because fun?
Because I can?
Because maker?

Pick one…


I pick this one :smiley:

That wasn’t meant as an insult. It sounds like we actually have similar motives. I just find the programming, automation, and integration of these devices to be the more interesting part of the hardware / software equation. I built several of these “clones” before the Sonoff was available, so to me, the debut of the Sonoff was a welcome respite from the soldering iron.

Its just personal preference. I prefer to build things than buy them.
I could go an buy a SONOFF and be done… but in my mind its not the same as building your own… and yes I know you can “hack” a sonoff and re-flash it but then there’s no point buying their hardware only to wipe their code.

Just looked up buying a SONOFF device and I can’t even find a place that will ship to my country :joy:

Reflashing is exactly the point - customizing the device to work with my system, adapting it to a wider and more complex array of triggers, in ways that the manufacturer didn’t anticipate.

IMHO, build “things” by myself is funny as part of the challenge. Could I buy one of them? Yes, for sure, but it won’t be the same…


recently i added this line to my sketch

 timer.setInterval(2000L, []() {
     Blynk.setProperty(vPIN_INFO, "label", String("WIFI: ") + String(map(WiFi.RSSI(), -105, -40, 0, 100)) + String("% (") + WiFi.RSSI() + String("dB)"));

it works fine , but i don’t understand ( -105, -40, 0, 100) what that mean.
also label is showing in very small characters at left corner , and /pin/ is not showing at all.