Achiket Kumar
Published © GPL3+

Intrusion Detection Alert System

Intrusion detection by the help of the PIR sensor. Whenever someone tries to come in signal will found in the form of a text message.

IntermediateFull instructions provided1,531
Intrusion Detection Alert System

Things used in this project

Hardware components

PIR Motion Sensor (generic)
PIR Motion Sensor (generic)
Bolt WiFi Module
Bolt IoT Bolt WiFi Module
Male/Female Jumper Wires
Male/Female Jumper Wires
Micro-USB to USB Cable (Generic)
Micro-USB to USB Cable (Generic)
60W PCIe 12V 5A Power Supply
Digilent 60W PCIe 12V 5A Power Supply

Software apps and online services

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


Read more


Complete Python Code

import conf, json, time, requests #importing libraries 
from boltiot import Sms, Bolt 

SID = 'You can find SID in your Twilio Dashboard' 
AUTH_TOKEN = 'You can find  on your Twilio Dashboard' 
FROM_NUMBER = 'This is the no. generated by Twilio. You can find this on your Twilio Dashboard'
TO_NUMBER = 'This is your number. Make sure you are adding +91 in beginning'
API_KEY = 'This is your Bolt Cloud accout API key'
DEVICE_ID = 'This is the ID of your Bolt device' 

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

while True: 
    response = requests.get('')
    data=json.loads(response.text) #loding and storing the value
    sensor_value = int(data['value'])
    if sensor_value == 1: #value is high
        print("MOTION DETECTED")
        print("sending SMS")
        sms.send_sms("SOMEONE ENTERED")
    elif sensor_value ==0: #Value is low
        print("SENSOR IS READY")
    time.sleep(5) #Time interval in seconds to check the intrusion


Achiket Kumar

Achiket Kumar

12 projects • 3 followers
I am a Computer Science student from Indian Institute of Information Technology, Kalyani


Add projectSign up / Login