Skip to content

Commit d51bae5

Browse files
committed
Update protobufs
1 parent 22ab283 commit d51bae5

File tree

12 files changed

+1380
-172
lines changed

12 files changed

+1380
-172
lines changed

protobuf/car_server.proto

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ message VehicleAction {
2222
reserved 60;
2323
reserved 76;
2424
oneof vehicle_action_msg {
25+
GetVehicleData getVehicleData = 1;
2526
ChargingSetLimitAction chargingSetLimitAction = 5;
2627
ChargingStartStopAction chargingStartStopAction = 6;
2728
DrivingClearSpeedLimitPinAction drivingClearSpeedLimitPinAction = 7;
@@ -75,13 +76,67 @@ message VehicleAction {
7576
}
7677
}
7778

79+
message GetVehicleData {
80+
GetChargeState getChargeState = 2;
81+
GetClimateState getClimateState = 3;
82+
GetDriveState getDriveState = 4;
83+
reserved 5, 6;
84+
GetLocationState getLocationState = 7;
85+
GetClosuresState getClosuresState = 8;
86+
GetChargeScheduleState getChargeScheduleState = 10;
87+
GetPreconditioningScheduleState getPreconditioningScheduleState = 11;
88+
reserved 12, 13;
89+
GetTirePressureState getTirePressureState = 14;
90+
GetMediaState getMediaState = 15;
91+
GetMediaDetailState getMediaDetailState = 16;
92+
GetSoftwareUpdateState getSoftwareUpdateState = 17;
93+
GetParentalControlsState getParentalControlsState = 19;
94+
}
95+
96+
message GetTirePressureState {
97+
}
98+
99+
message GetMediaState {
100+
}
101+
102+
message GetMediaDetailState {
103+
}
104+
105+
message GetSoftwareUpdateState {
106+
}
107+
108+
message GetChargeState {
109+
}
110+
111+
message GetClimateState {
112+
}
113+
114+
message GetDriveState {
115+
}
116+
117+
message GetLocationState {
118+
}
119+
120+
message GetClosuresState {
121+
}
122+
123+
message GetChargeScheduleState {
124+
}
125+
126+
message GetPreconditioningScheduleState {
127+
}
128+
129+
message GetParentalControlsState {
130+
}
131+
78132
message EraseUserDataAction {
79133
string reason = 1;
80134
}
81135

82136
message Response {
83137
ActionStatus actionStatus = 1;
84138
oneof response_msg {
139+
VehicleData vehicleData = 2;
85140
Signatures.SessionInfo getSessionInfoResponse = 3;
86141
NearbyChargingSites getNearbyChargingSites = 5;
87142
Ping ping = 9;

protobuf/common.proto

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ message LatLong {
1616
float longitude = 2;
1717
}
1818

19+
message ChargePortLatchState {
20+
oneof type {
21+
Void SNA = 1;
22+
Void Disengaged = 2;
23+
Void Engaged = 3;
24+
Void Blocking = 4;
25+
}
26+
}
27+
1928
message PreconditioningTimes {
2029
oneof times {
2130
Void all_week = 1;
@@ -30,6 +39,19 @@ message OffPeakChargingTimes {
3039
}
3140
}
3241

42+
enum MediaPlaybackStatus {
43+
Stopped = 0;
44+
Playing = 1;
45+
Paused = 2;
46+
}
47+
48+
enum StwHeatLevel {
49+
StwHeatLevel_Unknown = 0;
50+
StwHeatLevel_Off = 1;
51+
StwHeatLevel_Low = 2;
52+
StwHeatLevel_High = 3;
53+
}
54+
3355
message ChargeSchedule {
3456
uint64 id = 1; // datetime in epoch time
3557
string name = 2;

protobuf/managed_charging.proto

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
syntax = "proto3";
2+
3+
package ManagedCharging;
4+
5+
option go_package = "github.com/teslamotors/vehicle-command/pkg/protocol/protobuf/managedcharging";
6+
7+
// The reasons why the site controller may recommend no charge.
8+
// The site controller will only return the highest priority reason to the vehicle.
9+
enum ChargeOnSolarNoChargeReason {
10+
CHARGE_ON_SOLAR_NO_CHARGE_REASON_INVALID = 0;
11+
// The Powerwall is being prioritized over the vehicle to charge.
12+
CHARGE_ON_SOLAR_NO_CHARGE_REASON_POWERWALL_CHARGE_PRIORITY = 1;
13+
// There is not enough solar for the vehicle to charge effectively.
14+
CHARGE_ON_SOLAR_NO_CHARGE_REASON_INSUFFICIENT_SOLAR = 2;
15+
// The site controller is prioritizing export to the grid. This can
16+
// happen when the site controller is in autonomous mode and it is
17+
// most economical to export excess solar to the grid, or during a
18+
// virtual power plant event.
19+
CHARGE_ON_SOLAR_NO_CHARGE_REASON_GRID_EXPORT_PRIORITY = 3;
20+
// Another vehicle is charging on solar at this location and has priority.
21+
CHARGE_ON_SOLAR_NO_CHARGE_REASON_ALTERNATE_VEHICLE_CHARGE_PRIORITY = 4;
22+
}

protobuf/signatures.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ enum Tag
1515
TAG_COUNTER = 5;
1616
TAG_CHALLENGE = 6;
1717
TAG_FLAGS = 7;
18+
TAG_REQUEST_HASH = 8;
19+
TAG_FAULT = 9;
1820
TAG_END = 255;
1921
}
2022

@@ -25,6 +27,7 @@ enum SignatureType
2527
SIGNATURE_TYPE_HMAC = 6;
2628
reserved 7;
2729
SIGNATURE_TYPE_HMAC_PERSONALIZED = 8;
30+
SIGNATURE_TYPE_AES_GCM_RESPONSE = 9;
2831
}
2932

3033
message KeyIdentity {
@@ -43,6 +46,12 @@ message AES_GCM_Personalized_Signature_Data {
4346
bytes tag = 5;
4447
}
4548

49+
message AES_GCM_Response_Signature_Data {
50+
bytes nonce = 1;
51+
uint32 counter = 2;
52+
bytes tag = 3;
53+
}
54+
4655
message HMAC_Signature_Data {
4756
bytes tag = 1;
4857
}
@@ -61,6 +70,7 @@ message SignatureData {
6170
AES_GCM_Personalized_Signature_Data AES_GCM_Personalized_data = 5;
6271
HMAC_Signature_Data session_info_tag = 6;
6372
HMAC_Personalized_Signature_Data HMAC_Personalized_data = 8;
73+
AES_GCM_Response_Signature_Data AES_GCM_Response_data = 9;
6474
}
6575
}
6676

protobuf/universal_message.proto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ enum MessageFault_E
5353
MESSAGEFAULT_ERROR_REMOTE_ACCESS_DISABLED = 21; // The vehicle owner has disabled Mobile access.
5454
MESSAGEFAULT_ERROR_REMOTE_SERVICE_ACCESS_DISABLED = 22; // The command was authorized with a Service key, but the vehicle has not been configured to permit remote service commands.
5555
MESSAGEFAULT_ERROR_COMMAND_REQUIRES_ACCOUNT_CREDENTIALS = 23; // The command requires proof of Tesla account credentials but was not sent over a channel that provides this proof. Resend the command using Fleet API.
56+
MESSAGEFAULT_ERROR_REQUEST_MTU_EXCEEDED = 24; // Client sent a request with a field that exceeds MTU
57+
MESSAGEFAULT_ERROR_RESPONSE_MTU_EXCEEDED = 25; // Client's request was received, but response size exceeded MTU
58+
MESSAGEFAULT_ERROR_REPEATED_COUNTER = 26;
59+
MESSAGEFAULT_ERROR_INVALID_KEY_HANDLE = 27;
60+
MESSAGEFAULT_ERROR_REQUIRES_RESPONSE_ENCRYPTION = 28;
5661
}
5762

5863
message MessageStatus
@@ -69,6 +74,7 @@ message SessionInfoRequest
6974

7075
enum Flags {
7176
FLAG_USER_COMMAND = 0;
77+
FLAG_ENCRYPT_RESPONSE = 1;
7278
}
7379

7480
message RoutableMessage {

0 commit comments

Comments
 (0)