Skip to content

A full-stack IoT Security Door sensor for Raspberry Pi Zero W developed for CMP408-System Internals and Cybersecurity at the University of Abertay Dundee.

Notifications You must be signed in to change notification settings

notdeclan/raspberry-pi-security-door

Repository files navigation

IoT Security Door Sensor

image

A full-stack IoT Security Door sensor for Raspberry Pi Zero W developed for CMP408-System Internals and Cybersecurity at the University of Abertay Dundee. The aim of this project was to develop a prototype home security system that detects when doors are opened and raise an alarm if the system is armed. The security device is able to be remotely monitored from the cloud using various AWS Services.

Demonstration Video

Hardware and Kernel

Hardware and Kernel The device required 4 separate external hardware devices connected via GPIO.

  • Keypad
  • Door Sensor
  • OLED Display
  • Passive Buzzer

To communicate between the hardware and user space, a Linux Loadable Kernel Module was developed to read the GPIO data from the Door Sensor. When an interrupt is detected, a signal is sent to the user space application using signals which is registered using IOCTL. Finally, SysFS is used to read the updated value from the GPIO.

User Space

The user space application is responsible for handling input on the device from hardware, such as the Keypad and the Door Sensor, as well as outputting data to the connected OLED display.

The user space application is also responsible for handling communication to and from the cloud using IoT Core and MQTT. To allow user monitoring, updates are sent from the user space application at regular intervals, and when a user makes a remote change to the device it is handled.

To increase device security, the udev rule was added to allow the application to communicate with the kernel’s device file, and SysFS without sudeor permissions.

Displays

Device Startup Setup Mode Information Passcode Entry
This screen is displayed when the device is powering on, and connecting to the MQTT Server. When the device has been powered on for the first time, it waits until the ID number has been registered on the web panel before starting. When the device is setup and powered on the information screen displays where the device is armed, the time, and the device ID. When the user is typing a passcode on the keypad, each key is displayed on the screen.
image image image image

Cloud

To provide high availability, low latency cloud access to the devices state, 6 different AWS Services were used together. Users authenticate to the web panel hosted on Elastic Beanstalk using Cognito, all traffic is encrypted using TLS. Once logged into the web panel user actions which influence the device are sent using Web Sockets to API Gateway which is then forwarded to Lambda to send the data to the connected device in IoT Core. All communication from the device to the Cloud is handled using IoT Core and sent using MQTT.

image

User Panel

Add Device

image

Dashboard

image

Future Work

  • Creation of a complete firmware image
  • Increased Security
  • Multiple Device Support
  • More Hardware communication in Kernel Module

About

A full-stack IoT Security Door sensor for Raspberry Pi Zero W developed for CMP408-System Internals and Cybersecurity at the University of Abertay Dundee.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published