Raspberry Pi terrarium control system with environmental monitoring and automated scheduling.
- 🌡️ Temperature & Humidity Monitoring - DHT22 sensor readings via GPIO
- 💡 Relay Control - Automated light and cooling system management
- 📅 Planning Mode - Time-based scheduling for environmental profiles
- 🌐 Web Interface - Real-time dashboard via MQTT WebSocket
TerraPi/
├── backend/ # Python MQTT sensor/control service
│ ├── run.py # Entry point
│ ├── conf/ # YAML configuration files
│ └── terrapi/ # Core Python package
├── frontend/ # React TypeScript web UI
│ ├── src/ # Source components
│ └── package.json
└── .github/ # AI coding instructions
cd backend
# Set MQTT credentials
export MQTT_USER=your_username
export MQTT_PASSWORD=your_password
# Run the service
python run.py --conf conf/main.yamlRequirements: Raspberry Pi with GPIO access, Python 3.7+, MQTT broker
cd frontend
npm install
npm startOpens at http://localhost:3000
Edit backend/conf/main.yaml to configure:
- MQTT broker connection
- Sensor pins (DHT22)
- Control pins (relays)
- Logging interval
Edit backend/conf/modes.yaml for environmental profiles.
Edit backend/conf/planning.yaml for scheduling.
RPi GPIO Sensors → TerraHandler → MQTT Broker ↔ React Frontend
↓
GPIO Relays
Communication uses MQTT topics for sensor data, control states, and configuration sync.
MIT