Close

Update 1 - A Start

A project log for Smart Lock with Web Interface

Raspberry Pi based smart lock for apartment dwellers

chrisChris 10/13/2017 at 14:290 Comments

I am out of the country right now (and my parts supply is at home), so it will be the end of November before I have all the components necessary to finish. Nonetheless, most of the work here will be building a functional front end so the end result is more than just a hack.

There general task here will be to build a Rails app that allows an administrator to create users, enforce scheduled access, and log all access. I will then use an additional Rails GEM to control the gpio pins on the RPi to actuate some solenoids to physically control the smart home system below:

I will need two separate actuators because I need to press the "Intercom" button and then the "Open Door" button. I considered cheating here by pressing both locations with one actuator, but the system will only respond to one touchpoint.

I'll have to MOSFETs between the RPi and the solenoids to keep anything from burning out...supposedly these solenoid can drawn up to 700mA. We also shouldn't have any issue with the 3.3 pins on the RPi triggering the MOSFETs.

On the software side, I'll basically be running a stock Raspian image + Ruby on Rails + a Dynamic DNS Updater. I've never cared for setting these up with a screen and keyboard, so I'll plug in via USB directly and configure over SSH.

On the coding front, I'm making liberal use of some generators from a prior app development course. Full info is at https://guides.firstdraft.com. I'm using a couple of tools here:

1. "Starter" generators to create my basic controllers, views, and routes.
2. https://ideas.firstdraft.com/ to develop my DB structure as below:

3. Devise for the admin authentication.
4. Bootstrap for the theme.

Discussions