Skip to content

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:

  1. SiteOrchestrator calculates net site power
  2. Calls SetPower(watts) on the grid meter
  3. Grid meter accumulates import/export registers based on power direction

Power Direction

Power ValueDirectionRegister
PositiveImport from gridImportRegisterWh increases
NegativeExport to gridExportRegisterWh increases

Metrics

The grid meter provides these metrics:

MetricDescription
ActivePower_SumCurrent power flow (W)
ImportActiveEnergyCumulative import (Wh)
ExportActiveEnergyCumulative export (Wh)
VoltageLineToNeutralAvg230 V (fixed)
CurrentAvgCalculated 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.