This project aims to provide a smart farm solution for livestock tracking. It utilizes a three-tier approach involving data collection from sensors installed in the ranch, data processing and packaging in JSON format, and data visualization for live tracking and monitoring of the animals.
- Real-time tracking and monitoring of livestock on a farm
- Display of individual animal information, including other sensors deployed.
- Unique color assignment for each animal for easy identification
-
Python: The main programming language used for developing the smart farm system.
-
Flask (web framework): Flask is used to build the web application for visualizing the tracked livestock.
-
MQTT (message queuing protocol): MQTT is used as the communication protocol for transmitting data between the sensors and the visualization system.
-
HTML/CSS/JavaScript (for the frontend visualization): These web technologies are used to create an interactive and user-friendly interface for visualizing livestock data.
-
Clone the repository:
git clone https://github.com/taugroup/Smartfarm_Demo.git
-
Create a Python eirtual environment and activate it:
python -m venv venv source venv/bin/activate -
Install the required dependencies:
pip install -r requirements.txt
-
Run both the backend and frontend applications:
python frontend/app.py & python backend/backend.py -vr backend/cow_move.mp4 -
Access the application in your web browser at
http://localhost:5000.
-
Ensure that the MQTT server is running and receiving data from the sensors.
-
Open the web browser and navigate to
http://localhost:5000. -
The animals in the pen will be displayed in the green box.
-
Hover over each animal to view the respective information received from the sensors.
-
You can customize the MQTT server connection details in the
app.pyfile. -
To change the visualization layout or style, modify the HTML/CSS/JavaScript code in the
templates/index.htmlfile.