SecuriDoor Log

From ESE205 Wiki
Jump to: navigation, search

Group Members

  • Clayton Keating
  • Savannah Rush

Find our project page here

Week of September 4

This week we narrowed our project idea. Our design will be a mobile application with home security features. Using sensors, the application will notify the user if there is motion in the front doorway and will enable the user to remotely lock their door. This week we met briefly with our TA, Nathan, and scheduled a weekly time for us to meet. We also created our individual and project wikis.

Week of September 11

This week we determined a project timeline and identified key milestones throughout the semester. We thought through more of the details of our project and identified the technical mediums that we will use. We developed a list of hardware needs and supplies and crafted a budget. On Thursday, we spent time with our TA Nathan, and narrowed the scope of our project. The goal of our design is to enable a website user to remotely lock a door. With Nathan's guidance, we decided to use Raspberry Pi and create a website (rather than an app) which communicates with the locking system.

Week of September 18

Savannah

  • This week I spent several hours watching video tutorials (3 hours) to familiarize myself with HTML and CSS coding. I downloaded a text editor on my computer and began designing the site using an HTML file and a CSS style sheet. The site now has a "home" page with a navigation bar with a link to an "about" page (2 hours). This week I also began researching how to create a secure login page (1 hour). I have currently identified two courses of action for the login page. I can either use a PHP script or a development framework (more specifically, Laravel). Next week I will be working towards having a functioning domain and web server presence, and will continue to make progress on the login page.

Clayton

  • This week I ordered our project supplies online and will soon pick them up. The budget has been finalized and we decided we do not want to keep our project, so I will need to keep all of our receipts in order to get reimbursed. Once we acquire the Raspberry Pi machine, I will start learning more Python code that is relevant to servos and other project-related activities. I also have started research on casings for the door-mounted locking/unlocking mechanism. Most likely this will be 3D printed, so I will do measurements of all the supplies we have once they come in. I am awaiting the "master classes" for SolidWorks and Python, as I am by no means an expert on either.

Week of September 25

Savannah

  • I searched through past ESE 205 projects to research how other groups have developed a web presence. One group recommended the hosting site Bluehost, but upon further investigation this option is rather expensive and, according to online bloggers, difficult to set up SSL which we need for our secure login page. This research took 1 hour.
  • I then went on to option 2: Amazon Web Services. After struggling to understand all of the myriad options available on Amazon's site, I reached out to a friend who had used it previously and received negative feedback. This took 1 hour.
  • Enter Option 3: web.com. Said friend recommended this site as a hosting and domain acquisition option, similar to Bluehost. However, this site was much cheaper and offered a month-to-month purchase option for just $5/month. After performing further research on my own, I went ahead and moved forward with the site, purchasing a month plan. I set up a working domain (www.thesecuridoor.com) and uploaded my previously coded files to the site. This took 2 hours.
  • Next, I set out to create a user registration and login page for the site. After finding some tutorials on the internet, I adapted them to meet our project's needs and specifications and edited the style using a CSS file. This took 2.5 hours.
  • Next week we aim to connect our raspberry pi to wifi and complete the registration/login page by adding a php database.

Clayton

  • This week I have been out of town in Denver working on a WashU competition building a solar-powered house. That being said, I have been able to research cases for a Raspberry Pi unit that might hold it in place as well as the servo and locking mechanism. When I return to school I will print one and determine whether it will suffice or not. Otherwise, I will test out the Raspberry Pi to servo connection and programming when I return home from Denver.

Week of October 2

A link to our presentation is found here File:Presentation.pdf

Savannah

  • I read several tutorials about the workings of PHP databases and how to create them for the use of a login/registration page. This took 1 hour.
  • I created a database for the site using MyPHPAdmin. However, I was unable to successfully add users to the database. I spent 4 hours creating a user case and attempting to debug. When I attempt to register a user for the site, I receive an error saying that the database does not exist. However, I have gone into PHP My Admin and created a database and table.

I have the following code: <?PHP require_once("./include/fg_membersite.php");

$fgmembersite = new FGMembersite();

//Provide your site name here $fgmembersite->SetWebsiteName('thesecuridoor.com');

//Provide the email address where you want to get notifications $fgmembersite->SetAdminEmail('savannah.rush@wustl.edu');

//Provide your database login details here: //hostname, user name, password, database name and table name //note that the script will create the table (for example, fgusers in this case) //by itself on submitting register.php for the first time $fgmembersite->InitDB(/*hostname*/'localhost',

                     /*username*/'fake_user',
                     /*password*/'fake_password',
                     /*database name*/'securidoor_login',
                     /*table name*/'users_info');

$fgmembersite->SetRandomKey('qSRcVS6DrTzrPvr');

?>

  • I also spent .5 hours making a PowerPoint for our presentation.
  • Next week we aim to successfully transmit information between the Pi and the website.

Clayton

  • This week, I was able to boot up the Raspberry Pi after learning the correct tools to purchase in order to make this happen. In addition, I finalized the servo set-up for the Pi. In our meetings with TAs and Professor Feher, we feel that we are sufficiently moving forward on a good pace. Next week I will 3D print the Pi case and build the miniature door.

Week of October 9

Savannah

  • After thinking through the process of securing the site, I have decided to use our hosting platform's (web.com) site password protection. This will more closely mimic what a company does when selling a product that is tied to an online interface. Upon purchase of the product, the company gives the user a unique username and password (which can then be changed by the user). The hosting platform's security is much more robust than my original login system, which was susceptible to SQL injections and the like. Setting up password protection using the hosting platform took me 2 hours.
  • I also created a form where users can request a password change, should they forget the password given to them upon "purchase". Users input their Username, Email, and Lock ID (a unique code given to each lock) and a site administrator (me) will be notified. I linked this form to the main page of the site. This took 2 hours.

Clayton

  • I have continued to learn things that I need to purchase in order for the Pi to work. Several trips to micro-center later, I believe I am ready to boot up the Raspberry Pi.
  • Unfortunately, I will be in Denver for the Solar Decathlon at the end of this week and the beginning of next week. I will absolutely pick up the slack in the weeks after.

Week of October 16

Savannah

  • I spent 2 hours researching and learning about how to control a Raspberry Pi using a website. There was a wealth of information on the web, and I feel confident that we will be able to successfully control the Pi using our website.
  • I found source code online for how to control LEDs on a Pi using a website. I now have javascript, php, and html files that will be used to communicate with the Pi. I spent 3 hours reviewing these files and attempting to make modifications to the code to fit our project design goals.

Clayton

  • Again, the beginning of this week for me was spent in Denver for the solar decathlon, so I do not have as much hands-on progress to report.
  • I was able to research how the servo can be mounted as well as specifics for the code that will be used to code it. Once all that code is written, Savannah and I will be able to connect and begin putting the whole thing together.
  • By next Thursday, I should have the Raspberry Pi able to turn the servo and the casing model for the Pi ready to print.

Week of October 23

Savannah

  • I bought a new micro SD card, formatted the card, and installed NOOBS. I then wired and booted the the Pi, which turned on and booted correctly. I then began to download Raspbian. However, the Raspbian download would quit after only a short while. I then wiped the SD card, reformatted it, reinstalled NOOBS, and booted the Pi again. However, Raspbian still would not download. After several more attempts wiping the card and reinstalling the software, it still would not work. Even after trying with earlier versions of NOOBS, Raspbian still would not download. After 7 hours between Saturday and Sunday trying various fixes and calling in for reinforcements (our TA, Nathan), Nathan finally figured out that my power supply had been shorting out. I was then able to successfully download Raspbian.
  • I then dowloaded WiringPi, a package used to help control some of the input/output commands on the Pi. I spent 2 hours familiarizing myself with it and wiring a few different test circuits, which included successfully lighting an LED connected to the Pi (seen below).

Clayton

  • After a full week of testing my Pi and attempting to boot it with all the supplies, I realized that there was some problem with getting my Pi to work. It wasn't the SD card, the power supply, or any of the display. I was able to boot up Savannah's (the new) Raspberry Pi 3 and it worked with my SD card and power supply. Unfortunately, this means that my Pi does not work. For the rest of the semester, we will be working with the same Pi at different times.
  • In addition to figuring out the Pi/servo mess, I have begun work on a design to house the Pi and attach it to the "door". Hopefully I will get my design approved on Thursday and print it over the weekend. The next design I will make will be the device that attaches the servo to the deadbolt.

Week of October 30

Savannah

  • Over the weekend I caught the flu so I wasn't able to spend as much time in the lab working as I would have liked. I was still able to spend about 2 hours trying to communicate with the website and the pi, but was unsuccessful. However, I believe I have isolated the problem to an area of code on the html-side. With a few more hours of tinkering, I am confident that I can control the pi from the site.

Clayton

  • This week I have focused my time on 3 separate parts of our project. None of them resulted in a finished product, but I believe I will be very ready to complete all of them in the coming week.
  • First, I continued working with the servo code and how to get it to turn to a specific angle instead of using the slider. Tutorials online helped, but I will most likely need assistance from peers to get it to work perfectly. This took my about an hour and a half.
  • I also drew out some plans for how to keep the servo/breadboard portion of our device attached to the lock/wall. None of these are ready to be printed and are very rough sketches. I only spent about 30 minutes on this.
  • The most time spent this week has been on creating a solidworks model for a case for the Pi. I realized that I am not as fluent in solidworks as I thought I was, so it took a lot of time to get acquainted with the software again. After about 3 hours of work, I think I am very close to being able to print a design.

Week of November 6

Savannah

  • I spent 5 hours in the lab this week still trying to implement communications between the site and the Pi using SSH. I tried multiple different programs to do this, including Weaved (which never successfully worked) and Dataplicity (which did). However, after using the Dataplicity SSH, I realized that this program would not interface with the website and would require a website user to understand how to code on the Pi. This is not realistic, so I reached out to Professor Feher about alternative strategies.
  • Professor Feher agreed that SSH was not the way to go, and suggested using PHP, and pull/push scripts to communicate between the two. I spent 1.5 hours researching alternative methods and the kind of functions that each script will need to be able to pass the required information. Tomorrow (Thursday) I am meeting with a friend of Clayton's who was a CS major and will be able to help me write simple scripts that will enable pi-website communication.

Clayton

  • I have been in communication with friends of mine that can possibly give us a crash course on how to make the connection between the Pi and the website. We have already spent 30 minutes diagnosing the issue.
  • I also spent about an hour going through this website to plan our demo for the presentation day in class.
  • I am still waiting for the 3D printers to get up and running to finish my 3D mounting designs

Week of November 13

Savannah

  • This week I tried several different ways to communicate between the Pi and the site. First, I spent 4 hours setting up a working server on the Pi. This server allowed me to control the Pi from my computer, however, this was only able to happen on the local network, so I realized that I would have to come up with another way to communicate. After trying several different things (5 hours), Professor Feher spent an hour with me and helped set up an FTP connection on the Pi to get and put files from/to the site. I then was able to write two Python files: one that continuously checks a page on the site and downloads the text and another that sends an image to the site. I also wrote another page on the site that includes a form where a user selects whether they would like to lock or unlock their door. Their form response is written to a file (this is the file that the Pi downloads). This took 1 hour.


  • After getting the programs working and cleaning up the website (1 hour), I got a Pi camera from Nathan and adapted my Python script to send an image taken from the Pi camera. However, even with Nathan's help we were unable to get the Pi to detect the camera. We will try a different camera and see if we can get the Pi to recognize it.
  • Videos of both of these functions are shown here.

Clayton

  • Late last week I was able to finish the design for the Pi case and hopefully that has been/is being 3D printed. Finishing the design took about 2 hours. Design-wise, next I will be working on how to attach the servo to the door and connect it to the lock.
  • Door-wise, this week was a mess. After going to home depot to pick up my completed door, I found that the price I would have to pay was too great for the budget of the project. I will be going there today to figure out an alternative solution (most likely foam).
  • I was also able to get the servo to turn the lock. Video of this happening can be found below.

Week of November 27

Savannah

  • This week I spent about 1 hour designing our poster.
  • I wrote our group's tutorial, which is located here. This took 45 minutes.
  • Clayton and I spent an hour trying to combine our respective scripts into one. We did not successfully combine them and will work tomorrow (Thursday) to achieve this.


Clayton

  • Overall, this week I spent about 2 hours finalizing the locking code and designing the poster.