DNP3 Outstation

DERSim runs an IEEE 1815 (DNP3) outstation alongside its other comm interfaces. The outstation exposes the same DER state — power, energy, voltage, frequency, alarms, grid-support modes — that the SunSpec and IEEE 2030.5 surfaces do, mapped onto the DNP3 point classes a master station expects.

This is the interface for testing utility SCADA integrations that poll DERs over DNP3 rather than 2030.5, and for testing distribution-management-system protocols that expect DNP3 control points.

Quick start

./sim --device_type PV-3Phase --dnp3_enable yes

The outstation listens on TCP port 20000 by default; an external DNP3 master connects, integrity-polls, and starts seeing the simulator's live state mapped onto DNP3 points.

CLI flag reference

Flag Default Notes
-d3 / --dnp3_enable no Set to yes to bring up the outstation
-d3p / --dnp3_port 20000 TCP port for the outstation listener
-d3o / --dnp3_outstation_addr 1 DNP3 link-layer address for the outstation
-d3m / --dnp3_remote_addr 4 Expected master station address. Frames from other masters are rejected at the link layer

For multi-master setups (e.g. SCADA + DMS both polling), bind one outstation per master with different --dnp3_remote_addr values — DNP3 doesn't natively support multi-master so the simulator picks one master per outstation instance.

What the outstation reports

The outstation exposes the same live DER state the SunSpec Modbus server and the 2030.5 client do. Point classes:

Point class Examples DNP3 group/variant
Analog inputs (read-only) Active power, reactive power, apparent power, voltage L-N / L-L, current, frequency, energy registers, SoC g30 v3 (analog input with flags)
Binary inputs (status) Inverter state, service state, fault chip, comm-up chip g1 v2 (binary input with status)
Analog outputs (control) Active-power setpoint, reactive-power setpoint, grid-support enable g41 v1 (analog output, direct operate)
Binary outputs (control) Enter service, exit service, mode select g12 v1 (CROB direct operate)

The exact point indices match the IEEE 1815.2-2019 mapping for DER points, so a master station configured against the standard talks to the simulator without any vendor-specific overlay.

Event reporting

The outstation supports DNP3 event classes (1, 2, 3) for poll-on- change semantics:

  • Class 1 — high-priority events. Inverter state changes, protective trips, comm faults.
  • Class 2 — medium-priority events. Grid-support mode transitions, setpoint changes.
  • Class 3 — low-priority events. Energy-register updates, steady-state telemetry samples.

A master station that subscribes to Class 1 + 2 only — typical for SCADA — sees state changes immediately and skips the chatty Class-3 stream. Unsolicited responses are off by default; enable via the master's normal Enable Unsol request.

Driving DNP3 controls

A master can drive the simulator's grid-support behavior over DNP3 just as it can over SunSpec or 2030.5:

Action DNP3 group/variant + index Effect
Set active-power output target g41 v1 index 0 Inverter clamps WMax to the requested value
Set reactive-power output target g41 v1 index 1 Inverter clamps VAR output similarly
Enter service g12 v1 index 0 (CROB) DER transitions from Off → Available → Running
Exit service g12 v1 index 1 (CROB) DER transitions to Off
Reset alarms g12 v1 index 2 (CROB) Clears latched alarm chips

Controls are direct-operate semantics — no select-before-operate intermediate. For environments that require SBO, the bundled DNP3 agent supports it but the dersim layer above doesn't expose it as a knob yet.

Architecture — the DNP3 agent

DERSim's DNP3 stack runs as a separate process (dnp3_agent.exe on Windows, dnp3_agent on Linux/macOS) that the simulator talks to over a local TCP control channel. The agent owns the actual DNP3 protocol state machine — link-layer addressing, integrity polls, event classes, unsolicited responses — and the simulator posts state updates / accepts control requests through it.

This split means the simulator can be paused, restarted, or reconfigured without dropping the DNP3 link from the master's perspective. It also means the agent process needs to be reachable on its own port (typically localhost:9090 for the agent control channel — distinct from the --dnp3_port outstation listener).

The agent ships with the simulator binary; no separate install or download is needed. The simulator spawns it on --dnp3_enable yes and reaps it on shutdown.

Dashboard integration

DNP3 traffic appears in the dashboard's Logs view under the DNP3 module tag. The log captures master polls, event responses, and control requests with their group / variant / index for protocol-level debugging.

Limitations

  • TCP only. DNP3 over serial (RS-232 / RS-485) isn't currently exposed. For serial protocols use Modbus RTU.
  • Single master per outstation. Multi-master setups need multiple outstation instances.
  • No file-transfer object (g70) — file objects are mainly used for firmware updates, which a simulated DER doesn't need.
  • Authentication object (g120 Secure Authentication v5) is not implemented. Production utility deployments require it; if you're testing an SA-aware master, simulate the DNP3 side with a different tool until SA lands here.

When to use DNP3 vs SunSpec vs 2030.5

Driving from Reach for
Utility SCADA (typical) DNP3
Aggregator / DERMS (modern) IEEE 2030.5
Standards conformance test SunSpec Modbus
Custom test harness REST + WebSocket

All four interfaces expose the same underlying DER state. Pick the one your master is built for — the simulator handles them in parallel without state divergence.