Blynk to control the lights and a bunch of sensors around the house, with ESP8266

I am working on a project with an ESP8266 (nodemcu dev board), to control my lights and some sensors: light, temperature, motion, humidity, barometric pressure. The data is also logged to thingspeak. And I am also delivering data over web and providing firmware updates OTA (over the air).

Also created some pcb’s to make things nicer. :smile:

Still a work in progress, but I’d like to share it with you.

Link to the project:

Link to thingspeak:


A picture of my finalised PCB. :slight_smile:


Very nice! Why did you used both a DHT22 and a DS18B20?

Looks very nice!
Do you provide the firmware updates over wifi? That would be really cool!
How did you manage that?

I find the ds18 more accurate than the DHT20 for temperature. And I just had some lying around… So why not use them. :wink:

1 Like

Do you need something that converts 5v from the PIR?

The Vcc for the PIR is 5V, but the output of the PIR is 3.3V. It has a 3.3V regulator on board.

Sure, my bad. Nice board btw.

wow, amazing work. thank you for sharing all the details very clear.
i’m working on a blynk integrated v2 plant monitor that i had created few years back. this is what i have so far;
it uses soil sensor, light sensor, temp/humid sensor and an rgb led to alarm locally.
blue color blinks when thirsty/too wet
yellow blinks when not enough light/sleeping
red blinks when too hot/cold
but it isn’t the most stable, best setup yet at all as my programming skills are novice at best :slight_smile:
maybe you can suggest me some improvements. when i try to push the board to do all that i suggested, it stops responding. and looking at how much more you have going on with your setup, i know that my problem is software related
love & peace

1 Like


I was away for a while. Did you already solve your stability issue? Is the source you were referring to, still recent?

hello vdwel,
i think the board is confused now, i’m getting a hang of it. i’ll message back if i get stuck again…

HI Im new here and dont understand everything but Im very interested about arduino… can you tell me from this board on the picture, how you control the lights?

@Josip_Boc have you looked through all the details on the authors GitHub as per the link they provided?

If you have and you still don’t understand how it works perhaps be a little more specific about which part(s) you can’t follow.

i dont understand how
It delivers automatic control of the lights in the livingroom
where is the switch reley or something
for what is 433 MHz transmiter
please dont laugh to me Im new in this

@Josip_Boc I know a bit about 433 MHz RF and looking at the GitHub this is how I it will work:

The lights in the room will be plugged into a wall socket that is controlled via a KAKU RF device like this

The relay is in the KAKU unit.

There is a PIR sensor in the schematic so that sees when people are in the room etc.

Hope this makes sense.

it make sense
however when somebody is in the room the pir sensor indicate that and if is in the room dark what indicate ldr 433 mhz transmiter send signal to kaku unit and reley turn on the light

am I correct

Blynk is full of magic.

It is all included in


Arduino: 1.6.12 (Windows 10), Board: “Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 512K (64K SPIFFS), ck, Disabled, None”

libraries\Time\NTPtime.cpp.o: In function `sendNTPpacket(IPAddress&)’:

D:\Josip\Documents\Arduino\libraries\Time/NTPtime.cpp:84: multiple definition of `sendNTPpacket(IPAddress&)’

sketch\NTPtime.cpp.o:sketch/NTPtime.cpp:84: first defined here

libraries\Time\NTPtime.cpp.o: In function `getNTPTime()’:

D:\Josip\Documents\Arduino\libraries\Time/NTPtime.cpp:36: multiple definition of `getNTPTime()’

sketch\NTPtime.cpp.o:sketch/NTPtime.cpp:36: first defined here

libraries\Time\NTPtime.cpp.o: In function `getTime(int, bool)’:

D:\Josip\Documents\Arduino\libraries\Time/NTPtime.cpp:15: multiple definition of `getTime(int, bool)’

sketch\NTPtime.cpp.o:sketch/NTPtime.cpp:15: first defined here

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Generic ESP8266 Module.

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

I think you have something with your libraries messed up. Try to remove all the Blynk and Blynk related libraries, download the latest libraries and copy them by hand to the library directory (do NOT use the Arduino built in library manager!).

You have two ntptime libraries. One in the project folder and one in the libraries. Remove or rename one.