How samuelcaaz/risco-zero-subterraneo works
Risco Zero Subterrâneo is a prototype for automatic drainage in underground electrical galleries. Its critical control loop runs locally on the Arduino: floats determine pump operation with hysteresis. The Flask server supervises over serial, publishes telemetry to a browser dashboard, accepts authorized manual commands, and provides event logs, management settings, Telegram alerts, weather forecasts, and an operational report. Several backend routes and templates are documented but not fully sampled, so those relationships rely on README evidence; unsampled implementation details are not inferred.
Main entry points: app.js Dashboard interface · app.py Flask application · risco_zero_subterraneo.ino Arduino control · index.html Dashboard page
Components 20
Local control
- Level floats
- Arduino control
arduino/risco_zero_subterraneo/risco_zero_subterraneo.ino - Pump relay
- Drainage pump
Web supervision
- Serial link
- Flask application
app.py - Telemetry parsing
app.py - Dashboard API
app.py - Dashboard interface
static/app.js - Dashboard page
templates/index.html - Dashboard styling
static/style.css
Operations
- History and logs
app.py - Manual operation
app.py - Management settings
app.py - Operational report
templates/report.html - Alert monitoring
app.py - Weather forecast
app.py
External services
- Telegram
- Open-Meteo
Other components
- Operator
Connections 22
- Level floats → Arduino control: signal levels
README.md - Arduino control → Pump relay: switches
README.md - Pump relay → Drainage pump: powers
README.md - Arduino control → Serial link: sends telemetry
README.md - Serial link → Telemetry parsing: carries CSV
README.md - Flask application → Telemetry parsing: parses lines
app.py - Telemetry parsing → History and logs: updates state
app.py - Dashboard interface → Dashboard API: polls data
README.md - Dashboard API → Dashboard interface: returns state
README.md - Flask application → Dashboard page: renders page
app.py - Dashboard interface → Dashboard styling: uses styles
- Operator → Dashboard interface: views panel
README.md - Operator → Manual operation: requests control
README.md - Manual operation → Serial link: sends commands
README.md - Dashboard API → History and logs: serves history
README.md - Operator → Management settings: configures alerts
README.md - Dashboard interface → Management settings: loads settings
static/app.js - Flask application → Operational report: renders report
README.md - Flask application → Alert monitoring: monitors cycles
README.md - Alert monitoring → Telegram: sends alerts
README.md - Operator → Weather forecast: requests forecast
README.md - Weather forecast → Open-Meteo: fetches forecast
README.md