Skip to content

mendesLet/smart-garage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Garage System

This repository contains the implementation of an IoT-based Smart Garage system. The project integrates an ESP32 microcontroller, a Raspberry Pi, and a Streamlit dashboard to automate garage door operations and vehicle entry logging. The system uses MQTT (via Mosquitto) for message communication between the components.

Directory Structure

smart-garage/
├── esp32_clients/
│   ├── iot_final.ino               # Main Arduino sketch for ESP32
│   ├── PinDefinitionsAndMore.h     # Pin definitions and helper functions
├── raspi_clients/
│   ├── client_pub.py               # MQTT Publisher (Garage door control)
│   ├── client_sub.py               # MQTT Subscriber (Ultrasonic sensor)
├── plate_model/
│   ├── # TODO
├── README.md                       # Documentation

Setup Instructions

1. Install Mosquitto on Linux

sudo apt install mosquitto mosquitto-clients
sudo systemctl enable mosquitto
sudo systemctl start mosquitto
Make sure to add this to the Mosquitto config files
listener 1883
allow_anonymous true

2. ESP32 Setup

  • Upload the iot_final.ino sketch to your ESP32:
  • Open esp32_clients/iot_final.ino in Arduino IDE.
  • Connect your ESP32 device and select the correct port under Tools > Port.
  • Compile and upload the sketch.

3. Raspberry Pi Setup

  • Install the dependencys
pip install paho-mqtt
  • Run the MQTT publisher:
python raspi_clients/client_pub.py
  • Run the MQTT subscriber:
python raspi_clients/client_sub.py

Usage

Diagramas(1)

  1. Start the ESP32 with the uploaded iot_final.ino sketch.

  2. Ensure the Raspberry Pi is running both client_pub.py and client_sub.py.

  3. Monitor and control the garage door via MQTT topics:

    • Subscribe to ultrasonic/detection to simulate vehicle detection.
    • Publish to garage/open_garage to control the garage door.
  4. Open the Streamlit dashboard for monitoring (future integration).

About

This repository contains an IoT solution for smart garage door automation. It leverages infrared technology for door activation and integrates a license plate recognition system tailored for Brazilian car plates.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors