Commit Graph

5 Commits

Author SHA1 Message Date
Wizznu 6c3b2f3112 feat: Complete ApsGo hydroponics system with multiple features
Features implemented:
- Dashboard with real-time sensor monitoring (temp, humidity, light, soil moisture)
- Water flow status indicator with color coding
- Time-based scheduling (Kontrol Waktu/Jadwal)
- Sensor-based threshold control (Kontrol Sensor/Threshold)
- Smart mode with auto-stop when target reached
- Three pump controls: Air, Larutan Nutrisi, Pengaduk
- Manual control for all actuators
- History/logging system
- Firebase Realtime Database integration
- Railway worker backend service

UI/UX improvements:
- Material Design 3 components
- Badge indicators for active pumps
- Conditional rendering (show only when active)
- Responsive layouts with Wrap widgets
- Color-coded status indicators

Backend fixes:
- Fixed water_flow reading from Firebase
- Fixed threshold model copyWith method
- Added pompa_pengaduk support across all models
- Smart mode with per-pot independent monitoring
- Cooldown per-threshold (not per-pot)
- Valves stop together when targets reached

Renamed: All 'Pupuk' references to 'Larutan Nutrisi Cair'
2026-02-18 08:10:43 +07:00
Wizznu 1224c8e867 feat: Threshold-based sensor system with unlimited threshold configs
- NEW: Flexible threshold system (threshold_1, threshold_2, ... unlimited)
- Each threshold: batas_bawah, batas_atas, durasi, smart_mode, pot_aktif[]
- Smart mode: siram sampai batas_atas tercapai
- Fixed mode: siram sesuai durasi tetap
- ThresholdModel: Complete model with validation
- ThresholdService: CRUD operations for threshold management
- ThresholdManagementPage: UI untuk list dan manage threshold
- ThresholdFormPage: Add/edit form dengan slider dan pot selection
- Worker.js: Dynamic threshold_* detection and processing
- Navigation: Sensor button now goes to ThresholdManagementPage
- Firebase: Auto-setup script with example threshold data (threshold_1, threshold_2, threshold_3)
- Path: All threshold data stored in /kontrol_1
2026-02-16 12:30:13 +07:00
Wizznu abef985a11 APSGO V2.1 NEW APS 2026-02-16 11:40:41 +07:00
Wizznu 09ee9ea516 feat: Complete ApsGo system with Railway Worker automation
- Real-time scheduling system working with 20s delay per section
- 1 schedule time controls multiple pumps simultaneously
- Railway Worker with Firebase SDK + REST API fallback
- Timeout handling and job queue management
- Comprehensive documentation and troubleshooting guides
- Flutter mobile app with dual mode (manual + auto scheduling)
2026-02-11 17:17:22 +07:00
Wizznu de5ce25f57 feat: Add Railway Worker, bug fixes, and mosvet_8 pengaduk
 New Features:
- Railway Worker for 24/7 automation (Node.js + BullMQ + Redis)
- Connection monitoring service
- Automation constants for centralized config
- History logging service with auto cleanup
- Mosvet_8 pengaduk support in kontrol page and Firebase

🐛 Bug Fixes:
- Fixed StreamSubscription memory leak in dashboard_page
- Added AppLifecycle observer for proper service management
- Fixed race conditions with Redis queue
- Improved error handling and user feedback
- Better connection status monitoring

📚 Documentation:
- DEPLOYMENT_GUIDE.md - Complete Railway deployment guide
- BUGS_AND_FIXES.md - Bug report and fixes summary
- RAILWAY_QUICK_START.md - Quick reference guide
- IMPLEMENTATION_COMPLETE.md - Complete implementation summary
- FULL_HISTORY_SYSTEM.md - History system documentation

🔧 Code Changes:
- lib/main.dart - Added AppLifecycleObserver
- lib/screens/dashboard_page.dart - Fixed memory leak
- lib/screens/histori_page.dart - Full Firebase integration
- lib/screens/kontrol_page.dart - Added pengaduk (mosvet_8)
- lib/services/firebase_database_service.dart - Added mosvet_8, history methods
- lib/services/kontrol_automation_service.dart - Use constants, connection check
- lib/services/automation_constants.dart - NEW centralized constants
- lib/services/connection_monitor_service.dart - NEW connection monitoring
- lib/services/history_logging_service.dart - NEW auto logging service
- railway-worker/ - NEW complete worker implementation

Status:  Production Ready
2026-02-10 07:22:43 +07:00