Amanjeet Kumar Mishra
Published

Door Detects --> Forced Entrance

When any unknown person tries to enter in your house without your prior knowledge the Door Forced Entrance system detects and sends an SMS.

IntermediateFull instructions provided3 hours300
Door Detects --> Forced Entrance

Things used in this project

Hardware components

PIR Motion Sensor (generic)
PIR Motion Sensor (generic)
×1
Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
SMS Messaging API
Twilio SMS Messaging API

Story

Read more

Custom parts and enclosures

Circuit connections

Code

Untitled file

Python
Python code for Door Detection system.
import conf, json, time, requests
from boltiot import Sms, Bolt

sms = Sms(conf.SID, conf.AUTH_TOKEN, conf.TO_NUMBER, conf.FROM_NUMBER)

while True:
    response = requests.get('http://cloud.boltiot.com/remote/xxxxxxxxxx/digitalRead?pin=0&deviceName=BOLTxxxxx')
    data json.loads(response.text)
    print(data)
    sensor_value = int(data['value'])
    if sensor_value == 1:
        print("MOTION DETECTED")
        print("AMANJEET")
        sms.send_sms("<< WARNING >>
Someone is trying to enter into your  house.")
    elif sensor_value ==0:
        print("SENSOR IS READY")
    time.sleep(5)

Credits

Amanjeet Kumar Mishra
2 projects • 0 followers
Contact

Comments

Please log in or sign up to comment.