EMMA is a distributed software platform designed for monitoring, analyzing, and optimizing energy assets in the European market. The platform solves the challenge of price decoupling and renewable energy intermittency, allowing energy communities and industrial operators to make decisions based on real-time data.
In a market where prices can range from €130/MWh in France to negative values in Spain, EMMA acts as a centralized brain that:
- Synchronizes: Ingests massive telemetry from IoT assets (solar panels, batteries, EV chargers) using lightweight protocols.
- Analyzes: Processes data from the Spanish market operator (REData) and European markets to identify opportunities for energy arbitrage.
- Optimizes: Automates asset consumption when the grid has surpluses (negative prices), reducing the carbon footprint and operating costs.
Designed with a focus on decoupled microservices and high availability:
-
Ingestion & Strategy Engine: Distributed microservices in .NET and Python processing messages via MQTT/Kafka.
-
Data Core: Multi-database architecture with three specialized PostgreSQL instances:
- IdentityDB: Authentication, API keys, and audit logs
- AppDB: Business logic, devices, assets, and communities
- TelemetryDB: TimescaleDB for massive time-series storage with native compression
- See Database Architecture for details
-
Market Intelligence: Integration with the REData API for monitoring intraday prices and European interconnection congestion.
-
Frontend Observability: Real-time visualization and asset monitoring using React, Recharts, and Leaflet for interactive geographic distribution.
-
Infrastructure: Orchestrated deployment using Docker and .NET Aspire for microservice management.
| Service | Goal | Technology |
|---|---|---|
| EMMA.AppHost | Main orchestrator managing service lifecycle and network dependencies. | .NET Aspire |
| Emma.Server | Core API providing dashboard metrics, asset control, and arbitrage analytics. | .NET 9 |
| Emma.Dashboard | High-performance React frontend providing real-time observability, predictive analytics, and asset maps. | React + Vite |
| EMMA.MarketService | Continuous monitor for market prices (REData), congestion, and inter-border flows. | .NET Worker |
| EMMA.CommandService | Asset controller executing real-time setpoint adjustments and arbitrage strategies. | .NET Worker |
| EMMA.SolarForecaster | Machine learning service providing solar production forecasts for the next 24h. | Python (FastAPI) |
| EMMA.Optimizer | Advanced optimization engine calculating the best setpoints for multi-asset communities. | Python |
| Energy Simulator | Multi-asset IoT simulator generating realistic telemetry and price scenarios. | Python |
| EMMA.Ingestion | Scalable telemetry ingestor processing MQTT/Kafka streams into TimescaleDB. | .NET Worker |
| MQTT-Kafka Bridge | High-performance message bridge for translating IoT protocols to the data bus. | Fluent Bit |
| TimescaleDB Core | Time-series database optimized for energy metrics with native compression. | TimescaleDB |
| Emma.Identity | Robust authentication service ensuring multi-tenant data isolation. | .NET 9 |
- GDPR Ready: Implementation of consumption data anonymization at the database level.
- Multi-Region: Native support for multiple time zones (CET/EET/WET) and intra-community VAT management.
- Energy Efficiency: Optimized algorithms for handling negative prices resulting from renewable overproduction.
Ensure you have the .NET SDK and Docker installed, then run:
dotnet run --project src/EMMA.AppHostOpen the Aspire Dashboard (link provided in terminal) to monitor all microservices or use the Emma Dashboard for asset observability.
To verify that sensitive actions are tracked:
- Use the Swagger UI in
Emma.Apito perform aPOSTorPUTrequest (e.g., updating an asset). - Query the
audit_logstable in PostgreSQL:SELECT * FROM audit_logs ORDER BY timestamp DESC;
- Confirm the user ID, tenant ID, and payload are correctly captured.
The market-service automatically monitors the ES-FR link:
- Check the
market-servicelogs in the Aspire Dashboard. - Look for
Checking ES-FR Interconnection Flows.... - If saturation is >90% (simulated in mock), you will see:
ALERT: ES-FR Interconnection Saturated. Price decoupling highly likely. - Verify the API response in
Emma.Apivia/market/summaryincludes theMarketWarningand current REData pricing.
The solar-forecaster (Python) runs every 6 hours or can be triggered manually:
- Manual Trigger: Call the FastAPI endpoint:
curl -X POST http://localhost:8000/predict
- Verify Output: Check the
solar-forecasterlogs forPublished predictions to Kafka. - Kafka: Use a Kafka consumer (or Kafka UI) to listen to the
solar-predictionstopic.
Verify that no keys are hardcoded:
- Check
src/Emma.Identity/appsettings.jsonandsrc/Emma.Api/appsettings.json. - Notice that
Jwt:Keyis missing. It is injected at runtime via Aspire environment variables (Jwt__Key).