You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/teslemetry.md
+183Lines changed: 183 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -159,3 +159,186 @@ async def main():
159
159
160
160
asyncio.run(main())
161
161
```
162
+
163
+
## Get Streaming Fields
164
+
165
+
The `fields` method retrieves streaming field parameters and metadata.
166
+
167
+
```python
168
+
asyncdefmain():
169
+
asyncwith aiohttp.ClientSession() as session:
170
+
teslemetry = Teslemetry(
171
+
session=session,
172
+
access_token="<access_token>",
173
+
)
174
+
175
+
response =await teslemetry.fields()
176
+
print(response)
177
+
178
+
asyncio.run(main())
179
+
```
180
+
181
+
## Get Vehicle Configuration
182
+
183
+
The `vehicle_config` method retrieves the saved vehicle configuration for a specific vehicle.
184
+
185
+
```python
186
+
asyncdefmain():
187
+
asyncwith aiohttp.ClientSession() as session:
188
+
teslemetry = Teslemetry(
189
+
session=session,
190
+
access_token="<access_token>",
191
+
)
192
+
193
+
vin ="<vin>"
194
+
195
+
response =await teslemetry.vehicle_config(vin)
196
+
print(response)
197
+
198
+
asyncio.run(main())
199
+
```
200
+
201
+
## Get Streaming Configuration
202
+
203
+
The `streaming_config` method retrieves the streaming configuration for a specific vehicle, including certificate, hostname, port, and configurable telemetry fields.
204
+
205
+
```python
206
+
asyncdefmain():
207
+
asyncwith aiohttp.ClientSession() as session:
208
+
teslemetry = Teslemetry(
209
+
session=session,
210
+
access_token="<access_token>",
211
+
)
212
+
213
+
vin ="<vin>"
214
+
215
+
response =await teslemetry.streaming_config(vin)
216
+
print(response)
217
+
218
+
asyncio.run(main())
219
+
```
220
+
221
+
## Stop Streaming
222
+
223
+
The `stop_streaming` method stops streaming data from a specific vehicle.
224
+
225
+
```python
226
+
asyncdefmain():
227
+
asyncwith aiohttp.ClientSession() as session:
228
+
teslemetry = Teslemetry(
229
+
session=session,
230
+
access_token="<access_token>",
231
+
)
232
+
233
+
vin ="<vin>"
234
+
235
+
response =await teslemetry.stop_streaming(vin)
236
+
print(response)
237
+
238
+
asyncio.run(main())
239
+
```
240
+
241
+
## Modify Streaming Configuration
242
+
243
+
The `modify_streaming_config` method modifies the streaming configuration for a specific vehicle.
0 commit comments