Keywords

1 Introduction

Smart products like television, smart watches, etc., are emerging due to the advancements in the technology. The survey says that on an average a men spends a minimum of 18 min looking into the mirror. This time can be productively used if it turns out to be smarter [1]. Smart mirror is a glass made up of 70% reflective and 30% transparent and hence used it instead of traditional mirror. It functions through NodeMCU which is integrated with the smart technology. Smart mirror functioning through Raspberry Pi foreshows features like weather, temperature, calendars, daily news feeds, to do lists, etc. [2,3,4]. The proposed technology makes our home or office smarter toward the future development. Smart mirror can be interfaced with both existing and new sensors and products [5]. Philips HomeLab incorporated the interactive mirrors which creates fun in the bathroom by playing cartoons to the children and news to the elders [6]. Home appliances are controlled by voice recognition [7, 8].

Face recognition can be implemented with deep learning algorithms for making the device much more smarter [9]. The server used is free as well as secure, and database is created with SQL. Fog computing proven to be efficient than cloud computing in terms of latency and total network usage [10]. The smart phones can get paired with the smart mirror by means of a Bluetooth facility available in the Raspberry Pi [11]. Akshaya et al. have integrated the two possible ways of accessing the smart mirror by means of Website and mobile application which creates an user-friendly environment [12]. Yusri et al. [13] developed a smart mirror specifically for disabled persons by controlling the home appliances by means of the intelligent mirror. Jin et al. [14] have developed a secure smart mirror which alerts the user when other persons try to access the mirror and biometric authentication is also an added feature. Besserer et al. [15] designed a model which recognizes the user and their emotions and motivates them to do their exercises and shows their happiness level after doing exercise. Rahman et al. [16], Nguyen and Liu [17] proposed a model which recognizes the face and suggests the type of makeup suitable to that particular person. Raspberry Pi enables the smart mirror technology more efficiently [18, 19] and it can be used for edge computing.

2 Materials and Method

2.1 Proposed Methodology

The idea behind our sensible product is to show data like time, date, weather, and an inventory of tasks to be done on a mirror show. This can be the essential data which we want to know during the morning hours to plan for the day. Smart mirror is a technology which will make our lives easier and ease our daily routines. The idea of this product has been around for many years. The inspiration came from the Internet of things (IoT) idea, which can be represented as an associate to form everything sensible. At its core, the Internet of things is regarding connecting devices over the net during a method that permits communication between users and applications on such devices. In the Following, this idea hardware elements that area unit necessary for the product to be purposeful are noninheritable. These include a Raspberry Pi controller board, monitor, and two-way mirror. Instead of third-party APIs an open-source software called Node-RED is used. All the GET and POST methods are managed using this software. With the help of this software, a process flow has been created. Using which all the client devices, i.e., IoT devices are accessible. Figure 1 depicts the hardware and software integrated with the smart mirror. The home automation performed remotely is represented in Fig. 2.

Fig. 1
figure 1

Block diagram of proposed method

Fig. 2
figure 2

Block diagram of home automation

In existing a single Wi-Fi router used in the home can hold up to 30 devices. When an individual products are added, it will go beyond its limit so we need more routers. Instead the mesh networking concept is used where one NodeMCU will access all the client devices. Here, this NodeMCU is alone connected to the router. This NodeMCU will act as master, around ten slave devices can be connected to this master. In existing products, the system cannot be configured. But in the proposed model, the system can be configured by the clients themselves based on their purpose. For increasing the security of the proposed product, a random IP address will be generated during each time of login. This random IP address can be checked from a remote through an application. This strengthens the privacy of the data of a proposed model. The size of a database in MySQL server is 524272 terabytes, and file size for data is 16 terabytes and for the log is 2 terabyte. Hence, huge amount of data can be stored securely.

The main theme of proposed methodology is to create or develop a more sustainable technology in this growing world. The product is out of the box co-engineered with a powerful computer and most advanced IoT devices at a most moderate price. The target audience is people who are planning to construct modern homes with voice assistant combined with artificial intelligence and in industries and colleges as an attractive dashboard which displays all the necessary data which will be a replacement of old style notice boards combined with google calendar, drive access for displaying some pictures, etc. Smart mirror has all necessary ports such as Ethernet port, Wi-Fi, and Bluetooth for connectivity purposes. In order to connect existing appliances with the Internet, an ESP8266 microcontroller is used. In order to increase the efficiency, a variety of sensors and transducers is used so that the efficiency of a technology and home assistant modules is increased. Some of the sensors used in the proposed method are PIR for motion detection for light intensity and DHT11 for temperature and humidity monitoring. Figure 3 is the photographic image of the proposed model.

Fig. 3
figure 3

Photographic image of the prototype

2.2 Open-Source Software

In the proposed method, the open-source software [OSS] is used. The tools used here are Node-RED, Mosquitto, MQTT, InfluxDB, Grafana, and remote framework.

Node-RED is a programming tool that can be connected with hardware devices through the Internet. It is an open-source tool that was originally developed by IBM technologies. Later, it was developed by JS Foundation. The platform used in this tool is Node JS, and the language used is JavaScript. Node-RED cannot be directly implemented with IoT. It is a generic event processing engine. Without writing any program, it can collect data from Websites like Twitter and Web tools like WebSockets and HTTP and store it in its database. Node-RED provides a Web browser-based flow editor that helps to create JavaScript functions. Instead of low-level coding tasks, Node-RED allows users to connect Web services along with hardware. This can be done through a visual drag-drop interface (Fig. 4).

Fig. 4
figure 4

Node-RED flow

MQTT means message queuing telemetry transport. It is used to exchange data between the devices and the cloud server. The bandwidth requirements for MQTT are at the absolute minimum, and it has the capability to handle unreliable networks. Hence, it can be used for machine-to-machine [M2M] communication. This protocol usually runs over TCP/IP.

InfluxDB is an open-source time series database that was originally developed by Influx Data. It is optimized for quick, excessive storage, and retrieval of time series data in fields like operations, observations, application metrics, IoT sensing element information, and period analytics. It also has the support for processing data from Grafana. InfluxDB is designed to handle high write and load query.

Grafana is multi-platform open-source analytics and shows an interactive visualization for Web applications. It displays charts, graphs, and gives alerts for the Web when connected to the supported data sources. As a visualization tool, Grafana is a standard element in observing stacks and is usually employed in combination with statistic databases like InfluxDB. Using this tool, the data can be monitored with a customizable dashboard. The main advantage of using Grafana is it will collect data for each and every millisecond, whereas other tools have time intervals. Using Grafana, the data can be monitored even after a week or a month.

3 Algorithm

  • Step 1: Installing OS in Raspberry Pi.

  • Step 2: Installing Node-RED in local.

  • Step 3: An IP address will be generated.

  • Step 4: There is a port number for each OSS.

  • Step 5: The port number for each portal is entered in the IP format: Port number.

  • Step 6: After accessing this port number, all portals will be opened at once.

  • Step 7: In Node-RED, each node has individual functions. Using these functions, the module can be connected to Google Assistant, UI dashboard, etc.

  • Step 8: All these nodes are interconnected. During this interconnection, a flow will be generated. In this flow, using JavaScript, a connection is established.

  • Step 9: Before establishing a connection, MQTT brokers have to be installed. In MQTT, for each device, a device ID is generated. This device ID is entered in Node-RED. For all load devices, an MQTT ID is given. If anyone of the ID pushes the data, that data will be captured by Node-RED. Based on the condition given, a flow will be produced using this captured data.

  • Step 10: From Node-RED, all data are pushed to InfluxDB. This database will collect each and every data per second. The data present in this InfluxDB will be used by Grafana.

  • Step 11: Based on these data, Grafana will produce flowcharts and graphs.

  • Step 12: All the above steps are done on the local server. To establish all these procedures in the cloud, we use a framework called remote framework.

  • Step 13: The static IP address is generated by InfluxDB and Grafana to Raspberry Pi.

  • Step 14: This static IP address is merged with the router present in the home.

  • Step 15: On opening each type of this framework, a dynamic IP is generated.

  • Step 16: This dynamic IP gets matched to static IP which is connected to the router present in the home.

4 Result and Analysıs

The status of the temperature and humidity in the living room and bed room is monitored in the dashboard, and it is given in Figs. 5 and 6. The water tank level measurement is monitored remotely, and it is shown in Fig. 7.

Fig. 5
figure 5

Temperature and humidity status of living room

Fig. 6
figure 6

Temperature and humidity status of bed room

Fig. 7
figure 7

UI dashboard for tank level measurement

The weather update and video demonstration for makeup are displayed in smart mirror, using which a person can do their work in a stage by stage manner and is shown in Fig. 8. The news updated is given in Fig. 9.

Fig. 8
figure 8

Smart mirror displaying makeup video

Fig. 9
figure 9

Smart mirror update us the news

5 Conclusıon

The smart mirror uses artificial intelligence which plays a major role in showing the user’s notifications and data. A GSM-based automation system is also mannered, according to this technology users can control and monitor the appliances, sensors by Blynk app from the mobile phone. The ultimate goal of Jarvis technology is to interface all the automated systems into a single interface. This innovation started as a trail to furnish in bringing smart home environment and working place. Ultimately, we all are well pleased with our project. As a further development, extra features can add to this smart mirror, which becomes more customizable and user-friendly.