Energy Management Module System¶
Architecture¶
The EMS uses a factory pattern where each module is a Python class extending
EnergyManagementModule. New modules are registered in the factory and auto-discovered.
classDiagram
class EnergyManagementModule {
+get_capabilities() list
+get_config_schema() dict
+validate_config(config) bool
+calculate_setpoints(forecasts, start, end)
+on_activate()
+on_deactivate()
+get_status() dict
}
class OSTECSimpleModule {
+calculate_setpoints(forecasts, start, end)
+get_capabilities() list
+get_config_schema() dict
}
class GDBNBeFlexibleModule {
+receive_setpoints()
+receive_offers()
}
EnergyManagementModule <|-- OSTECSimpleModule
EnergyManagementModule <|-- GDBNBeFlexibleModule
Adding a New Module¶
A new module requires only one Python file. It:
- Extends
EnergyManagementModule - Implements
get_capabilities(),get_config_schema(),calculate_setpoints() - Is placed in the
modules/directory and auto-registered by the factory
No database schema changes are needed. Module-specific config goes in the config_data JSONB field.
Available Modules¶
| Module type | Category | Status | Local calculation | Page |
|---|---|---|---|---|
OSTEC_SIMPLE |
Optimization | ✅ Production | Yes | OSTEC Simple |
OSTEC_PROMOTOR |
Optimization | 🟡 Dev | Yes (async) | OSTEC Promotor |
OSTEC_AC |
Optimization | 🟡 Dev | Yes | OSTEC w/ Allocation Coefficients |
OSTEC_FLEX |
Flexibility | 🟡 Dev | Yes | OSTEC Flexibility |
OSTEC_FLEX_HEMS |
Flexibility | 🟡 Dev | Yes + HEMS push | OSTEC Flexibility + HEMS |
OSTEC_ARBITRAGEM |
Market | 🟡 Dev | Yes | OSTEC Battery Arbitrage |
GDBN_BEFLEXIBLE |
Flexibility | 🟡 Dev | No — external push | GDBN BeFlexible |
Module Maturity Levels¶
| Level | Meaning |
|---|---|
PRODUCTION |
Fully tested, deployed in live communities |
BETA |
Functional but not yet battle-tested |
DEVELOPMENT |
Work in progress, not for production use |