Difference between revisions of "Wiki/SmartRoom"

From eLinux.org
Jump to: navigation, search
Line 74: Line 74:
 
   If door is left open for long, or is keft open unauthorized, a message is sent to the owner with links to view the camera.  
 
   If door is left open for long, or is keft open unauthorized, a message is sent to the owner with links to view the camera.  
 
   Now he may call his neighbours or in bad situations, the police.
 
   Now he may call his neighbours or in bad situations, the police.
3. Body comfort varies with ambient temperature and wind speed. Speed of fan is regulated using BeagleBone.
+
 
 +
There are hundreds of other applications we can add for further 'smartening' of a room.
  
 
== Theory of Operation ==
 
== Theory of Operation ==

Revision as of 17:42, 29 November 2015

thumb‎ Embedded Linux Class by Mark A. Yoder


Team members: Mohit Sharma[B12006], Siddharth Gangal[B13232], Ankur Sardar[B13108], Pushpender[B13132]

Executive Summary

The goal of this project was to build a smart room that captures the happenings in and out the room and performs certain assigned functions accordingly. The first in the list is an automatic door lock system for the room. For this one there is be a camera overlooking the door. Whenever someone approaches and is in the pre-required range of the camera, it clicks a photo and sends it to the concerned owner who then can approve and then the door would automatically unlock. Second one covers the fact that if the door is left open for more than an assigned period, a message will be forwarded to the owner regarding the same. Third point of implementation includes a temperature sensor inside the room, that monitors and controls the speed of the fan.

Packaging

consider this Fritzing diagram for ideas.

Installation Instructions

Give step by step instructions on how to install your project.

STEP 1 Install the WiFi adapter

STEP 2 First set the time (just to be sure)

/usr/bin/ntpdate -b -s -u pool.ntp.org

STEP 3 Install socket.io

cd /var/lib/cloud9 npm install socket.io

This takes a few minutes, wait until installation is complete.

STEP 5 Installing the Javascript and HTML code Find smart_home.js and index.html code on:

https://github.com/mohitsmr/CS404-Project.git

User Instructions

We encourage you to use the Cloud9 IDE as often as possible to program your BeagleBone. First read the previous part: Cloud 9 IDE on the BeagleBone Black.

With the Cloud9 IDE open, you can create a folder and file in your workspace. Follow these steps:

Right-click the cloud9 folder and choose New Folder from the shortcut menu. Name the new folder Projects. Right-click the Projects folder and choose New File from the shortcut menu. Name your file index.html. Repeat step number 3. and name your new file smarthome.js.

Creating your Web Server Your smarthom.js file is the last piece of the puzzle. First you have to load all the required modules and configure your BeagleBone Black’s pin. You also initialize a web server on port 8888. Then you establish the communication between server.js and index.html files using socket.io. the code is in this following link:

Launching your web server Launching your web server is easy. You simply save all two files. Click the green button “Run” in the Cloud9 IDE, and you should see a message in your output window that says “Server Running . . . “.

That’s it, your web server is up and running! Open a tab in your web browser, and type http://192.168.7.2:8888.

This web page only opens only if your computer is connected directly to the BeagleBone Black by USB. If that’s not the case, read the next section to see how to access the BeagleBone through a device connected in your workspace network.

Accessing your Web Server with another device To access your web page in any device inside your network, you need your BeagleBone Black’s Ethernet IP address. Open your terminal and type the following command: ifconfig

Now you can type your Ethernet IP address followed by the port number (example http://192.168.1.80:8888) in a web browser of any device. Now you can control any outputs remotely!

Highlights

1. To open or not to open? :

  Camera captures live video feed and sends it to the owner using Nodemailer who can now decide whether to open solenoid valve lock.

2. Security:

  If door is left open for long, or is keft open unauthorized, a message is sent to the owner with links to view the camera. 
  Now he may call his neighbours or in bad situations, the police.

There are hundreds of other applications we can add for further 'smartening' of a room.

Theory of Operation

Give a high level overview of the structure of your software. Are you using GStreamer? Show a diagram of the pipeline. Are you running multiple tasks? Show what they do and how they interact.

Work Breakdown

We all worked collectively on the project, so we all have an idea of all the workings. Responsibility was divided as follows:

  • Processing of image, sending to user over a webpage using HTML, message to user and the model to demonstrate - Ankur and Mohit
  • Proximity Sensor for door open and close, circuits for relay, making a solenoid, sourcing components and wiring and code for sensors and actuators ready - Siddharth and Pushpendra

Future Work

We can include voice recognition features to control speed of fan, turning lights ON and OFF inside the room, have coffee automatically made in the morning and even include features for colorful ambient lighting, such as the Philips smart lighting systems that depend on mood we can see nowadays.

Conclusions

This was an interesting project to work with. We learned how to make and use servers, use the openCV library, operate motion and t-mux. In electronics, we use relays to power a solenoid using a beaglebone and used temperature sensors, switches, ultrasonic sensors and many more components.

We had a few unexpected snags along the way, and we dealt with them efficiently.

We got to learn a whole lot of new things working with BeagleBone and it was a great experience.




thumb‎ Embedded Linux Class by Mark A. Yoder