This paper describes the design, construction and working of an IoT based smart mirror. Every morning our day begins by watching ourselves at least once in mirror before leaving our homes. We interact with it psychologically to find out how we look and how our attire is. Smart Mirror or Magic Mirror is one of the applications of Raspberry Pie. A computer screen embedded in mirror looks very futuristic. The Raspberry Pie stays at back scenes and controls the data displayed on mirror. While looking at mirror you can look at various notifications from social sites as well news, weather forecast and more things. Such mirrors can be programmed to work as AI and control home appliances by voice input or touch screen. The Raspberry Pie is connected to monitor via HDMI as well as it also has inbuilt Wi-Fi and Bluetooth interfaces so we can just swipe music and videos to mirror.
Smart mirrors are straight from science fiction. They’re part of an optimistic vision of the future that imagines a world where screens and data are everywhere, ready to feed you whatever information you need at a moment’s notice. Basically, the mirror is looks like normal mirror but when someone stand in front of it the scene changes. The mirror provides a functional, user friendly and interactive UI to its userfor accessing their social sites, messengers, etc. It has widgets for displaying the current whether conditions, Time, Events, Latest news headlines. The Smart Mirror would help in developing smart houses with embedded artificial intelligence, as well as finding its applications in industries. Switching home appliances becomes easy with mirror. Virtual dressing, a smart way of having trials with your fashion sense make things quite easy in malls. Having such intellectual mirror will only surge the beauty of home. The Raspberry Pi is programmed using python and connects to a monitor with inbuilt speaker so as to provide an onscreen interface and voice assistance as well. The working while making Smart Mirror is covered under Functional Overview of mirror. Atlast, the problems and issuesthat occurred during development were mentioned
A. Level I Design
Power connection, microphone for voice input, camera for image processing forms the basic input devices for the mirror. The monitor and speakers form the output devices of the mirror. Fig 1 depicts the basic structure of the smart mirror.
B. Level II Design
Smart Mirror doesn’t fully show the all the equipment that are to be connected to raspberry pi, but covers all major functional units. The IR frames are connected over mirror but still they work fine because it’s a co-ordinate-based touch detection by the IR sensors placed at the side of frames and doesn’t require the frame to be directly having contact with monitor behind mirror. The microphone is connected via sound card on USB port of Pi. The camera can be connected to USB port or the Pi camera can be connected to camera slot on Pi. The 8-channel relay is connected to GPIO pins on Pi for controlling the home appliances. To access the internet the Pi is connected to home Wi-Fi network. The programming of the Pi for displaying the UI on the screen is done using Python, the total description of how coding is implemented is described in Section 3 of the document
A. Two-Way Glass Mirror
The Two-Way Mirror is what gives the Mirror Its Real Identity. It’s really magic mirror as it has reflective surface at one side and also its transparent for light with good intensity. The mirror stays at the front where the user can watch himself/herself in the mirror at the same time thus allows the light from monitor to pass through it and make available the UI.
The RASPBERRY PI is the most vital part of the mirror, it forms the processing unit of the mirror. The Pi is like motherboard having all the required constituents which forms a great CPU. Its size of a credit card and still it can perform like a full-fledged computer. The programming of Pi is done using Python language. The programs can be first developed and compiled on windows or any other platform and then can run on Pi. The Pi also has its own inbuilt IDE to program in languages like C++, Python, C, Java, etc. Installation of OS on Raspberry Pi is quite a simple process. First you have to download NOOBS along with Raspbian which is great OS of Raspberry Pi for beginners. The Raspbian is just a flavor of Debian Operating System. There are many IDEs available to do programming for Python but what we found was PyCharm Community is free and good among them who serves our requirements. Designer is amazing tool to make UI of Python. Figure 3 shows a fully functional calculator wrote in Python script. The GPIO pins on Raspberry Pi controls the 8-Channel relay which is explained in next sub-section. The Raspberry Pi has inbuilt Wi-fi and Bluetooth for connectivity purpose as well as it allows 4 USB devices to be plugged in.
The Camera is input device for the mirror, it used for face recognition as well as body recognition. A concept called Virtual Dressing can be implemented using Image Processing. We roam in malls in search of various clothes, we cannot practically try all dressings that we like. So virtual sorts this problem out, Images of this clothing’s are saved in memory of mirror, whenever user stands in front of mirror and selects the dress, the mirror fits the dress on our body reflection in mirror. So, no need for doing trials every time. Face Recognition based authentication is another use of the camera, it customizes the profile of different users on same mirror.
The MICROPHONE is used to give voice input to the mirror. Along with touch capability a voice input makesthe system very reliable and robust in working. A sensitive microphone takes voice command from the user and processes it to do corresponding action.
H. Cooling Fan
This is used to keep the thermals in check, so that overheating can’t take place. This prevents the internals of our device from being damaged due to overheating. We have placed multiple fans and heat sinks throughout the device to prevent heat from sinking into the motherboard and destroying Our Raspberry Pi.
I. Program Flowchart
J. User Input/ Output
This unit basically consist of all the input commands which we give using the Keyboard, and mobile phone. While the output commands are displayed on the LCD panel and the voice command can be heard by the speaker connected to Raspberry PI via Bluetooth.
K. Processing Unit
It contains Raspberry PI as the main component and is the heart and brain of the entire system. It has an inbuilt Bluetooth and Wi-Fi to connect to the external devices.
L. Application Programming Interface (API)
In order for a user to interact with the system this unit perform the most difficult task of providing interface to the user. Interface difficulty refers to a device or a program that enables a user to communicate with the computer in order to provide interface we have installed Raspbian operating system in Raspberry Pi and then we use Amazon Alexa skill kit which is an open-source software development kit that allows us to install Alexa in our as verify also the interface of Alexis think it is so simple that even a layman can interact with it's quite easily.
The working of each component in smart mirror is explained in this section.
In the particular diagram the Embedded Computer shown in the centre is Raspberry Pi it does all the processing part of the components and hence in short, we can say it is the head and the brain power of our project.
Now the Kinect shown on the left-hand side refers to the add- on devices that are connected to the Raspberry Pi. They are basically all the input and output peripheral devices. For our project we have used our mobile phone's microphone to give voice commands and connect our mobile phone to Raspberry Pi via Bluetooth to give all the inputs. Also, the Raspberry Pi has a built in Wi-Fi by which it gets connected to the external devices and can access internet.
Raspberry Pi after doing processing on all the input command and send output signals to the display unit which is basically LCD panel and speakers from where the end use i.e., us, can see the output. All this input unit Processing Unit is a Raspberry Pi and output device is connected to the power supply in order to draw the power is needs.
A. Installing Alexa Interface
The process of getting Alexa Skill Kit SDK is as Follows:
On the top left-hand corner one can see the Temperature in Celsiusor Fahrenheit along with their 7-day forecast of the original place that the user lives in judged by the calendar and clock events. Also, the righthand side we can see that time the day and the date that everybody needs moreover on the left-hand corner on the bottom part of the screen one can see the news updates. And on the right-hand corner in the bottom half one can see the live traffic update. The interface and the dashboard can be changed and modified according to the users need.
IV. FINAL PRODUCT OVERVIEW
On the right-hand corner one can see there is LCD screen it is connected to two boats one yellow one and one green yellow board is comptroller and the green board is the switch controller now that now the input output controller is connected to the raspberry Pi that is connected via whiteboard the raspberry Pi is in connected via a power cable that gives AC power supply it uses a 12 volts 5 ampere charger and the entire frame is made of pine wood. The black portion seen in the entire photograph is vinyl sheet that is used to make that two-way mirror. The two-way mirror is just a normal glass without the silver polish in back thus making it reflective as well as permeable to see. Hence the user can see both himself as well as the screen behind the mirror.
A. Way to Incorporate in Our Daily Life
Depending upon the time of the day, the mirror will show particular greeting judged by calendar and clock. (For ex- every morning when the user first comes near the mirror it will show “GOOD MORNING! HAVE A NICE DAY”, in the evening it will show “GOOD EVENING! I HOPE YOU HAD A WONDERFUL DAY! and it will wish birthdays and calendar events too.)
The User can watch movies on amazon prime, set alarm, browse on internet, and shop online using the mirror • The user can make payments online using the combined mirror and phone interface of biometric scanning. • Booking a cab on Uber can also be done using the mirror.
The finished product demonstrated is something to behold for its futuristic appeal and usefulness. It has the hardware which is simple, and elegant enough to demonstrate our widget structure. The final project has a few of the widget cluster, such as the weather widget, news etc. Originally, the mirror was created to act as a personal assistant to both developers and general consumers alike. However, the sheer scope of the idea, along with the vagueness of such a complex concept, forced us to rethink our idea into a more viable option. Eventually, the idea of focusing on the creation of the open-source platform was settled.
 P. Maheshwari, M. J. Kaur, S. Anand, “Smart Mirror: A Reflective Interface to Maximize Productivity”, International Journal of Computer Applications, pp.0975 – 8887, May 2017.
 K. Govinda, R.A.K Saravanaguru, “Review on IOT Technologies”, International Journal of Applied Engineering Research, vol 11, pp. 2848-2853, 2016.
 J. Jose, R. Chakravarthy, J. Jacob, M. Masood Ali, S. Maria D’souza, “Home Automated Smart Mirror as an Internet of Things (IoT) Implementation”, International Journal of Advanced Research Trends in Engineering and Technology, February 2017.
 S. Emami, V. P. Suciu, “Facial Recognition using OpenCV”, Journal of Mobile, Embedded and Distributed Systems, vol. IV, 2012.
 S. Suthagar, A. S. Ponmalar, B. Banupriya, Beulah, “Smart Surveillance Camera Using Raspberry Pi and Open CV”, International Journal of Electrical, Electronics and Data Communication, April 2016