This project involves a mobile application designed to control an IoT-enabled coffee machine. The application features a modern frontend developed with Flutter and a Flask backend, utilizing SQLite for database management. The core functionality of the coffee machine is driven by an ESP32 module, programmed in C++ to handle operations like scheduled brewing control and status monitoring.
Security and reliability are ensured with TCP sockets using SSL/TLS protocols to link the backend with the coffee machine, and HTTPS to connect the frontend with the backend.
- Frontend: Built using Flutter, providing a user-friendly interface for controlling the coffee machine.
- Backend: Developed with Flask, handling API requests and communicating with the SQLite database and the coffee machine.
- Database: SQLite is used for storing user data and coffee machine states.
- Coffee Machine Control: An ESP32 embedded within the coffee machine runs custom C++ code, facilitating real-time operations and responses.
- Communication:
- Backend to Coffee Machine: Secure TCP sockets with SSL/TLS.
- Frontend to Backend: Secured with HTTPS.
We plan to expand the capabilities of our application by integrating an IoT sprinkler system, which will also be controlled through the mobile app. This addition will allow users to manage both coffee brewing and garden watering schedules seamlessly from the same platform, enhancing the smart home experience.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Android Studio
- Python 3.x
- Flutter SDK
- An ESP32 module within your coffee machine (already set up and programmed)
-
Install Python Packages
Ensure you have Python installed, then set up the Flask environment and dependencies:
pip install Flask Flask-SQLAlchemy Flask-Bcrypt
-
Install Flutter
Follow the official Flutter installation guide to set up Flutter on your system.
-
Set up Android Studio
Download and install Android Studio from the official site. Follow the setup wizard to install the necessary SDK tools.
-
Launch the Backend Server
Navigate to the backend directory and start the Flask server:
cd onsync_backend python app.py
-
Launch the Frontend Application
In another terminal, navigate to the frontend directory and run the Flutter application:
cd onsync_frontend flutter run
Ensure an emulator is running in Android Studio or a device is connected to your computer.
-
Accessing the Mobile Application
Open the mobile application in Android Studio. The application should connect to the backend server running locally.
To watch the video demonstration of the running application: