Skip to content

Flow of an event through Plaid with default Plugin

Events are generated in the VTN, sent to Plaid, which will parse it and then call the appropriate endpoints through the default plugin. This will give an example of how one single event is created and propagated through Plaid to ultimately the customer's end system.

Event Flow

Event Flow

  1. VTN creates a new event
  2. VTN creates an oadrDistributeEvent
  3. Plaid logs that new event is processing and posts event parameters json object (and continues to log ongoing event activities, not detailed here)
  4. Plaid acknowledges event and responds with oadrCreatedEvent
  5. VTN acknowledges Plaid's created event with an oadrResponse
  6. Plaid default plugin sends payload to event endpoint to notify about the event
  7. When event start time comes, Plaid default plugin sends payload to startEvent endpoint
  8. Simultaneously with event start time, Plaid default plugin sends payload to startEventInterval endpoint with information about the first interval
  9. If there are more intervals, Plaid will continue to send payload to startEventInterval at the time the interval starts
  10. When the event is over, plaid sends CompleteEvent payload to endEvent

Event Example

This example will detail the actual files sent by the VTN using an example event. This example was built using canvas as the VTN.

Event Creation

The event was created in canvas with the following parameters

  • Signal Name: ENERGY_PRICE
  • Signal Type: Price
  • Duration: 10 minutes, split into two 5 minute intervals
  • Payload: 0.15 for the first 5 minutes and 0.1 for the second 5 minutes

XML event sent by VTN

Note - there are a lot of lines so prepare to scroll!

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns2:oadrPayload
    xmlns="http://www.w3.org/2000/09/xmldsig#"
    xmlns:ns2="http://openadr.org/oadr-2.0b/2012/07"
    xmlns:ns3="http://docs.oasis-open.org/ns/energyinterop/201110"
    xmlns:ns4="http://docs.oasis-open.org/ns/energyinterop/201110/payloads"
    xmlns:ns5="urn:ietf:params:xml:ns:icalendar-2.0"
    xmlns:ns6="http://docs.oasis-open.org/ns/emix/2011/06"
    xmlns:ns7="urn:ietf:params:xml:ns:icalendar-2.0:stream"
    xmlns:ns8="http://www.w3.org/2005/Atom"
    xmlns:ns9="http://docs.oasis-open.org/ns/emix/2011/06/power"
    xmlns:ns10="http://www.opengis.net/gml/3.2"
    xmlns:ns11="http://docs.oasis-open.org/ns/emix/2011/06/siscale"
    xmlns:ns12="http://www.w3.org/2009/xmldsig11#"
    xmlns:ns13="http://openadr.org/oadr-2.0b/2012/07/xmldsig-properties"
    xmlns:ns14="urn:un:unece:uncefact:codelist:standard:5:ISO42173A:2010-04-07">
    <ns2:oadrSignedObject>
        <ns2:oadrDistributeEvent ns3:schemaVersion="2.0b">
            <ns3:eiResponse>
                <ns3:responseCode>200</ns3:responseCode>
                <ns3:responseDescription>OK</ns3:responseDescription>
                <ns4:requestID>2566b008a6d74bbceac4</ns4:requestID>
            </ns3:eiResponse>
            <ns4:requestID>0335958c010c0f61d2eb</ns4:requestID>
            <ns3:vtnID>NEBLAND_VTN</ns3:vtnID>
            <ns2:oadrEvent>
                <ns3:eiEvent>
                    <ns3:eventDescriptor>
                        <ns3:eventID>a5d1f1721b28bf8531be</ns3:eventID>
                        <ns3:modificationNumber>0</ns3:modificationNumber>
                        <ns3:modificationReason></ns3:modificationReason>
                        <ns3:priority>0</ns3:priority>
                        <ns3:eiMarketContext>
                            <ns6:marketContext>http://MarketContext2</ns6:marketContext>
                        </ns3:eiMarketContext>
                        <ns3:createdDateTime>2019-12-04T21:13:10.000Z</ns3:createdDateTime>
                        <ns3:eventStatus>far</ns3:eventStatus>
                        <ns3:testEvent>false</ns3:testEvent>
                        <ns3:vtnComment></ns3:vtnComment>
                    </ns3:eventDescriptor>
                    <ns3:eiActivePeriod>
                        <ns5:properties>
                            <ns5:dtstart>
                                <ns5:date-time>2019-12-04T21:17:00.000Z</ns5:date-time>
                            </ns5:dtstart>
                            <ns5:duration>
                                <ns5:duration>PT10M</ns5:duration>
                            </ns5:duration>
                            <ns5:tolerance>
                                <ns5:tolerate>
                                    <ns5:startafter>PT0M</ns5:startafter>
                                </ns5:tolerate>
                            </ns5:tolerance>
                            <ns3:x-eiNotification>
                                <ns5:duration>PT0M</ns5:duration>
                            </ns3:x-eiNotification>
                            <ns3:x-eiRampUp>
                                <ns5:duration>PT0M</ns5:duration>
                            </ns3:x-eiRampUp>
                            <ns3:x-eiRecovery>
                                <ns5:duration>PT0M</ns5:duration>
                            </ns3:x-eiRecovery>
                        </ns5:properties>
                        <ns5:components
                            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
          </ns3:eiActivePeriod>
          <ns3:eiEventSignals>
            <ns3:eiEventSignal>
              <ns7:intervals>
                <ns3:interval>
                  <ns5:duration>
                    <ns5:duration>PT5M</ns5:duration>
                  </ns5:duration>
                  <ns5:uid>
                    <ns5:text>0</ns5:text>
                  </ns5:uid>
                  <ns3:signalPayload>
                    <ns3:payloadFloat>
                      <ns3:value>0.15</ns3:value>
                    </ns3:payloadFloat>
                  </ns3:signalPayload>
                </ns3:interval>
                <ns3:interval>
                  <ns5:duration>
                    <ns5:duration>PT5M</ns5:duration>
                  </ns5:duration>
                  <ns5:uid>
                    <ns5:text>1</ns5:text>
                  </ns5:uid>
                  <ns3:signalPayload>
                    <ns3:payloadFloat>
                      <ns3:value>0.1</ns3:value>
                    </ns3:payloadFloat>
                  </ns3:signalPayload>
                </ns3:interval>
              </ns7:intervals>
              <ns3:signalName>ENERGY_PRICE</ns3:signalName>
              <ns3:signalType>price</ns3:signalType>
              <ns3:signalID>150a42aec03bc99338dc</ns3:signalID>
              <ns3:currentValue>
                <ns3:payloadFloat>
                  <ns3:value>0.0</ns3:value>
                </ns3:payloadFloat>
              </ns3:currentValue>
            </ns3:eiEventSignal>
          </ns3:eiEventSignals>
          <ns3:eiTarget>
            <ns3:venID>911751d3cdf5db7fc78f</ns3:venID>
          </ns3:eiTarget>
        </ns3:eiEvent>
        <ns2:oadrResponseRequired>always</ns2:oadrResponseRequired>
      </ns2:oadrEvent>
      <ns2:oadrEvent>
        <ns3:eiEvent>
          <ns3:eventDescriptor>
            <ns3:eventID>71795fdd5189d8f08cf6</ns3:eventID>
            <ns3:modificationNumber>0</ns3:modificationNumber>
            <ns3:modificationReason></ns3:modificationReason>
            <ns3:priority>0</ns3:priority>
            <ns3:eiMarketContext>
              <ns6:marketContext>http://MarketContext2</ns6:marketContext>
            </ns3:eiMarketContext>
            <ns3:createdDateTime>2019-12-04T21:13:10.000Z</ns3:createdDateTime>
            <ns3:eventStatus>completed</ns3:eventStatus>
            <ns3:testEvent>false</ns3:testEvent>
            <ns3:vtnComment></ns3:vtnComment>
          </ns3:eventDescriptor>
          <ns3:eiActivePeriod>
            <ns5:properties>
              <ns5:dtstart>
                <ns5:date-time>2019-12-04T20:59:00.000Z</ns5:date-time>
              </ns5:dtstart>
              <ns5:duration>
                <ns5:duration>PT10M</ns5:duration>
              </ns5:duration>
              <ns5:tolerance>
                <ns5:tolerate>
                  <ns5:startafter>PT0M</ns5:startafter>
                </ns5:tolerate>
              </ns5:tolerance>
              <ns3:x-eiNotification>
                <ns5:duration>PT0M</ns5:duration>
              </ns3:x-eiNotification>
              <ns3:x-eiRampUp>
                <ns5:duration>PT0M</ns5:duration>
              </ns3:x-eiRampUp>
              <ns3:x-eiRecovery>
                <ns5:duration>PT0M</ns5:duration>
              </ns3:x-eiRecovery>
            </ns5:properties>
            <ns5:components
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
          </ns3:eiActivePeriod>
          <ns3:eiEventSignals>
            <ns3:eiEventSignal>
              <ns7:intervals>
                <ns3:interval>
                  <ns5:duration>
                    <ns5:duration>PT5M</ns5:duration>
                  </ns5:duration>
                  <ns5:uid>
                    <ns5:text>1</ns5:text>
                  </ns5:uid>
                  <ns3:signalPayload>
                    <ns3:payloadFloat>
                      <ns3:value>0.15</ns3:value>
                    </ns3:payloadFloat>
                  </ns3:signalPayload>
                </ns3:interval>
                <ns3:interval>
                  <ns5:duration>
                    <ns5:duration>PT5M</ns5:duration>
                  </ns5:duration>
                  <ns5:uid>
                    <ns5:text>2</ns5:text>
                  </ns5:uid>
                  <ns3:signalPayload>
                    <ns3:payloadFloat>
                      <ns3:value>0.1</ns3:value>
                    </ns3:payloadFloat>
                  </ns3:signalPayload>
                </ns3:interval>
              </ns7:intervals>
              <ns3:signalName>ENERGY_PRICE</ns3:signalName>
              <ns3:signalType>price</ns3:signalType>
              <ns3:signalID>717b89f726bec990bd0c</ns3:signalID>
              <ns3:currentValue>
                <ns3:payloadFloat>
                  <ns3:value>0.0</ns3:value>
                </ns3:payloadFloat>
              </ns3:currentValue>
            </ns3:eiEventSignal>
          </ns3:eiEventSignals>
          <ns3:eiTarget>
            <ns3:venID>911751d3cdf5db7fc78f</ns3:venID>
          </ns3:eiTarget>
        </ns3:eiEvent>
        <ns2:oadrResponseRequired>always</ns2:oadrResponseRequired>
      </ns2:oadrEvent>
    </ns2:oadrDistributeEvent>
  </ns2:oadrSignedObject>
</ns2:oadrPayload>

XML Sent by Plaid to VTN

<p1:oadrPayload xmlns:p1="http://openadr.org/oadr-2.0b/2012/07">
  <p1:oadrSignedObject>
    <p1:oadrCreatedEvent xmlns:p3="http://docs.oasis-open.org/ns/energyinterop/201110" p3:schemaVersion="2.0b" xmlns:p2="http://docs.oasis-open.org/ns/energyinterop/201110/payloads">
      <p2:eiCreatedEvent xmlns:p3="http://docs.oasis-open.org/ns/energyinterop/201110">
        <p3:eiResponse>
          <p3:responseCode>200</p3:responseCode>
          <p3:responseDescription>OK</p3:responseDescription>
          <p2:requestID/>
        </p3:eiResponse>
        <p3:eventResponses>
          <p3:eventResponse>
            <p3:responseCode>200</p3:responseCode>
            <p3:responseDescription>OK</p3:responseDescription>
            <p2:requestID>7bef59051d3d5adb46e2</p2:requestID>
            <p3:qualifiedEventID>
              <p3:eventID>ad1c3eecb86f60a1d0dc</p3:eventID>
              <p3:modificationNumber>0</p3:modificationNumber>
            </p3:qualifiedEventID>
            <p3:optType>optIn</p3:optType>
          </p3:eventResponse>
          <p3:eventResponse>
            <p3:responseCode>200</p3:responseCode>
            <p3:responseDescription>OK</p3:responseDescription>
            <p2:requestID>7bef59051d3d5adb46e2</p2:requestID>
            <p3:qualifiedEventID>
              <p3:eventID>71795fdd5189d8f08cf6</p3:eventID>
              <p3:modificationNumber>0</p3:modificationNumber>
            </p3:qualifiedEventID>
            <p3:optType>optIn</p3:optType>
          </p3:eventResponse>
          <p3:eventResponse>
            <p3:responseCode>200</p3:responseCode>
            <p3:responseDescription>OK</p3:responseDescription>
            <p2:requestID>7bef59051d3d5adb46e2</p2:requestID>
            <p3:qualifiedEventID>
              <p3:eventID>a5d1f1721b28bf8531be</p3:eventID>
              <p3:modificationNumber>0</p3:modificationNumber>
            </p3:qualifiedEventID>
            <p3:optType>optIn</p3:optType>
          </p3:eventResponse>
        </p3:eventResponses>
        <p3:venID>911751d3cdf5db7fc78f</p3:venID>
      </p2:eiCreatedEvent>
    </p1:oadrCreatedEvent>
  </p1:oadrSignedObject>
</p1:oadrPayload>

JSON payloads delivered by Plaid Default Plugin

Upon Event Generation, post to Event

{
  "dtStartTimet": 1575494220,
  "durationInSeconds": 600,
  "eventId": "a5d1f1721b28bf8531be",
  "notifierEventType": "OnEvent",
  "payload": 0.150000005960464,
  "pluginApiVersion": "0.8",
  "pluginVersion": "0.1",
  "randomized": false,
  "randomizedSeconds": 0,
  "signalName": "ENERGY_PRICE",
  "signalType": "price",
  "status": "far",
  "targets": {
    "groupIds": [],
    "partyId": "",
    "resourceIds": [],
    "venId": "911751d3cdf5db7fc78f"
  }
}

At Event Start Time

{
  "dtStartTimet": 1575494220,
  "durationInSeconds": 600,
  "eventId": "a5d1f1721b28bf8531be",
  "notifierEventType": "StartEvent",
  "payload": 0.150000005960464,
  "pluginApiVersion": "0.8",
  "pluginVersion": "0.1",
  "signalName": "ENERGY_PRICE",
  "signalType": "price",
  "status": "active",
  "targets": {
    "groupIds": [],
    "partyId": "",
    "resourceIds": [],
    "venId": "911751d3cdf5db7fc78f"
  }
}

At interval 1 start time

{
  "dtIntervalStartTimet": 1575494220,
  "dtStartTimet": 1575494220,
  "durationInSeconds": 600,
  "eventId": "a5d1f1721b28bf8531be",
  "intervalDurationInSeconds": 300,
  "notifierEventType": "StartEventInterval",
  "payload": 0.150000005960464,
  "pluginApiVersion": "0.8",
  "pluginVersion": "0.1",
  "signalName": "ENERGY_PRICE",
  "signalType": "price",
  "status": "active",
  "targets": {
    "groupIds": [],
    "partyId": "",
    "resourceIds": [],
    "venId": "911751d3cdf5db7fc78f"
  }
}

At interval 2 start time

{
  "dtIntervalStartTimet": 1575494520,
  "dtStartTimet": 1575494220,
  "durationInSeconds": 600,
  "eventId": "a5d1f1721b28bf8531be",
  "intervalDurationInSeconds": 300,
  "notifierEventType": "StartEventInterval",
  "payload": 0.100000001490116,
  "pluginApiVersion": "0.8",
  "pluginVersion": "0.1",
  "signalName": "ENERGY_PRICE",
  "signalType": "price",
  "status": "active",
  "targets": {
    "groupIds": [],
    "partyId": "",
    "resourceIds": [],
    "venId": "911751d3cdf5db7fc78f"
  }
}

At event end time

{
  "eventId": "a5d1f1721b28bf8531be",
  "notifierEventType": "CompleteEvent",
  "pluginApiVersion": "0.8",
  "pluginVersion": "0.1"
}