Simulated Grid Meter
Externally controlled grid meter for site orchestration. The grid meter represents the point of connection to the utility grid.
Configuration
json
{
"Name": "sim-grid",
"DeviceClass": "SimulatedGridMeter",
"AssetType": "Grid"
}No additional configuration required - the grid meter's power is controlled by the SiteOrchestrator.
How It Works
Unlike other simulated assets that generate their own values, the grid meter is externally controlled:
SiteOrchestratorcalculates net site power- Calls
SetPower(watts)on the grid meter - Grid meter accumulates import/export registers based on power direction
Power Direction
| Power Value | Direction | Register |
|---|---|---|
| Positive | Import from grid | ImportRegisterWh increases |
| Negative | Export to grid | ExportRegisterWh increases |
Metrics
The grid meter provides these metrics:
| Metric | Description |
|---|---|
ActivePower_Sum | Current power flow (W) |
ImportActiveEnergy | Cumulative import (Wh) |
ExportActiveEnergy | Cumulative export (Wh) |
VoltageLineToNeutralAvg | 230 V (fixed) |
CurrentAvg | Calculated from power/voltage |
Programmatic Control
If not using SiteOrchestrator, you can control the grid meter directly:
csharp
var gridMeter = await assetFactory.CreateAsync<SimulatedGridMeter>("grid-meter");
// Importing 5 kW from grid
gridMeter.SetPower(5000);
// Exporting 3 kW to grid
gridMeter.SetPower(-3000);Alternative: SimulatedMeter
For simpler use cases without orchestration, use SimulatedMeter with AssetType: "Grid":
json
{
"Name": "sim-grid",
"DeviceClass": "SimulatedMeter",
"AssetType": "Grid"
}This version has a built-in daily import/export pattern instead of external control.