-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsensiboDR.openapi.yaml
221 lines (208 loc) · 6.81 KB
/
sensiboDR.openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
openapi: 3.0.0
info:
title: Sensibo Demand Response API
version: 1.0.5
description: <h1>Description</h1> <p>The Sensibo Demand Response API is designed for orchestrating large scale smart grid events. <br>The orchestrator schedules an event and selects the participating audience and desired strategy.<br>The event will start executing at the specified time and will control the state of the eligible devices.<br>During the event and after, a detailed report will be available for monitoring and analysis. <br><br>An <b>event strategy</b> is the algorithm for deciding which devices to control and in what way. For example, a strategy may be to take all devices that are cooling to a target temperature of below 24 degrees and increase the target temperature to exactly 24 degrees. In the end of the event the devices will revert to their previous state.</p>
x-logo:
url: https://sensibo.github.io/logo.png
servers:
- url: https://home.sensibo.com/api/v3
paths:
/event:
post:
description: Creates a Demand Response Event
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/eventCreate'
security:
- api_key: []
responses:
'200':
description: Success. Returns the created object
'/event/{uid}':
put:
description: Modify the event
parameters:
- name: uid
in: path
description: event unique id
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/eventChange'
security:
- api_key: []
responses:
'200':
description: Success. Returns the created object
get:
description: Get a specific event info
parameters:
- name: uid
in: path
description: event unique id
required: true
schema:
type: string
security:
- api_key: []
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/event'
'/event/{uid}/report':
get:
description: Get a detailed event report
parameters:
- name: uid
in: path
description: event unique id
required: true
schema:
type: string
security:
- api_key: []
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: '#/components/schemas/eventReport'
/events:
get:
description: Get all Demand Response programs
responses:
'200':
description: List of event uids sorted from last to first
content:
application/json:
schema:
properties:
uids:
description: List of event uids
type: array
items:
type: string
components:
schemas:
eventCreationProperties:
type: object
properties:
startTime:
description: The start time (in UTC) of the DR event (2021-10-14T12:51:37Z)
format: string
duration:
type: integer
description: The duration of the DR event (in minutes)
startTimeWindow:
type: integer
default: 300
description: The number of seconds around the startTime in which the Event will start
endTimeWindow:
type: integer
description: The number of seconds around the endTime in which the Event will end
default: 300
executionStrategy:
type: string
description: The action performed on the customer's device during the DR event, e.g. "minimum_cooling_to_24"
devices:
description: List of participating devices
type: array
items:
type: string
description:
type: string
description: Optional user comments regarding the event
eventCreate:
type: object
required:
- startTime
- duration
- executionStrategy
- devices
allOf:
- $ref: '#/components/schemas/eventCreationProperties'
eventChange:
type: object
allOf:
- $ref: '#/components/schemas/eventCreationProperties'
properties:
devicesToAdd:
description: List of device uids to add to event
type: array
items:
type: string
devicesToRemove:
description: List of device uids to remove from event
type: array
items:
type: string
event:
allOf:
- $ref: '#/components/schemas/eventCreationProperties'
- type: object
properties:
status:
type: string
enum: [pending, started, ended]
description: The current state of the event
uid:
type: string
description: The uid of the event
eventReport:
type: object
properties:
status:
type: string
enum: [pending, started, ended]
description: The current state of the event
uid:
type: string
description: The uid of the event
allDevices:
description: List of device uids in event
type: array
items:
type: string
diconnectedAtStart:
description: List of device uids that were disconnect at the beginning of the event
# didn't match the strategy, e.g. were off
type: array
items:
type: string
diconnectedAtEnd:
description: List of device uids that were disconnect at the end of the event
# List of device uids that matched the strategy, received a command, and stayed until the end of the event
type: array
items:
type: string
alreadyOptimizedAtStart:
description: List of device uids that matched the strategy at the beginning of the event
type: array
items:
type: string
OptimizedAtEnd:
description: List of device uids that matched the strategy until the end of the event
type: array
items:
type: string
notOptimizedAtStart:
description: List of device uids that didn't match the strategy at the beginning of the event
type: array
items:
type: string
notOptimizedAtEnd:
description: List of device uids that didn't match the strategy at the end of the event
type: array
items:
type: string