App Pattern: DR Responder (OpenADR + Dispatch + Attest)
🏗️ Module 8: Build Real Apps
App Pattern: DR Responder (OpenADR + Dispatch + Attest)
Demand Response (DR) is when the grid operator says "we need you to reduce consumption NOW" and you get paid for doing it. This is the app that responds automatically.
The 3 DR Signal Types
| Signal | What It Means | Example | Response Time |
|---|---|---|---|
| Shed | Reduce load immediately | Turn off HVAC, dim lights | Minutes |
| Shift | Move load to a different time | Delay EV charging to off-peak | Hours |
| Shimmy | Fine-tune load continuously | Adjust battery charge rate to follow a signal | Seconds |
Most DR programs in the UAE use shed signals. DEWA sends the signal, you reduce load, you get paid.
Step 1: Create a DR Event
curl -s -X POST https://app.energyatit.com/api/v1/dr/events \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"signal_type": "shed",
"facility_id": "YOUR_FACILITY_UUID",
"scheduled_start": "2026-02-27T14:00:00Z",
"duration_minutes": 60,
"target_reduction_kw": 500
}'curl.exe --% -X POST -H "Authorization: Bearer $env:TOKEN" -H "Content-Type: application/json" -d "{"signal_type": "shed", "facility_id": "YOUR_FACILITY_UUID", "scheduled_start": "2026-02-27T14:00:00Z", "duration_minutes": 60, "target_reduction_kw": 500}" "https://app.energyatit.com/api/v1/dr/events"Step 2: Dispatch the Response
When the event time arrives, dispatch the actual load reduction:
curl -s -X POST https://app.energyatit.com/api/v1/dr/events/EVENT_UUID/dispatch \
-H "Authorization: Bearer $TOKEN"curl.exe --% -X POST -H "Authorization: Bearer $env:TOKEN" "https://app.energyatit.com/api/v1/dr/events/EVENT_UUID/dispatch"This sends commands to all controllable assets in the facility — batteries discharge, HVAC setpoints rise, non-critical loads shed.
Step 3: Settle and Attest
After the DR event completes, settle it with carbon attestation:
from energyatit import EnergyAtItClient
client = EnergyAtItClient(token="your_token")
result = client.settle_dr_event("EVENT_UUID")
print(f"DR Event settled: {result['settlement_id']}")
print(f"Carbon saved: {result['carbon_avoided_kg']} kg CO2e")
print(f"Payment earned: {result['payment_amount']} AED")The settlement includes a carbon attestation — cryptographic proof of the emissions you avoided. This is what makes EnergyAtIt different from a simple DR platform. You don't just respond to signals. You prove the environmental impact.
Log in to track your progress and earn certifications.