Fix Grafana dashboard datasource, add Grid Singularity skill
- Fix PostgreSQL datasource uid in Grafana dashboard - Update datasource to point to FlexMeasures DB (flexmeasures-db:5432) - Dashboard now shows real data from Cariflex simulator - Add Grid Singularity skill (gsy-e, gsy-framework, gsy-e-sdk)
This commit is contained in:
3
TODO.md
3
TODO.md
@@ -51,7 +51,8 @@ FlexMeasures = élément central. Volet R&D LEM (Local Energy Market).
|
||||
| cariflex-fm-entsoe | Installer flexmeasures-entsoe | ✅ Installé |
|
||||
| cariflex-fm-weather | Installer flexmeasures-weather | ✅ Installé |
|
||||
| cariflex-scheduler | Scheduler FlexMeasures | ✅ Redis OK, schedule à tester |
|
||||
| cariflex-s2-cem-config | Configurer S2 CEM | s2-python installé |
|
||||
| cariflex-s2-cem-config | Configurer S2 CEM | ✅ Script créé |
|
||||
| cariflex-grid-singularity | Intégrer Grid Singularity | gsy-e, gsy-framework, gsy-e-sdk |
|
||||
| cariflex-flex-config | Config flexibilité | flex_context + flex_model par type |
|
||||
## Actifs FlexMeasures (40)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"title": "Production PV (kW) - 10 panneaux",
|
||||
"type": "timeseries",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 0},
|
||||
"datasource": {"type": "postgres", "uid": "31"},
|
||||
"datasource": {"type": "postgres", "uid": "a9b60854-60c5-4c86-bb0b-d98852df0c89"},
|
||||
"targets": [{
|
||||
"rawSql": "SELECT event_start as time, SUM(event_value) as power_kw FROM timed_belief WHERE sensor_id BETWEEN 41 AND 50 AND event_start > NOW() - INTERVAL '24 hours' GROUP BY event_start ORDER BY event_start",
|
||||
"refId": "A"
|
||||
@@ -25,7 +25,7 @@
|
||||
"title": "Consommation Bornes VE (kW) - 10 bornes",
|
||||
"type": "timeseries",
|
||||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 0},
|
||||
"datasource": {"type": "postgres", "uid": "31"},
|
||||
"datasource": {"type": "postgres", "uid": "a9b60854-60c5-4c86-bb0b-d98852df0c89"},
|
||||
"targets": [{
|
||||
"rawSql": "SELECT event_start as time, SUM(event_value) as power_kw FROM timed_belief WHERE sensor_id BETWEEN 61 AND 70 AND event_start > NOW() - INTERVAL '24 hours' GROUP BY event_start ORDER BY event_start",
|
||||
"refId": "A"
|
||||
@@ -37,7 +37,7 @@
|
||||
"title": "Batteries - État de Charge (kWh)",
|
||||
"type": "timeseries",
|
||||
"gridPos": {"h": 8, "w": 8, "x": 0, "y": 8},
|
||||
"datasource": {"type": "postgres", "uid": "31"},
|
||||
"datasource": {"type": "postgres", "uid": "a9b60854-60c5-4c86-bb0b-d98852df0c89"},
|
||||
"targets": [{
|
||||
"rawSql": "SELECT event_start as time, AVG(event_value) as soc_kwh FROM timed_belief WHERE sensor_id BETWEEN 51 AND 60 AND event_start > NOW() - INTERVAL '24 hours' GROUP BY event_start ORDER BY event_start",
|
||||
"refId": "A"
|
||||
@@ -49,7 +49,7 @@
|
||||
"title": "VE V2G - État de Charge (kWh)",
|
||||
"type": "timeseries",
|
||||
"gridPos": {"h": 8, "w": 8, "x": 8, "y": 8},
|
||||
"datasource": {"type": "postgres", "uid": "31"},
|
||||
"datasource": {"type": "postgres", "uid": "a9b60854-60c5-4c86-bb0b-d98852df0c89"},
|
||||
"targets": [{
|
||||
"rawSql": "SELECT event_start as time, AVG(event_value) as soc_kwh FROM timed_belief WHERE sensor_id BETWEEN 71 AND 80 AND event_start > NOW() - INTERVAL '24 hours' GROUP BY event_start ORDER BY event_start",
|
||||
"refId": "A"
|
||||
@@ -61,7 +61,7 @@
|
||||
"title": "Flexibilité Totale (kW)",
|
||||
"type": "stat",
|
||||
"gridPos": {"h": 8, "w": 8, "x": 16, "y": 8},
|
||||
"datasource": {"type": "postgres", "uid": "31"},
|
||||
"datasource": {"type": "postgres", "uid": "a9b60854-60c5-4c86-bb0b-d98852df0c89"},
|
||||
"targets": [{
|
||||
"rawSql": "SELECT SUM(event_value) as flex_kw FROM timed_belief WHERE sensor_id BETWEEN 51 AND 80 AND event_start > NOW() - INTERVAL '1 hour' GROUP BY sensor_id ORDER BY event_start DESC LIMIT 1",
|
||||
"refId": "A"
|
||||
@@ -73,7 +73,7 @@
|
||||
"title": "Carte des Actifs Cariflex",
|
||||
"type": "geomap",
|
||||
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 16},
|
||||
"datasource": {"type": "postgres", "uid": "31"},
|
||||
"datasource": {"type": "postgres", "uid": "a9b60854-60c5-4c86-bb0b-d98852df0c89"},
|
||||
"targets": [{
|
||||
"rawSql": "SELECT g.name, g.latitude, g.longitude, gt.name as type FROM generic_asset g JOIN generic_asset_type gt ON g.generic_asset_type_id = gt.id ORDER BY gt.id, g.id",
|
||||
"refId": "A"
|
||||
|
||||
98
skills/energy/grid-singularity/SKILL.md
Normal file
98
skills/energy/grid-singularity/SKILL.md
Normal file
@@ -0,0 +1,98 @@
|
||||
# Skill Grid Singularity - Cariflex Energy
|
||||
|
||||
## Description
|
||||
Intégration des outils Grid Singularity (GSy) pour le projet Carifflex.
|
||||
Grid Singularity est une plateforme open source pour les marchés décentralisés d'énergie.
|
||||
|
||||
## Source
|
||||
https://github.com/gridsingularity
|
||||
|
||||
## Repos principaux
|
||||
|
||||
| Repo | Description | Stars | Langage |
|
||||
|------|-------------|-------|---------|
|
||||
| `gsy-e` | Grid Singularity Energy Exchange | 88 | Python |
|
||||
| `gsy-framework` | GSy services framework | 8 | Python |
|
||||
| `gsy-e-sdk` | Client SDK for Grid Singularity Exchange | 3 | Python |
|
||||
| `gsy-matching-engine-sdk` | SDK for Myco matching agents | 0 | Python |
|
||||
| `gsy-decentralized-exchange` | Decentralized Energy Exchange | 0 | Rust |
|
||||
|
||||
## Installation
|
||||
|
||||
### 1. Cloner les repos
|
||||
```bash
|
||||
cd /home/eric/cariflex/tools
|
||||
|
||||
# Energy Exchange (principal)
|
||||
git clone --depth 1 https://github.com/gridsingularity/gsy-e.git
|
||||
|
||||
# Framework
|
||||
git clone --depth 1 https://github.com/gridsingularity/gsy-framework.git
|
||||
|
||||
# SDK
|
||||
git clone --depth 1 https://github.com/gridsingularity/gsy-e-sdk.git
|
||||
```
|
||||
|
||||
### 2. Installation gsy-e
|
||||
```bash
|
||||
cd gsy-e
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
### 3. Installation SDK
|
||||
```bash
|
||||
cd gsy-e-sdk
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
## Architecture Grid Singularity
|
||||
|
||||
### Composants
|
||||
| Composant | Rôle |
|
||||
|-----------|------|
|
||||
| **Energy Exchange** | Marché décentralisé d'énergie |
|
||||
| **Matching Engine** | Appariement offres/demands |
|
||||
| **SDK Client** | Interface pour participants |
|
||||
| **Blockchain DEX** | Transactions décentralisées |
|
||||
|
||||
### Intégration Cariflex
|
||||
```
|
||||
Cariflex CEM → gsy-e-sdk → Grid Singularity Exchange
|
||||
↓
|
||||
Matching Engine
|
||||
↓
|
||||
Flex Schedules
|
||||
```
|
||||
|
||||
## Utilisation SDK
|
||||
|
||||
### Connexion au Exchange
|
||||
```python
|
||||
from gsy_e_sdk import GSyEClient
|
||||
|
||||
client = GSyEClient(
|
||||
gsy_e_api_url="https://api.gsy-e.io",
|
||||
username="cariflex",
|
||||
password="***"
|
||||
)
|
||||
|
||||
# Submit buy/sell offers
|
||||
client.submit_buy_offer(
|
||||
energy_kwh=100,
|
||||
price_eur_mwh=50,
|
||||
time_slot="2026-06-09T12:00:00Z"
|
||||
)
|
||||
```
|
||||
|
||||
### Récupérer les prix du marché
|
||||
```python
|
||||
market_prices = client.get_market_prices()
|
||||
for slot in market_prices:
|
||||
print(f"{slot.time}: {slot.price} €/MWh")
|
||||
```
|
||||
|
||||
## Liens
|
||||
- GitHub: https://github.com/gridsingularity
|
||||
- Energy Exchange: https://github.com/gridsingularity/gsy-e
|
||||
- SDK: https://github.com/gridsingularity/gsy-e-sdk
|
||||
- Documentation: https://gridsingularity.github.io/gsy-e/
|
||||
Reference in New Issue
Block a user