Conditional agreements
This guide will help you get started with integration for conditional agreements.
Last updated
Was this helpful?
This guide will help you get started with integration for conditional agreements.
Last updated
Was this helpful?
To comply with contractual rules for curtailing the power of a customer resource (e.g. an EV charging site), limit requests from the grid owner must be handled by integrating with the Switch platform. The requests are generated as events within the OpenADR standard. Each event covers a 15-minute delivery period where average resource power levels must be below the specified limit. Each 15-minute delivery period can only contain a single event per resource. Resources must also report their real-time data by sending readings of their active power usage to the Switch API.
Some resources support an advanced mode of curtailing using dynamic limits. Dynamic limits differ from the normal behavior in two ways:
The limit for a specific delivery period might not be equal to the configured resource limit. It can be set to a higher or equal value, but never lower.
The delivery limit might change at any time before the delivery period starts. This is done by updating the OpenADR event for the delivery period.
First of all, you'll need to be set up and get accustomed to working with the . Next you need to create an and note the client ID and secret since you will need them further on.
In order to be able to fetch or send readings, you first need a valid access token that will be used to authorize your request to the Switch API.
To accomplish this you will need the previously noted client ID and client secret and use them to retrieve valid access token by following the client credentials flow as described in page. Please note the endpoint for retrieving the token as stated in page depending on which environment you want to interface with.
When you have your access token ready, proceed with the next step.
You can use the endpoint to find information about the resources available in your organization. The ID of a specific resource is needed to handle requests and reports. It's also possible to view the resource information in the Switch app, as described in the section.
You can use the Switch app (QA environment only) to create your own events for test purposes. First, navigate to Conditional agreements/Requests
in the top menu. On that page you'll find a button in the top right corner to create manual requests, which will open a dialog:
You can select one or multiple resources to create requests for. All created requests will be listed in the table on the page and will be available as OpenADR events.
Once you've successfully fetched an event you can proceed to the next step.
To verify that the resource power levels was below the event delivery limit, you can check the updated data included in the event, which should be available within 30 minutes of the end of the delivery period (i.e. start time + 15 minutes). As shown in the payload example below, both the validation status and the reading value are included:
When all previous steps are completed, you should be ready for a full test procedure. This typically involves on-site verification of enforced limits of e.g. EV chargers, based on a test event created by the grid owner. When the testing is completed, the resource may be approved for normal operation.
To fetch limit requests in the form of events, you first need to create a VTN client and secret, as described in the section of the OpenADR 3 documentation.
Optionally, you can also setup a subscription to use webhooks for events instead of only using HTTP polling, as detailed in the section.
When you have an access token for OpenADR ready, you can test it by using the endpoint that . The response should contain the basic parameters of the OpenADR 3 program used by Switch, like the example below:
To fetch events, you can use the endpoint. We provide some as suggestions on how to implement authentication and polling for events. To learn more about the structure of a typical event, visit the page.
All events must be acknowledged by sending a report back to the VTN using the . This must be done within 5 minutes after the event was created or the event limit was updated. To learn more about the structure of a typical acknowledgement report, visit the page.