How one0one2552/mgb works
File Structure Analysis
• top-level:
• config/config.yaml – runtime settings for sensors, actuators, PID, web server
• src/main.py – application entry point
• install_service.sh, mgb.service – systemd service for auto-start on Pi
• requirements.txt – Python dependencies
• src/:
• sensors/ – hardware or mock sensor drivers (scd30_sensor.py)
• controllers/ – PID logic (pid_controller.py)
• actuators/ – relay control for pump, heater, fan (relay_actuator.py)
• utils/ – logger, data logger, wifi management, translations
• web/ – Flask app (app.py), wifi setup endpoint, static assets (JS/CSS), templates (HTML)
• tests at root – unit tests for sensors and actuators.
README Insights
• Core architectural layers described: hardware interface → control logic → persistence → web API/UI.
• Technology stack: Python3, Flask + SocketIO, SQLite, Chart.js, Raspberry Pi GPIO.
• Hardware wiring details and GPIO assignments indicate direct integration with physical world.
• Deployment uses systemd service on Pi; development mode supports mock sensors.