Implementing event Opts with the default plugin
"Opt" is used to tell the VTN whether the VEN, or specific resources under the VEN, will be participating in an event. There are two ways to opt in or out of an event in OpenADR:
1: When responding to an event, include an opt in or out in the response 2: Later, using the EiOpt service (defined in section 8.5 of the OpenADR specification)
The typical implementation would be to by default opt-in as the whole VEN, and then use the EiOpt service to either opt out the whole VEN or individual resources. For example, if 10 sites are aggregated under one VEN and two of them are not participating, first the VEN would respond to the event with an OptIn, and then follow up via the Opt Service to opt out those two resources.
In the response to
cancelEvent functions, a response that Plaid will use to opt in or out of the event by default is requested. OptIn should typically be used by default, and only use OptOut if a critical service is down and the VEN should opt out of everything.
Plaid's API includes an endpoint for creating an opt for a specific resource ID. This creates an OptID, and references the
optReason (as defined by OpenADR spec, rarely used), the
resourceId to opt out of, and whether it is an
optOut. When this endpoint is hit, Plaid will send an opt message to the VTN with this information.
Creating Opt Schedules
OpenADR also has a (rarely used) concept of creating schedules via the EiOpt service that can convey to the VTN a period of either availability or unavailability for a particular resource ID. Similarly, the Plaid API has an endpoint that allows these types of opts to be created, and if needed cancelled.