OpenADR & OCPP: Demand Response and EV Charging
📡 Module 2: Industrial Protocols
OpenADR & OCPP: Demand Response and EV Charging
These two protocols bridge the gap between the utility/grid operator and flexible loads (buildings, industrial facilities, EV chargers). They are application-layer protocols that ride on standard HTTP/WebSocket transports.
OpenADR 2.0b (Automated Demand Response)
OpenADR is an open standard for communicating demand response signals between utilities and their customers. It defines two roles:
- VTN (Virtual Top Node): The utility or aggregator that issues DR events
- VEN (Virtual End Node): The customer's system that receives and responds to DR events
#### Key Message Types
| Message | Direction | Purpose |
|---|---|---|
oadrDistributeEvent | VTN -> VEN | Signal a DR event (shed, shift, or generate) |
oadrCreatedEvent | VEN -> VTN | Acknowledge receipt and opt-in/opt-out |
oadrUpdateReport | VEN -> VTN | Send telemetry data (power, energy) |
oadrRegisterReport | VEN -> VTN | Declare what data the VEN can report |
oadrPoll | VEN -> VTN | Pull-mode polling for new events (simple HTTP) |
#### Event Structure
An OpenADR event contains:
<oadrEvent>
<eiEvent>
<eventDescriptor>
<eventID>event-2026-02-21-001</eventID>
<priority>1</priority>
<eiMarketContext>http://dewa.gov.ae/dr-program</eiMarketContext>
</eventDescriptor>
<eiActivePeriod>
<dtstart>2026-02-21T14:00:00Z</dtstart>
<duration>PT2H</duration>
</eiActivePeriod>
<eiEventSignals>
<eiEventSignal>
<signalName>SIMPLE</signalName>
<signalType>level</signalType>
<currentValue>2</currentValue> <!-- 0=normal, 1=moderate, 2=high, 3=critical -->
</eiEventSignal>
</eiEventSignals>
</eiEvent>
</oadrEvent>#### XML Signatures
OpenADR messages are signed using XML-DSIG (xmldsig) with X.509 certificates. EnergyAtIt uses the xml-crypto library to sign outgoing messages and verify incoming ones.
OCPP 2.0.1 (Open Charge Point Protocol)
OCPP is the standard for communication between EV chargers (Charge Points) and a central management system (CSMS). Version 2.0.1 uses WebSocket + JSON (replacing SOAP/XML in 1.6).
#### Connection Model
Charge Point --(WebSocket)--> CSMS (Central System Management System)
ws://csms.example.com/ocpp/CP001Each charge point maintains a persistent WebSocket connection. The URL path includes the charge point ID.
#### Key Messages
Charge Point -> CSMS:
BootNotification: Charge point announces itself (vendor, model, serial number)StatusNotification: Connector status change (Available, Occupied, Faulted)TransactionEvent: Charging session lifecycle (Started, Updated, Ended)MeterValues: Periodic energy and power readingsHeartbeat: Keep-alive (every 5-10 minutes)
CSMS -> Charge Point:
RequestStartTransaction: Remote start (for app-based charging)RequestStopTransaction: Remote stopSetChargingProfile: Power limits and schedulesChangeAvailability: Take connector in/out of serviceTriggerMessage: Request immediate status update
#### Smart Charging Profiles
OCPP's SetChargingProfile enables fine-grained power control for demand response:
{
"chargingProfile": {
"id": 1,
"stackLevel": 0,
"chargingProfilePurpose": "TxProfile",
"chargingProfileKind": "Absolute",
"chargingSchedule": [{
"chargingRateUnit": "W",
"chargingSchedulePeriod": [
{ "startPeriod": 0, "limit": 22000 },
{ "startPeriod": 3600, "limit": 7000 },
{ "startPeriod": 7200, "limit": 22000 }
]
}]
}
}This curtails the charger from 22 kW to 7 kW for one hour, then restores it. EnergyAtIt integrates this with OpenADR events: when a DR signal arrives, the system automatically generates OCPP charging profiles for affected chargers.
Log in to track your progress and earn certifications.