SlideShare a Scribd company logo
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 06 | June 2019 www.irjet.net p-ISSN: 2395-0072
© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1400
Smart Door Security System using Raspberry Pi with Telegram
Shivani Desai1, Virendra D Pawar2
1Shivani Desai, Dept. of Computer Engineering, Vishwakarma Institute of Technology, Pune, Maharashtra
2Virendra D Pawar, Asst. Professor, Dept. of computer Engineering, Vishwakarma Institute of Technology, Pune,
Maharashtra
---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - In modern world, the IoT is at its peak. Theworld
is becoming smarter, the homeautomationisemerging. Smart
Door control system is a latest technology in home
automation. The main purpose of smart Door technology is to
provide a complete security to the door, ease and comfort for
users. The aim of this paper is to enlarge the door automation
technique using Raspberry pi andandroidphone. Raspberrypi
controls PIR sensor, camera module, bell button, whichis used
in detecting the motion of a arrival of a person, capturing an
image of a person as soon as the bell is being pressed and
sends the still image to the android device through telegram
app and alerts the owner about the person standing at the
door. The entire systems programminghasbeenestablishedin
python 3.5 domains for raspberry pi operations.
Key Words: IoT, Telegram, Raspberry pi, python, Putty,
Security
1. INTRODUCTION
In today’s era every “thing” has its unique identity that is
what IoT (Internet of Things) is. It enables the connectivity
with physical devices and allows user to transfer the data
across the world through the networks. The technology is
playing a vital role in day-to-days life. Likewise the security.
The main objective of this project is to build a system that
will control the door using a smart phone. This system
includes various components like a Raspberry Pi model B3
(Inbuilt-Wi-Fi), PIR Sensor, Bell, Camera Module and a
Telegram App for getting the notification on an Android
Device.
The Purpose of this system is that whenever the person
arrives in front of the door , the person’s motion is been
detected by a PIR sensor and as soon as he/she presses the
bell button, the camera captures the image and the still
image is sent on a telegram app of an android device. The
components are connected via raspberry pi which has an
internet connection through Wi-Fi.
The user can unlock the door with the help of a mobile
phone as soon as he/she gets notification. The user will
unlock the door if the person is known and will give
authentication to enter the house.
Now a day’s security plays a foremost role as per as high-
tech things are taken into the consideration “more the
technology, higher the security”. This paper procures the
security to the raspberry pi, to secure it from gettinghacked.
SSH keys (asymmetric cryptography) network security is
being used in this project. User can also use a FAIL2BAN
method to secure your raspberry pi.
2. LITERATURE REVIEW
Nareshkumar R.[1]This paper is related to design a home
based automation system using smart phone andRPIhaving
biometric system. It captures the images when sensed
through PIR sensor, and using GSM technology the
communication has been done between the system and a
computer.
Reeta R[2]This paper uses the Eigen face detection
technique, where image is been captured using a snippet
code detecting the features of a person, the captured images
are stored into the database and. Access is given to the
members particularly whose image is already in the
database , alert is send if unauthorized face is detectedusing
GSM.
Rishabh Kumar Gupta [3] This paper consist of remote
access control system, switch and the speaker is used for
interacting with the guest standing right outside at thedoor.
Zigbee module is designed to support wireless sensor
network. Image is captured to the primary host and if
needed then to the secondary host, so locking and unlocking
of door is done.
D.Kishore[4]This paper uses the Raspberry pi, PIR sensor
which captures the images, saves it on the system and sends
it through Email via TCP/IP. Entire system is built using
ARM1176JZF-S microcontroller, implementation is done on
smart phone using JavaScript.
3. SYSTEM OVERVIEW
Fig-1 Functional Block Diagram
Motion
Detected
Bell
Pressed
Sent on
Android
Image
Captured
User
notified
Person
known
Door
Unlocked
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 06 | June 2019 www.irjet.net p-ISSN: 2395-0072
© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1401
As shown in fig-1 The Motion is detected using PIR sensor,
and when bell is pressed still image is captured and sent to a
user on an android app ,user gets notified , and if the person
is known then the door is unlocked by the owner. System
requires following components:
1. Raspberry pi B3
2. PIR Sensor
3. Camera Module
4. Wi-Fi Module
5. Telegram App
1 Raspberry pi-3 Model B:
Fig-2 Raspberry pi-3 ModelB
Raspberry pi is a small credit card size computer, which acts
as a heart of the whole system. Its a BCM2837 processor,
System on chip (SoC) With an ARM having a CPU and GPU.
The CPU consist of Quad core ARM-Cortex A53, 64 bit.
Consisting of 1GB RAM. The RPI include a wireless
connectivity with802.11 wirelessLAN (Wi-Fi)andBluetooth
4.1, 4*USB 2.0 ports, a set of GPIO (2*20 pins) header. It also
has an audio jack, a camera interface,display interface,HDMI
port. It requires a power supply of min 2.5 A for glowing up
the repositioned Led’s. It has a small SD card slot at its back,
inserting the OS, other files import it in the card and then
export all the files and get started .Changes can be made as
per the requirements.
$sudo apt-get update && sudo apt-get update
$Sudo reboot
The above commands will help user to update the raspberry
pi and can proceed further to configure the pi.
2 PIR sensor:
Fig-3 PIR Sensor
PIR (Passive Infrared sensor) is an electronic component
that measures any kind of object (person / animal in the
field. The window behind the lens is made up of IR-
transmissive material. TheFresnel lenscondenseslightupto
some 6-7 meters and its highly sensitive. It has a pins
consisting of VCC, Ground and the Output. The output is
given to GPIO pins of Raspberry pi through 5V of power
supply to the VCC.
3 Camera Module
Fig-4 Camera Module
The camera module is a 5MP customized designed camera
for a raspberry pi. It has a small socket at the board named
as ‘Camera Interface’ situated between HDMI port and
Ethernet. Insert the camera module intoits slot,designed for
interfacing a camera. This module allows the user tocapture
the still images and also to record a video in full HD. When
the picture is taken its camera preview is opened for few
seconds, using python coding adjust the resolution andsend
the image to an android app.
“Sudo raspi-config” is the command which allows you to
enable the camera module on raspberry pi.
4 Wi-Fi Module:
Wi-Fi is a wireless technology that provides high speed
connectivity. It is trademarked as IEEE 802.11x. it is
supported by many applications such as videogames , home
networks , mobile phone etc. The Wi-Fi is the mostfavorable
choice for IoT now days which will increase the speed of
connecting the network worldwide. In this system the
Raspberry pi has a in-built Wi-Fi, hence accessing it from
anywhere, controlling the raspberry pi
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 06 | June 2019 www.irjet.net p-ISSN: 2395-0072
© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1402
5 Telegram App on Android Phone:
Fig-5 Telegram App
The telegram app is heavily encrypted app. It delivers the
messages, images, documents, files faster than other apps.It
is highly secured from attackers, as it has end – to end
encryption and it is a cloud based app. It can be accessed
from multiple devices as well. It also procures a “Secret
Chat” facility which has self destructing feature.
4. METHODOLOGY
When the person arrives at a home and stands in the front
on the door, he/she will get detected byPIR motiondetector,
Led glows as motion is detected, ThePIR sensorisconnected
to raspberry pi, it has three pins. The GND pin is connected
to GND of RPI, VCC is connected to 5V and the output is
connected with any GPIO pin. As soon as the person will
press the bell the image is captured with the help of a
camera module. The push button is used as a switch,
inserted in a breadboard, one wire is connected with GND
and other is connected to some GPIO pin. The image of a
person is captured and stored in a RPI andimmediatelysend
on an android phone, whenever the bell is pressed. The CLI-
Telegram is used on an mobile phone, Linux commands are
used for the installation process, since telegram is highly
secured app, has various features like Secret chat, hasendto
end encryption and also can send data and files up to 1.5 GB.
User need to add the contact details while installation
process , the data will be save in the script call tg.sh and the
photos will be saved in a script tg_photo.sh , thesescriptsare
saved in home/pi/tg.
Then after the still image is been sent, the user will unlock
the door if the person is known. The unlocking of door is
done when a user presses ‘’1” on a telegram itwill unlock the
door.
The requirement of this projects include a Raspberry pi
model 3B having a SD card which has a Raspbian OS , a
switch , a camera module of 5Mp , a PIR sensor and an
android phone with installation of an telegram app in it. It
also requires a power supply of 1.5A to even 2A, a USB cable.
The coding is done in python having a python IDLE version
3.6. The necessary modules and libraries are also imported.
The Network security is playing a Vital role, the PUTTY and
PUTTY GEN are used for SSH (secure shell) The SSH key is
generated using a asymmetric cipher i.e. generation one
public and private key. The public key can be shared among
users, while a private key remains with the owner.
5. FLOWCHART AND ALGORITHM
No
No Yes
Yes
No Yes
Intruder Detected
Door remain
close
PIR
Sensor
Person Arrives
Start
Initialize Raspberry pi,
Camera, PIR sensor, Bell
Button
Bell
presse
d
Image Sent & user notified
on mobile phone
User
choice
Unlock the
door
Stop
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 06 | June 2019 www.irjet.net p-ISSN: 2395-0072
© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1403
1. Start
2. Initialize Raspberry pi, camera module, PIR sensor,
Bell Button etc
3. If person arrives, he/she will get detected by PIR
sensor
4. If the person presses the bell, then the image is
captured by the camera and will send a notification
and a snap on a smart phone.
5. The telegram app is been used to get the
notification on a smart phone.
6. The snap is sent, it’s a user choice to open a door or
to keep it close.
7. Stop.
Fig-6 Complete Setup
6. NETWORK SECURITY
SSH (Secure Shell) is a cryptographic Network protocol
which is used for securing a raspberry pi.
SSH uses an Asymmetric Cipher an algorithm that performs
encryption and decryption.
As SSH key has a user name and password which can be
stolen in the middle, but the SSH generates a pair of key:
Public and Private Key.
The data can be encrypted by using a user’s public key and
can be only decrypted by the private key.
In this project Putty and putty Generator are used for
generating the SSH for securing a raspberry pi
HOW TO SECURE RPI USING SSH:
1. Download Putty and key Generator.
2. Select key generator and click on “import- key”.
3. Generate the passphrase.
4. Putty will generate the public and private key
5. Save the private key with .ppk file
6. Now open the Putty and enter the host name, select SSH-
> authentication -> browse the private key and close it.
User must change the default “User name” and “Password”
$sudo raspi-config
Improve SSH security by using the following command -
$sudo nano /etc/ssh /sshd_config
User can make a use of FAIL2BAN, it is an intrusion
prevention software framework that protects computer
servers from malicious attacks, hence improves the security
of the Raspberry pi
It scans log files and bans IPs which are showing the
malicious signs, which make too many log in attempts or
performs unwanted activity.
HOW TO SET UP FAIL2BAN IN RPI?
Step1:$sudo apt-get installs fail2ban
During installation create a file “jail.conf”
Step2:$sudo
cp/etc/fail2ban/jail.conf/etc/fail2ban/jail.local
Step3: open file in nano editor:
sudo nano /etc/fail2ban/jail.local
Step4: within that use CTRL + W and search sshd
Type: enable = true
Filter =sshd
This shall process and enable the fail2ban and configure it.
7. CONCLUSION
We have a designed a smart system which reduces the
human efforts and provide the ease to operate the Smart
door, can access it from any corner of the world, providing a
good security. It is easy to upgrade, portable.Thesmartdoor
lock system using telegram is very efficient technique, which
allows the user to grant the access to the known person by
sending a back message to RPI and unlock the door. The
system uses various components like PIR sensor, camera
module, switch and telegram app on an android phone. The
networks security is also playing a vital role so that
raspberry pi could not be hacked. The coding is done using
python language and installation of a telegram is done using
CLI Telegram and some concept of Linux The networks
security is also playing a vital role so that raspberry pi could
not be hacked. The SSH key is used, which provides a good
network security. The Fail2ban software can also be used as
an additional security to Raspberry pi.
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 06 Issue: 06 | June 2019 www.irjet.net p-ISSN: 2395-0072
© 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1404
REFERENCES
[1] Nareshkumar R. M.,Dnyaneshvari Shinde,- Smart Door
Security Control System Using Raspberry Pi Volume 6,
2347 – 8616 Issue 11 November 2017
[2] Reeta R -Smart Secure Door Lock System Using IoT And
Eigenface Approach,Volume 5, Issue 4 December 2017,
2320-2882
[3] Rishabh Kumar Gupta, S. Balamurugan, K. Aroul-IoT
Based Door Entry System Vol 9(37), DOI:
10.17485/ijst/2016/v9i37/102136,October2016,0974-
6846
[4] D.Kishore ,Shaik Anwar-Iot Based smart Home Security
System with Alert Door And Access Control UsingSmart
phone, vol-5 Issue 12,December 2016,2278-0181

More Related Content

PPTX
IoT Based Home Automation System Presantation
PDF
Voice Control Home Automation
PPTX
Home automation ppt
PPTX
Home Automation System using iot
PPTX
ppt on accident detection system based on Iot
PPTX
Home automation- An Iot application
PDF
Project ideas ece students
PPTX
Home automation based iot
IoT Based Home Automation System Presantation
Voice Control Home Automation
Home automation ppt
Home Automation System using iot
ppt on accident detection system based on Iot
Home automation- An Iot application
Project ideas ece students
Home automation based iot

What's hot (20)

PDF
Latest Seminar Topics for Engineering,MCA,MSc Students
PPTX
Humidity & Temperature monitoring using arduino
PPTX
Home automation
PPT
Home automation in client server using NodeMcu approach along with user notif...
PPTX
Home automation using blynk app with fan direction control and displaying sta...
PPTX
Embedded web technology
PPTX
Internet of Things (IoT) Based Smart Security & Home Automation System.
PPTX
Home automation using wifi
PPTX
Smart quill ppt
DOCX
Wireless E-Notice Board Using Bluetooth Report.docx
PPTX
Home automation using IoT
DOCX
Smart car parking system
PPT
Arduino Platform with C programming.
PPT
Voice Control Home Automation
DOCX
smart street light system using IOT
PDF
ESP32 CAM Face Detection Door Lock
PPTX
Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
PPTX
Smart DoorBell - Make your door smart with Raspberry Pi!
PPTX
Password based door locking system
PPTX
Security in an embedded system
Latest Seminar Topics for Engineering,MCA,MSc Students
Humidity & Temperature monitoring using arduino
Home automation
Home automation in client server using NodeMcu approach along with user notif...
Home automation using blynk app with fan direction control and displaying sta...
Embedded web technology
Internet of Things (IoT) Based Smart Security & Home Automation System.
Home automation using wifi
Smart quill ppt
Wireless E-Notice Board Using Bluetooth Report.docx
Home automation using IoT
Smart car parking system
Arduino Platform with C programming.
Voice Control Home Automation
smart street light system using IOT
ESP32 CAM Face Detection Door Lock
Bidirectional Visitor Counter using IR sensors and Arduino Uno R3
Smart DoorBell - Make your door smart with Raspberry Pi!
Password based door locking system
Security in an embedded system
Ad

Similar to IRJET- Smart Door Security System using Raspberry Pi with Telegram (20)

PPTX
IOT in security camera and door unlock system
PDF
Development of Smart Home security system using Raspberry Pi
PDF
Smart Door Monitoring and Locking system
PDF
Home Automation System using Raspberry Pi
PDF
IRJET - IoT based Anti Theft Detection and Alerting System using Raspberry Pi
PDF
AUTOMATIC DOOR UNLOCK WITH FACIAL RECOGNITION USING IoT
PDF
IRJET - Smart Door System
PDF
IoT Assisted Fingerprint Based Door Security System using Raspberry PI 4
PDF
IRJET - Raspberry Pi based Intelligent Security System
PDF
IRJET- Secure Buddy: An Intelligent Door Lock
PDF
IOT BASED ROBOTIC CAR USING RASPBERRY
PDF
S.W.A.T – Motion Based Intrusion Detection System
PDF
Comparative Study on Various System Based on Raspberry-Pi Technology
PDF
IRJET- Motion Activated Security System
PDF
IRJEWT-An Intelligent Remote Controlled System for Smart Home Automation
PDF
Designing Of Multifunctional Surveillance And Security System
PDF
Embedded Web Server based Home Automation using Raspberry PI
PDF
IRJET- An Intelligent Remote Controlled System for Smart Home Automation
PDF
final SRE POSTER
PDF
IOT: Home Automation using Android Application
IOT in security camera and door unlock system
Development of Smart Home security system using Raspberry Pi
Smart Door Monitoring and Locking system
Home Automation System using Raspberry Pi
IRJET - IoT based Anti Theft Detection and Alerting System using Raspberry Pi
AUTOMATIC DOOR UNLOCK WITH FACIAL RECOGNITION USING IoT
IRJET - Smart Door System
IoT Assisted Fingerprint Based Door Security System using Raspberry PI 4
IRJET - Raspberry Pi based Intelligent Security System
IRJET- Secure Buddy: An Intelligent Door Lock
IOT BASED ROBOTIC CAR USING RASPBERRY
S.W.A.T – Motion Based Intrusion Detection System
Comparative Study on Various System Based on Raspberry-Pi Technology
IRJET- Motion Activated Security System
IRJEWT-An Intelligent Remote Controlled System for Smart Home Automation
Designing Of Multifunctional Surveillance And Security System
Embedded Web Server based Home Automation using Raspberry PI
IRJET- An Intelligent Remote Controlled System for Smart Home Automation
final SRE POSTER
IOT: Home Automation using Android Application
Ad

More from IRJET Journal (20)

PDF
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
PDF
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
PDF
Kiona – A Smart Society Automation Project
PDF
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
PDF
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
PDF
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
PDF
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
PDF
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
PDF
BRAIN TUMOUR DETECTION AND CLASSIFICATION
PDF
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
PDF
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
PDF
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
PDF
Breast Cancer Detection using Computer Vision
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
PDF
Auto-Charging E-Vehicle with its battery Management.
PDF
Analysis of high energy charge particle in the Heliosphere
PDF
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Enhanced heart disease prediction using SKNDGR ensemble Machine Learning Model
Utilizing Biomedical Waste for Sustainable Brick Manufacturing: A Novel Appro...
Kiona – A Smart Society Automation Project
DESIGN AND DEVELOPMENT OF BATTERY THERMAL MANAGEMENT SYSTEM USING PHASE CHANG...
Invest in Innovation: Empowering Ideas through Blockchain Based Crowdfunding
SPACE WATCH YOUR REAL-TIME SPACE INFORMATION HUB
A Review on Influence of Fluid Viscous Damper on The Behaviour of Multi-store...
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...
Explainable AI(XAI) using LIME and Disease Detection in Mango Leaf by Transfe...
BRAIN TUMOUR DETECTION AND CLASSIFICATION
The Project Manager as an ambassador of the contract. The case of NEC4 ECC co...
"Enhanced Heat Transfer Performance in Shell and Tube Heat Exchangers: A CFD ...
Advancements in CFD Analysis of Shell and Tube Heat Exchangers with Nanofluid...
Breast Cancer Detection using Computer Vision
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
A Novel System for Recommending Agricultural Crops Using Machine Learning App...
Auto-Charging E-Vehicle with its battery Management.
Analysis of high energy charge particle in the Heliosphere
Wireless Arduino Control via Mobile: Eliminating the Need for a Dedicated Wir...

Recently uploaded (20)

PDF
Digital Logic Computer Design lecture notes
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
PPT on Performance Review to get promotions
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
bas. eng. economics group 4 presentation 1.pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
additive manufacturing of ss316l using mig welding
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
Lecture Notes Electrical Wiring System Components
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PPTX
Construction Project Organization Group 2.pptx
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Digital Logic Computer Design lecture notes
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PPT on Performance Review to get promotions
UNIT-1 - COAL BASED THERMAL POWER PLANTS
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
bas. eng. economics group 4 presentation 1.pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
UNIT 4 Total Quality Management .pptx
additive manufacturing of ss316l using mig welding
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Internet of Things (IOT) - A guide to understanding
CYBER-CRIMES AND SECURITY A guide to understanding
CH1 Production IntroductoryConcepts.pptx
Lecture Notes Electrical Wiring System Components
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Foundation to blockchain - A guide to Blockchain Tech
Construction Project Organization Group 2.pptx
Embodied AI: Ushering in the Next Era of Intelligent Systems
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS

IRJET- Smart Door Security System using Raspberry Pi with Telegram

  • 1. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 06 Issue: 06 | June 2019 www.irjet.net p-ISSN: 2395-0072 © 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1400 Smart Door Security System using Raspberry Pi with Telegram Shivani Desai1, Virendra D Pawar2 1Shivani Desai, Dept. of Computer Engineering, Vishwakarma Institute of Technology, Pune, Maharashtra 2Virendra D Pawar, Asst. Professor, Dept. of computer Engineering, Vishwakarma Institute of Technology, Pune, Maharashtra ---------------------------------------------------------------------***--------------------------------------------------------------------- Abstract - In modern world, the IoT is at its peak. Theworld is becoming smarter, the homeautomationisemerging. Smart Door control system is a latest technology in home automation. The main purpose of smart Door technology is to provide a complete security to the door, ease and comfort for users. The aim of this paper is to enlarge the door automation technique using Raspberry pi andandroidphone. Raspberrypi controls PIR sensor, camera module, bell button, whichis used in detecting the motion of a arrival of a person, capturing an image of a person as soon as the bell is being pressed and sends the still image to the android device through telegram app and alerts the owner about the person standing at the door. The entire systems programminghasbeenestablishedin python 3.5 domains for raspberry pi operations. Key Words: IoT, Telegram, Raspberry pi, python, Putty, Security 1. INTRODUCTION In today’s era every “thing” has its unique identity that is what IoT (Internet of Things) is. It enables the connectivity with physical devices and allows user to transfer the data across the world through the networks. The technology is playing a vital role in day-to-days life. Likewise the security. The main objective of this project is to build a system that will control the door using a smart phone. This system includes various components like a Raspberry Pi model B3 (Inbuilt-Wi-Fi), PIR Sensor, Bell, Camera Module and a Telegram App for getting the notification on an Android Device. The Purpose of this system is that whenever the person arrives in front of the door , the person’s motion is been detected by a PIR sensor and as soon as he/she presses the bell button, the camera captures the image and the still image is sent on a telegram app of an android device. The components are connected via raspberry pi which has an internet connection through Wi-Fi. The user can unlock the door with the help of a mobile phone as soon as he/she gets notification. The user will unlock the door if the person is known and will give authentication to enter the house. Now a day’s security plays a foremost role as per as high- tech things are taken into the consideration “more the technology, higher the security”. This paper procures the security to the raspberry pi, to secure it from gettinghacked. SSH keys (asymmetric cryptography) network security is being used in this project. User can also use a FAIL2BAN method to secure your raspberry pi. 2. LITERATURE REVIEW Nareshkumar R.[1]This paper is related to design a home based automation system using smart phone andRPIhaving biometric system. It captures the images when sensed through PIR sensor, and using GSM technology the communication has been done between the system and a computer. Reeta R[2]This paper uses the Eigen face detection technique, where image is been captured using a snippet code detecting the features of a person, the captured images are stored into the database and. Access is given to the members particularly whose image is already in the database , alert is send if unauthorized face is detectedusing GSM. Rishabh Kumar Gupta [3] This paper consist of remote access control system, switch and the speaker is used for interacting with the guest standing right outside at thedoor. Zigbee module is designed to support wireless sensor network. Image is captured to the primary host and if needed then to the secondary host, so locking and unlocking of door is done. D.Kishore[4]This paper uses the Raspberry pi, PIR sensor which captures the images, saves it on the system and sends it through Email via TCP/IP. Entire system is built using ARM1176JZF-S microcontroller, implementation is done on smart phone using JavaScript. 3. SYSTEM OVERVIEW Fig-1 Functional Block Diagram Motion Detected Bell Pressed Sent on Android Image Captured User notified Person known Door Unlocked
  • 2. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 06 Issue: 06 | June 2019 www.irjet.net p-ISSN: 2395-0072 © 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1401 As shown in fig-1 The Motion is detected using PIR sensor, and when bell is pressed still image is captured and sent to a user on an android app ,user gets notified , and if the person is known then the door is unlocked by the owner. System requires following components: 1. Raspberry pi B3 2. PIR Sensor 3. Camera Module 4. Wi-Fi Module 5. Telegram App 1 Raspberry pi-3 Model B: Fig-2 Raspberry pi-3 ModelB Raspberry pi is a small credit card size computer, which acts as a heart of the whole system. Its a BCM2837 processor, System on chip (SoC) With an ARM having a CPU and GPU. The CPU consist of Quad core ARM-Cortex A53, 64 bit. Consisting of 1GB RAM. The RPI include a wireless connectivity with802.11 wirelessLAN (Wi-Fi)andBluetooth 4.1, 4*USB 2.0 ports, a set of GPIO (2*20 pins) header. It also has an audio jack, a camera interface,display interface,HDMI port. It requires a power supply of min 2.5 A for glowing up the repositioned Led’s. It has a small SD card slot at its back, inserting the OS, other files import it in the card and then export all the files and get started .Changes can be made as per the requirements. $sudo apt-get update && sudo apt-get update $Sudo reboot The above commands will help user to update the raspberry pi and can proceed further to configure the pi. 2 PIR sensor: Fig-3 PIR Sensor PIR (Passive Infrared sensor) is an electronic component that measures any kind of object (person / animal in the field. The window behind the lens is made up of IR- transmissive material. TheFresnel lenscondenseslightupto some 6-7 meters and its highly sensitive. It has a pins consisting of VCC, Ground and the Output. The output is given to GPIO pins of Raspberry pi through 5V of power supply to the VCC. 3 Camera Module Fig-4 Camera Module The camera module is a 5MP customized designed camera for a raspberry pi. It has a small socket at the board named as ‘Camera Interface’ situated between HDMI port and Ethernet. Insert the camera module intoits slot,designed for interfacing a camera. This module allows the user tocapture the still images and also to record a video in full HD. When the picture is taken its camera preview is opened for few seconds, using python coding adjust the resolution andsend the image to an android app. “Sudo raspi-config” is the command which allows you to enable the camera module on raspberry pi. 4 Wi-Fi Module: Wi-Fi is a wireless technology that provides high speed connectivity. It is trademarked as IEEE 802.11x. it is supported by many applications such as videogames , home networks , mobile phone etc. The Wi-Fi is the mostfavorable choice for IoT now days which will increase the speed of connecting the network worldwide. In this system the Raspberry pi has a in-built Wi-Fi, hence accessing it from anywhere, controlling the raspberry pi
  • 3. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 06 Issue: 06 | June 2019 www.irjet.net p-ISSN: 2395-0072 © 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1402 5 Telegram App on Android Phone: Fig-5 Telegram App The telegram app is heavily encrypted app. It delivers the messages, images, documents, files faster than other apps.It is highly secured from attackers, as it has end – to end encryption and it is a cloud based app. It can be accessed from multiple devices as well. It also procures a “Secret Chat” facility which has self destructing feature. 4. METHODOLOGY When the person arrives at a home and stands in the front on the door, he/she will get detected byPIR motiondetector, Led glows as motion is detected, ThePIR sensorisconnected to raspberry pi, it has three pins. The GND pin is connected to GND of RPI, VCC is connected to 5V and the output is connected with any GPIO pin. As soon as the person will press the bell the image is captured with the help of a camera module. The push button is used as a switch, inserted in a breadboard, one wire is connected with GND and other is connected to some GPIO pin. The image of a person is captured and stored in a RPI andimmediatelysend on an android phone, whenever the bell is pressed. The CLI- Telegram is used on an mobile phone, Linux commands are used for the installation process, since telegram is highly secured app, has various features like Secret chat, hasendto end encryption and also can send data and files up to 1.5 GB. User need to add the contact details while installation process , the data will be save in the script call tg.sh and the photos will be saved in a script tg_photo.sh , thesescriptsare saved in home/pi/tg. Then after the still image is been sent, the user will unlock the door if the person is known. The unlocking of door is done when a user presses ‘’1” on a telegram itwill unlock the door. The requirement of this projects include a Raspberry pi model 3B having a SD card which has a Raspbian OS , a switch , a camera module of 5Mp , a PIR sensor and an android phone with installation of an telegram app in it. It also requires a power supply of 1.5A to even 2A, a USB cable. The coding is done in python having a python IDLE version 3.6. The necessary modules and libraries are also imported. The Network security is playing a Vital role, the PUTTY and PUTTY GEN are used for SSH (secure shell) The SSH key is generated using a asymmetric cipher i.e. generation one public and private key. The public key can be shared among users, while a private key remains with the owner. 5. FLOWCHART AND ALGORITHM No No Yes Yes No Yes Intruder Detected Door remain close PIR Sensor Person Arrives Start Initialize Raspberry pi, Camera, PIR sensor, Bell Button Bell presse d Image Sent & user notified on mobile phone User choice Unlock the door Stop
  • 4. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 06 Issue: 06 | June 2019 www.irjet.net p-ISSN: 2395-0072 © 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1403 1. Start 2. Initialize Raspberry pi, camera module, PIR sensor, Bell Button etc 3. If person arrives, he/she will get detected by PIR sensor 4. If the person presses the bell, then the image is captured by the camera and will send a notification and a snap on a smart phone. 5. The telegram app is been used to get the notification on a smart phone. 6. The snap is sent, it’s a user choice to open a door or to keep it close. 7. Stop. Fig-6 Complete Setup 6. NETWORK SECURITY SSH (Secure Shell) is a cryptographic Network protocol which is used for securing a raspberry pi. SSH uses an Asymmetric Cipher an algorithm that performs encryption and decryption. As SSH key has a user name and password which can be stolen in the middle, but the SSH generates a pair of key: Public and Private Key. The data can be encrypted by using a user’s public key and can be only decrypted by the private key. In this project Putty and putty Generator are used for generating the SSH for securing a raspberry pi HOW TO SECURE RPI USING SSH: 1. Download Putty and key Generator. 2. Select key generator and click on “import- key”. 3. Generate the passphrase. 4. Putty will generate the public and private key 5. Save the private key with .ppk file 6. Now open the Putty and enter the host name, select SSH- > authentication -> browse the private key and close it. User must change the default “User name” and “Password” $sudo raspi-config Improve SSH security by using the following command - $sudo nano /etc/ssh /sshd_config User can make a use of FAIL2BAN, it is an intrusion prevention software framework that protects computer servers from malicious attacks, hence improves the security of the Raspberry pi It scans log files and bans IPs which are showing the malicious signs, which make too many log in attempts or performs unwanted activity. HOW TO SET UP FAIL2BAN IN RPI? Step1:$sudo apt-get installs fail2ban During installation create a file “jail.conf” Step2:$sudo cp/etc/fail2ban/jail.conf/etc/fail2ban/jail.local Step3: open file in nano editor: sudo nano /etc/fail2ban/jail.local Step4: within that use CTRL + W and search sshd Type: enable = true Filter =sshd This shall process and enable the fail2ban and configure it. 7. CONCLUSION We have a designed a smart system which reduces the human efforts and provide the ease to operate the Smart door, can access it from any corner of the world, providing a good security. It is easy to upgrade, portable.Thesmartdoor lock system using telegram is very efficient technique, which allows the user to grant the access to the known person by sending a back message to RPI and unlock the door. The system uses various components like PIR sensor, camera module, switch and telegram app on an android phone. The networks security is also playing a vital role so that raspberry pi could not be hacked. The coding is done using python language and installation of a telegram is done using CLI Telegram and some concept of Linux The networks security is also playing a vital role so that raspberry pi could not be hacked. The SSH key is used, which provides a good network security. The Fail2ban software can also be used as an additional security to Raspberry pi.
  • 5. International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056 Volume: 06 Issue: 06 | June 2019 www.irjet.net p-ISSN: 2395-0072 © 2019, IRJET | Impact Factor value: 7.211 | ISO 9001:2008 Certified Journal | Page 1404 REFERENCES [1] Nareshkumar R. M.,Dnyaneshvari Shinde,- Smart Door Security Control System Using Raspberry Pi Volume 6, 2347 – 8616 Issue 11 November 2017 [2] Reeta R -Smart Secure Door Lock System Using IoT And Eigenface Approach,Volume 5, Issue 4 December 2017, 2320-2882 [3] Rishabh Kumar Gupta, S. Balamurugan, K. Aroul-IoT Based Door Entry System Vol 9(37), DOI: 10.17485/ijst/2016/v9i37/102136,October2016,0974- 6846 [4] D.Kishore ,Shaik Anwar-Iot Based smart Home Security System with Alert Door And Access Control UsingSmart phone, vol-5 Issue 12,December 2016,2278-0181