The first quarter of the 21st century has pushed the 4th industrial revolution with the increasingly widespread internet of things (IoT). One of the most popular applications on IoT is smart home. Smart home as a home which is smart enough to assist the inhabitants to live independently and comfortably with the help of technology is termed as smart home. In a smart home, all the mechanical and digital devices are interconnected to form a network, which can communicate with each other and with the user to create an interactive space .
In  presented about the current state and future challenges about smart homes. Even in a few years earlier,  said that smart home is just a dream. Smart home applications have been developed by [3,4] that use surveillance cameras to regulate the heating system, control the lights in the room, and control the television channels.
The development of internet technology has caused smart homes to shift from local networks into the Internet network. By using Internet network, homeowners can monitor their home state anywhere as long as they have internet access. Some researchers have developed smart homes using HTTP technology, REST API and Web 2.0 [5,6]. In Service-Oriented Architecture and Internet of Things technology, object interconnects are used to create smart home in [7,8].
With the rapid development of technology and price reductions of devices and sensors make smart home more easily and inexpensively obtained and implemented in a real home. In this paper, we discusses designing a smart home in an easy way on a building that has been established and does not have a smart home installation plan, and has minimal costs through a smartphone.
2. Methods and Equipment
A sensor is a device that receives and responds to a signal. This signal must be produced by some type of energy, such as heat, light, motion, or chemical reaction. Once a sensor detects one or more of these signals (an input), it converts it into an analog or digital representation of the input signal .
A transducer is any device which converts one form of energy into another. Examples of common transducers include the following: A microphone converts sound into electrical impulses and a loudspeaker converts electrical impulses into sound (i.e., sound energy to electrical energy and vice versa). A solar cell converts light into electricity and a thermocouple converts thermal energy into electrical energy. An incandescent light bulb produces light by passing a current through a filament. Thus, a light bulb is a transducer for converting electrical energy into optical energy. An electric motor is a transducer for conversion of electricity into mechanical energy or motion. An actuator is a device that actuates or moves something. An actuator uses energy to provide motion. Therefore, an actuator is a specific type of a transducer .
The NodeMCU module  are shown in Figure 1 is a compact board that is very small and has the ability to be programmed and connected to networks via wireless. In other word, The NodeMCU board is a System On Chip (SOC) with integrated TCP / IP the protocol. In a network, NodeMCU can function as a server, client or both. In server mode, NodeMCU applies as hosting and in client mode NodeMCU can request on the server. In addition, NodeMCU has input / output pins that can be connected to sensors or actuators so that data from sensors can be sent to the server and able to activate the actuator based on the data received.
The Raspberry pi  are shown in Figure 2 is a mini-credit card with an ARM11 class processor. The Raspberry pi has a built in video, audio, and USB input that can be connected to the keyboard and mouse as well as network connection capabilities via Ethernet, wireless and USB. The data storage used is the SD card with the OS currently circulating is Noobs and Raspbian. This board has a 40 pin GPIO that can be connected to sensors and actuators and is easily programmed using strong languages like C, python etc. Besides that, the package has provided a very familiar and robust Apache Server.
Blynk is an IoT platform for iOS or Android smartphones that is used to control Arduino, Raspberry Pi and NodeMCU via the Internet. This application is used to create a graphical interface or human machine interface (HMI) by compiling and providing the appropriate address on the available widgets.
Blynk was designed for the Internet of Things. It can control hardware remotely, it can display sensor data, it can store data, visualize it and do many other cool things.
There are three major components in the platform :
Blynk App: – It allows you to create amazing interfaces for your projects using various widgets which are provided.
Blynk Server: – It is responsible for all the communications between the smartphone and hardware.
You can use the Blynk Cloud or run your private Blynk server locally. It's open-source, could easily handle thousands of devices and can even be launched on a Raspberry Pi.
Blynk Libraries: – It enables communication, for all the popular hardware platforms, with the server and process all the incoming and outcoming commands.
The process that occurs when someone presses the Button in the Blynk application is that the data will move to Blynk Cloud, where data magically finds its way to the hardware that has been installed. It works in the opposite direction and everything happens in a blink of an eye are shown in Figure 3.
In designing the smart home, in this study used sensors, actuators, NodeMCU, Raspberry Pi, Smartphones, and Blynk framework are shown in Figure 4. Sensors and actuators are connected to NodeMCU. Each room is installed with one NodeMCU as a client or more depending on I / O requirements designed. In a house the entire NodeMCU is connected wirelessly to the Raspberry pi as a server and is used as a data center and control and bridge between NodeMCU and the internet. With wireless installations, homeowners do not need additional costs for renovation and installation of cables. After connecting to the internet, the homeowner can control and monitor the condition of his home through a smartphone equipped with the Blynk application.
The results of the proposed design are presented in Figure 5. In the system there is a sensor, a DHT11 sensor is used and there is a relay actuator. sensors and actuators are connected to NodeMCU which are run in client mode. This MCU node is connected to raspberry pi as a wireless server. Furthermore, the Raspberry pi is connected to the internet network via a LAN cable. On raspberry pi the application runs connected to the Blynk server via the internet. after all is connected, the smart phone can be seen on the widget to adjust the actuator and the temperature sensor reading.
The use of NodeMCU as a client and installed in every room in the house makes it easy to install smart home. The ability of NodeMCU to read sensors and execute commands to activate actuators can also run as expected. However, with a minimum power supply installed in the NodeMCU, it is necessary to pay attention to the I / O usage load installed to the NodeMCU so that the NodeMCU works within a standardized range.
The use of Raspberry Pi as a server and data center also has an impact on the cheapness of building a smart home. In addition, if needed Raspberry pi has the ability to control the actuator and read the sensor through its GPIO. With data stored on the raspberry pi storage media, users can track and check events that have been recorded in the log data. However, in order for a system to be more reliable, a backup power supply should be designed in the event of a power failure.