Skip to main content

OpenADR

The OpenADR page configures GEM as an OpenADR Virtual End Node (VEN) for automated demand response. GEM connects to a utility's Virtual Top Node (VTN) server — either through a gateway device or directly — and responds to demand response events by running macros to shed or restore loads.

Open OpenADR

Tabs

The page has three tabs: Settings, Macros, and Status.


Device Selection

At the top of the page, select an existing OpenADR device or choose <New> to create one. Each device represents one OpenADR connection. Use the Delete button to remove a device.


Settings Tab

Mode

FieldDescription
ModeGateway (eisy / ISY) — connect through a pre-certified OpenADR gateway device. Direct VEN — connect directly to a VTN as a Virtual End Node.

The remaining settings change based on the selected mode.

Gateway Mode Settings

FieldDescription
Gateway URLIP or hostname of the eisy/ISY device (e.g., https://192.168.1.100). Required.
UsernameGateway login username. Default: admin.
PasswordGateway login password (stored encrypted).
Poll IntervalSeconds between polls to the gateway for new events. Minimum: 10. Default: 60.
EnabledToggle to enable or disable the device.

Direct VEN Mode Settings

FieldDescription
ProfileOpenADR protocol version. 2.0a supports basic DR events only. 2.0b (default) is the full profile with opt-in/opt-out services.
VTN URLBase URL of the VTN server (e.g., https://vtn.example.com). Required.
VEN NameName used to identify this VEN during registration. Default: GEM-VEN.
Poll IntervalSeconds between polls to the VTN for new events. Minimum: 10. Default: 60.
EnabledToggle to enable or disable the device.

mTLS Certificates (Direct VEN Only)

Mutual TLS (mTLS) is used for secure communication with the VTN. Paste PEM-encoded certificates and keys in the text areas.

FieldDescription
Client CertificatePEM certificate for client authentication.
Client KeyPEM private key matching the client certificate.
CA CertificatePEM CA certificate to verify the VTN server.
Allow InsecureDisables TLS certificate verification. Only use for testing.
warning

Enabling Allow Insecure disables all TLS verification. Never use this in production.

Click Save to persist connection settings and create the device if new.


Macros Tab

Configure which macros run in response to demand response events.

info

When a DR event arrives, the driver runs the macro matching the signal level. If no level-specific macro is configured, the Shed Macro runs as a fallback. When all events end, the Restore Macro runs to return to normal operation.

FieldDescription
Restore MacroRuns when all events end — returns the building to normal operation.
Shed MacroFallback macro for any signal level without a level-specific macro.
Level 1 MacroRuns for moderate / pre-event signals (signal level 1).
Level 2 MacroRuns for high-priority signals (signal level 2).
Level 3 MacroRuns for critical signals (signal level 3 or higher).

Macro Context Variables

Event macros receive context variables that can be used in macro steps:

VariableDescription
event_idThe VTN event identifier
signal_levelCurrent signal level (numeric)
previous_signal_levelPrevious signal level (on updates only)
start_timeEvent start time (ISO 8601)
end_timeEvent end time (ISO 8601)

Click Save to persist macro assignments.


Status Tab

note

Save a device first to view status.

The status tab shows real-time connection and event information, refreshing automatically every 10 seconds.

Status Fields

FieldDescription
ModeGateway or Direct VEN.
ConnectionConnected (green) or Disconnected (red).
GatewayGateway connection status (gateway mode only).
Event StatusCurrent event state: idle, active, etc.
VEN IDID assigned by the VTN during registration.
Registration IDRegistration identifier from the VTN.
Last Event IDMost recent event ID received.
Last Signal LevelSignal level of the most recent event.
Opted OutWhether the VEN has opted out of events.
Active EventsNumber of currently active DR events.

Actions

ButtonDescription
Register(Re-)register with the VTN server (direct mode only).
Poll NowImmediately poll for new events.
Opt InOpt in to future events.
Opt OutOpt out of future events.
Test ShedManually trigger the shed macro for testing.
Test RestoreManually trigger the restore macro for testing.
RefreshRefresh the status display.

How It Works

Gateway Mode

  1. Polling — GEM polls the gateway device at the configured interval for OpenADR event data.
  2. Event Processing — When an event arrives, GEM evaluates the signal level and runs the appropriate macro.
  3. Event End — When all active events end, the restore macro runs.

The gateway device handles VTN registration and event acknowledgment on its own.

Direct VEN Mode

  1. Registration — GEM registers with the VTN as a VEN, providing its profile and transport details.
  2. Polling — GEM polls the VTN at the configured interval for demand response events.
  3. Event Processing — When an event arrives, GEM evaluates the signal level and runs the appropriate macro.
  4. Acknowledgment — GEM acknowledges events back to the VTN. Duplicate acknowledgments for the same event version are suppressed.
  5. Event End — When all active events end, the restore macro runs.

Zone Attributes

If zones are assigned to the OpenADR device, the driver updates demand response attributes on each zone:

AttributeDescription
dr_active1 if a DR event is active, 0 otherwise
dr_signal_levelCurrent signal level
dr_event_idCurrent event ID

These attributes can be used in Triggers for additional automation logic.

  • Macros - Creating event response macros
  • Triggers - Attribute-based automation
  • Devices - Device management