Close
0%
0%

Home Monitoring System

A Raspberry Pi and Arduino home monitoring system with text alerts, environmental status webpage, power outage monitoring, smoke alarm, etc.

Similar projects worth following
The Home Monitoring System project successfully addresses issues of home security and provides the user with information about their home that they may not otherwise have access to. The system provides enhanced home security via text message alerts when doors open. Further security is provided by a complex smoke alarm capable of turning on lights, unlocking a door, and alerting the user via text message if smoke is detected. To provide the user with information about their home various aspects of the home are monitored. These include information about the environment, power outages, and light usage. This information is then displayed on a webpage. Ultimately, the project is a fully functional system and works as intended.

Review of Objectives

The objective of this project was the design and creation of a home monitoring system. It has several sensors throughout the home, which measure various quantities and report them to a Raspberry Pi. The Raspberry Pi then presents this data on a webpage, which allows for viewing of information on trends occurring in the home. It also functions as an alert system that makes the user aware of any unauthorized entry to the home or the presence of fire. In the case of fire, the system also controls parts of the home to both unlock a door and turn on lights.

Review of Deliverables

The deliverables for this project included monitoring aspects of the home, control systems for the home, hosting a website, and acting as an alert system. The deliverables related to monitoring the home included gathering information on light usage. As well as the air quality, temperature, and humidity in the home. Occurrences of power outages were also to be monitored. Detecting whether doors are open or closed was also required. Finally, the system would also detect the presence of smoke. The control system deliverables for the home included engaging and disengaging an electromagnetic lock and turning on and off lights. These controls were also to be used to cause the lights to come on and the lock to disengage if a fire were detected. The website was to be created to display the aspects of the home being monitored and to display them in a user-friendly manner. Finally, the system was to act as an alert system such the user is informed when a door to the home opens.

Technical Implementation

The first step in creating this project was setting up the Raspberry Pi 3 B+, and ensuring that it would boot successfully. Next, the BME680 sensor was attached to the Raspberry Pi. This task required soldering female headers to the BME680, and then connecting wires from these headers to their appropriate pins on the Raspberry Pi. In order, these pins are 1,3,5, 7, and 9. These specific pins were selected as they provide the sensor both power and I2C communication with the Raspberry Pi.

A program was written in Python to read the environmental information sent from the sensor. Using Python was a learning experience throughout the entirety of this project, due to only having used it to create one program prior to undertaking this project. To read data from the sensor a Python library supplied by the manufacturers of the sensor was included in the program.

Once the information could be read from the sensor, it was necessary to figure out a means of storing it in a database. MySQL was selected as the database software for this project due to its online presence and thorough documentation. MySQL was another major learning experience throughout this project. As a complete novice, it required much trial and error before the necessary level of competency was achieved to create a location for the BME680 data to be stored. Next, the Python program used to read the sensor’s information was altered so that it would send this information to the appropriate MySQL table. This was achieved through the use of a library called mysql.connector.

The next step in the project was displaying the stored environmental information on a webpage. To accomplish this, an Apache server was created on the Raspberry Pi. Luckily, its creation was far more straight forward than other aspects of this project and didn’t have a large learning curve for a complete novice. Once set up, the software broadcasted a webpage on the local network. To alter what appeared on the webpage, the Apache server’s default index file was edited. Through a combination of HTML and PHP (as well as mysqli which allows for PHP to interface with MySQL) it was possible to edit this file such that the webpage displayed the MySQL table containing the environmental information log. Although not part of the original proposal, the environmental monitoring presented on the website was expanded upon ...

Read more »

x-zip-compressed - 5.44 kB - 09/12/2022 at 18:30

Download

x-zip-compressed - 2.78 kB - 09/12/2022 at 18:30

Download

  • 1 × Raspberry Pi 3 B+ was used, but 4 would work too
  • 1 × Switches integrated into doors from old alarm system Could be replaced with any sensor that breaks upon a door opening
  • 1 × BME680 Temp, pressure, humidity sensor
  • 1 × Raspberry Pi UPS HAT
  • 2 × COM-13015 Relay

View all 8 components

  • 1
    Install Raspbian, boot Pi, and download files for this project to your Pi

    Download Raspbian, and use Balena Etcher or equivalent to get Raspberry Pi runnning. Once it is running, go and download the files for this project. Create a folder on the Desktop called "HMS", and place all of the files in "Python Programs" into this folder. This is so that the paths for the files will align with the ones that I used for running the cron jobs/ in the rc.local file. If you know what you are doing as far as running cron jobs, or editing the etc rc.local file then putting the files in the desktop folder is unnecessary.

  • 2
    Attach the BME680 Sensor

    This task required soldering female headers to the BME680, and then connecting wires from these headers to their appropriate pins on the Raspberry Pi. In order, these pins are 1,3,5, 7, and 9. These specific pins were selected as they provide the sensor both power and I2C communication with the Raspberry Pi.

  • 3
    Test BME680

    Run a program to be sure the sensor is outputting data correctly. Google to find programs from the manufacturer of the product to test it.

View all 10 instructions

Enjoy this project?

Share

Discussions

nodemcu12ecanada wrote 09/13/2022 at 16:35 point

Have you considered Adafruit MQTT? Monitor, record and control from anywhere in the world. It takes seconds to set up a HMI compared to a web page. I do both.

https://sites.google.com/site/nodemcu12e/home#h.bagvjtiwx7l3

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates