Close

Mirror interaction website

A project log for Smart Mirror

Added features Like music stream, customizable greeting, camera selfie.

shubham-khatrishubham khatri 05/28/2017 at 11:190 Comments

The sole purpose of this website is to configure some setting for mirror like greeting, to access some features like music stream, click pictures etc.In future this website will interact with mirror to configure setting like changing location of weather,news preference,stocks preference.The secondary function is to control/access other features (music,home automation etc).As these feature are thought to be controled by motion ,it is also to be implemented in future.

The screenshot of the website are shown below.

On this page the user can see the changes that he made.Those will reflect side by side on the mirror as well.

On this page the user can view/change the greeting that will be displayed on the mirror. Or he can reset them to default.This is implemented through use of JSON,a JSON file is created from which the mirror access the greeting that will be displayed on the UI. By using This website the data in that JSON file is manipulated.

This page gives the ability to control the LED lights,hence fulfills the purpose of home automation on small scale. This is implemented through the use of a python script which is triggered when the button on the website is clicked.this python script then sends signal to relay to turn on/off the LED lights.

The camera selfie works through use of Python,python script is triggered as we click the button.This python script then use camera to take the picture and save it to the storage of the raspberry pi.This pictures can be assessed through the FTP server of the raspberry PI.But in the future I am thinking of sending the image either through Email or through use of Bluetooth(On the paired phone).This will be done as soon the image is clicked.

This page access the music stream feature.The user can add more music to website list by adding music files in the raspberry pi storage through use of FTP server.When the user updates the files in the raspberry pi directory he needs to refresh the website list by clicking refresh button (purple color circle).when the user wants to play a song first he has to select the song then press play button.To stop the song he have to press kill button.This is achieved through use of JSON ,python and JavaScript .First when user pushes the songs in the directory through FTP then after pressing refresh button a python script is triggered which scans for all the files in the directory.Then these file names are saved to a JSON file o the raspberry pi.After this the website uses JavaScript to display only MP3 files on the website.After this when user wants to play the song a JSON file is created with the name of the song.This name is then passed in the program which starts VLC to run the song.

This feature of sending message to the phone of the user uses "Twilio API".Which is a trial base free service.This API is used inside python program to fetch stocks data then send it to the user phone number.




Discussions