DNP3: Utility SCADA Communication
📡 Module 2: Industrial Protocols
DNP3: Utility SCADA Communication
DNP3 (Distributed Network Protocol 3) is the dominant SCADA protocol in North American utilities and is widely used in the Middle East, Australia, and parts of Asia. It was designed in the early 1990s to solve problems that Modbus could not: event-driven reporting, time-stamped data, and reliable delivery over unreliable links.
Architecture
DNP3 uses a master-outstation architecture:
- Master: The SCADA host or control center that polls outstations and issues commands
- Outstation: The remote device (RTU, IED, or gateway) that collects field data
Communication can be over TCP/IP (port 20000 by default), serial, or radio links.
Data Types (Point Types)
DNP3 defines specific point types:
| Type | Code | Description | Example |
|---|---|---|---|
| Binary Input | BI | Single-bit status | Breaker open/closed |
| Binary Output | BO | Single-bit control | Trip/close command |
| Analog Input | AI | 16/32-bit measured value | Voltage, current, power |
| Analog Output | AO | 16/32-bit setpoint | Tap position, power setpoint |
| Counter | CT | Accumulated value | Energy (kWh), operations count |
Each point has associated flags (online, restart, comm_lost, remote_forced, over_range, etc.) providing data quality information.
Event-Driven Reporting (Unsolicited Responses)
Unlike Modbus where the master must poll every register, DNP3 outstations can send unsolicited responses when values change. The outstation maintains an event buffer and sends events based on:
- Deadband: Analog values are reported when they change by more than a configurable threshold (e.g., voltage changes by > 0.5 V)
- Class assignments: Points are assigned to Class 1 (high priority), Class 2 (medium), or Class 3 (low). The master can poll by class.
This dramatically reduces bandwidth on constrained links. A typical DNP3 poll sequence:
Master -> Outstation: Integrity Poll (Class 0 - all current values)
Master -> Outstation: Event Poll (Class 1,2,3 - only changed values)
Outstation -> Master: Unsolicited Response (critical events)Secure Authentication (SA)
DNP3 Secure Authentication (SA, defined in IEEE 1815-2012) adds challenge-response authentication to prevent unauthorized commands. This is critical because DNP3 was originally designed with no security.
SA v5 uses HMAC-SHA-256 with pre-shared keys:
- Master sends a control command
- Outstation responds with an Authentication Challenge (challenge sequence number + random data)
- Master computes HMAC over the original command + challenge data and sends an Authentication Reply
- Outstation verifies the HMAC and executes the command if valid
DNP3 vs. IEC 61850
| Feature | DNP3 | IEC 61850 |
|---|---|---|
| Data model | Flat point lists | Hierarchical object model |
| Time stamps | Per-event, 1 ms resolution | Per-event, 1 ms resolution |
| Unsolicited reporting | Yes | Yes (MMS reports) |
| Peer-to-peer | No | Yes (GOOSE) |
| Configuration | Manual point mapping | SCL file import |
| Primary use | WAN SCADA | Substation LAN |
EnergyAtIt Integration
In EnergyAtIt, DNP3 communication is handled via a sidecar gateway pattern: a Python-based DNP3 master (using pydnp3/OpenDNP3) exposes a REST API that the Node.js application calls. This avoids the complexity of native C++ FFI bindings in Node.js while maintaining full DNP3 protocol support.
Node.js App --(HTTP)--> DNP3 Gateway (Python/Flask) --(DNP3 TCP)--> OutstationLog in to track your progress and earn certifications.