How forddiven/hidrogencellenergy works
HidrogenCellEnergy is a Flask dashboard for operating and monitoring a hydrogen-cell system. An operator signs in, views live status and alarms, and can start or manage a run; the controller executes the configured startup sequence, communicates with Modbus hardware or simulation, and persists readings and run state. The dashboard also supports history and charting, CSV export, configuration, user administration, and security logs. The excerpts show the main controller, database, and browser interactions; some routes and their implementations were not sampled.
Main entry points: app.py Web routes · controller.py Controller runtime · database.py SQLite database · charts.js Live dashboard
Components 14
Web dashboard
- Web routes
app.py - Sign-in and roles
app.py - Live dashboard
static/charts.js - Admin and config
templates - History and export
app.py - Alarm views
templates - Chart rendering
static/charts.js
System operation
- Controller runtime
controller.py - Startup sequence
startup_procedure.py - Modbus device
- Default settings
config.py
Persistence and records
- SQLite database
database.py
HIL simulation
- HIL simulator
HIL.py
Other components
- Operator
Connections 18
- Operator → Web routes: uses dashboard
README.md - Web routes → Sign-in and roles: handles sign-in
README.md - Web routes → Controller runtime: starts and stops
app.py - Web routes → SQLite database: reads and updates
app.py - Web routes → Live dashboard: serves live views
- Live dashboard → Web routes: requests status
static/charts.js - Live dashboard → Chart rendering: renders readings
static/charts.js - Web routes → History and export: serves history
app.py - History and export → SQLite database: queries readings
app.py - Operator → Admin and config: manages system
README.md - Web routes → Admin and config: renders admin views
- Operator → Alarm views: reviews alarms
README.md - Controller runtime → Startup sequence: uses steps
controller.py - Controller runtime → SQLite database: persists readings and state
controller.py - Controller runtime → Modbus device: reads and writes registers
controller.py - HIL simulator → Modbus device: hosts simulated registers
HIL.py - Controller runtime → HIL simulator: connects over Modbus
- SQLite database → Default settings: loads defaults
database.py