aboutsummaryrefslogtreecommitdiffstats
path: root/build/resources/main/messages/VehicleRemoteHvac.proto
blob: 38afaaefcb6998fb7bc13639e158c58e386a85b5 (plain)
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
syntax = "proto3"; /**
*    <h2>Cabin Preconditioning</h2>
*    <p>This set of messages define how to acquire vehicle location, either on demand or by interval and events.</p>
*
*    <h3>Message Orchestration</h3>
*    <p>[TO-DO]</p>
*
*    <h3>MQTT Topic Design</h3>
*    <table>
*    <thead>
*    <tr>
*    <th>Direction</th>
*    <th>Subscribe Topic</th>
*    <th>Publish Topic</th>
*    </tr>
*    </thead>
*    <tbody>
*    <tr>
*    <td>Vehicle to Cloud</td>
*    <td>cabin/#</td>
*    <td>cabin/&lt;device_id&gt;</td>
*    </tr>
*    <tr>
* <td>Cloud to Vehicle</td>
*    <td>&lt;device_id&gt;/cabin</td>
*    <td>&lt;device_id&gt;/cabin</td>
*    </tr>
*    </tbody>
*    </table>
*/
import "google/protobuf/timestamp.proto";
package messages;
message CabinConditionStatusPublish {

  google.protobuf.Timestamp event_time = 1; // Time of the event
  HVACState hvac_state = 2; // Current state of the HVAC
  CabinTemperature cabin_temperature = 3; // Current cabin temperature
}

message PreconditionRequest {

  repeated HVACZone hvac_zones = 1; // List of HVAC zones to precondition
  // For scheduled preconditioning, set the start_time to the desired future time.
  // For on-demand preconditioning, leave the start_time unset.
  google.protobuf.Timestamp start_time = 2;
}

message PreconditionResponse {
  enum Status {
    SUCCESS = 0;
    FAILURE = 1;
    PENDING = 2;
  }

  Status status = 1; // Status of the precondition request
  string message = 2; // Optional message
}

message CabinTemperature {
  Temperature temperature = 1; // Current cabin temperature
  HVACZone zone = 2; // Zone of the reported temperature
}


message Temperature {
  float value = 1; // Temperature value
  string unit = 2; // Temperature unit (e.g., "Celsius", "Fahrenheit")
}

message HVACZone {
  enum Zone {
    DRIVER = 0;
    PASSENGER = 1;
    REAR_LEFT = 2;
    REAR_RIGHT = 3;
  }
  
  Zone zone = 1; // HVAC Zone 
  Temperature target_temperature = 2; // Target temperature
}


message HVACState {
  enum State {
    OFF = 0;
    HEATING = 1;
    COOLING = 2;
    IDLE = 3;
  }
  
  State state = 1; // Current state of the HVAC
  HVACZone current_zone = 2; // Current active zone
}