openbyd 0.0.0-stage → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +147 -2
- package/dist/client.d.ts +168 -0
- package/dist/client.js +374 -0
- package/dist/functions.d.ts +32 -0
- package/dist/functions.js +48 -0
- package/dist/generated/errors.d.ts +114 -0
- package/dist/generated/errors.js +167 -0
- package/dist/generated/methods.d.ts +461 -0
- package/dist/generated/methods.js +926 -0
- package/dist/generated/models.d.ts +1361 -0
- package/dist/generated/models.js +191 -0
- package/dist/generated/shapes.d.ts +45 -0
- package/dist/generated/shapes.js +164 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +51 -0
- package/dist/native.d.ts +32 -0
- package/dist/native.js +53 -0
- package/dist/testing.d.ts +127 -0
- package/dist/testing.js +140 -0
- package/dist/wire.d.ts +32 -0
- package/dist/wire.js +130 -0
- package/package.json +53 -4
|
@@ -0,0 +1,1361 @@
|
|
|
1
|
+
/** Any JSON value. */
|
|
2
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
3
|
+
[key: string]: JsonValue;
|
|
4
|
+
};
|
|
5
|
+
/** A JSON object. */
|
|
6
|
+
export type JsonObject = {
|
|
7
|
+
[key: string]: JsonValue;
|
|
8
|
+
};
|
|
9
|
+
/** Remote control `commandType` values. */
|
|
10
|
+
export declare const RemoteCommand: {
|
|
11
|
+
readonly LOCK: "LOCKDOOR";
|
|
12
|
+
readonly UNLOCK: "OPENDOOR";
|
|
13
|
+
readonly START_CLIMATE: "OPENAIR";
|
|
14
|
+
readonly STOP_CLIMATE: "CLOSEAIR";
|
|
15
|
+
readonly SCHEDULE_CLIMATE: "BOOKINGAIR";
|
|
16
|
+
readonly FIND_CAR: "FINDCAR";
|
|
17
|
+
readonly FLASH_LIGHTS: "FLASHLIGHTNOWHISTLE";
|
|
18
|
+
readonly CLOSE_WINDOWS: "CLOSEWINDOW";
|
|
19
|
+
readonly OPEN_WINDOWS: "OPENWINDOW";
|
|
20
|
+
readonly SEAT_CLIMATE: "VENTILATIONHEATING";
|
|
21
|
+
readonly BATTERY_HEAT: "BATTERYHEAT";
|
|
22
|
+
readonly OPEN_TRUNK: "OPENTRUNK";
|
|
23
|
+
readonly CLOSE_TRUNK: "CLOSETRUNK";
|
|
24
|
+
readonly START_CHARGE: "SMARTCHARGESTART";
|
|
25
|
+
readonly STOP_CHARGE: "SMARTCHARGESTOP";
|
|
26
|
+
};
|
|
27
|
+
/** A value of `RemoteCommand`. */
|
|
28
|
+
export type RemoteCommand = (typeof RemoteCommand)[keyof typeof RemoteCommand];
|
|
29
|
+
/** Control command execution state. */
|
|
30
|
+
export declare const ControlState: {
|
|
31
|
+
readonly PENDING: 0;
|
|
32
|
+
readonly SUCCESS: 1;
|
|
33
|
+
readonly FAILURE: 2;
|
|
34
|
+
};
|
|
35
|
+
/** A value of `ControlState`. */
|
|
36
|
+
export type ControlState = (typeof ControlState)[keyof typeof ControlState];
|
|
37
|
+
/** Lifecycle state for deterministic command ACK correlation. */
|
|
38
|
+
export declare const CommandLifecycleStatus: {
|
|
39
|
+
readonly REGISTERED: "registered";
|
|
40
|
+
readonly MATCHED: "matched";
|
|
41
|
+
readonly EXPIRED: "expired";
|
|
42
|
+
readonly UNCORRELATED: "uncorrelated";
|
|
43
|
+
};
|
|
44
|
+
/** A value of `CommandLifecycleStatus`. */
|
|
45
|
+
export type CommandLifecycleStatus = (typeof CommandLifecycleStatus)[keyof typeof CommandLifecycleStatus];
|
|
46
|
+
/** A/C compressor switch, separate from the overall `HvacOverallStatus`. */
|
|
47
|
+
export declare const AcSwitch: {
|
|
48
|
+
readonly UNKNOWN: -1;
|
|
49
|
+
readonly OFF: 1;
|
|
50
|
+
readonly ON: 2;
|
|
51
|
+
};
|
|
52
|
+
/** A value of `AcSwitch`. */
|
|
53
|
+
export type AcSwitch = (typeof AcSwitch)[keyof typeof AcSwitch];
|
|
54
|
+
/** Overall HVAC on/off status. */
|
|
55
|
+
export declare const HvacOverallStatus: {
|
|
56
|
+
readonly UNKNOWN: -1;
|
|
57
|
+
readonly ON: 1;
|
|
58
|
+
readonly OFF: 2;
|
|
59
|
+
};
|
|
60
|
+
/** A value of `HvacOverallStatus`. */
|
|
61
|
+
export type HvacOverallStatus = (typeof HvacOverallStatus)[keyof typeof HvacOverallStatus];
|
|
62
|
+
/** A/C control mode. */
|
|
63
|
+
export declare const AirConditioningMode: {
|
|
64
|
+
readonly UNKNOWN: -1;
|
|
65
|
+
readonly OFF: 0;
|
|
66
|
+
readonly AUTO: 1;
|
|
67
|
+
readonly MANUAL: 2;
|
|
68
|
+
};
|
|
69
|
+
/** A value of `AirConditioningMode`. */
|
|
70
|
+
export type AirConditioningMode = (typeof AirConditioningMode)[keyof typeof AirConditioningMode];
|
|
71
|
+
/** Airflow direction (which vents blow). */
|
|
72
|
+
export declare const HvacWindMode: {
|
|
73
|
+
readonly UNKNOWN: -1;
|
|
74
|
+
readonly OFF: 0;
|
|
75
|
+
readonly FACE: 1;
|
|
76
|
+
readonly FACE_FOOT: 2;
|
|
77
|
+
readonly FOOT: 3;
|
|
78
|
+
readonly FOOT_DEFROST: 4;
|
|
79
|
+
readonly DEFROST: 5;
|
|
80
|
+
};
|
|
81
|
+
/** A value of `HvacWindMode`. */
|
|
82
|
+
export type HvacWindMode = (typeof HvacWindMode)[keyof typeof HvacWindMode];
|
|
83
|
+
/** Fan speed, 1 (lowest) to 7 (highest). */
|
|
84
|
+
export declare const HvacWindPosition: {
|
|
85
|
+
readonly UNKNOWN: -1;
|
|
86
|
+
readonly OFF: 0;
|
|
87
|
+
readonly POSITION_1: 1;
|
|
88
|
+
readonly POSITION_2: 2;
|
|
89
|
+
readonly POSITION_3: 3;
|
|
90
|
+
readonly POSITION_4: 4;
|
|
91
|
+
readonly POSITION_5: 5;
|
|
92
|
+
readonly POSITION_6: 6;
|
|
93
|
+
readonly POSITION_7: 7;
|
|
94
|
+
};
|
|
95
|
+
/** A value of `HvacWindPosition`. */
|
|
96
|
+
export type HvacWindPosition = (typeof HvacWindPosition)[keyof typeof HvacWindPosition];
|
|
97
|
+
/** Inbox category, the value is the `messageGroup` sent to the API. */
|
|
98
|
+
export declare const NotificationCategory: {
|
|
99
|
+
readonly VEHICLE: 1;
|
|
100
|
+
readonly SYSTEM: 2;
|
|
101
|
+
};
|
|
102
|
+
/** A value of `NotificationCategory`. */
|
|
103
|
+
export type NotificationCategory = (typeof NotificationCategory)[keyof typeof NotificationCategory];
|
|
104
|
+
/** Vehicle online/offline state. */
|
|
105
|
+
export declare const OnlineState: {
|
|
106
|
+
readonly UNKNOWN: -1;
|
|
107
|
+
readonly ONLINE: 1;
|
|
108
|
+
readonly OFFLINE: 2;
|
|
109
|
+
};
|
|
110
|
+
/** A value of `OnlineState`. */
|
|
111
|
+
export type OnlineState = (typeof OnlineState)[keyof typeof OnlineState];
|
|
112
|
+
/** T-Box connection state. */
|
|
113
|
+
export declare const ConnectState: {
|
|
114
|
+
readonly UNKNOWN: -1;
|
|
115
|
+
readonly DISCONNECTED: 0;
|
|
116
|
+
readonly CONNECTED: 1;
|
|
117
|
+
};
|
|
118
|
+
/** A value of `ConnectState`. */
|
|
119
|
+
export type ConnectState = (typeof ConnectState)[keyof typeof ConnectState];
|
|
120
|
+
/** Vehicle power state. */
|
|
121
|
+
export declare const VehicleState: {
|
|
122
|
+
readonly UNKNOWN: -1;
|
|
123
|
+
readonly OFF: 0;
|
|
124
|
+
readonly ON: 2;
|
|
125
|
+
};
|
|
126
|
+
/** A value of `VehicleState`. */
|
|
127
|
+
export type VehicleState = (typeof VehicleState)[keyof typeof VehicleState];
|
|
128
|
+
/** Charging state indicator. */
|
|
129
|
+
export declare const ChargingState: {
|
|
130
|
+
readonly UNKNOWN: -1;
|
|
131
|
+
readonly NOT_CHARGING: 0;
|
|
132
|
+
readonly CHARGING: 1;
|
|
133
|
+
readonly CONNECTED: 15;
|
|
134
|
+
};
|
|
135
|
+
/** A value of `ChargingState`. */
|
|
136
|
+
export type ChargingState = (typeof ChargingState)[keyof typeof ChargingState];
|
|
137
|
+
/** Sentry mode state. */
|
|
138
|
+
export declare const SentryStatus: {
|
|
139
|
+
readonly UNKNOWN: -1;
|
|
140
|
+
readonly ON: 2;
|
|
141
|
+
readonly OFF: 4;
|
|
142
|
+
};
|
|
143
|
+
/** A value of `SentryStatus`. */
|
|
144
|
+
export type SentryStatus = (typeof SentryStatus)[keyof typeof SentryStatus];
|
|
145
|
+
/** Unit used for tire pressure readings. */
|
|
146
|
+
export declare const TirePressureUnit: {
|
|
147
|
+
readonly UNKNOWN: -1;
|
|
148
|
+
readonly BAR: 1;
|
|
149
|
+
readonly PSI: 2;
|
|
150
|
+
readonly KPA: 3;
|
|
151
|
+
};
|
|
152
|
+
/** A value of `TirePressureUnit`. */
|
|
153
|
+
export type TirePressureUnit = (typeof TirePressureUnit)[keyof typeof TirePressureUnit];
|
|
154
|
+
/** Door/trunk open/closed state. */
|
|
155
|
+
export declare const DoorOpenState: {
|
|
156
|
+
readonly UNKNOWN: -1;
|
|
157
|
+
readonly CLOSED: 0;
|
|
158
|
+
readonly OPEN: 1;
|
|
159
|
+
};
|
|
160
|
+
/** A value of `DoorOpenState`. */
|
|
161
|
+
export type DoorOpenState = (typeof DoorOpenState)[keyof typeof DoorOpenState];
|
|
162
|
+
/** Door lock state. */
|
|
163
|
+
export declare const LockState: {
|
|
164
|
+
readonly UNKNOWN: -1;
|
|
165
|
+
readonly UNAVAILABLE: 0;
|
|
166
|
+
readonly UNLOCKED: 1;
|
|
167
|
+
readonly LOCKED: 2;
|
|
168
|
+
};
|
|
169
|
+
/** A value of `LockState`. */
|
|
170
|
+
export type LockState = (typeof LockState)[keyof typeof LockState];
|
|
171
|
+
/** Window open/closed state. */
|
|
172
|
+
export declare const WindowState: {
|
|
173
|
+
readonly UNKNOWN: -1;
|
|
174
|
+
readonly CLOSED: 1;
|
|
175
|
+
readonly OPEN: 2;
|
|
176
|
+
};
|
|
177
|
+
/** A value of `WindowState`. */
|
|
178
|
+
export type WindowState = (typeof WindowState)[keyof typeof WindowState];
|
|
179
|
+
/** Vehicle power state. */
|
|
180
|
+
export declare const PowerGear: {
|
|
181
|
+
readonly UNKNOWN: -1;
|
|
182
|
+
readonly OFF: 1;
|
|
183
|
+
readonly ON: 3;
|
|
184
|
+
};
|
|
185
|
+
/** A value of `PowerGear`. */
|
|
186
|
+
export type PowerGear = (typeof PowerGear)[keyof typeof PowerGear];
|
|
187
|
+
/** Steering wheel heating state. */
|
|
188
|
+
export declare const StearingWheelHeat: {
|
|
189
|
+
readonly ON: -1;
|
|
190
|
+
readonly NO_DATA: 0;
|
|
191
|
+
readonly OFF: 1;
|
|
192
|
+
};
|
|
193
|
+
/** A value of `StearingWheelHeat`. */
|
|
194
|
+
export type StearingWheelHeat = (typeof StearingWheelHeat)[keyof typeof StearingWheelHeat];
|
|
195
|
+
/** Seat heating / ventilation level. */
|
|
196
|
+
export declare const SeatHeatVentState: {
|
|
197
|
+
readonly UNKNOWN: -1;
|
|
198
|
+
readonly NO_DATA: 0;
|
|
199
|
+
readonly OFF: 1;
|
|
200
|
+
readonly LOW: 2;
|
|
201
|
+
readonly HIGH: 3;
|
|
202
|
+
};
|
|
203
|
+
/** A value of `SeatHeatVentState`. */
|
|
204
|
+
export type SeatHeatVentState = (typeof SeatHeatVentState)[keyof typeof SeatHeatVentState];
|
|
205
|
+
/** Air circulation mode. */
|
|
206
|
+
export declare const AirCirculationMode: {
|
|
207
|
+
readonly UNKNOWN: -1;
|
|
208
|
+
readonly UNAVAILABLE: 0;
|
|
209
|
+
readonly EXTERNAL: 1;
|
|
210
|
+
readonly INTERNAL: 2;
|
|
211
|
+
};
|
|
212
|
+
/** A value of `AirCirculationMode`. */
|
|
213
|
+
export type AirCirculationMode = (typeof AirCirculationMode)[keyof typeof AirCirculationMode];
|
|
214
|
+
/** Vehicle powertrain type. */
|
|
215
|
+
export declare const EnergyType: {
|
|
216
|
+
readonly UNKNOWN: -1;
|
|
217
|
+
readonly EV: 0;
|
|
218
|
+
readonly ICE: 1;
|
|
219
|
+
readonly HYBRID: 2;
|
|
220
|
+
};
|
|
221
|
+
/** A value of `EnergyType`. */
|
|
222
|
+
export type EnergyType = (typeof EnergyType)[keyof typeof EnergyType];
|
|
223
|
+
/** Seat position for heat/ventilation commands. */
|
|
224
|
+
export declare const SeatPosition: {
|
|
225
|
+
readonly DRIVER: "driver";
|
|
226
|
+
readonly COPILOT: "copilot";
|
|
227
|
+
readonly REAR_LEFT: "rear_left";
|
|
228
|
+
readonly REAR_RIGHT: "rear_right";
|
|
229
|
+
};
|
|
230
|
+
/** A value of `SeatPosition`. */
|
|
231
|
+
export type SeatPosition = (typeof SeatPosition)[keyof typeof SeatPosition];
|
|
232
|
+
/** Seat heat/ventilation intensity level. */
|
|
233
|
+
export declare const SeatLevel: {
|
|
234
|
+
readonly OFF: 0;
|
|
235
|
+
readonly LOW: 1;
|
|
236
|
+
readonly HIGH: 2;
|
|
237
|
+
};
|
|
238
|
+
/** A value of `SeatLevel`. */
|
|
239
|
+
export type SeatLevel = (typeof SeatLevel)[keyof typeof SeatLevel];
|
|
240
|
+
/** What a seat can do: heat or ventilate. */
|
|
241
|
+
export declare const SeatMode: {
|
|
242
|
+
readonly HEAT: "heat";
|
|
243
|
+
readonly VENTILATION: "ventilation";
|
|
244
|
+
};
|
|
245
|
+
/** A value of `SeatMode`. */
|
|
246
|
+
export type SeatMode = (typeof SeatMode)[keyof typeof SeatMode];
|
|
247
|
+
/**
|
|
248
|
+
* A single scheduled-climate timer (one `listInfo` entry).
|
|
249
|
+
*
|
|
250
|
+
* pyBYD's `ClimateBooking`, as `model_dump(mode="json")` gives it.
|
|
251
|
+
*/
|
|
252
|
+
export interface ClimateBooking {
|
|
253
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
254
|
+
readonly raw: JsonObject;
|
|
255
|
+
readonly booking_id: number | null;
|
|
256
|
+
/** An ISO 8601 date and time. */
|
|
257
|
+
readonly booking_time: string | null;
|
|
258
|
+
readonly main_setting_temp: number | null;
|
|
259
|
+
readonly main_setting_temp_new: number | null;
|
|
260
|
+
readonly time_span: number | null;
|
|
261
|
+
readonly ac_switch: number | null;
|
|
262
|
+
readonly cycle_mode: number | null;
|
|
263
|
+
readonly wind_level: number | null;
|
|
264
|
+
readonly wind_mode: number | null;
|
|
265
|
+
readonly air_condition_temp_range: number | null;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Scheduled-climate bookings for a vehicle (`getBookingList` response).
|
|
269
|
+
*
|
|
270
|
+
* pyBYD's `BookingList`, as `model_dump(mode="json")` gives it.
|
|
271
|
+
*/
|
|
272
|
+
export interface BookingList {
|
|
273
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
274
|
+
readonly raw: JsonObject;
|
|
275
|
+
readonly vin: string;
|
|
276
|
+
readonly allow_setting: number | null;
|
|
277
|
+
readonly config_data: number | null;
|
|
278
|
+
readonly bookings: ClimateBooking[];
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Smart charging status for a vehicle.
|
|
282
|
+
*
|
|
283
|
+
* pyBYD's `ChargingStatus`, as `model_dump(mode="json")` gives it.
|
|
284
|
+
*/
|
|
285
|
+
export interface ChargingStatus {
|
|
286
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
287
|
+
readonly raw: JsonObject;
|
|
288
|
+
readonly vin: string;
|
|
289
|
+
readonly soc: number | null;
|
|
290
|
+
readonly charging_state: number | null;
|
|
291
|
+
readonly connect_state: number | null;
|
|
292
|
+
readonly wait_status: number | null;
|
|
293
|
+
readonly full_hour: number | null;
|
|
294
|
+
readonly full_minute: number | null;
|
|
295
|
+
readonly charge_power: number | null;
|
|
296
|
+
readonly charge_power_unit: string | null;
|
|
297
|
+
/** An ISO 8601 date and time. */
|
|
298
|
+
readonly update_time: string | null;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Canonical command gate definition.
|
|
302
|
+
*
|
|
303
|
+
* pyBYD's `CommandGateRule`, as `model_dump(mode="json")` gives it.
|
|
304
|
+
*/
|
|
305
|
+
export interface CommandGateRule {
|
|
306
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
307
|
+
readonly raw: JsonObject;
|
|
308
|
+
readonly gate_id: string;
|
|
309
|
+
readonly command: RemoteCommand;
|
|
310
|
+
readonly required_function_nos: string[];
|
|
311
|
+
readonly required_learn_info_keys: string[];
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Evaluated support verdict for a command gate.
|
|
315
|
+
*
|
|
316
|
+
* pyBYD's `CommandGateVerdict`, as `model_dump(mode="json")` gives it.
|
|
317
|
+
*/
|
|
318
|
+
export interface CommandGateVerdict {
|
|
319
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
320
|
+
readonly raw: JsonObject;
|
|
321
|
+
readonly command: RemoteCommand;
|
|
322
|
+
readonly gate_id: string;
|
|
323
|
+
readonly supported: boolean;
|
|
324
|
+
readonly reason: string;
|
|
325
|
+
readonly required_function_nos: string[];
|
|
326
|
+
readonly matched_function_nos: string[];
|
|
327
|
+
readonly counterpart_function_nos: string[];
|
|
328
|
+
readonly required_learn_info_keys: string[];
|
|
329
|
+
readonly matched_learn_info_keys: string[];
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Result of a remote control command.
|
|
333
|
+
*
|
|
334
|
+
* pyBYD's `RemoteControlResult`, as `model_dump(mode="json")` gives it.
|
|
335
|
+
*/
|
|
336
|
+
export interface RemoteControlResult {
|
|
337
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
338
|
+
readonly raw: JsonObject;
|
|
339
|
+
readonly control_state: ControlState;
|
|
340
|
+
readonly success: boolean;
|
|
341
|
+
readonly request_serial: string | null;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Generic acknowledgement response for write/toggle endpoints.
|
|
345
|
+
*
|
|
346
|
+
* pyBYD's `CommandAck`, as `model_dump(mode="json")` gives it.
|
|
347
|
+
*/
|
|
348
|
+
export interface CommandAck {
|
|
349
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
350
|
+
readonly raw: JsonObject;
|
|
351
|
+
readonly vin: string;
|
|
352
|
+
readonly result: string | null;
|
|
353
|
+
readonly request_serial: string | null;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Terminal result of `/control/smartCharge/changeChargeStatue`.
|
|
357
|
+
*
|
|
358
|
+
* pyBYD's `ChargeChangeResult`, as `model_dump(mode="json")` gives it.
|
|
359
|
+
*/
|
|
360
|
+
export interface ChargeChangeResult {
|
|
361
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
362
|
+
readonly raw: JsonObject;
|
|
363
|
+
readonly vin: string;
|
|
364
|
+
readonly res: number | null;
|
|
365
|
+
readonly message: string | null;
|
|
366
|
+
readonly request_serial: string | null;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Structured MQTT remote-control acknowledgement event.
|
|
370
|
+
*
|
|
371
|
+
* pyBYD's `CommandAckEvent`, as `model_dump(mode="json")` gives it.
|
|
372
|
+
*/
|
|
373
|
+
export interface CommandAckEvent {
|
|
374
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
375
|
+
readonly raw: JsonObject;
|
|
376
|
+
readonly vin: string;
|
|
377
|
+
readonly request_serial: string | null;
|
|
378
|
+
readonly raw_uuid: string | null;
|
|
379
|
+
readonly result: string | null;
|
|
380
|
+
readonly success: boolean;
|
|
381
|
+
readonly timestamp: number | null;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Lifecycle event emitted by the client command ACK registry.
|
|
385
|
+
*
|
|
386
|
+
* pyBYD's `CommandLifecycleEvent`, as `model_dump(mode="json")` gives it.
|
|
387
|
+
*/
|
|
388
|
+
export interface CommandLifecycleEvent {
|
|
389
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
390
|
+
readonly raw: JsonObject;
|
|
391
|
+
readonly status: CommandLifecycleStatus;
|
|
392
|
+
readonly vin: string;
|
|
393
|
+
readonly request_serial: string | null;
|
|
394
|
+
readonly command: string | null;
|
|
395
|
+
readonly timestamp: number;
|
|
396
|
+
readonly ack: CommandAckEvent | null;
|
|
397
|
+
readonly reason: string | null;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Snapshot counters for command ACK registry diagnostics.
|
|
401
|
+
*
|
|
402
|
+
* pyBYD's `CommandAckDiagnostics`, as `model_dump(mode="json")` gives it.
|
|
403
|
+
*/
|
|
404
|
+
export interface CommandAckDiagnostics {
|
|
405
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
406
|
+
readonly raw: JsonObject;
|
|
407
|
+
readonly pending: number;
|
|
408
|
+
readonly matched: number;
|
|
409
|
+
readonly expired: number;
|
|
410
|
+
readonly uncorrelated: number;
|
|
411
|
+
readonly pending_by_vin: Record<string, number>;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Response from the control password verification endpoint.
|
|
415
|
+
*
|
|
416
|
+
* pyBYD's `VerifyControlPasswordResponse`, as `model_dump(mode="json")` gives it.
|
|
417
|
+
*/
|
|
418
|
+
export interface VerifyControlPasswordResponse {
|
|
419
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
420
|
+
readonly raw: JsonObject;
|
|
421
|
+
readonly vin: string;
|
|
422
|
+
readonly ok: boolean | null;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Parameters for starting HVAC immediately (commandType `OPENAIR`).
|
|
426
|
+
*
|
|
427
|
+
* The fields of pyBYD's `ClimateStartParams`, in camelCase.
|
|
428
|
+
*/
|
|
429
|
+
export interface ClimateStartParams {
|
|
430
|
+
temperature?: number | null | undefined;
|
|
431
|
+
copilotTemperature?: number | null | undefined;
|
|
432
|
+
/** Default `14.0`. */
|
|
433
|
+
tempOffset?: number | undefined;
|
|
434
|
+
/** Default `2`. */
|
|
435
|
+
cycleMode?: number | undefined;
|
|
436
|
+
timeSpan?: number | null | undefined;
|
|
437
|
+
/** Default `4`. */
|
|
438
|
+
remoteMode?: number | undefined;
|
|
439
|
+
/** Default `1`. */
|
|
440
|
+
airAccuracy?: number | undefined;
|
|
441
|
+
/** Default `1`. */
|
|
442
|
+
airConditioningMode?: number | undefined;
|
|
443
|
+
windLevel?: number | null | undefined;
|
|
444
|
+
airSet?: string | null | undefined;
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* Parameters for scheduling HVAC (commandType `BOOKINGAIR`).
|
|
448
|
+
*
|
|
449
|
+
* The fields of pyBYD's `ClimateScheduleParams`, in camelCase.
|
|
450
|
+
*/
|
|
451
|
+
export interface ClimateScheduleParams {
|
|
452
|
+
temperature?: number | null | undefined;
|
|
453
|
+
copilotTemperature?: number | null | undefined;
|
|
454
|
+
/** Default `14.0`. */
|
|
455
|
+
tempOffset?: number | undefined;
|
|
456
|
+
/** Default `2`. */
|
|
457
|
+
cycleMode?: number | undefined;
|
|
458
|
+
timeSpan?: number | null | undefined;
|
|
459
|
+
/** Default `1`. */
|
|
460
|
+
remoteMode?: number | undefined;
|
|
461
|
+
/** Default `1`. */
|
|
462
|
+
airAccuracy?: number | undefined;
|
|
463
|
+
/** Default `1`. */
|
|
464
|
+
airConditioningMode?: number | undefined;
|
|
465
|
+
windLevel?: number | null | undefined;
|
|
466
|
+
airSet?: string | null | undefined;
|
|
467
|
+
bookingId?: number | null | undefined;
|
|
468
|
+
bookingTime?: number | null | undefined;
|
|
469
|
+
/** Default `0`. */
|
|
470
|
+
acSwitch?: number | undefined;
|
|
471
|
+
windMode?: number | null | undefined;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Parameters for seat heating/ventilation (commandType `VENTILATIONHEATING`).
|
|
475
|
+
*
|
|
476
|
+
* The fields of pyBYD's `SeatClimateParams`, in camelCase.
|
|
477
|
+
*/
|
|
478
|
+
export interface SeatClimateParams {
|
|
479
|
+
chairType?: string | null | undefined;
|
|
480
|
+
/** Default `1`. */
|
|
481
|
+
remoteMode?: number | undefined;
|
|
482
|
+
/** Default `3`. */
|
|
483
|
+
mainHeat?: number | undefined;
|
|
484
|
+
/** Default `0`. */
|
|
485
|
+
mainVentilation?: number | undefined;
|
|
486
|
+
/** Default `3`. */
|
|
487
|
+
copilotHeat?: number | undefined;
|
|
488
|
+
/** Default `0`. */
|
|
489
|
+
copilotVentilation?: number | undefined;
|
|
490
|
+
/** Default `0`. */
|
|
491
|
+
lrSeatHeatState?: number | undefined;
|
|
492
|
+
/** Default `0`. */
|
|
493
|
+
lrSeatVentilationState?: number | undefined;
|
|
494
|
+
/** Default `0`. */
|
|
495
|
+
lrThirdHeatState?: number | undefined;
|
|
496
|
+
/** Default `0`. */
|
|
497
|
+
lrThirdVentilationState?: number | undefined;
|
|
498
|
+
/** Default `0`. */
|
|
499
|
+
rrSeatHeatState?: number | undefined;
|
|
500
|
+
/** Default `0`. */
|
|
501
|
+
rrSeatVentilationState?: number | undefined;
|
|
502
|
+
/** Default `0`. */
|
|
503
|
+
rrThirdHeatState?: number | undefined;
|
|
504
|
+
/** Default `0`. */
|
|
505
|
+
rrThirdVentilationState?: number | undefined;
|
|
506
|
+
/** Default `3`. */
|
|
507
|
+
steeringWheelHeatState?: number | undefined;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Parameters for battery heating (commandType `BATTERYHEAT`).
|
|
511
|
+
*
|
|
512
|
+
* The fields of pyBYD's `BatteryHeatParams`, in camelCase.
|
|
513
|
+
*/
|
|
514
|
+
export interface BatteryHeatParams {
|
|
515
|
+
on: boolean;
|
|
516
|
+
/** Default `2`. */
|
|
517
|
+
heatType?: number | undefined;
|
|
518
|
+
}
|
|
519
|
+
/**
|
|
520
|
+
* 7-day rolling consumption series.
|
|
521
|
+
*
|
|
522
|
+
* pyBYD's `EnergyConsumptionGraph`, as `model_dump(mode="json")` gives it.
|
|
523
|
+
*/
|
|
524
|
+
export interface EnergyConsumptionGraph {
|
|
525
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
526
|
+
readonly raw: JsonObject;
|
|
527
|
+
readonly energy_consumption: number[];
|
|
528
|
+
readonly energy_consumption_unit: string;
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Lifetime AVERAGE consumption rate, per leg.
|
|
532
|
+
*
|
|
533
|
+
* pyBYD's `CumulativeEnergyConsumption`, as `model_dump(mode="json")` gives it.
|
|
534
|
+
*/
|
|
535
|
+
export interface CumulativeEnergyConsumption {
|
|
536
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
537
|
+
readonly raw: JsonObject;
|
|
538
|
+
readonly total_mileage: number | null;
|
|
539
|
+
readonly mileage_unit: string;
|
|
540
|
+
readonly avg_ev_consumption: number | null;
|
|
541
|
+
readonly ev_unit: string;
|
|
542
|
+
readonly avg_oil_consumption: number | null;
|
|
543
|
+
readonly oil_unit: string;
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* Last-50km breakdown, per leg + driving-mode distribution.
|
|
547
|
+
*
|
|
548
|
+
* pyBYD's `NearestEnergyConsumption`, as `model_dump(mode="json")` gives it.
|
|
549
|
+
*/
|
|
550
|
+
export interface NearestEnergyConsumption {
|
|
551
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
552
|
+
readonly raw: JsonObject;
|
|
553
|
+
readonly avg_ev_consumption: number | null;
|
|
554
|
+
readonly ev_consumption: number | null;
|
|
555
|
+
readonly ev_unit: string;
|
|
556
|
+
readonly ev_value_unit: string;
|
|
557
|
+
readonly avg_oil_consumption: number | null;
|
|
558
|
+
readonly oil_consumption: number | null;
|
|
559
|
+
readonly oil_unit: string;
|
|
560
|
+
readonly oil_value_unit: string;
|
|
561
|
+
readonly avg_eq_oil_consumption: number | null;
|
|
562
|
+
readonly drive_distribution: number | null;
|
|
563
|
+
readonly elect_distribution: number | null;
|
|
564
|
+
readonly air_distribution: number | null;
|
|
565
|
+
readonly other_distribution: number | null;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Energy consumption data for a vehicle.
|
|
569
|
+
*
|
|
570
|
+
* pyBYD's `EnergyConsumption`, as `model_dump(mode="json")` gives it.
|
|
571
|
+
*/
|
|
572
|
+
export interface EnergyConsumption {
|
|
573
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
574
|
+
readonly raw: JsonObject;
|
|
575
|
+
readonly self_graph: EnergyConsumptionGraph | null;
|
|
576
|
+
readonly cumulative_energy_consumption: CumulativeEnergyConsumption | null;
|
|
577
|
+
readonly nearest_energy_consumption: NearestEnergyConsumption | null;
|
|
578
|
+
readonly auto_model_graph: EnergyConsumptionGraph | null;
|
|
579
|
+
/** An ISO 8601 date and time. */
|
|
580
|
+
readonly timestamp: string | null;
|
|
581
|
+
}
|
|
582
|
+
/**
|
|
583
|
+
* GPS location data for a vehicle.
|
|
584
|
+
*
|
|
585
|
+
* pyBYD's `GpsInfo`, as `model_dump(mode="json")` gives it.
|
|
586
|
+
*/
|
|
587
|
+
export interface GpsInfo {
|
|
588
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
589
|
+
readonly raw: JsonObject;
|
|
590
|
+
readonly latitude: number | null;
|
|
591
|
+
readonly longitude: number | null;
|
|
592
|
+
readonly speed: number | null;
|
|
593
|
+
readonly direction: number | null;
|
|
594
|
+
/** An ISO 8601 date and time. */
|
|
595
|
+
readonly gps_timestamp: string | null;
|
|
596
|
+
readonly request_serial: string | null;
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Current HVAC / climate control state.
|
|
600
|
+
*
|
|
601
|
+
* pyBYD's `HvacStatus`, as `model_dump(mode="json")` gives it.
|
|
602
|
+
*/
|
|
603
|
+
export interface HvacStatus {
|
|
604
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
605
|
+
readonly raw: JsonObject;
|
|
606
|
+
readonly ac_switch: AcSwitch | null;
|
|
607
|
+
readonly status: HvacOverallStatus | null;
|
|
608
|
+
readonly air_conditioning_mode: AirConditioningMode | null;
|
|
609
|
+
readonly wind_mode: HvacWindMode | null;
|
|
610
|
+
readonly wind_position: HvacWindPosition | null;
|
|
611
|
+
readonly cycle_choice: AirCirculationMode | null;
|
|
612
|
+
readonly main_setting_temp: number | null;
|
|
613
|
+
readonly main_setting_temp_new: number | null;
|
|
614
|
+
readonly copilot_setting_temp: number | null;
|
|
615
|
+
readonly copilot_setting_temp_new: number | null;
|
|
616
|
+
readonly temp_in_car: number | null;
|
|
617
|
+
readonly temp_out_car: number | null;
|
|
618
|
+
readonly whether_support_adjust_temp: number | null;
|
|
619
|
+
readonly vde_temp_range_min: number | null;
|
|
620
|
+
readonly vde_temp_range_max: number | null;
|
|
621
|
+
readonly front_defrost_status: number | null;
|
|
622
|
+
readonly electric_defrost_status: number | null;
|
|
623
|
+
readonly wiper_heat_status: number | null;
|
|
624
|
+
readonly main_seat_heat_state: SeatHeatVentState | null;
|
|
625
|
+
readonly main_seat_ventilation_state: SeatHeatVentState | null;
|
|
626
|
+
readonly copilot_seat_heat_state: SeatHeatVentState | null;
|
|
627
|
+
readonly copilot_seat_ventilation_state: SeatHeatVentState | null;
|
|
628
|
+
readonly steering_wheel_heat_state: StearingWheelHeat | null;
|
|
629
|
+
readonly lr_seat_heat_state: SeatHeatVentState | null;
|
|
630
|
+
readonly lr_seat_ventilation_state: SeatHeatVentState | null;
|
|
631
|
+
readonly rr_seat_heat_state: SeatHeatVentState | null;
|
|
632
|
+
readonly rr_seat_ventilation_state: SeatHeatVentState | null;
|
|
633
|
+
readonly rapid_increase_temp_state: number | null;
|
|
634
|
+
readonly rapid_decrease_temp_state: number | null;
|
|
635
|
+
readonly refrigerator_state: number | null;
|
|
636
|
+
readonly refrigerator_door_state: number | null;
|
|
637
|
+
readonly pm: number | null;
|
|
638
|
+
readonly pm25_state_out_car: number | null;
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* One capability node from getLatestConfig (top-level or second-level).
|
|
642
|
+
*
|
|
643
|
+
* pyBYD's `LatestConfigFunction`, as `model_dump(mode="json")` gives it.
|
|
644
|
+
*/
|
|
645
|
+
export interface LatestConfigFunction {
|
|
646
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
647
|
+
readonly raw: JsonObject;
|
|
648
|
+
readonly code: string;
|
|
649
|
+
readonly function_name: string;
|
|
650
|
+
readonly function_no: string;
|
|
651
|
+
readonly sort_num: number | null;
|
|
652
|
+
readonly cf_fixed_second_level_list: LatestConfigFunction[];
|
|
653
|
+
}
|
|
654
|
+
/**
|
|
655
|
+
* Latest per-vehicle feature configuration from BYD cloud.
|
|
656
|
+
*
|
|
657
|
+
* pyBYD's `VehicleLatestConfig`, as `model_dump(mode="json")` gives it.
|
|
658
|
+
*/
|
|
659
|
+
export interface VehicleLatestConfig {
|
|
660
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
661
|
+
readonly raw: JsonObject;
|
|
662
|
+
readonly widget_config_id: string;
|
|
663
|
+
readonly config_version: number | null;
|
|
664
|
+
readonly app_config_version: number | null;
|
|
665
|
+
readonly style_id: number | null;
|
|
666
|
+
readonly terminal_type: number | null;
|
|
667
|
+
readonly cf_fixed_list: LatestConfigFunction[];
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Normalized vehicle capability availability used by integrations.
|
|
671
|
+
*
|
|
672
|
+
* pyBYD's `VehicleCapabilities`, as `model_dump(mode="json")` gives it.
|
|
673
|
+
*/
|
|
674
|
+
export interface VehicleCapabilities {
|
|
675
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
676
|
+
readonly raw: JsonObject;
|
|
677
|
+
readonly vin: string;
|
|
678
|
+
readonly source: string;
|
|
679
|
+
readonly lock: boolean | null;
|
|
680
|
+
readonly unlock: boolean | null;
|
|
681
|
+
readonly climate: boolean | null;
|
|
682
|
+
readonly car_on: boolean | null;
|
|
683
|
+
readonly battery_heat: boolean | null;
|
|
684
|
+
readonly steering_wheel_heat: boolean | null;
|
|
685
|
+
readonly driver_seat_heat: boolean | null;
|
|
686
|
+
readonly driver_seat_ventilation: boolean | null;
|
|
687
|
+
readonly passenger_seat_heat: boolean | null;
|
|
688
|
+
readonly passenger_seat_ventilation: boolean | null;
|
|
689
|
+
readonly rear_left_seat_heat: boolean | null;
|
|
690
|
+
readonly rear_right_seat_heat: boolean | null;
|
|
691
|
+
readonly rear_left_seat_ventilation: boolean | null;
|
|
692
|
+
readonly rear_right_seat_ventilation: boolean | null;
|
|
693
|
+
readonly find_car: boolean | null;
|
|
694
|
+
readonly flash_lights: boolean | null;
|
|
695
|
+
readonly close_windows: boolean | null;
|
|
696
|
+
readonly open_windows: boolean | null;
|
|
697
|
+
readonly location: boolean | null;
|
|
698
|
+
readonly open_trunk: boolean | null;
|
|
699
|
+
readonly close_trunk: boolean | null;
|
|
700
|
+
readonly start_charge: boolean | null;
|
|
701
|
+
readonly stop_charge: boolean | null;
|
|
702
|
+
readonly one_click_shutdown: boolean | null;
|
|
703
|
+
readonly child_presence_detection: boolean | null;
|
|
704
|
+
readonly digital_key: boolean | null;
|
|
705
|
+
readonly nfc_key: boolean | null;
|
|
706
|
+
readonly nfc_key_3c: boolean | null;
|
|
707
|
+
readonly uwb_key: boolean | null;
|
|
708
|
+
readonly mobile_ota: boolean | null;
|
|
709
|
+
readonly scheduled_departure: boolean | null;
|
|
710
|
+
readonly energy_analysis: boolean | null;
|
|
711
|
+
readonly vehicle_health: boolean | null;
|
|
712
|
+
readonly health_tpms: boolean | null;
|
|
713
|
+
readonly health_steering: boolean | null;
|
|
714
|
+
readonly health_srs: boolean | null;
|
|
715
|
+
readonly health_powertrain: boolean | null;
|
|
716
|
+
readonly health_battery: boolean | null;
|
|
717
|
+
readonly health_esp: boolean | null;
|
|
718
|
+
readonly health_charging: boolean | null;
|
|
719
|
+
readonly health_braking: boolean | null;
|
|
720
|
+
readonly health_abs: boolean | null;
|
|
721
|
+
readonly function_nos: string[];
|
|
722
|
+
readonly codes: string[];
|
|
723
|
+
readonly unknown_function_nos: string[];
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* A single message from the account inbox.
|
|
727
|
+
*
|
|
728
|
+
* pyBYD's `VehicleMsgItemInfo`, as `model_dump(mode="json")` gives it.
|
|
729
|
+
*/
|
|
730
|
+
export interface VehicleMsgItemInfo {
|
|
731
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
732
|
+
readonly raw: JsonObject;
|
|
733
|
+
readonly message_id: number | string;
|
|
734
|
+
readonly title: string | null;
|
|
735
|
+
readonly title_id: number | null;
|
|
736
|
+
readonly content: string | null;
|
|
737
|
+
/** An ISO 8601 date and time. */
|
|
738
|
+
readonly push_time: string | null;
|
|
739
|
+
readonly message_group: number | null;
|
|
740
|
+
readonly jump_url: string | null;
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* Decoded response of `/app/messageCenter/getUnReadMessageList`.
|
|
744
|
+
*
|
|
745
|
+
* pyBYD's `VehicleMsgListResponse`, as `model_dump(mode="json")` gives it.
|
|
746
|
+
*/
|
|
747
|
+
export interface VehicleMsgListResponse {
|
|
748
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
749
|
+
readonly raw: JsonObject;
|
|
750
|
+
readonly messages: VehicleMsgItemInfo[];
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* A single per-type push notification switch.
|
|
754
|
+
*
|
|
755
|
+
* pyBYD's `PushSwitch`, as `model_dump(mode="json")` gives it.
|
|
756
|
+
*/
|
|
757
|
+
export interface PushSwitch {
|
|
758
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
759
|
+
readonly raw: JsonObject;
|
|
760
|
+
readonly type: number | null;
|
|
761
|
+
readonly state: number | null;
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Per-type push notification switch states for a vehicle.
|
|
765
|
+
*
|
|
766
|
+
* pyBYD's `PushNotificationState`, as `model_dump(mode="json")` gives it.
|
|
767
|
+
*/
|
|
768
|
+
export interface PushNotificationState {
|
|
769
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
770
|
+
readonly raw: JsonObject;
|
|
771
|
+
readonly vin: string;
|
|
772
|
+
readonly switches: PushSwitch[];
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Realtime telemetry data for a vehicle.
|
|
776
|
+
*
|
|
777
|
+
* pyBYD's `VehicleRealtimeData`, as `model_dump(mode="json")` gives it.
|
|
778
|
+
*/
|
|
779
|
+
export interface VehicleRealtimeData {
|
|
780
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
781
|
+
readonly raw: JsonObject;
|
|
782
|
+
readonly online_state: OnlineState;
|
|
783
|
+
readonly connect_state: ConnectState;
|
|
784
|
+
readonly vehicle_state: VehicleState;
|
|
785
|
+
readonly request_serial: string | null;
|
|
786
|
+
readonly elec_percent: number | null;
|
|
787
|
+
readonly power_battery: number | null;
|
|
788
|
+
readonly endurance_mileage: number | null;
|
|
789
|
+
readonly ev_endurance: number | null;
|
|
790
|
+
readonly endurance_mileage_v2: number | null;
|
|
791
|
+
readonly endurance_mileage_v2_unit: string | null;
|
|
792
|
+
readonly total_mileage: number | null;
|
|
793
|
+
readonly total_mileage_v2: number | null;
|
|
794
|
+
readonly total_mileage_v2_unit: string | null;
|
|
795
|
+
readonly speed: number | null;
|
|
796
|
+
readonly power_gear: PowerGear | null;
|
|
797
|
+
readonly temp_in_car: number | null;
|
|
798
|
+
readonly main_setting_temp: number | null;
|
|
799
|
+
readonly main_setting_temp_new: number | null;
|
|
800
|
+
readonly air_run_state: AirCirculationMode | null;
|
|
801
|
+
readonly main_seat_heat_state: SeatHeatVentState | null;
|
|
802
|
+
readonly main_seat_ventilation_state: SeatHeatVentState | null;
|
|
803
|
+
readonly copilot_seat_heat_state: SeatHeatVentState | null;
|
|
804
|
+
readonly copilot_seat_ventilation_state: SeatHeatVentState | null;
|
|
805
|
+
readonly steering_wheel_heat_state: StearingWheelHeat | null;
|
|
806
|
+
readonly lr_seat_heat_state: SeatHeatVentState | null;
|
|
807
|
+
readonly lr_seat_ventilation_state: SeatHeatVentState | null;
|
|
808
|
+
readonly rr_seat_heat_state: SeatHeatVentState | null;
|
|
809
|
+
readonly rr_seat_ventilation_state: SeatHeatVentState | null;
|
|
810
|
+
readonly charging_state: ChargingState;
|
|
811
|
+
readonly charge_state: ChargingState | null;
|
|
812
|
+
readonly wait_status: number | null;
|
|
813
|
+
readonly full_hour: number | null;
|
|
814
|
+
readonly full_minute: number | null;
|
|
815
|
+
readonly remaining_hours: number | null;
|
|
816
|
+
readonly remaining_minutes: number | null;
|
|
817
|
+
readonly booking_charge_state: number | null;
|
|
818
|
+
readonly booking_charging_hour: number | null;
|
|
819
|
+
readonly booking_charging_minute: number | null;
|
|
820
|
+
readonly left_front_door: DoorOpenState | null;
|
|
821
|
+
readonly right_front_door: DoorOpenState | null;
|
|
822
|
+
readonly left_rear_door: DoorOpenState | null;
|
|
823
|
+
readonly right_rear_door: DoorOpenState | null;
|
|
824
|
+
readonly trunk_lid: DoorOpenState | null;
|
|
825
|
+
readonly sliding_door: DoorOpenState | null;
|
|
826
|
+
readonly forehold: DoorOpenState | null;
|
|
827
|
+
readonly left_front_door_lock: LockState | null;
|
|
828
|
+
readonly right_front_door_lock: LockState | null;
|
|
829
|
+
readonly left_rear_door_lock: LockState | null;
|
|
830
|
+
readonly right_rear_door_lock: LockState | null;
|
|
831
|
+
readonly sliding_door_lock: LockState | null;
|
|
832
|
+
readonly left_front_window: WindowState | null;
|
|
833
|
+
readonly right_front_window: WindowState | null;
|
|
834
|
+
readonly left_rear_window: WindowState | null;
|
|
835
|
+
readonly right_rear_window: WindowState | null;
|
|
836
|
+
readonly skylight: WindowState | null;
|
|
837
|
+
readonly left_front_window_pct: number | null;
|
|
838
|
+
readonly right_front_window_pct: number | null;
|
|
839
|
+
readonly left_rear_window_pct: number | null;
|
|
840
|
+
readonly right_rear_window_pct: number | null;
|
|
841
|
+
readonly left_front_tire_pressure: number | null;
|
|
842
|
+
readonly right_front_tire_pressure: number | null;
|
|
843
|
+
readonly left_rear_tire_pressure: number | null;
|
|
844
|
+
readonly right_rear_tire_pressure: number | null;
|
|
845
|
+
readonly left_front_tire_status: number | null;
|
|
846
|
+
readonly right_front_tire_status: number | null;
|
|
847
|
+
readonly left_rear_tire_status: number | null;
|
|
848
|
+
readonly right_rear_tire_status: number | null;
|
|
849
|
+
readonly tire_press_unit: TirePressureUnit | null;
|
|
850
|
+
readonly tirepressure_system: number | null;
|
|
851
|
+
readonly rapid_tire_leak: number | null;
|
|
852
|
+
readonly total_power: number | null;
|
|
853
|
+
readonly gl: number | null;
|
|
854
|
+
readonly total_energy: string | null;
|
|
855
|
+
readonly nearest_energy_consumption: string | null;
|
|
856
|
+
readonly nearest_energy_consumption_unit: string | null;
|
|
857
|
+
readonly recent_50km_energy: string | null;
|
|
858
|
+
readonly oil_endurance: number | null;
|
|
859
|
+
readonly oil_percent: number | null;
|
|
860
|
+
readonly total_oil: number | null;
|
|
861
|
+
readonly power_system: number | null;
|
|
862
|
+
readonly engine_status: number | null;
|
|
863
|
+
readonly epb: number | null;
|
|
864
|
+
readonly eps: number | null;
|
|
865
|
+
readonly esp: number | null;
|
|
866
|
+
readonly abs_warning: number | null;
|
|
867
|
+
readonly svs: number | null;
|
|
868
|
+
readonly srs: number | null;
|
|
869
|
+
readonly ect: number | null;
|
|
870
|
+
readonly ect_value: number | null;
|
|
871
|
+
readonly pwr: number | null;
|
|
872
|
+
readonly sentry_status: SentryStatus;
|
|
873
|
+
readonly battery_heat_state: number | null;
|
|
874
|
+
readonly charge_heat_state: number | null;
|
|
875
|
+
readonly upgrade_status: number | null;
|
|
876
|
+
readonly lr_third_heat_state: SeatHeatVentState | null;
|
|
877
|
+
readonly lr_third_ventilation_state: SeatHeatVentState | null;
|
|
878
|
+
readonly rr_third_heat_state: SeatHeatVentState | null;
|
|
879
|
+
readonly rr_third_ventilation_state: SeatHeatVentState | null;
|
|
880
|
+
readonly rate: number | null;
|
|
881
|
+
readonly charge_power: number | null;
|
|
882
|
+
readonly charge_power_unit: string | null;
|
|
883
|
+
readonly less_one_min: boolean | null;
|
|
884
|
+
readonly energy_consumption: string | null;
|
|
885
|
+
readonly total_consumption: string | null;
|
|
886
|
+
readonly total_consumption_en: string | null;
|
|
887
|
+
readonly energy_consumption_ev: number | null;
|
|
888
|
+
readonly energy_consumption_ev_unit: string | null;
|
|
889
|
+
readonly energy_consumption_fuel: number | null;
|
|
890
|
+
readonly energy_consumption_fuel_unit: string | null;
|
|
891
|
+
readonly nearest_energy_consumption_ev: number | null;
|
|
892
|
+
readonly nearest_energy_consumption_ev_unit: string | null;
|
|
893
|
+
readonly nearest_energy_consumption_fuel: number | null;
|
|
894
|
+
readonly nearest_energy_consumption_fuel_unit: string | null;
|
|
895
|
+
readonly recent_50km_energy_ev: number | null;
|
|
896
|
+
readonly recent_50km_energy_ev_unit: string | null;
|
|
897
|
+
readonly recent_50km_energy_fuel: number | null;
|
|
898
|
+
readonly recent_50km_energy_fuel_unit: string | null;
|
|
899
|
+
readonly total_energy_ev: number | null;
|
|
900
|
+
readonly total_energy_ev_unit: string | null;
|
|
901
|
+
readonly total_energy_fuel: number | null;
|
|
902
|
+
readonly total_energy_fuel_unit: string | null;
|
|
903
|
+
readonly total_consumption_ev: number | null;
|
|
904
|
+
readonly total_consumption_ev_unit: string | null;
|
|
905
|
+
readonly total_consumption_fuel: number | null;
|
|
906
|
+
readonly total_consumption_fuel_unit: string | null;
|
|
907
|
+
readonly total_consumption_en_ev: number | null;
|
|
908
|
+
readonly total_consumption_en_ev_unit: string | null;
|
|
909
|
+
readonly total_consumption_en_fuel: number | null;
|
|
910
|
+
readonly total_consumption_en_fuel_unit: string | null;
|
|
911
|
+
readonly eq_consumption: number | null;
|
|
912
|
+
readonly eq_consumption_unit: string | null;
|
|
913
|
+
readonly oil_pressure_system: number | null;
|
|
914
|
+
readonly braking_system: number | null;
|
|
915
|
+
readonly charging_system: number | null;
|
|
916
|
+
readonly steering_system: number | null;
|
|
917
|
+
readonly ok_light: number | null;
|
|
918
|
+
readonly repair_mode_switch: string | null;
|
|
919
|
+
readonly vehicle_time_zone: string | null;
|
|
920
|
+
readonly power_battery_connection: number | null;
|
|
921
|
+
readonly ins: number | null;
|
|
922
|
+
/** An ISO 8601 date and time. */
|
|
923
|
+
readonly timestamp: string | null;
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* The simple "charge within a window" schedule (`smartChargeDto`).
|
|
927
|
+
*
|
|
928
|
+
* pyBYD's `SmartChargeDto`, as `model_dump(mode="json")` gives it.
|
|
929
|
+
*/
|
|
930
|
+
export interface SmartChargeDto {
|
|
931
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
932
|
+
readonly raw: JsonObject;
|
|
933
|
+
/** A time of day, `HH:MM:SS`. */
|
|
934
|
+
readonly start_time: string | null;
|
|
935
|
+
/** A time of day, `HH:MM:SS`. */
|
|
936
|
+
readonly end_time: string | null;
|
|
937
|
+
readonly charge_until_full: boolean;
|
|
938
|
+
readonly charge_way: string | null;
|
|
939
|
+
readonly status: boolean | null;
|
|
940
|
+
/** An ISO 8601 date and time. */
|
|
941
|
+
readonly update_time: string | null;
|
|
942
|
+
/** An ISO 8601 date and time. */
|
|
943
|
+
readonly create_time: string | null;
|
|
944
|
+
/** An ISO 8601 date and time. */
|
|
945
|
+
readonly exe_time: string | null;
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* Departure-time / off-peak-window schedule (`smartJourneyDto`).
|
|
949
|
+
*
|
|
950
|
+
* pyBYD's `SmartJourneyDto`, as `model_dump(mode="json")` gives it.
|
|
951
|
+
*/
|
|
952
|
+
export interface SmartJourneyDto {
|
|
953
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
954
|
+
readonly raw: JsonObject;
|
|
955
|
+
/** A time of day, `HH:MM:SS`. */
|
|
956
|
+
readonly use_vehicle_time: string | null;
|
|
957
|
+
/** A time of day, `HH:MM:SS`. */
|
|
958
|
+
readonly discount_start: string | null;
|
|
959
|
+
/** A time of day, `HH:MM:SS`. */
|
|
960
|
+
readonly discount_end: string | null;
|
|
961
|
+
readonly charge_way: string | null;
|
|
962
|
+
readonly status: boolean | null;
|
|
963
|
+
/** An ISO 8601 date and time. */
|
|
964
|
+
readonly update_time: string | null;
|
|
965
|
+
/** An ISO 8601 date and time. */
|
|
966
|
+
readonly create_time: string | null;
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
969
|
+
* Top-level schedule snapshot from `/control/smartCharge/homePage`.
|
|
970
|
+
*
|
|
971
|
+
* pyBYD's `SmartChargingSchedule`, as `model_dump(mode="json")` gives it.
|
|
972
|
+
*/
|
|
973
|
+
export interface SmartChargingSchedule {
|
|
974
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
975
|
+
readonly raw: JsonObject;
|
|
976
|
+
readonly vin: string;
|
|
977
|
+
readonly soc: number | null;
|
|
978
|
+
readonly type: string | null;
|
|
979
|
+
readonly time_zone: string | null;
|
|
980
|
+
readonly charge: SmartChargeDto | null;
|
|
981
|
+
readonly journey: SmartJourneyDto | null;
|
|
982
|
+
/** An ISO 8601 date and time. */
|
|
983
|
+
readonly update_time: string | null;
|
|
984
|
+
}
|
|
985
|
+
/**
|
|
986
|
+
* Supported and active AC charging current limits from
|
|
987
|
+
* `/control/smartCharge/getAcCurrentLimit`.
|
|
988
|
+
*
|
|
989
|
+
* pyBYD's `AcCurrentLimit`, as `model_dump(mode="json")` gives it.
|
|
990
|
+
*/
|
|
991
|
+
export interface AcCurrentLimit {
|
|
992
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
993
|
+
readonly raw: JsonObject;
|
|
994
|
+
readonly vin: string;
|
|
995
|
+
readonly current_ev_current_limit: string | null;
|
|
996
|
+
readonly current_limit_list: string[];
|
|
997
|
+
}
|
|
998
|
+
/**
|
|
999
|
+
* A permission scope granted to a shared user.
|
|
1000
|
+
*
|
|
1001
|
+
* pyBYD's `EmpowerRange`, as `model_dump(mode="json")` gives it.
|
|
1002
|
+
*/
|
|
1003
|
+
export interface EmpowerRange {
|
|
1004
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
1005
|
+
readonly raw: JsonObject;
|
|
1006
|
+
readonly code: string;
|
|
1007
|
+
readonly name: string;
|
|
1008
|
+
readonly children: EmpowerRange[];
|
|
1009
|
+
}
|
|
1010
|
+
/**
|
|
1011
|
+
* A vehicle associated with the user's account.
|
|
1012
|
+
*
|
|
1013
|
+
* pyBYD's `Vehicle`, as `model_dump(mode="json")` gives it.
|
|
1014
|
+
*/
|
|
1015
|
+
export interface Vehicle {
|
|
1016
|
+
/** The reply this was parsed from, as BYD sent it. */
|
|
1017
|
+
readonly raw: JsonObject;
|
|
1018
|
+
readonly vin: string;
|
|
1019
|
+
readonly model_name: string;
|
|
1020
|
+
readonly brand_name: string;
|
|
1021
|
+
readonly energy_type: EnergyType;
|
|
1022
|
+
readonly auto_alias: string;
|
|
1023
|
+
readonly auto_plate: string;
|
|
1024
|
+
readonly pic_main_url: string;
|
|
1025
|
+
readonly pic_set_url: string;
|
|
1026
|
+
readonly out_model_type: string;
|
|
1027
|
+
readonly total_mileage: number | null;
|
|
1028
|
+
readonly model_id: number | null;
|
|
1029
|
+
readonly car_type: number | null;
|
|
1030
|
+
readonly default_car: boolean;
|
|
1031
|
+
readonly empower_type: number | null;
|
|
1032
|
+
readonly permission_status: number | null;
|
|
1033
|
+
readonly tbox_version: string;
|
|
1034
|
+
readonly vehicle_state: string;
|
|
1035
|
+
/** An ISO 8601 date and time. */
|
|
1036
|
+
readonly auto_bought_time: string | null;
|
|
1037
|
+
/** An ISO 8601 date and time. */
|
|
1038
|
+
readonly yun_active_time: string | null;
|
|
1039
|
+
readonly empower_id: number | null;
|
|
1040
|
+
readonly range_detail_list: EmpowerRange[];
|
|
1041
|
+
readonly vehicle_fun_learn_info: Record<string, number>;
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* Device identity fields sent with every request.
|
|
1045
|
+
*
|
|
1046
|
+
* The fields of pyBYD's `DeviceProfile`, in camelCase.
|
|
1047
|
+
*/
|
|
1048
|
+
export interface DeviceProfile {
|
|
1049
|
+
/** Default `"and"`. */
|
|
1050
|
+
ostype?: string | undefined;
|
|
1051
|
+
/** Default `"BANGCLE01234"`. */
|
|
1052
|
+
imei?: string | undefined;
|
|
1053
|
+
/** Default `"00:00:00:00:00:00"`. */
|
|
1054
|
+
mac?: string | undefined;
|
|
1055
|
+
/** Default `"POCO F1"`. */
|
|
1056
|
+
model?: string | undefined;
|
|
1057
|
+
/** Default `"35"`. */
|
|
1058
|
+
sdk?: string | undefined;
|
|
1059
|
+
/** Default `"Xiaomi"`. */
|
|
1060
|
+
mod?: string | undefined;
|
|
1061
|
+
/** Default `"00000000000000000000000000000000"`. */
|
|
1062
|
+
imeiMd5?: string | undefined;
|
|
1063
|
+
/** Default `"XIAOMI"`. */
|
|
1064
|
+
mobileBrand?: string | undefined;
|
|
1065
|
+
/** Default `"POCO F1"`. */
|
|
1066
|
+
mobileModel?: string | undefined;
|
|
1067
|
+
/** Default `"0"`. */
|
|
1068
|
+
deviceType?: string | undefined;
|
|
1069
|
+
/** Default `"wifi"`. */
|
|
1070
|
+
networkType?: string | undefined;
|
|
1071
|
+
/** Default `"15"`. */
|
|
1072
|
+
osType?: string | undefined;
|
|
1073
|
+
/** Default `"35"`. */
|
|
1074
|
+
osVersion?: string | undefined;
|
|
1075
|
+
}
|
|
1076
|
+
/**
|
|
1077
|
+
* Client configuration.
|
|
1078
|
+
*
|
|
1079
|
+
* The fields of pyBYD's `BydConfig`, in camelCase.
|
|
1080
|
+
*/
|
|
1081
|
+
export interface BydConfig {
|
|
1082
|
+
username: string;
|
|
1083
|
+
password: string;
|
|
1084
|
+
/** Default `"https://dilinkappoversea-eu.byd.auto"`. */
|
|
1085
|
+
baseUrl?: string | undefined;
|
|
1086
|
+
/** Default `"NL"`. */
|
|
1087
|
+
countryCode?: string | undefined;
|
|
1088
|
+
/** Default `"en"`. */
|
|
1089
|
+
language?: string | undefined;
|
|
1090
|
+
/** Default `"Europe/Amsterdam"`. */
|
|
1091
|
+
timeZone?: string | undefined;
|
|
1092
|
+
/** Default `"3.5.1"`. */
|
|
1093
|
+
appVersion?: string | undefined;
|
|
1094
|
+
/** Default `"351"`. */
|
|
1095
|
+
appInnerVersion?: string | undefined;
|
|
1096
|
+
/** Default `"0"`. */
|
|
1097
|
+
softType?: string | undefined;
|
|
1098
|
+
/** Default `"3"`. */
|
|
1099
|
+
tboxVersion?: string | undefined;
|
|
1100
|
+
/** Default `"1"`. */
|
|
1101
|
+
isAuto?: string | undefined;
|
|
1102
|
+
/** Default `"0"`. */
|
|
1103
|
+
identifierType?: string | undefined;
|
|
1104
|
+
controlPin?: string | null | undefined;
|
|
1105
|
+
/** Default `43200`. */
|
|
1106
|
+
sessionTtl?: number | undefined;
|
|
1107
|
+
/** Default `true`. */
|
|
1108
|
+
mqttEnabled?: boolean | undefined;
|
|
1109
|
+
/** Default `120`. */
|
|
1110
|
+
mqttKeepalive?: number | undefined;
|
|
1111
|
+
/** Default `10.0`. */
|
|
1112
|
+
mqttTimeout?: number | undefined;
|
|
1113
|
+
device?: DeviceProfile | undefined;
|
|
1114
|
+
}
|
|
1115
|
+
/** The session a client is using: pyBYD's `Session` fields. */
|
|
1116
|
+
export interface SessionInfo {
|
|
1117
|
+
/** The account's user ID. */
|
|
1118
|
+
readonly user_id: string;
|
|
1119
|
+
/** The token requests are signed with. A secret. */
|
|
1120
|
+
readonly sign_token: string;
|
|
1121
|
+
/** The token the content key derives from. A secret. */
|
|
1122
|
+
readonly encry_token: string;
|
|
1123
|
+
/** When the session was made, in the client's monotonic seconds. */
|
|
1124
|
+
readonly created_at: number;
|
|
1125
|
+
/** Seconds the session lives; infinite for no expiry. */
|
|
1126
|
+
readonly ttl: number;
|
|
1127
|
+
}
|
|
1128
|
+
/**
|
|
1129
|
+
* A session as an application stores it, to resume later without a password login. Give it
|
|
1130
|
+
* back unchanged to `import_session`.
|
|
1131
|
+
*/
|
|
1132
|
+
export interface SessionTokens {
|
|
1133
|
+
/** The account's user ID. */
|
|
1134
|
+
readonly user_id: string;
|
|
1135
|
+
/** The token requests are signed with. A secret. */
|
|
1136
|
+
readonly sign_token: string;
|
|
1137
|
+
/** The token the content key derives from. A secret. */
|
|
1138
|
+
readonly encry_token: string;
|
|
1139
|
+
/** Seconds the session has left; null for no expiry. */
|
|
1140
|
+
readonly ttl_remaining: number | null;
|
|
1141
|
+
/** Whether the account reaches each VIN as a guest. */
|
|
1142
|
+
readonly guest_vins: Record<string, boolean>;
|
|
1143
|
+
}
|
|
1144
|
+
/** One request the client sent, for metrics. */
|
|
1145
|
+
export interface RequestRecord {
|
|
1146
|
+
/** The endpoint, such as `/control/getGpsInfo`. */
|
|
1147
|
+
readonly endpoint: string;
|
|
1148
|
+
/** `reply` (the API answered), `transport` (the HTTP request failed) or `failed`. */
|
|
1149
|
+
readonly outcome: string;
|
|
1150
|
+
/** The reply's code; `0` is success. Null unless the API answered. */
|
|
1151
|
+
readonly code: string | null;
|
|
1152
|
+
/** The HTTP status of a transport failure, when the server answered. */
|
|
1153
|
+
readonly status: number | null;
|
|
1154
|
+
/** The error class of any other failure. */
|
|
1155
|
+
readonly error: string | null;
|
|
1156
|
+
/** How long the request took, in seconds. */
|
|
1157
|
+
readonly duration: number;
|
|
1158
|
+
}
|
|
1159
|
+
/** Live charging state and the charging schedule, from one call. */
|
|
1160
|
+
export interface ChargingHomepage {
|
|
1161
|
+
/** The live charging state. */
|
|
1162
|
+
readonly status: ChargingStatus;
|
|
1163
|
+
/** The smart-charging schedule. */
|
|
1164
|
+
readonly schedule: SmartChargingSchedule;
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* A car's merged state, by section, with the projections of commands in flight laid over it. A
|
|
1168
|
+
* section is null until its first data arrived.
|
|
1169
|
+
*/
|
|
1170
|
+
export interface VehicleSnapshot {
|
|
1171
|
+
/** The vehicle's metadata. */
|
|
1172
|
+
readonly vehicle: Vehicle;
|
|
1173
|
+
/** Doors, locks, charge, range, tyres. */
|
|
1174
|
+
readonly realtime: VehicleRealtimeData | null;
|
|
1175
|
+
/** Climate control. */
|
|
1176
|
+
readonly hvac: HvacStatus | null;
|
|
1177
|
+
/** Location. */
|
|
1178
|
+
readonly gps: GpsInfo | null;
|
|
1179
|
+
/** Live charging state. */
|
|
1180
|
+
readonly charging: ChargingStatus | null;
|
|
1181
|
+
/** Energy consumption. */
|
|
1182
|
+
readonly energy: EnergyConsumption | null;
|
|
1183
|
+
/** The smart-charging schedule. */
|
|
1184
|
+
readonly charging_schedule: SmartChargingSchedule | null;
|
|
1185
|
+
}
|
|
1186
|
+
/** Whether a car has a feature. */
|
|
1187
|
+
export interface FeatureAvailability {
|
|
1188
|
+
/** Whether the car supports it. */
|
|
1189
|
+
readonly available: boolean;
|
|
1190
|
+
}
|
|
1191
|
+
/** What a car's climate control offers. */
|
|
1192
|
+
export interface HvacFeatures {
|
|
1193
|
+
/** Whether the car supports remote climate control. */
|
|
1194
|
+
readonly available: boolean;
|
|
1195
|
+
/** °C offset of the car's 1-17 temperature scale. */
|
|
1196
|
+
readonly temp_offset: number;
|
|
1197
|
+
/** The settable temperature range in °C: lowest, highest. */
|
|
1198
|
+
readonly temp_range: number[];
|
|
1199
|
+
}
|
|
1200
|
+
/** What one seat offers. */
|
|
1201
|
+
export interface SeatAvailability {
|
|
1202
|
+
/** Whether the seat can be heated. */
|
|
1203
|
+
readonly heat: boolean;
|
|
1204
|
+
/** Whether the seat can be ventilated. */
|
|
1205
|
+
readonly ventilation: boolean;
|
|
1206
|
+
}
|
|
1207
|
+
/** What each seat offers. */
|
|
1208
|
+
export interface SeatFeatures {
|
|
1209
|
+
readonly driver: SeatAvailability;
|
|
1210
|
+
readonly copilot: SeatAvailability;
|
|
1211
|
+
readonly rear_left: SeatAvailability;
|
|
1212
|
+
readonly rear_right: SeatAvailability;
|
|
1213
|
+
}
|
|
1214
|
+
/** Whether a car can be found and can flash its lights. */
|
|
1215
|
+
export interface FinderFeatures {
|
|
1216
|
+
/** Whether the car supports find-my-car. */
|
|
1217
|
+
readonly find_available: boolean;
|
|
1218
|
+
/** Whether the car can flash its lights remotely. */
|
|
1219
|
+
readonly flash_available: boolean;
|
|
1220
|
+
}
|
|
1221
|
+
/** Whether a car's windows can be closed and opened remotely. */
|
|
1222
|
+
export interface WindowsFeatures {
|
|
1223
|
+
/** Whether the car can close its windows remotely. */
|
|
1224
|
+
readonly close_available: boolean;
|
|
1225
|
+
/** Whether the car can open its windows remotely (to a vent crack). */
|
|
1226
|
+
readonly open_available: boolean;
|
|
1227
|
+
}
|
|
1228
|
+
/** Whether a car's trunk can be opened and closed remotely. */
|
|
1229
|
+
export interface TrunkFeatures {
|
|
1230
|
+
/** Whether the trunk can be opened remotely. */
|
|
1231
|
+
readonly open_available: boolean;
|
|
1232
|
+
/** Whether the trunk can be closed remotely. */
|
|
1233
|
+
readonly close_available: boolean;
|
|
1234
|
+
}
|
|
1235
|
+
/** What each feature of a car offers. */
|
|
1236
|
+
export interface CarFeatures {
|
|
1237
|
+
readonly lock: FeatureAvailability;
|
|
1238
|
+
readonly hvac: HvacFeatures;
|
|
1239
|
+
readonly seat: SeatFeatures;
|
|
1240
|
+
readonly steering: FeatureAvailability;
|
|
1241
|
+
readonly battery: FeatureAvailability;
|
|
1242
|
+
readonly finder: FinderFeatures;
|
|
1243
|
+
readonly windows: WindowsFeatures;
|
|
1244
|
+
readonly trunk: TrunkFeatures;
|
|
1245
|
+
}
|
|
1246
|
+
/** pyBYD's reply models by name: what `parseModel` returns for each. */
|
|
1247
|
+
export interface Models {
|
|
1248
|
+
ClimateBooking: ClimateBooking;
|
|
1249
|
+
BookingList: BookingList;
|
|
1250
|
+
ChargingStatus: ChargingStatus;
|
|
1251
|
+
CommandGateRule: CommandGateRule;
|
|
1252
|
+
CommandGateVerdict: CommandGateVerdict;
|
|
1253
|
+
RemoteControlResult: RemoteControlResult;
|
|
1254
|
+
CommandAck: CommandAck;
|
|
1255
|
+
ChargeChangeResult: ChargeChangeResult;
|
|
1256
|
+
CommandAckEvent: CommandAckEvent;
|
|
1257
|
+
CommandLifecycleEvent: CommandLifecycleEvent;
|
|
1258
|
+
CommandAckDiagnostics: CommandAckDiagnostics;
|
|
1259
|
+
VerifyControlPasswordResponse: VerifyControlPasswordResponse;
|
|
1260
|
+
EnergyConsumptionGraph: EnergyConsumptionGraph;
|
|
1261
|
+
CumulativeEnergyConsumption: CumulativeEnergyConsumption;
|
|
1262
|
+
NearestEnergyConsumption: NearestEnergyConsumption;
|
|
1263
|
+
EnergyConsumption: EnergyConsumption;
|
|
1264
|
+
GpsInfo: GpsInfo;
|
|
1265
|
+
HvacStatus: HvacStatus;
|
|
1266
|
+
LatestConfigFunction: LatestConfigFunction;
|
|
1267
|
+
VehicleLatestConfig: VehicleLatestConfig;
|
|
1268
|
+
VehicleCapabilities: VehicleCapabilities;
|
|
1269
|
+
VehicleMsgItemInfo: VehicleMsgItemInfo;
|
|
1270
|
+
VehicleMsgListResponse: VehicleMsgListResponse;
|
|
1271
|
+
PushSwitch: PushSwitch;
|
|
1272
|
+
PushNotificationState: PushNotificationState;
|
|
1273
|
+
VehicleRealtimeData: VehicleRealtimeData;
|
|
1274
|
+
SmartChargeDto: SmartChargeDto;
|
|
1275
|
+
SmartJourneyDto: SmartJourneyDto;
|
|
1276
|
+
SmartChargingSchedule: SmartChargingSchedule;
|
|
1277
|
+
AcCurrentLimit: AcCurrentLimit;
|
|
1278
|
+
EmpowerRange: EmpowerRange;
|
|
1279
|
+
Vehicle: Vehicle;
|
|
1280
|
+
}
|
|
1281
|
+
/** The options of `seedVehicleMetadata`. */
|
|
1282
|
+
export interface SeedOptions {
|
|
1283
|
+
/** The model's name. */
|
|
1284
|
+
modelName?: string | null | undefined;
|
|
1285
|
+
}
|
|
1286
|
+
/** The options of `getVehicleCapabilities`. */
|
|
1287
|
+
export interface CapabilitiesOptions {
|
|
1288
|
+
/** Fetch again even when cached. Default `false`. */
|
|
1289
|
+
forceRefresh?: boolean | undefined;
|
|
1290
|
+
}
|
|
1291
|
+
/** The options of `getVehicleRealtime`, `getGpsInfo`. */
|
|
1292
|
+
export interface PollOptions {
|
|
1293
|
+
/** HTTP polls after the MQTT wait. Default `10`. */
|
|
1294
|
+
pollAttempts?: number | undefined;
|
|
1295
|
+
/** Seconds slept before each poll. Default `1.5`. */
|
|
1296
|
+
pollInterval?: number | undefined;
|
|
1297
|
+
/** Seconds to wait for the MQTT push; the config's `mqtt_timeout` when null. */
|
|
1298
|
+
mqttTimeout?: number | null | undefined;
|
|
1299
|
+
/** "Data unavailable" answers in a row that end the polling. Default `2`. */
|
|
1300
|
+
signalRetries?: number | undefined;
|
|
1301
|
+
}
|
|
1302
|
+
/** The options of `getAcCurrentLimit`. */
|
|
1303
|
+
export interface AcCurrentLimitOptions {
|
|
1304
|
+
/** The powertrain; the vehicle's own when null. */
|
|
1305
|
+
energyType?: EnergyType | null | undefined;
|
|
1306
|
+
}
|
|
1307
|
+
/** The options of `setPushState`. */
|
|
1308
|
+
export interface PushStateOptions {
|
|
1309
|
+
/** The notification type; 701 is the vehicle status push. Default `701`. */
|
|
1310
|
+
pushType?: number | undefined;
|
|
1311
|
+
}
|
|
1312
|
+
/** The options of `getNotifications`. */
|
|
1313
|
+
export interface NotificationOptions {
|
|
1314
|
+
/** Vehicle or system messages. Default `1`. */
|
|
1315
|
+
category?: NotificationCategory | undefined;
|
|
1316
|
+
}
|
|
1317
|
+
/**
|
|
1318
|
+
* The options of `verifyCommandAccess`, `lock`, `unlock`, `stopClimate`, `flashLights`,
|
|
1319
|
+
* `closeWindows`, `openWindows`, `findCar`, `openTrunk`, `closeTrunk`, `startClimate`,
|
|
1320
|
+
* `scheduleClimate`, `setSeatClimate`, `setBatteryHeat`.
|
|
1321
|
+
*/
|
|
1322
|
+
export interface CommandOptions {
|
|
1323
|
+
/** The control PIN for this command; the config's `control_pin` when null. */
|
|
1324
|
+
commandPwd?: string | null | undefined;
|
|
1325
|
+
}
|
|
1326
|
+
/** The options of `saveChargingSchedule`. */
|
|
1327
|
+
export interface SaveScheduleOptions {
|
|
1328
|
+
/** Whether the schedule is active. Default `true`. */
|
|
1329
|
+
enabled?: boolean | undefined;
|
|
1330
|
+
/** Seconds to wait for the MQTT push; the config's `mqtt_timeout` when null. */
|
|
1331
|
+
mqttTimeout?: number | null | undefined;
|
|
1332
|
+
/** HTTP polls after the MQTT wait. Default `6`. */
|
|
1333
|
+
pollAttempts?: number | undefined;
|
|
1334
|
+
/** Seconds slept before each poll. Default `2.0`. */
|
|
1335
|
+
pollInterval?: number | undefined;
|
|
1336
|
+
}
|
|
1337
|
+
/** The options of `startCharging`, `stopCharging`. */
|
|
1338
|
+
export interface ChargePollOptions {
|
|
1339
|
+
/** Seconds to wait for the MQTT push; the config's `mqtt_timeout` when null. */
|
|
1340
|
+
mqttTimeout?: number | null | undefined;
|
|
1341
|
+
/** HTTP polls after the MQTT wait. Default `6`. */
|
|
1342
|
+
pollAttempts?: number | undefined;
|
|
1343
|
+
/** Seconds slept before each poll. Default `2.0`. */
|
|
1344
|
+
pollInterval?: number | undefined;
|
|
1345
|
+
}
|
|
1346
|
+
/** The options of `saveChargingSchedule`. */
|
|
1347
|
+
export interface CarScheduleOptions {
|
|
1348
|
+
/** Whether the schedule is active. Default `true`. */
|
|
1349
|
+
enabled?: boolean | undefined;
|
|
1350
|
+
}
|
|
1351
|
+
/** The options of `start`. */
|
|
1352
|
+
export interface ClimateOptions {
|
|
1353
|
+
/** Target temperature in °C. Default `21.0`. */
|
|
1354
|
+
temperature?: number | undefined;
|
|
1355
|
+
/** Run time in minutes: 10, 15, 20, 25 or 30. Default `20`. */
|
|
1356
|
+
duration?: number | undefined;
|
|
1357
|
+
/** 1 fresh air, 2 recirculate; null keeps a running session's setting. */
|
|
1358
|
+
cycleMode?: number | null | undefined;
|
|
1359
|
+
/** Fan speed 1-7; null keeps a running session's speed. */
|
|
1360
|
+
fanLevel?: number | null | undefined;
|
|
1361
|
+
}
|