-
Notifications
You must be signed in to change notification settings - Fork 51
/
spec.yaml
310 lines (298 loc) · 9.73 KB
/
spec.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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
openapi: 3.0.3
info:
version: 1.0.0
title: Tesla Powerwall 2 - Local Gateway API Documentation
description: |
## A community documented list of the endpoints available on the Tesla Powerwall 2
<span style="color:red">_It does take a few seconds for the documentation to load all of the definitions._</span>
### Contributing
This documentation is a work in progress. If you find any endpoints that are not documented, or are out of date, please contribute a
pull request on the [GitHub repository](https://github.com/vloschiavo/powerwall2). Not all of the endpoints in the README.md have
been converted over to OpenAPI spec. Endpoints removed from [README.md.workingcopy](README.md.workingcopy) have been converted over
and those remaining in README.md.workingcopy have not been converted over yet. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for
more information on how to contribute.
### How to use the Swagger UI Try it out feature against your own Powerwall
Please see [USING-SWAGGER-TRY-IT-OUT.md](USING-SWAGGER-TRY-IT-OUT.md) for more information on how to use the Swagger UI Try it out feature against your own Powerwall.
servers:
- url: https://{hostname}/api
variables:
hostname:
default: powerwall
description: the hostname of your Tesla Powerwall 2
tags:
- name: default
description: Endpoints that have been documented
- name: Undocumented
description: Endpoints that have not been documented yet
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
responses:
Accepted:
description: |
Accepted
The request has been accepted for processing, but the processing has not been completed.
NoContent:
description: |
No content
Mostly seen on delete endpoints where there is nothing for the API to return.
BadRequest:
description: |
Bad Request
The request was malformed or invalid.
Unauthorized:
description: |
Unauthorized
The Authorization Bearer Token header has not been set to a correct token value.
Forbidden:
description: |
Forbidden
User does not have adequate access rights
NotFound:
description: The specified resource was not found
BadGateway:
description: |
Bad Gateway
Common response for when the Powerwall is stopped and a request has been made to an endpoint for data.
ExpectationFailed:
description: |
Expectation Failed
InternalServerError:
description: |
Internal Server Error
ServiceUnavailable:
description: |
Service Unavailable
schemas:
MetersAggregatesMeter:
type: object
properties:
last_communication_time:
type: string
format: date-time
instant_power:
type: number
format: double
instant_reactive_power:
type: number
format: double
instant_apparent_power:
type: number
format: double
frequency:
type: number
format: double
energy_exported:
type: number
format: double
energy_imported:
type: number
format: double
instant_average_voltage:
type: number
format: double
instant_average_current:
type: number
format: double
i_a_current:
type: number
format: double
i_b_current:
type: number
format: double
i_c_current:
type: number
format: double
last_phase_voltage_communication_time:
type: string
format: date-time
last_phase_power_communication_time:
type: string
format: date-time
last_phase_energy_communication_time:
type: string
format: date-time
timeout:
type: number
num_meters_aggregated:
type: number
instant_total_current:
type: number
format: double
paths:
/{e}:
$ref: "./paths/e.yaml"
/auth/toggle/login:
$ref: "./paths/auth/toggle/login.yaml"
/auth/toggle/start:
$ref: "./paths/auth/toggle/start.yaml"
/auth/toggle/supported:
$ref: "./paths/auth/toggle/supported.yaml"
/autoconfig/cancel:
$ref: "./paths/autoconfig/cancel.yaml"
/autoconfig/retry:
$ref: "./paths/autoconfig/retry.yaml"
/autoconfig/run:
$ref: "./paths/autoconfig/run.yaml"
/autoconfig/status:
$ref: "./paths/autoconfig/status.yaml"
/config:
$ref: "./paths/config.yaml"
/config/completed:
$ref: "./paths/config/completed.yaml"
/customer:
$ref: "./paths/customer.yaml"
/customer/registration:
$ref: "./paths/customer/registration.yaml"
/customer/registration/legal:
$ref: "./paths/customer/registration/legal.yaml"
/devices/vitals:
$ref: "./paths/devices/vitals.yaml"
/generators:
$ref: "./paths/generators.yaml"
/generators/disconnect_types:
$ref: "./paths/generators/disconnect_types.yaml"
/installer:
$ref: "./paths/installer.yaml"
/installer/companies:
$ref: "./paths/installer/companies.yaml"
/legal/radio:
$ref: "./paths/legal/radio.yaml"
/logging:
$ref: "./paths/logging.yaml"
/login/Basic:
$ref: "./paths/login/basic.yaml"
/logout:
$ref: "./paths/logout.yaml"
/meters:
$ref: "./paths/meters.yaml"
/meters/{e}/ct_config:
$ref: "./paths/meters/e/ct_config.yaml"
/meters/{e}/cts:
$ref: "./paths/meters/e/cts.yaml"
/meters/{e}/invert_cts:
$ref: "./paths/meters/e/invert_cts.yaml"
/meters/{i}/commission:
$ref: "./paths/meters/i/commission.yaml"
/meters/{o.serial}/cts:
$ref: "./paths/meters/o.serial/cts.yaml"
/meters/aggregates:
$ref: "./paths/meters/aggregates.yaml"
/meters/detect_wired_meters:
$ref: "./paths/meters/detect_wired_meters.yaml"
/meters/inverter_meter_readings:
$ref: "./paths/meters/inverter_meter_readings.yaml"
/meters/readings:
$ref: "./paths/meters/readings.yaml"
/meters/site:
$ref: "./paths/meters/site.yaml"
/meters/solar:
$ref: "./paths/meters/solar.yaml"
/meters/status:
$ref: "./paths/meters/status.yaml"
/meters/verify:
$ref: "./paths/meters/verify.yaml"
/networks:
$ref: "./paths/networks.yaml"
/networks/{e}/disconnect:
$ref: "./paths/networks/e/disconnect.yaml"
/networks/access_points:
$ref: "./paths/networks/access_points.yaml"
/networks/client_protocols:
$ref: "./paths/networks/client_protocols.yaml"
/networks/connect:
$ref: "./paths/networks/connect.yaml"
/networks/enable_{e}:
$ref: "./paths/networks/enable_e.yaml"
/networks/request_scan_wifi:
$ref: "./paths/networks/request_scan_wifi.yaml"
/operation:
$ref: "./paths/operation.yaml"
/password/change:
$ref: "./paths/password/change.yaml"
/password/generate:
$ref: "./paths/password/generate.yaml"
/password/reset:
$ref: "./paths/password/reset.yaml"
/powerwalls:
$ref: "./paths/powerwalls.yaml"
/powerwalls/enable_inverter_solar_meter_readings:
$ref: "./paths/powerwalls/enable_inverter_solar_meter_readings.yaml"
/powerwalls/phase_detection:
$ref: "./paths/powerwalls/phase_detection.yaml"
/powerwalls/phase_usages:
$ref: "./paths/powerwalls/phase_usages.yaml"
/powerwalls/pvi_power_status:
$ref: "./paths/powerwalls/pvi_power_status.yaml"
/powerwalls/pvi_sub_package_numbers:
$ref: "./paths/powerwalls/pvi_sub_package_numbers.yaml"
/powerwalls/scan:
$ref: "./paths/powerwalls/scan.yaml"
/powerwalls/status:
$ref: "./paths/powerwalls/status.yaml"
/powerwalls/update:
$ref: "./paths/powerwalls/update.yaml"
/site_info:
$ref: "./paths/site_info.yaml"
/site_info/export_mode:
$ref: "./paths/site_info/export_mode.yaml"
/site_info/extra_programs:
$ref: "./paths/site_info/extra_programs.yaml"
/site_info/grid_code:
$ref: "./paths/site_info/grid_code.yaml"
/site_info/grid_regions:
$ref: "./paths/site_info/grid_regions.yaml"
/site_info/offgrid:
$ref: "./paths/site_info/offgrid.yaml"
/site_info/site_name:
$ref: "./paths/site_info/site_name.yaml"
/site_info/timezone:
$ref: "./paths/site_info/timezone.yaml"
/sitemaster:
$ref: "./paths/sitemaster.yaml"
/sitemaster/run:
$ref: "./paths/sitemaster/run.yaml"
/sitemaster/run_for_commissioning:
$ref: "./paths/sitemaster/run_for_commissioning.yaml"
/sitemaster/stop:
$ref: "./paths/sitemaster/stop.yaml"
/solar_powerwall/reset:
$ref: "./paths/solar_powerwall/reset.yaml"
/solars:
$ref: "./paths/solars.yaml"
/solars/brands:
$ref: "./paths/solars/brands.yaml"
/solars/brands/{e}:
$ref: "./paths/solars/brands/e.yaml"
/status:
$ref: "./paths/status.yaml"
/synchrometer/ct_voltage_references:
$ref: "./paths/synchrometer/ct_voltage_references.yaml"
/synchrometer/ct_voltage_references/options:
$ref: "./paths/synchrometer/ct_voltage_references/options.yaml"
/system/networks/conn_tests:
$ref: "./paths/system/networks/conn_tests.yaml"
/system/testing:
$ref: "./paths/system/testing.yaml"
/system/testing/PINV_TEST:
$ref: "./paths/system/testing/PINV_TEST.yaml"
/system/update:
$ref: "./paths/system/update.yaml"
/system/update/status:
$ref: "./paths/system/update/status.yaml"
/system/update/urgency:
$ref: "./paths/system/update/urgency.yaml"
/system_status:
$ref: "./paths/system_status.yaml"
/system_status/grid_faults:
$ref: "./paths/system_status/grid_faults.yaml"
/system_status/grid_status:
$ref: "./paths/system_status/grid_status.yaml"
/system_status/soe:
$ref: "./paths/system_status/soe.yaml"
/troubleshooting/problems:
$ref: "./paths/troubleshooting/problems.yaml"
/v2/islanding/mode:
$ref: "./paths/v2/islanding/mode.yaml"