A comprehensive IoT agriculture system combining ESP32 sensors, React Native mobile application, and Firebase for real-time remote monitoring and control of irrigation systems.
AgriControl is a comprehensive IoT agriculture system built with ESP32 sensors and a React Native mobile application for remote control and monitoring. Designed for farmers and agricultural professionals, the system provides real-time environmental monitoring with 2-second response time and serves 100+ users.
The mobile app offers an intuitive interface to monitor and control irrigation equipment including pumps, valves, water basins, and soil sensors, with advanced data visualization and scheduling capabilities.
- ESP32 Sensor Network: Real-time data collection from IoT sensors
- 2-Second Response Time: Ultra-fast environmental monitoring
- 100+ Active Users: Scalable system supporting multiple concurrent users
- Remote Control: Manage irrigation equipment from anywhere
- Secure user registration and login
- Firebase Authentication integration
- Session persistence
- Multi-user support with isolated data
- Pompes (Pumps): Monitor and schedule irrigation pumps with customizable periods
- Vannes (Valves): Control and track water valve operations
- Bassin (Basin): Monitor water basin levels and distances
- Sonde (Probes): Track soil conditions with multi-level temperature and humidity sensors
- Real-time data charts for all equipment types
- Historical data tracking
- Interactive chart components
- Visual analytics for better decision-making
- Multi-language support (English/French)
- Runtime language switching
- Comprehensive translation coverage
- Date and time pickers for equipment scheduling
- Automated period-based operations
- Start date and time configuration
- Framework: React Native 0.74.5
- Platform: Expo SDK 51
- Navigation: React Navigation v6
- Charts: react-native-chart-kit
- Internationalization: i18next, react-i18next
- Build: EAS (Expo Application Services)
- Database: Firebase Realtime Database
- Authentication: Firebase Auth
- IoT Hardware: ESP32 Microcontroller
- Sensors: Temperature, Humidity, Distance sensors
- Communication: Real-time data sync with 2-second response time
- Node.js (v14 or higher)
- npm or yarn
- Expo CLI
- Android Studio / Xcode (for native builds)
-
Clone the repository
git clone https://github.com/SaifEddinBrahmi/Smart-Agriculture-IoT-System.git cd "Smart-Agriculture-IoT-System"
-
Install dependencies
npm install
-
Configure Firebase
- Create a Firebase project at Firebase Console
- Enable Authentication and Realtime Database
- Update
config/firebase.jswith your Firebase credentials
-
Start the development server
npm start
# Start Expo development server
npm start
# Run on Android
npm run android
# Run on iOS
npm run ios
# Run on web
npm run webeas build --profile preview --platform androideas build --profile production --platform androidAgriControl Mobile App/
βββ App.js # Root component with navigation
βββ app.json # Expo configuration
βββ package.json # Dependencies
βββ babel.config.js # Babel configuration
βββ eas.json # EAS Build configuration
βββ i18n.js # Internationalization setup
βββ assets/ # Images and icons
βββ components/ # React components
β βββ HomePage.js # Authentication screen
β βββ Pompes.js # Pump management
β βββ AddPompes.js # Add pump data
β βββ DisplayPompes.js # Display pump list
β βββ PompesChartsPage.js # Pump analytics
β βββ Vannes.js # Valve management
β βββ AddVannes.js # Add valve data
β βββ DisplayVannes.js # Display valve list
β βββ VannesChartsPage.js # Valve analytics
β βββ Bassin.js # Basin monitoring
β βββ DisplayBassin.js # Display basin data
β βββ BassinChartsPage.js # Basin analytics
β βββ Sonde.js # Probe monitoring
β βββ DisplaySonde.js # Display probe data
β βββ SondeChartsPage.js # Probe analytics
β βββ ChartComponent.js # Reusable chart component
β βββ styles.js # Shared styles
βββ config/
β βββ firebase.js # Firebase configuration
βββ resources/ # Translation files
β βββ en.js # English translations
β βββ fr.js # French translations
β βββ index.js # Resource exports
βββ utils/
βββ firebaseUtils.js # Firebase helper functions
users/
βββ {userId}/
βββ pompes/
β βββ {pompeId}/
β βββ name
β βββ period
β βββ startdate
βββ vannes/
β βββ {vanneId}/
β βββ name
β βββ period
β βββ startdate
βββ bassin/
β βββ {bassinId}/
β βββ distance
β βββ date
βββ sonde/
βββ {sondeId}/
βββ date
βββ tempLevel1
βββ tempLevel2
βββ tempLevel3
βββ humLevel1
βββ humLevel2
βββ humLevel3
- π¬π§ English (default)
- π«π· French
Language can be switched at runtime from the login screen.
- β Real-time Monitoring: 2-second response time for environmental data
- β Scalable Architecture: Successfully serving 100+ active users
- β ESP32 Integration: Seamless IoT sensor network communication
- β Remote Control: Full irrigation system management from mobile device
- β Multi-level Sensing: Temperature and humidity monitoring at 3 different soil depths
- β Multi-language Support: English and French localization
The mobile application features:
- Clean and intuitive user interface
- Bottom tab navigation for easy access
- Real-time data synchronization with ESP32 sensors
- Interactive charts and graphs for data visualization
- Date/time pickers for equipment scheduling
- Responsive design for various screen sizes
- Automated irrigation control based on sensor data
- Create a Firebase project
- Enable Email/Password authentication
- Enable Realtime Database
- Configure database rules for security
- Update
config/firebase.jswith your credentials
The project uses EAS for building:
- Development: Development client with internal distribution
- Preview: APK builds for testing
- Production: Production-ready builds
Contributions are welcome! Please feel free to submit a Pull Request.
This project is part of the AgriControl ecosystem.
Saif Eddine Brahmi
- GitHub: @SaifEddinBrahmi
- Email: saifeddin.brahmi@ensi-uma.tn
If you find this project useful, please consider giving it a star! It helps others discover this project and motivates continued development.
π Star this repository on GitHub
Built with β€οΈ using ESP32, React Native, and Firebase | Smart Agriculture IoT System