Who'sThere?

Made by nadityan

Found in DIoT 2018 1- Home Hack

Are you always skeptical about the activity in your house in your absence? Do you want real time updates on who is entering or leaving your house? 'Who'sThere?' lets you keep a track on the movement going on in your house by sending real time updates to your phone.

0

Problem Statement

Our landlord has an extra pair of keys to our house and constantly sends his handymen to fix small issues, in our absence. My room mate is very uncomfortable with strangers entering our house in our absence and she wishes to be notified every time someone enters the house. 'Who'sThere?' is for skeptical tenants like her, who need an update every time someone enters their house

0

Goal

The goal of this project is to be able to provide my room mate with real time notifications on her smartphone, every time someone leaves or enters the house. Using a PIR sensor, any motion at the house entrance is detected and with the help of IFTTT and Pushover app, this notification is sent to her smartphone real time.

0
0

Process

Using the precedents from hackster.io on Motion Sensors, I started building the motion sensor circuit first. I began with checking the motion sensor function using the LED and it did not function properly initially. I had mixed up the input pin and the voltage pin for the sensor due to which the circuit did not function properly. On connecting the input pin in between the voltage and ground pin, the sensor started functioning properly. Once the sensor started functioning well, I published the code and created an account in IFTTT. In IFTTT, 'this' was connected to Particle and 'that' was connected to Pushover. After downloading the Pushover app, I registered my phone as one of the devices on the Pushover website. Every time the event was published, a notification pops up on my phone, indicating motion in the specified area.

0

Parts

1 x Photon

1 x 10k ohm Resistor 

1 x PIR Sensor 

Wires

Breadboard

Online Services - Particle, IFTTT and Pushover

0
int inputPin = D0;              
int ledPin = D1;               
int pirState = LOW;            
int val = 0;                   

int calibrateTime = 10000;      
void setup()
{
  pinMode( ledPin, OUTPUT );
  pinMode(inputPin, INPUT);     
}

void loop()
{


  if ( calibrated() )
  {
  
    readTheSensor();

    
    reportTheData();
  }
}

void readTheSensor() {
  val = digitalRead(inputPin);
}

bool calibrated() {
  return millis() - calibrateTime > 0;
}

void reportTheData() {

  
  if (val == HIGH) {

    
    if (pirState == LOW) {
      
      Particle.publish("designingiot/s15/motion");
    
      pirState = HIGH;
      setLED( pirState );
    }
  } else {
    if (pirState == HIGH) {
    
      pirState = LOW;
      setLED( pirState );
    }
  }
}

void setLED( int state )
{
  digitalWrite( ledPin, state );
}
Click to Expand
0

Outcome 

When the sensor detects motion, the LED lights up and the published event is captured. Once the published event is captured, IFTTT sends a trigger to Pushover app which in turn sends a notification to the smartphone device connected. This way, my room mate can get a notification on her phone, everytime there is motion detected outside the home entrance door.


0

Reflections 

Through this project I learnt about sensors and their qualities. I experimented with various sensors such as Halleffect Sensor, Infrared Proximity Sensor, Temperature Sensor etc. Writing the code to check the sensor function and then publishing it was a very tedious yet informative step. Additionally, using IFTTT and Pushover to get the desired notification on the phone was extremely informative and opened up my knowledge about capturing published events on the phone. All in all, the entire experience has been very enriching and accomplishing. The projects that I came across at hackster.io have been very helpful in shaping and guiding my project.


x
Share this Project

Courses

49713 Designing for the Internet of Things

· 25 members

A hands-on introductory course exploring the Internet of Things and connected product experiences.


Focused on
About

Are you always skeptical about the activity in your house in your absence? Do you want real time updates on who is entering or leaving your house? 'Who'sThere?' lets you keep a track on the movement going on in your house by sending real time updates to your phone.

Created

January 25th, 2018