-
Motion Control using PIR sensor(proposed)
05/28/2017 at 12:32 • 0 commentsThe features(music stream,camera selfie,stock message,Lights control will be implemented using PIR sensor.
Below are the images explaining motion in-front of different sensor to achieve some objective.
- Music control: this make use of two PIR sensor to start,stop,play next song and to play previous song. The arrow represent the direction of motion.
- Light and camera selfie control : Both these feature uses separate PIR sensor.These events are activated when there is motion in-front of the sensor. In case of the Light control First time motion will turn ON the Lights while second motion will switch OFF the lights.And for camera motion take picture.
-
Mirror interaction website
05/28/2017 at 11:19 • 0 commentsThe 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.
-
Mirror UI
05/28/2017 at 10:21 • 0 commentsThe basic features have been implemented, the code for some features is not that friendly with user.Like for the news,stocks if he wants to change type of news to be displayed he have to make some changes in code with the RSS feed links.I am trying to make the code more flexible.
The user greeting part is flexible ,user can change the greeting from the website.Or he can use them as reminder notes that will be displayed on the mirror.
-
Mirror Design
05/28/2017 at 10:09 • 0 commentsIt is a basic design of wooden frame,fixed with two-way mirror.To hold the monitor in place,I have drilled 4 holes on two sides of this frame.I could have made this design more compact ,but due to reason that I do not have separate parts particularly for this project like computer monitor,camera etc.
There is enough space in the frame to hold other hardware like raspberry pi, camera ,speaker,dc adapter,relay,PIR sensors,wires etc.
The PIR sensor will be installed on the sides of the frame by drilling holes on each side.These sensors are used to control features like music stream,lights controls etc.
This design was made so as to disassemble and reuse the hardware when necessary.Else can be more compact.