esphome 0.6.0 → 1.1.0
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.
- checksums.yaml +4 -4
- data/exe/esphome-monitor +16 -14
- data/exe/esphome-serial-proxy +132 -0
- data/lib/esphome/action.rb +55 -0
- data/lib/esphome/api/README.md +3 -0
- data/lib/esphome/api/api.proto +2756 -0
- data/lib/esphome/api/api_options.proto +120 -0
- data/lib/esphome/api/api_options_pb.rb +20 -0
- data/lib/esphome/api/api_pb.rb +229 -0
- data/lib/esphome/api.rb +182 -0
- data/lib/esphome/cli/colors.rb +44 -0
- data/lib/esphome/cli/completion.rb +48 -0
- data/lib/esphome/cli/entities/button.rb +18 -0
- data/lib/esphome/cli/entities/climate.rb +196 -0
- data/lib/esphome/cli/entities/cover.rb +116 -0
- data/lib/esphome/cli/entities/date.rb +27 -0
- data/lib/esphome/cli/entities/date_time.rb +29 -0
- data/lib/esphome/cli/entities/form.rb +111 -0
- data/lib/esphome/cli/entities/lock.rb +20 -0
- data/lib/esphome/cli/entities/menu.rb +83 -0
- data/lib/esphome/cli/entities/number.rb +37 -0
- data/lib/esphome/cli/entities/select.rb +16 -0
- data/lib/esphome/cli/entities/subfields.rb +63 -0
- data/lib/esphome/cli/entities/switch.rb +18 -0
- data/lib/esphome/cli/entities/text.rb +16 -0
- data/lib/esphome/cli/entities/time.rb +40 -0
- data/lib/esphome/cli/entity.rb +78 -0
- data/lib/esphome/cli/monitor.rb +441 -0
- data/lib/esphome/dashboard.rb +86 -0
- data/lib/esphome/device.rb +416 -0
- data/lib/esphome/entities/binary_sensor.rb +66 -0
- data/lib/esphome/entities/button.rb +13 -0
- data/lib/esphome/entities/climate.rb +259 -0
- data/lib/esphome/entities/cover.rb +135 -0
- data/lib/esphome/entities/date.rb +23 -0
- data/lib/esphome/entities/date_time.rb +21 -0
- data/lib/esphome/entities/fan.rb +89 -0
- data/lib/esphome/entities/light.rb +158 -0
- data/lib/esphome/entities/lock.rb +53 -0
- data/lib/esphome/entities/number.rb +56 -0
- data/lib/esphome/entities/select.rb +27 -0
- data/lib/esphome/entities/sensor.rb +49 -0
- data/lib/esphome/entities/switch.rb +24 -0
- data/lib/esphome/entities/text.rb +36 -0
- data/lib/esphome/entities/text_sensor.rb +10 -0
- data/lib/esphome/entities/time.rb +39 -0
- data/lib/esphome/entity.rb +146 -0
- data/lib/esphome/error.rb +28 -0
- data/lib/esphome/serial_proxy.rb +372 -0
- data/lib/esphome/version.rb +5 -0
- data/lib/esphome.rb +5 -0
- data/lib/httpx/plugins/websocket.rb +62 -0
- data/lib/websocket/driver/httpx.rb +74 -0
- metadata +55 -5
- data/exe/esphome-update-all +0 -66
|
@@ -0,0 +1,2756 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
option ruby_package = "ESPHome::Api";
|
|
4
|
+
|
|
5
|
+
import "api_options.proto";
|
|
6
|
+
|
|
7
|
+
service APIConnection {
|
|
8
|
+
rpc hello (HelloRequest) returns (HelloResponse) {
|
|
9
|
+
option (needs_setup_connection) = false;
|
|
10
|
+
option (needs_authentication) = false;
|
|
11
|
+
}
|
|
12
|
+
// REMOVED in ESPHome 2026.1.0: rpc authenticate (AuthenticationRequest) returns (AuthenticationResponse)
|
|
13
|
+
rpc disconnect (DisconnectRequest) returns (DisconnectResponse) {
|
|
14
|
+
option (needs_setup_connection) = false;
|
|
15
|
+
option (needs_authentication) = false;
|
|
16
|
+
}
|
|
17
|
+
rpc ping (PingRequest) returns (PingResponse) {
|
|
18
|
+
option (needs_setup_connection) = false;
|
|
19
|
+
option (needs_authentication) = false;
|
|
20
|
+
}
|
|
21
|
+
rpc device_info (DeviceInfoRequest) returns (DeviceInfoResponse) {
|
|
22
|
+
option (needs_authentication) = false;
|
|
23
|
+
}
|
|
24
|
+
rpc list_entities (ListEntitiesRequest) returns (void) {}
|
|
25
|
+
rpc subscribe_states (SubscribeStatesRequest) returns (void) {}
|
|
26
|
+
rpc subscribe_logs (SubscribeLogsRequest) returns (void) {}
|
|
27
|
+
rpc subscribe_homeassistant_services (SubscribeHomeassistantServicesRequest) returns (void) {}
|
|
28
|
+
rpc subscribe_home_assistant_states (SubscribeHomeAssistantStatesRequest) returns (void) {}
|
|
29
|
+
rpc execute_service (ExecuteServiceRequest) returns (void) {}
|
|
30
|
+
rpc noise_encryption_set_key (NoiseEncryptionSetKeyRequest) returns (NoiseEncryptionSetKeyResponse) {}
|
|
31
|
+
|
|
32
|
+
rpc button_command (ButtonCommandRequest) returns (void) {}
|
|
33
|
+
rpc camera_image (CameraImageRequest) returns (void) {}
|
|
34
|
+
rpc climate_command (ClimateCommandRequest) returns (void) {}
|
|
35
|
+
rpc cover_command (CoverCommandRequest) returns (void) {}
|
|
36
|
+
rpc date_command (DateCommandRequest) returns (void) {}
|
|
37
|
+
rpc datetime_command (DateTimeCommandRequest) returns (void) {}
|
|
38
|
+
rpc fan_command (FanCommandRequest) returns (void) {}
|
|
39
|
+
rpc light_command (LightCommandRequest) returns (void) {}
|
|
40
|
+
rpc lock_command (LockCommandRequest) returns (void) {}
|
|
41
|
+
rpc media_player_command (MediaPlayerCommandRequest) returns (void) {}
|
|
42
|
+
rpc number_command (NumberCommandRequest) returns (void) {}
|
|
43
|
+
rpc select_command (SelectCommandRequest) returns (void) {}
|
|
44
|
+
rpc siren_command (SirenCommandRequest) returns (void) {}
|
|
45
|
+
rpc switch_command (SwitchCommandRequest) returns (void) {}
|
|
46
|
+
rpc text_command (TextCommandRequest) returns (void) {}
|
|
47
|
+
rpc time_command (TimeCommandRequest) returns (void) {}
|
|
48
|
+
rpc update_command (UpdateCommandRequest) returns (void) {}
|
|
49
|
+
rpc valve_command (ValveCommandRequest) returns (void) {}
|
|
50
|
+
rpc water_heater_command (WaterHeaterCommandRequest) returns (void) {}
|
|
51
|
+
|
|
52
|
+
rpc subscribe_bluetooth_le_advertisements(SubscribeBluetoothLEAdvertisementsRequest) returns (void) {}
|
|
53
|
+
rpc bluetooth_device_request(BluetoothDeviceRequest) returns (void) {}
|
|
54
|
+
rpc bluetooth_gatt_get_services(BluetoothGATTGetServicesRequest) returns (void) {}
|
|
55
|
+
rpc bluetooth_gatt_read(BluetoothGATTReadRequest) returns (void) {}
|
|
56
|
+
rpc bluetooth_gatt_write(BluetoothGATTWriteRequest) returns (void) {}
|
|
57
|
+
rpc bluetooth_gatt_read_descriptor(BluetoothGATTReadDescriptorRequest) returns (void) {}
|
|
58
|
+
rpc bluetooth_gatt_write_descriptor(BluetoothGATTWriteDescriptorRequest) returns (void) {}
|
|
59
|
+
rpc bluetooth_gatt_notify(BluetoothGATTNotifyRequest) returns (void) {}
|
|
60
|
+
rpc subscribe_bluetooth_connections_free(SubscribeBluetoothConnectionsFreeRequest) returns (BluetoothConnectionsFreeResponse) {}
|
|
61
|
+
rpc unsubscribe_bluetooth_le_advertisements(UnsubscribeBluetoothLEAdvertisementsRequest) returns (void) {}
|
|
62
|
+
rpc bluetooth_scanner_set_mode(BluetoothScannerSetModeRequest) returns (void) {}
|
|
63
|
+
rpc bluetooth_set_connection_params(BluetoothSetConnectionParamsRequest) returns (BluetoothSetConnectionParamsResponse) {}
|
|
64
|
+
|
|
65
|
+
rpc subscribe_voice_assistant(SubscribeVoiceAssistantRequest) returns (void) {}
|
|
66
|
+
rpc voice_assistant_get_configuration(VoiceAssistantConfigurationRequest) returns (VoiceAssistantConfigurationResponse) {}
|
|
67
|
+
rpc voice_assistant_set_configuration(VoiceAssistantSetConfiguration) returns (void) {}
|
|
68
|
+
|
|
69
|
+
rpc alarm_control_panel_command (AlarmControlPanelCommandRequest) returns (void) {}
|
|
70
|
+
|
|
71
|
+
rpc zwave_proxy_frame(ZWaveProxyFrame) returns (void) {}
|
|
72
|
+
rpc zwave_proxy_request(ZWaveProxyRequest) returns (void) {}
|
|
73
|
+
|
|
74
|
+
rpc infrared_rf_transmit_raw_timings(InfraredRFTransmitRawTimingsRequest) returns (void) {}
|
|
75
|
+
|
|
76
|
+
rpc serial_proxy_configure(SerialProxyConfigureRequest) returns (void) {}
|
|
77
|
+
rpc serial_proxy_write(SerialProxyWriteRequest) returns (void) {}
|
|
78
|
+
rpc serial_proxy_set_modem_pins(SerialProxySetModemPinsRequest) returns (void) {}
|
|
79
|
+
rpc serial_proxy_get_modem_pins(SerialProxyGetModemPinsRequest) returns (void) {}
|
|
80
|
+
rpc serial_proxy_request(SerialProxyRequest) returns (void) {}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
// ==================== BASE PACKETS ====================
|
|
85
|
+
|
|
86
|
+
// The Home Assistant protocol is structured as a simple
|
|
87
|
+
// TCP socket with short binary messages encoded in the protocol buffers format
|
|
88
|
+
// First, a message in this protocol has a specific format:
|
|
89
|
+
// * A zero byte.
|
|
90
|
+
// * VarInt denoting the size of the message object. (type is not part of this)
|
|
91
|
+
// * VarInt denoting the type of message.
|
|
92
|
+
// * The message object encoded as a ProtoBuf message
|
|
93
|
+
|
|
94
|
+
// The connection is established in 2 steps:
|
|
95
|
+
// * First, the client connects to the server and sends a "Hello Request" identifying itself
|
|
96
|
+
// * The server responds with a "Hello Response" and the connection is authenticated
|
|
97
|
+
// If anything in this initial process fails, the connection must immediately closed
|
|
98
|
+
// by both sides and _no_ disconnection message is to be sent.
|
|
99
|
+
// Note: Password authentication via AuthenticationRequest/AuthenticationResponse (message IDs 3, 4)
|
|
100
|
+
// was removed in ESPHome 2026.1.0. Those message IDs are reserved and should not be reused.
|
|
101
|
+
|
|
102
|
+
// Message sent at the beginning of each connection
|
|
103
|
+
// Can only be sent by the client and only at the beginning of the connection
|
|
104
|
+
message HelloRequest {
|
|
105
|
+
option (id) = 1;
|
|
106
|
+
option (source) = SOURCE_CLIENT;
|
|
107
|
+
option (no_delay) = true;
|
|
108
|
+
|
|
109
|
+
// Description of client (like User Agent)
|
|
110
|
+
// For example "Home Assistant"
|
|
111
|
+
// Not strictly necessary to send but nice for debugging
|
|
112
|
+
// purposes.
|
|
113
|
+
string client_info = 1;
|
|
114
|
+
uint32 api_version_major = 2;
|
|
115
|
+
uint32 api_version_minor = 3;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Confirmation of successful connection request.
|
|
119
|
+
// Can only be sent by the server and only at the beginning of the connection
|
|
120
|
+
message HelloResponse {
|
|
121
|
+
option (id) = 2;
|
|
122
|
+
option (source) = SOURCE_SERVER;
|
|
123
|
+
option (no_delay) = true;
|
|
124
|
+
|
|
125
|
+
// The version of the API to use. The _client_ (for example Home Assistant) needs to check
|
|
126
|
+
// for compatibility and if necessary adopt to an older API.
|
|
127
|
+
// Major is for breaking changes in the base protocol - a mismatch will lead to immediate disconnect_client_
|
|
128
|
+
// Minor is for breaking changes in individual messages - a mismatch will lead to a warning message
|
|
129
|
+
uint32 api_version_major = 1;
|
|
130
|
+
uint32 api_version_minor = 2;
|
|
131
|
+
|
|
132
|
+
// A string identifying the server (ESP); like client info this may be empty
|
|
133
|
+
// and only exists for debugging/logging purposes.
|
|
134
|
+
// Currently set to ESPHOME_VERSION string literal.
|
|
135
|
+
string server_info = 3 [(max_data_length) = 32, (force) = true];
|
|
136
|
+
|
|
137
|
+
// The name of the server (App.get_name() - device hostname)
|
|
138
|
+
// max_data_length matches ESPHOME_DEVICE_NAME_MAX_LEN (validated by validate_hostname)
|
|
139
|
+
string name = 4 [(max_data_length) = 31, (force) = true];
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// DEPRECATED in ESPHome 2026.1.0 - Password authentication is no longer supported.
|
|
143
|
+
// These messages are kept for protocol documentation but are not processed by the server.
|
|
144
|
+
// Use noise encryption instead: https://esphome.io/components/api/#configuration-variables
|
|
145
|
+
message AuthenticationRequest {
|
|
146
|
+
option (id) = 3;
|
|
147
|
+
option (source) = SOURCE_CLIENT;
|
|
148
|
+
option (no_delay) = true;
|
|
149
|
+
option deprecated = true;
|
|
150
|
+
|
|
151
|
+
string password = 1;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
message AuthenticationResponse {
|
|
155
|
+
option (id) = 4;
|
|
156
|
+
option (source) = SOURCE_SERVER;
|
|
157
|
+
option (no_delay) = true;
|
|
158
|
+
option deprecated = true;
|
|
159
|
+
|
|
160
|
+
bool invalid_password = 1;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Reason a party is requesting the connection be closed.
|
|
164
|
+
enum DisconnectReason {
|
|
165
|
+
// No specific reason / not provided (default for older peers).
|
|
166
|
+
DISCONNECT_REASON_UNSPECIFIED = 0;
|
|
167
|
+
// The device's provisioning window has expired. The device must be reset
|
|
168
|
+
// (power-cycled) to reopen the provisioning window before it will accept a
|
|
169
|
+
// connection again.
|
|
170
|
+
DISCONNECT_REASON_PROVISIONING_CLOSED = 1;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Request to close the connection.
|
|
174
|
+
// Can be sent by both the client and server
|
|
175
|
+
message DisconnectRequest {
|
|
176
|
+
option (id) = 5;
|
|
177
|
+
option (source) = SOURCE_BOTH;
|
|
178
|
+
option (no_delay) = true;
|
|
179
|
+
|
|
180
|
+
// Do not close the connection before the acknowledgement arrives
|
|
181
|
+
|
|
182
|
+
// Optional reason the connection is being closed. Older peers that do not
|
|
183
|
+
// send this field will report DISCONNECT_REASON_UNSPECIFIED (0).
|
|
184
|
+
DisconnectReason reason = 1;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
message DisconnectResponse {
|
|
188
|
+
option (id) = 6;
|
|
189
|
+
option (source) = SOURCE_BOTH;
|
|
190
|
+
option (no_delay) = true;
|
|
191
|
+
|
|
192
|
+
// Empty - Both parties are required to close the connection after this
|
|
193
|
+
// message has been received.
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
message PingRequest {
|
|
197
|
+
option (id) = 7;
|
|
198
|
+
option (source) = SOURCE_BOTH;
|
|
199
|
+
// Empty
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
message PingResponse {
|
|
203
|
+
option (id) = 8;
|
|
204
|
+
option (source) = SOURCE_BOTH;
|
|
205
|
+
// Empty
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
message DeviceInfoRequest {
|
|
209
|
+
option (id) = 9;
|
|
210
|
+
option (source) = SOURCE_CLIENT;
|
|
211
|
+
// Empty
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
message AreaInfo {
|
|
215
|
+
uint32 area_id = 1;
|
|
216
|
+
// max_data_length matches core/config.FRIENDLY_NAME_MAX_LEN via AREA_SCHEMA
|
|
217
|
+
string name = 2 [(max_data_length) = 120, (force) = true];
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
message DeviceInfo {
|
|
221
|
+
uint32 device_id = 1;
|
|
222
|
+
// max_data_length matches core/config.FRIENDLY_NAME_MAX_LEN via DEVICE_SCHEMA
|
|
223
|
+
string name = 2 [(max_data_length) = 120, (force) = true];
|
|
224
|
+
uint32 area_id = 3;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
enum SerialProxyPortType {
|
|
228
|
+
SERIAL_PROXY_PORT_TYPE_TTL = 0;
|
|
229
|
+
SERIAL_PROXY_PORT_TYPE_RS232 = 1;
|
|
230
|
+
SERIAL_PROXY_PORT_TYPE_RS485 = 2;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
message SerialProxyInfo {
|
|
234
|
+
string name = 1; // Human-readable port name
|
|
235
|
+
SerialProxyPortType port_type = 2; // Port type (RS232, RS485)
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// DeviceInfoResponse max_data_length values:
|
|
239
|
+
// name = 31 (ESPHOME_DEVICE_NAME_MAX_LEN, validated by validate_hostname)
|
|
240
|
+
// friendly_name = 120 (core/config.FRIENDLY_NAME_MAX_LEN)
|
|
241
|
+
// mac_address/bluetooth_mac_address = 17 (MAC_ADDRESS_PRETTY_BUFFER_SIZE - 1, constexpr)
|
|
242
|
+
// esphome_version = 32 (ESPHOME_VERSION string literal)
|
|
243
|
+
// compilation_time = 25 (Application::BUILD_TIME_STR_SIZE - 1, constexpr)
|
|
244
|
+
// manufacturer = 20 (longest hardcoded literal: "Nordic Semiconductor")
|
|
245
|
+
// model = 127 (core/config.BOARD_MAX_LENGTH, validated in platform schemas)
|
|
246
|
+
// project_name/project_version = 127 (core/config.PROJECT_MAX_LENGTH)
|
|
247
|
+
// suggested_area = 120 (core/config.FRIENDLY_NAME_MAX_LEN via AREA_SCHEMA)
|
|
248
|
+
message DeviceInfoResponse {
|
|
249
|
+
option (id) = 10;
|
|
250
|
+
option (source) = SOURCE_SERVER;
|
|
251
|
+
|
|
252
|
+
// Deprecated in ESPHome 2026.1.0, but kept for backward compatibility
|
|
253
|
+
// with older ESPHome versions that still send this field.
|
|
254
|
+
bool uses_password = 1 [deprecated = true];
|
|
255
|
+
|
|
256
|
+
// The name of the node, given by "App.set_name()" - device hostname
|
|
257
|
+
string name = 2 [(max_data_length) = 31, (force) = true];
|
|
258
|
+
|
|
259
|
+
// The mac address of the device. For example "AC:BC:32:89:0E:A9"
|
|
260
|
+
string mac_address = 3 [(max_data_length) = 17, (force) = true];
|
|
261
|
+
|
|
262
|
+
// A string describing the ESPHome version. For example "1.10.0"
|
|
263
|
+
string esphome_version = 4 [(max_data_length) = 32, (force) = true];
|
|
264
|
+
|
|
265
|
+
// A string describing the date of compilation, this is generated by the compiler
|
|
266
|
+
// and therefore may not be in the same format all the time.
|
|
267
|
+
// If the user isn't using ESPHome, this will also not be set.
|
|
268
|
+
string compilation_time = 5 [(max_data_length) = 25, (force) = true];
|
|
269
|
+
|
|
270
|
+
// The model of the board. For example NodeMCU
|
|
271
|
+
// max_data_length matches core/config.BOARD_MAX_LENGTH (validated in platform schemas)
|
|
272
|
+
string model = 6 [(max_data_length) = 127, (force) = true];
|
|
273
|
+
|
|
274
|
+
bool has_deep_sleep = 7 [(field_ifdef) = "USE_DEEP_SLEEP"];
|
|
275
|
+
|
|
276
|
+
// The esphome project details if set
|
|
277
|
+
// max_data_length matches core/config.PROJECT_MAX_LENGTH
|
|
278
|
+
string project_name = 8 [(max_data_length) = 127, (force) = true, (field_ifdef) = "ESPHOME_PROJECT_NAME"];
|
|
279
|
+
string project_version = 9 [(max_data_length) = 127, (force) = true, (field_ifdef) = "ESPHOME_PROJECT_NAME"];
|
|
280
|
+
|
|
281
|
+
uint32 webserver_port = 10 [(field_ifdef) = "USE_WEBSERVER"];
|
|
282
|
+
|
|
283
|
+
// Deprecated in API version 1.9
|
|
284
|
+
uint32 legacy_bluetooth_proxy_version = 11 [deprecated=true, (field_ifdef) = "USE_BLUETOOTH_PROXY"];
|
|
285
|
+
uint32 bluetooth_proxy_feature_flags = 15 [(field_ifdef) = "USE_BLUETOOTH_PROXY"];
|
|
286
|
+
|
|
287
|
+
string manufacturer = 12 [(max_data_length) = 20, (force) = true];
|
|
288
|
+
|
|
289
|
+
string friendly_name = 13 [(max_data_length) = 120, (force) = true];
|
|
290
|
+
|
|
291
|
+
// Deprecated in API version 1.10
|
|
292
|
+
uint32 legacy_voice_assistant_version = 14 [deprecated=true, (field_ifdef) = "USE_VOICE_ASSISTANT"];
|
|
293
|
+
uint32 voice_assistant_feature_flags = 17 [(field_ifdef) = "USE_VOICE_ASSISTANT"];
|
|
294
|
+
|
|
295
|
+
string suggested_area = 16 [(max_data_length) = 120, (force) = true, (field_ifdef) = "USE_AREAS"];
|
|
296
|
+
|
|
297
|
+
// The Bluetooth mac address of the device. For example "AC:BC:32:89:0E:AA"
|
|
298
|
+
string bluetooth_mac_address = 18 [(max_data_length) = 17, (force) = true, (field_ifdef) = "USE_BLUETOOTH_PROXY"];
|
|
299
|
+
|
|
300
|
+
// Supports receiving and saving api encryption key
|
|
301
|
+
bool api_encryption_supported = 19 [(field_ifdef) = "USE_API_NOISE"];
|
|
302
|
+
|
|
303
|
+
repeated DeviceInfo devices = 20 [(field_ifdef) = "USE_DEVICES", (fixed_array_size_define) = "ESPHOME_DEVICE_COUNT"];
|
|
304
|
+
repeated AreaInfo areas = 21 [(field_ifdef) = "USE_AREAS", (fixed_array_size_define) = "ESPHOME_AREA_COUNT"];
|
|
305
|
+
|
|
306
|
+
// Top-level area info to phase out suggested_area
|
|
307
|
+
AreaInfo area = 22 [(field_ifdef) = "USE_AREAS"];
|
|
308
|
+
|
|
309
|
+
// Indicates if Z-Wave proxy support is available and features supported
|
|
310
|
+
uint32 zwave_proxy_feature_flags = 23 [(field_ifdef) = "USE_ZWAVE_PROXY"];
|
|
311
|
+
uint32 zwave_home_id = 24 [(field_ifdef) = "USE_ZWAVE_PROXY"];
|
|
312
|
+
|
|
313
|
+
// Serial proxy instance metadata
|
|
314
|
+
repeated SerialProxyInfo serial_proxies = 25 [(field_ifdef) = "USE_SERIAL_PROXY", (fixed_array_size_define) = "SERIAL_PROXY_COUNT"];
|
|
315
|
+
|
|
316
|
+
// Device is unprovisioned and accepts Noise handshakes with the well-known
|
|
317
|
+
// all-zeros PSK, so the api encryption key can be provisioned without being
|
|
318
|
+
// sent in plaintext (protects against passive sniffing, not active MITM)
|
|
319
|
+
bool api_encryption_provisionable = 26 [(field_ifdef) = "USE_API_NOISE"];
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
message ListEntitiesRequest {
|
|
323
|
+
option (id) = 11;
|
|
324
|
+
option (source) = SOURCE_CLIENT;
|
|
325
|
+
// Empty
|
|
326
|
+
}
|
|
327
|
+
message ListEntitiesDoneResponse {
|
|
328
|
+
option (id) = 19;
|
|
329
|
+
option (source) = SOURCE_SERVER;
|
|
330
|
+
option (no_delay) = true;
|
|
331
|
+
// Empty
|
|
332
|
+
}
|
|
333
|
+
message SubscribeStatesRequest {
|
|
334
|
+
option (id) = 20;
|
|
335
|
+
option (source) = SOURCE_CLIENT;
|
|
336
|
+
// Empty
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
// ==================== COMMON =====================
|
|
340
|
+
|
|
341
|
+
enum EntityCategory {
|
|
342
|
+
ENTITY_CATEGORY_NONE = 0;
|
|
343
|
+
ENTITY_CATEGORY_CONFIG = 1;
|
|
344
|
+
ENTITY_CATEGORY_DIAGNOSTIC = 2;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
// Entity field max_data_length values match Python validation constants:
|
|
348
|
+
// name/object_id = 120 (config_validation.NAME_MAX_LENGTH)
|
|
349
|
+
// icon = 63 (core/config.ICON_MAX_LENGTH)
|
|
350
|
+
// device_class = 47 (core/config.DEVICE_CLASS_MAX_LENGTH)
|
|
351
|
+
// unit_of_measurement = 63 (core/config.UNIT_OF_MEASUREMENT_MAX_LENGTH)
|
|
352
|
+
|
|
353
|
+
// ==================== BINARY SENSOR ====================
|
|
354
|
+
message ListEntitiesBinarySensorResponse {
|
|
355
|
+
option (id) = 12;
|
|
356
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
357
|
+
option (source) = SOURCE_SERVER;
|
|
358
|
+
option (ifdef) = "USE_BINARY_SENSOR";
|
|
359
|
+
|
|
360
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
361
|
+
fixed32 key = 2 [(force) = true];
|
|
362
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
363
|
+
reserved 4; // Deprecated: was string unique_id
|
|
364
|
+
|
|
365
|
+
string device_class = 5 [(max_data_length) = 47];
|
|
366
|
+
bool is_status_binary_sensor = 6;
|
|
367
|
+
bool disabled_by_default = 7;
|
|
368
|
+
string icon = 8 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
369
|
+
EntityCategory entity_category = 9;
|
|
370
|
+
uint32 device_id = 10 [(field_ifdef) = "USE_DEVICES"];
|
|
371
|
+
}
|
|
372
|
+
message BinarySensorStateResponse {
|
|
373
|
+
option (id) = 21;
|
|
374
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
375
|
+
option (source) = SOURCE_SERVER;
|
|
376
|
+
option (ifdef) = "USE_BINARY_SENSOR";
|
|
377
|
+
option (no_delay) = true;
|
|
378
|
+
|
|
379
|
+
fixed32 key = 1 [(force) = true];
|
|
380
|
+
bool state = 2;
|
|
381
|
+
// If the binary sensor does not have a valid state yet.
|
|
382
|
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
|
|
383
|
+
bool missing_state = 3;
|
|
384
|
+
uint32 device_id = 4 [(field_ifdef) = "USE_DEVICES"];
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// ==================== COVER ====================
|
|
388
|
+
message ListEntitiesCoverResponse {
|
|
389
|
+
option (id) = 13;
|
|
390
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
391
|
+
option (source) = SOURCE_SERVER;
|
|
392
|
+
option (ifdef) = "USE_COVER";
|
|
393
|
+
|
|
394
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
395
|
+
fixed32 key = 2 [(force) = true];
|
|
396
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
397
|
+
reserved 4; // Deprecated: was string unique_id
|
|
398
|
+
|
|
399
|
+
bool assumed_state = 5;
|
|
400
|
+
bool supports_position = 6;
|
|
401
|
+
bool supports_tilt = 7;
|
|
402
|
+
string device_class = 8 [(max_data_length) = 47];
|
|
403
|
+
bool disabled_by_default = 9;
|
|
404
|
+
string icon = 10 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
405
|
+
EntityCategory entity_category = 11;
|
|
406
|
+
bool supports_stop = 12;
|
|
407
|
+
uint32 device_id = 13 [(field_ifdef) = "USE_DEVICES"];
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// Deprecated in API version 1.1
|
|
411
|
+
enum LegacyCoverState {
|
|
412
|
+
option deprecated = true;
|
|
413
|
+
LEGACY_COVER_STATE_OPEN = 0;
|
|
414
|
+
LEGACY_COVER_STATE_CLOSED = 1;
|
|
415
|
+
}
|
|
416
|
+
enum CoverOperation {
|
|
417
|
+
COVER_OPERATION_IDLE = 0;
|
|
418
|
+
COVER_OPERATION_IS_OPENING = 1;
|
|
419
|
+
COVER_OPERATION_IS_CLOSING = 2;
|
|
420
|
+
}
|
|
421
|
+
message CoverStateResponse {
|
|
422
|
+
option (id) = 22;
|
|
423
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
424
|
+
option (source) = SOURCE_SERVER;
|
|
425
|
+
option (ifdef) = "USE_COVER";
|
|
426
|
+
option (no_delay) = true;
|
|
427
|
+
|
|
428
|
+
fixed32 key = 1 [(force) = true];
|
|
429
|
+
// legacy: state has been removed in 1.13
|
|
430
|
+
// clients/servers must still send/accept it until the next protocol change
|
|
431
|
+
// Deprecated in API version 1.1
|
|
432
|
+
LegacyCoverState legacy_state = 2 [deprecated=true];
|
|
433
|
+
|
|
434
|
+
float position = 3;
|
|
435
|
+
float tilt = 4;
|
|
436
|
+
CoverOperation current_operation = 5;
|
|
437
|
+
uint32 device_id = 6 [(field_ifdef) = "USE_DEVICES"];
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// Deprecated in API version 1.1
|
|
441
|
+
enum LegacyCoverCommand {
|
|
442
|
+
option deprecated = true;
|
|
443
|
+
LEGACY_COVER_COMMAND_OPEN = 0;
|
|
444
|
+
LEGACY_COVER_COMMAND_CLOSE = 1;
|
|
445
|
+
LEGACY_COVER_COMMAND_STOP = 2;
|
|
446
|
+
}
|
|
447
|
+
message CoverCommandRequest {
|
|
448
|
+
option (id) = 30;
|
|
449
|
+
option (source) = SOURCE_CLIENT;
|
|
450
|
+
option (ifdef) = "USE_COVER";
|
|
451
|
+
option (no_delay) = true;
|
|
452
|
+
option (base_class) = "CommandProtoMessage";
|
|
453
|
+
|
|
454
|
+
fixed32 key = 1 [(force) = true];
|
|
455
|
+
|
|
456
|
+
// legacy: command has been removed in 1.13
|
|
457
|
+
// clients/servers must still send/accept it until the next protocol change
|
|
458
|
+
// Deprecated in API version 1.1
|
|
459
|
+
bool has_legacy_command = 2 [deprecated=true];
|
|
460
|
+
// Deprecated in API version 1.1
|
|
461
|
+
LegacyCoverCommand legacy_command = 3 [deprecated=true];
|
|
462
|
+
|
|
463
|
+
bool has_position = 4;
|
|
464
|
+
float position = 5;
|
|
465
|
+
bool has_tilt = 6;
|
|
466
|
+
float tilt = 7;
|
|
467
|
+
bool stop = 8;
|
|
468
|
+
uint32 device_id = 9 [(field_ifdef) = "USE_DEVICES"];
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
// ==================== FAN ====================
|
|
472
|
+
message ListEntitiesFanResponse {
|
|
473
|
+
option (id) = 14;
|
|
474
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
475
|
+
option (source) = SOURCE_SERVER;
|
|
476
|
+
option (ifdef) = "USE_FAN";
|
|
477
|
+
|
|
478
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
479
|
+
fixed32 key = 2 [(force) = true];
|
|
480
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
481
|
+
reserved 4; // Deprecated: was string unique_id
|
|
482
|
+
|
|
483
|
+
bool supports_oscillation = 5;
|
|
484
|
+
bool supports_speed = 6;
|
|
485
|
+
bool supports_direction = 7;
|
|
486
|
+
int32 supported_speed_count = 8;
|
|
487
|
+
bool disabled_by_default = 9;
|
|
488
|
+
string icon = 10 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
489
|
+
EntityCategory entity_category = 11;
|
|
490
|
+
repeated string supported_preset_modes = 12 [(container_pointer_no_template) = "std::vector<const char *>"];
|
|
491
|
+
uint32 device_id = 13 [(field_ifdef) = "USE_DEVICES"];
|
|
492
|
+
}
|
|
493
|
+
// Deprecated in API version 1.6 - only used in deprecated fields
|
|
494
|
+
enum FanSpeed {
|
|
495
|
+
option deprecated = true;
|
|
496
|
+
FAN_SPEED_LOW = 0;
|
|
497
|
+
FAN_SPEED_MEDIUM = 1;
|
|
498
|
+
FAN_SPEED_HIGH = 2;
|
|
499
|
+
}
|
|
500
|
+
enum FanDirection {
|
|
501
|
+
FAN_DIRECTION_FORWARD = 0;
|
|
502
|
+
FAN_DIRECTION_REVERSE = 1;
|
|
503
|
+
}
|
|
504
|
+
message FanStateResponse {
|
|
505
|
+
option (id) = 23;
|
|
506
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
507
|
+
option (source) = SOURCE_SERVER;
|
|
508
|
+
option (ifdef) = "USE_FAN";
|
|
509
|
+
option (no_delay) = true;
|
|
510
|
+
|
|
511
|
+
fixed32 key = 1 [(force) = true];
|
|
512
|
+
bool state = 2;
|
|
513
|
+
bool oscillating = 3;
|
|
514
|
+
// Deprecated in API version 1.6
|
|
515
|
+
FanSpeed speed = 4 [deprecated=true];
|
|
516
|
+
FanDirection direction = 5;
|
|
517
|
+
int32 speed_level = 6;
|
|
518
|
+
string preset_mode = 7;
|
|
519
|
+
uint32 device_id = 8 [(field_ifdef) = "USE_DEVICES"];
|
|
520
|
+
}
|
|
521
|
+
message FanCommandRequest {
|
|
522
|
+
option (id) = 31;
|
|
523
|
+
option (source) = SOURCE_CLIENT;
|
|
524
|
+
option (ifdef) = "USE_FAN";
|
|
525
|
+
option (no_delay) = true;
|
|
526
|
+
option (base_class) = "CommandProtoMessage";
|
|
527
|
+
|
|
528
|
+
fixed32 key = 1 [(force) = true];
|
|
529
|
+
bool has_state = 2;
|
|
530
|
+
bool state = 3;
|
|
531
|
+
// Deprecated in API version 1.6
|
|
532
|
+
bool has_speed = 4 [deprecated=true];
|
|
533
|
+
// Deprecated in API version 1.6
|
|
534
|
+
FanSpeed speed = 5 [deprecated=true];
|
|
535
|
+
bool has_oscillating = 6;
|
|
536
|
+
bool oscillating = 7;
|
|
537
|
+
bool has_direction = 8;
|
|
538
|
+
FanDirection direction = 9;
|
|
539
|
+
bool has_speed_level = 10;
|
|
540
|
+
int32 speed_level = 11;
|
|
541
|
+
bool has_preset_mode = 12;
|
|
542
|
+
string preset_mode = 13;
|
|
543
|
+
uint32 device_id = 14 [(field_ifdef) = "USE_DEVICES"];
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
// ==================== LIGHT ====================
|
|
547
|
+
enum ColorMode {
|
|
548
|
+
COLOR_MODE_UNKNOWN = 0;
|
|
549
|
+
COLOR_MODE_ON_OFF = 1;
|
|
550
|
+
COLOR_MODE_LEGACY_BRIGHTNESS = 2;
|
|
551
|
+
COLOR_MODE_BRIGHTNESS = 3;
|
|
552
|
+
COLOR_MODE_WHITE = 7;
|
|
553
|
+
COLOR_MODE_COLOR_TEMPERATURE = 11;
|
|
554
|
+
COLOR_MODE_COLD_WARM_WHITE = 19;
|
|
555
|
+
COLOR_MODE_RGB = 35;
|
|
556
|
+
COLOR_MODE_RGB_WHITE = 39;
|
|
557
|
+
COLOR_MODE_RGB_COLOR_TEMPERATURE = 47;
|
|
558
|
+
COLOR_MODE_RGB_COLD_WARM_WHITE = 51;
|
|
559
|
+
}
|
|
560
|
+
message ListEntitiesLightResponse {
|
|
561
|
+
option (id) = 15;
|
|
562
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
563
|
+
option (source) = SOURCE_SERVER;
|
|
564
|
+
option (ifdef) = "USE_LIGHT";
|
|
565
|
+
|
|
566
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
567
|
+
fixed32 key = 2 [(force) = true];
|
|
568
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
569
|
+
reserved 4; // Deprecated: was string unique_id
|
|
570
|
+
|
|
571
|
+
repeated ColorMode supported_color_modes = 12 [(container_pointer_no_template) = "light::ColorModeMask"];
|
|
572
|
+
// next four supports_* are for legacy clients, newer clients should use color modes
|
|
573
|
+
// Deprecated in API version 1.6
|
|
574
|
+
bool legacy_supports_brightness = 5 [deprecated=true];
|
|
575
|
+
// Deprecated in API version 1.6
|
|
576
|
+
bool legacy_supports_rgb = 6 [deprecated=true];
|
|
577
|
+
// Deprecated in API version 1.6
|
|
578
|
+
bool legacy_supports_white_value = 7 [deprecated=true];
|
|
579
|
+
// Deprecated in API version 1.6
|
|
580
|
+
bool legacy_supports_color_temperature = 8 [deprecated=true];
|
|
581
|
+
float min_mireds = 9;
|
|
582
|
+
float max_mireds = 10;
|
|
583
|
+
repeated string effects = 11 [(container_pointer_no_template) = "FixedVector<const char *>"];
|
|
584
|
+
bool disabled_by_default = 13;
|
|
585
|
+
string icon = 14 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
586
|
+
EntityCategory entity_category = 15;
|
|
587
|
+
uint32 device_id = 16 [(field_ifdef) = "USE_DEVICES"];
|
|
588
|
+
}
|
|
589
|
+
message LightStateResponse {
|
|
590
|
+
option (id) = 24;
|
|
591
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
592
|
+
option (source) = SOURCE_SERVER;
|
|
593
|
+
option (ifdef) = "USE_LIGHT";
|
|
594
|
+
option (no_delay) = true;
|
|
595
|
+
|
|
596
|
+
fixed32 key = 1 [(force) = true];
|
|
597
|
+
bool state = 2;
|
|
598
|
+
float brightness = 3;
|
|
599
|
+
ColorMode color_mode = 11;
|
|
600
|
+
float color_brightness = 10;
|
|
601
|
+
float red = 4;
|
|
602
|
+
float green = 5;
|
|
603
|
+
float blue = 6;
|
|
604
|
+
float white = 7;
|
|
605
|
+
float color_temperature = 8;
|
|
606
|
+
float cold_white = 12;
|
|
607
|
+
float warm_white = 13;
|
|
608
|
+
string effect = 9;
|
|
609
|
+
uint32 device_id = 14 [(field_ifdef) = "USE_DEVICES"];
|
|
610
|
+
}
|
|
611
|
+
message LightCommandRequest {
|
|
612
|
+
option (id) = 32;
|
|
613
|
+
option (source) = SOURCE_CLIENT;
|
|
614
|
+
option (ifdef) = "USE_LIGHT";
|
|
615
|
+
option (no_delay) = true;
|
|
616
|
+
option (base_class) = "CommandProtoMessage";
|
|
617
|
+
|
|
618
|
+
fixed32 key = 1 [(force) = true];
|
|
619
|
+
bool has_state = 2;
|
|
620
|
+
bool state = 3;
|
|
621
|
+
bool has_brightness = 4;
|
|
622
|
+
float brightness = 5;
|
|
623
|
+
bool has_color_mode = 22;
|
|
624
|
+
ColorMode color_mode = 23;
|
|
625
|
+
bool has_color_brightness = 20;
|
|
626
|
+
float color_brightness = 21;
|
|
627
|
+
bool has_rgb = 6;
|
|
628
|
+
float red = 7;
|
|
629
|
+
float green = 8;
|
|
630
|
+
float blue = 9;
|
|
631
|
+
bool has_white = 10;
|
|
632
|
+
float white = 11;
|
|
633
|
+
bool has_color_temperature = 12;
|
|
634
|
+
float color_temperature = 13;
|
|
635
|
+
bool has_cold_white = 24;
|
|
636
|
+
float cold_white = 25;
|
|
637
|
+
bool has_warm_white = 26;
|
|
638
|
+
float warm_white = 27;
|
|
639
|
+
bool has_transition_length = 14;
|
|
640
|
+
uint32 transition_length = 15;
|
|
641
|
+
bool has_flash_length = 16;
|
|
642
|
+
uint32 flash_length = 17;
|
|
643
|
+
bool has_effect = 18;
|
|
644
|
+
string effect = 19;
|
|
645
|
+
uint32 device_id = 28 [(field_ifdef) = "USE_DEVICES"];
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
// ==================== SENSOR ====================
|
|
649
|
+
enum SensorStateClass {
|
|
650
|
+
STATE_CLASS_NONE = 0;
|
|
651
|
+
STATE_CLASS_MEASUREMENT = 1;
|
|
652
|
+
STATE_CLASS_TOTAL_INCREASING = 2;
|
|
653
|
+
STATE_CLASS_TOTAL = 3;
|
|
654
|
+
STATE_CLASS_MEASUREMENT_ANGLE = 4;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
// Deprecated in API version 1.5
|
|
658
|
+
enum SensorLastResetType {
|
|
659
|
+
option deprecated = true;
|
|
660
|
+
LAST_RESET_NONE = 0;
|
|
661
|
+
LAST_RESET_NEVER = 1;
|
|
662
|
+
LAST_RESET_AUTO = 2;
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
message ListEntitiesSensorResponse {
|
|
666
|
+
option (id) = 16;
|
|
667
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
668
|
+
option (source) = SOURCE_SERVER;
|
|
669
|
+
option (ifdef) = "USE_SENSOR";
|
|
670
|
+
|
|
671
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
672
|
+
fixed32 key = 2 [(force) = true];
|
|
673
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
674
|
+
reserved 4; // Deprecated: was string unique_id
|
|
675
|
+
|
|
676
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
677
|
+
string unit_of_measurement = 6 [(max_data_length) = 63];
|
|
678
|
+
int32 accuracy_decimals = 7;
|
|
679
|
+
bool force_update = 8;
|
|
680
|
+
string device_class = 9 [(max_data_length) = 47];
|
|
681
|
+
SensorStateClass state_class = 10;
|
|
682
|
+
// Last reset type removed in 2021.9.0
|
|
683
|
+
// Deprecated in API version 1.5
|
|
684
|
+
SensorLastResetType legacy_last_reset_type = 11 [deprecated=true];
|
|
685
|
+
bool disabled_by_default = 12;
|
|
686
|
+
EntityCategory entity_category = 13;
|
|
687
|
+
uint32 device_id = 14 [(field_ifdef) = "USE_DEVICES"];
|
|
688
|
+
}
|
|
689
|
+
message SensorStateResponse {
|
|
690
|
+
option (id) = 25;
|
|
691
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
692
|
+
option (source) = SOURCE_SERVER;
|
|
693
|
+
option (ifdef) = "USE_SENSOR";
|
|
694
|
+
option (no_delay) = true;
|
|
695
|
+
option (speed_optimized) = true;
|
|
696
|
+
|
|
697
|
+
fixed32 key = 1 [(force) = true];
|
|
698
|
+
float state = 2;
|
|
699
|
+
// If the sensor does not have a valid state yet.
|
|
700
|
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
|
|
701
|
+
bool missing_state = 3;
|
|
702
|
+
uint32 device_id = 4 [(field_ifdef) = "USE_DEVICES"];
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
// ==================== SWITCH ====================
|
|
706
|
+
message ListEntitiesSwitchResponse {
|
|
707
|
+
option (id) = 17;
|
|
708
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
709
|
+
option (source) = SOURCE_SERVER;
|
|
710
|
+
option (ifdef) = "USE_SWITCH";
|
|
711
|
+
|
|
712
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
713
|
+
fixed32 key = 2 [(force) = true];
|
|
714
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
715
|
+
reserved 4; // Deprecated: was string unique_id
|
|
716
|
+
|
|
717
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
718
|
+
bool assumed_state = 6;
|
|
719
|
+
bool disabled_by_default = 7;
|
|
720
|
+
EntityCategory entity_category = 8;
|
|
721
|
+
string device_class = 9 [(max_data_length) = 47];
|
|
722
|
+
uint32 device_id = 10 [(field_ifdef) = "USE_DEVICES"];
|
|
723
|
+
}
|
|
724
|
+
message SwitchStateResponse {
|
|
725
|
+
option (id) = 26;
|
|
726
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
727
|
+
option (source) = SOURCE_SERVER;
|
|
728
|
+
option (ifdef) = "USE_SWITCH";
|
|
729
|
+
option (no_delay) = true;
|
|
730
|
+
|
|
731
|
+
fixed32 key = 1 [(force) = true];
|
|
732
|
+
bool state = 2;
|
|
733
|
+
uint32 device_id = 3 [(field_ifdef) = "USE_DEVICES"];
|
|
734
|
+
}
|
|
735
|
+
message SwitchCommandRequest {
|
|
736
|
+
option (id) = 33;
|
|
737
|
+
option (source) = SOURCE_CLIENT;
|
|
738
|
+
option (ifdef) = "USE_SWITCH";
|
|
739
|
+
option (no_delay) = true;
|
|
740
|
+
option (base_class) = "CommandProtoMessage";
|
|
741
|
+
|
|
742
|
+
fixed32 key = 1 [(force) = true];
|
|
743
|
+
bool state = 2;
|
|
744
|
+
uint32 device_id = 3 [(field_ifdef) = "USE_DEVICES"];
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
// ==================== TEXT SENSOR ====================
|
|
748
|
+
message ListEntitiesTextSensorResponse {
|
|
749
|
+
option (id) = 18;
|
|
750
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
751
|
+
option (source) = SOURCE_SERVER;
|
|
752
|
+
option (ifdef) = "USE_TEXT_SENSOR";
|
|
753
|
+
|
|
754
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
755
|
+
fixed32 key = 2 [(force) = true];
|
|
756
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
757
|
+
reserved 4; // Deprecated: was string unique_id
|
|
758
|
+
|
|
759
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
760
|
+
bool disabled_by_default = 6;
|
|
761
|
+
EntityCategory entity_category = 7;
|
|
762
|
+
string device_class = 8 [(max_data_length) = 47];
|
|
763
|
+
uint32 device_id = 9 [(field_ifdef) = "USE_DEVICES"];
|
|
764
|
+
}
|
|
765
|
+
message TextSensorStateResponse {
|
|
766
|
+
option (id) = 27;
|
|
767
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
768
|
+
option (source) = SOURCE_SERVER;
|
|
769
|
+
option (ifdef) = "USE_TEXT_SENSOR";
|
|
770
|
+
option (no_delay) = true;
|
|
771
|
+
|
|
772
|
+
fixed32 key = 1 [(force) = true];
|
|
773
|
+
string state = 2;
|
|
774
|
+
// If the text sensor does not have a valid state yet.
|
|
775
|
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
|
|
776
|
+
bool missing_state = 3;
|
|
777
|
+
uint32 device_id = 4 [(field_ifdef) = "USE_DEVICES"];
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
// ==================== SUBSCRIBE LOGS ====================
|
|
781
|
+
enum LogLevel {
|
|
782
|
+
LOG_LEVEL_NONE = 0;
|
|
783
|
+
LOG_LEVEL_ERROR = 1;
|
|
784
|
+
LOG_LEVEL_WARN = 2;
|
|
785
|
+
LOG_LEVEL_INFO = 3;
|
|
786
|
+
LOG_LEVEL_CONFIG = 4;
|
|
787
|
+
LOG_LEVEL_DEBUG = 5;
|
|
788
|
+
LOG_LEVEL_VERBOSE = 6;
|
|
789
|
+
LOG_LEVEL_VERY_VERBOSE = 7;
|
|
790
|
+
}
|
|
791
|
+
message SubscribeLogsRequest {
|
|
792
|
+
option (id) = 28;
|
|
793
|
+
option (source) = SOURCE_CLIENT;
|
|
794
|
+
LogLevel level = 1;
|
|
795
|
+
bool dump_config = 2;
|
|
796
|
+
}
|
|
797
|
+
message SubscribeLogsResponse {
|
|
798
|
+
option (id) = 29;
|
|
799
|
+
option (source) = SOURCE_SERVER;
|
|
800
|
+
option (log) = false;
|
|
801
|
+
option (no_delay) = false;
|
|
802
|
+
option (speed_optimized) = true;
|
|
803
|
+
|
|
804
|
+
LogLevel level = 1 [(force) = true];
|
|
805
|
+
bytes message = 3 [(force) = true];
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
// ==================== NOISE ENCRYPTION ====================
|
|
809
|
+
message NoiseEncryptionSetKeyRequest {
|
|
810
|
+
option (id) = 124;
|
|
811
|
+
option (source) = SOURCE_CLIENT;
|
|
812
|
+
option (ifdef) = "USE_API_NOISE";
|
|
813
|
+
|
|
814
|
+
bytes key = 1;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
message NoiseEncryptionSetKeyResponse {
|
|
818
|
+
option (id) = 125;
|
|
819
|
+
option (source) = SOURCE_SERVER;
|
|
820
|
+
option (ifdef) = "USE_API_NOISE";
|
|
821
|
+
|
|
822
|
+
bool success = 1;
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
// ==================== HOMEASSISTANT.SERVICE ====================
|
|
826
|
+
message SubscribeHomeassistantServicesRequest {
|
|
827
|
+
option (id) = 34;
|
|
828
|
+
option (source) = SOURCE_CLIENT;
|
|
829
|
+
option (ifdef) = "USE_API_HOMEASSISTANT_SERVICES";
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
message HomeassistantServiceMap {
|
|
833
|
+
string key = 1;
|
|
834
|
+
string value = 2;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
message HomeassistantActionRequest {
|
|
838
|
+
option (id) = 35;
|
|
839
|
+
option (source) = SOURCE_SERVER;
|
|
840
|
+
option (no_delay) = true;
|
|
841
|
+
option (ifdef) = "USE_API_HOMEASSISTANT_SERVICES";
|
|
842
|
+
|
|
843
|
+
string service = 1;
|
|
844
|
+
repeated HomeassistantServiceMap data = 2 [(fixed_vector) = true];
|
|
845
|
+
repeated HomeassistantServiceMap data_template = 3 [(fixed_vector) = true];
|
|
846
|
+
repeated HomeassistantServiceMap variables = 4 [(fixed_vector) = true];
|
|
847
|
+
bool is_event = 5;
|
|
848
|
+
uint32 call_id = 6 [(field_ifdef) = "USE_API_HOMEASSISTANT_ACTION_RESPONSES"];
|
|
849
|
+
bool wants_response = 7 [(field_ifdef) = "USE_API_HOMEASSISTANT_ACTION_RESPONSES_JSON"];
|
|
850
|
+
string response_template = 8 [(field_ifdef) = "USE_API_HOMEASSISTANT_ACTION_RESPONSES_JSON"];
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
// Message sent by Home Assistant to ESPHome with service call response data
|
|
854
|
+
message HomeassistantActionResponse {
|
|
855
|
+
option (id) = 130;
|
|
856
|
+
option (source) = SOURCE_CLIENT;
|
|
857
|
+
option (no_delay) = true;
|
|
858
|
+
option (ifdef) = "USE_API_HOMEASSISTANT_ACTION_RESPONSES";
|
|
859
|
+
|
|
860
|
+
uint32 call_id = 1; // Matches the call_id from HomeassistantActionRequest
|
|
861
|
+
bool success = 2; // Whether the service call succeeded
|
|
862
|
+
string error_message = 3; // Error message if success = false
|
|
863
|
+
bytes response_data = 4 [(field_ifdef) = "USE_API_HOMEASSISTANT_ACTION_RESPONSES_JSON"];
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
// ==================== IMPORT HOME ASSISTANT STATES ====================
|
|
867
|
+
// 1. Client sends SubscribeHomeAssistantStatesRequest
|
|
868
|
+
// 2. Server responds with zero or more SubscribeHomeAssistantStateResponse (async)
|
|
869
|
+
// 3. Client sends HomeAssistantStateResponse for state changes.
|
|
870
|
+
message SubscribeHomeAssistantStatesRequest {
|
|
871
|
+
option (id) = 38;
|
|
872
|
+
option (source) = SOURCE_CLIENT;
|
|
873
|
+
option (ifdef) = "USE_API_HOMEASSISTANT_STATES";
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
message SubscribeHomeAssistantStateResponse {
|
|
877
|
+
option (id) = 39;
|
|
878
|
+
option (source) = SOURCE_SERVER;
|
|
879
|
+
option (ifdef) = "USE_API_HOMEASSISTANT_STATES";
|
|
880
|
+
string entity_id = 1;
|
|
881
|
+
string attribute = 2;
|
|
882
|
+
bool once = 3;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
message HomeAssistantStateResponse {
|
|
886
|
+
option (id) = 40;
|
|
887
|
+
option (source) = SOURCE_CLIENT;
|
|
888
|
+
option (no_delay) = true;
|
|
889
|
+
option (ifdef) = "USE_API_HOMEASSISTANT_STATES";
|
|
890
|
+
|
|
891
|
+
string entity_id = 1;
|
|
892
|
+
string state = 2;
|
|
893
|
+
string attribute = 3;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
// ==================== IMPORT TIME ====================
|
|
897
|
+
message GetTimeRequest {
|
|
898
|
+
option (id) = 36;
|
|
899
|
+
option (source) = SOURCE_SERVER;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
enum DSTRuleType {
|
|
903
|
+
DST_RULE_TYPE_NONE = 0;
|
|
904
|
+
DST_RULE_TYPE_MONTH_WEEK_DAY = 1;
|
|
905
|
+
DST_RULE_TYPE_JULIAN_NO_LEAP = 2;
|
|
906
|
+
DST_RULE_TYPE_DAY_OF_YEAR = 3;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
message DSTRule {
|
|
910
|
+
option (source) = SOURCE_CLIENT;
|
|
911
|
+
|
|
912
|
+
sint32 time_seconds = 1;
|
|
913
|
+
uint32 day = 2;
|
|
914
|
+
DSTRuleType type = 3;
|
|
915
|
+
uint32 month = 4;
|
|
916
|
+
uint32 week = 5;
|
|
917
|
+
uint32 day_of_week = 6;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
message ParsedTimezone {
|
|
921
|
+
option (source) = SOURCE_CLIENT;
|
|
922
|
+
|
|
923
|
+
sint32 std_offset_seconds = 1;
|
|
924
|
+
sint32 dst_offset_seconds = 2;
|
|
925
|
+
DSTRule dst_start = 3;
|
|
926
|
+
DSTRule dst_end = 4;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
message GetTimeResponse {
|
|
930
|
+
option (id) = 37;
|
|
931
|
+
option (source) = SOURCE_CLIENT;
|
|
932
|
+
option (no_delay) = true;
|
|
933
|
+
|
|
934
|
+
fixed32 epoch_seconds = 1;
|
|
935
|
+
string timezone = 2;
|
|
936
|
+
ParsedTimezone parsed_timezone = 3;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
// ==================== USER-DEFINES SERVICES ====================
|
|
940
|
+
enum ServiceArgType {
|
|
941
|
+
SERVICE_ARG_TYPE_BOOL = 0;
|
|
942
|
+
SERVICE_ARG_TYPE_INT = 1;
|
|
943
|
+
SERVICE_ARG_TYPE_FLOAT = 2;
|
|
944
|
+
SERVICE_ARG_TYPE_STRING = 3;
|
|
945
|
+
SERVICE_ARG_TYPE_BOOL_ARRAY = 4;
|
|
946
|
+
SERVICE_ARG_TYPE_INT_ARRAY = 5;
|
|
947
|
+
SERVICE_ARG_TYPE_FLOAT_ARRAY = 6;
|
|
948
|
+
SERVICE_ARG_TYPE_STRING_ARRAY = 7;
|
|
949
|
+
}
|
|
950
|
+
enum SupportsResponseType {
|
|
951
|
+
SUPPORTS_RESPONSE_NONE = 0;
|
|
952
|
+
SUPPORTS_RESPONSE_OPTIONAL = 1;
|
|
953
|
+
SUPPORTS_RESPONSE_ONLY = 2;
|
|
954
|
+
// Status-only response - reports success/error without data payload
|
|
955
|
+
// Value is higher to avoid conflicts with future Home Assistant values
|
|
956
|
+
SUPPORTS_RESPONSE_STATUS = 100;
|
|
957
|
+
}
|
|
958
|
+
message ListEntitiesServicesArgument {
|
|
959
|
+
option (ifdef) = "USE_API_USER_DEFINED_ACTIONS";
|
|
960
|
+
string name = 1;
|
|
961
|
+
ServiceArgType type = 2;
|
|
962
|
+
}
|
|
963
|
+
message ListEntitiesServicesResponse {
|
|
964
|
+
option (id) = 41;
|
|
965
|
+
option (source) = SOURCE_SERVER;
|
|
966
|
+
option (ifdef) = "USE_API_USER_DEFINED_ACTIONS";
|
|
967
|
+
|
|
968
|
+
string name = 1;
|
|
969
|
+
fixed32 key = 2 [(force) = true];
|
|
970
|
+
repeated ListEntitiesServicesArgument args = 3 [(fixed_vector) = true];
|
|
971
|
+
SupportsResponseType supports_response = 4;
|
|
972
|
+
}
|
|
973
|
+
message ExecuteServiceArgument {
|
|
974
|
+
option (ifdef) = "USE_API_USER_DEFINED_ACTIONS";
|
|
975
|
+
bool bool_ = 1;
|
|
976
|
+
int32 legacy_int = 2;
|
|
977
|
+
float float_ = 3;
|
|
978
|
+
string string_ = 4;
|
|
979
|
+
// ESPHome 1.14 (api v1.3) make int a signed value
|
|
980
|
+
sint32 int_ = 5;
|
|
981
|
+
repeated bool bool_array = 6 [packed=false, (fixed_vector) = true];
|
|
982
|
+
repeated sint32 int_array = 7 [packed=false, (fixed_vector) = true];
|
|
983
|
+
repeated float float_array = 8 [packed=false, (fixed_vector) = true];
|
|
984
|
+
repeated string string_array = 9 [(fixed_vector) = true];
|
|
985
|
+
}
|
|
986
|
+
message ExecuteServiceRequest {
|
|
987
|
+
option (id) = 42;
|
|
988
|
+
option (source) = SOURCE_CLIENT;
|
|
989
|
+
option (no_delay) = true;
|
|
990
|
+
option (ifdef) = "USE_API_USER_DEFINED_ACTIONS";
|
|
991
|
+
|
|
992
|
+
fixed32 key = 1 [(force) = true];
|
|
993
|
+
repeated ExecuteServiceArgument args = 2 [(fixed_vector) = true];
|
|
994
|
+
uint32 call_id = 3 [(field_ifdef) = "USE_API_USER_DEFINED_ACTION_RESPONSES"];
|
|
995
|
+
bool return_response = 4 [(field_ifdef) = "USE_API_USER_DEFINED_ACTION_RESPONSES"];
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
// Message sent by ESPHome to Home Assistant with service execution response data
|
|
999
|
+
message ExecuteServiceResponse {
|
|
1000
|
+
option (id) = 131;
|
|
1001
|
+
option (source) = SOURCE_SERVER;
|
|
1002
|
+
option (no_delay) = true;
|
|
1003
|
+
option (ifdef) = "USE_API_USER_DEFINED_ACTION_RESPONSES";
|
|
1004
|
+
|
|
1005
|
+
uint32 call_id = 1; // Matches the call_id from ExecuteServiceRequest
|
|
1006
|
+
bool success = 2; // Whether the service execution succeeded
|
|
1007
|
+
string error_message = 3; // Error message if success = false
|
|
1008
|
+
bytes response_data = 4 [(pointer_to_buffer) = true, (field_ifdef) = "USE_API_USER_DEFINED_ACTION_RESPONSES_JSON"];
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
// ==================== CAMERA ====================
|
|
1012
|
+
message ListEntitiesCameraResponse {
|
|
1013
|
+
option (id) = 43;
|
|
1014
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
1015
|
+
option (source) = SOURCE_SERVER;
|
|
1016
|
+
option (ifdef) = "USE_CAMERA";
|
|
1017
|
+
|
|
1018
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
1019
|
+
fixed32 key = 2 [(force) = true];
|
|
1020
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
1021
|
+
reserved 4; // Deprecated: was string unique_id
|
|
1022
|
+
bool disabled_by_default = 5;
|
|
1023
|
+
string icon = 6 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
1024
|
+
EntityCategory entity_category = 7;
|
|
1025
|
+
uint32 device_id = 8 [(field_ifdef) = "USE_DEVICES"];
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
message CameraImageResponse {
|
|
1029
|
+
option (id) = 44;
|
|
1030
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
1031
|
+
option (source) = SOURCE_SERVER;
|
|
1032
|
+
option (ifdef) = "USE_CAMERA";
|
|
1033
|
+
|
|
1034
|
+
fixed32 key = 1 [(force) = true];
|
|
1035
|
+
bytes data = 2;
|
|
1036
|
+
bool done = 3;
|
|
1037
|
+
uint32 device_id = 4 [(field_ifdef) = "USE_DEVICES"];
|
|
1038
|
+
}
|
|
1039
|
+
message CameraImageRequest {
|
|
1040
|
+
option (id) = 45;
|
|
1041
|
+
option (source) = SOURCE_CLIENT;
|
|
1042
|
+
option (ifdef) = "USE_CAMERA";
|
|
1043
|
+
option (no_delay) = true;
|
|
1044
|
+
|
|
1045
|
+
bool single = 1;
|
|
1046
|
+
bool stream = 2;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
// ==================== TEMPERATURE UNIT ====================
|
|
1050
|
+
enum TemperatureUnit {
|
|
1051
|
+
TEMPERATURE_UNIT_CELSIUS = 0;
|
|
1052
|
+
TEMPERATURE_UNIT_FAHRENHEIT = 1;
|
|
1053
|
+
TEMPERATURE_UNIT_KELVIN = 2;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
// ==================== CLIMATE ====================
|
|
1057
|
+
enum ClimateMode {
|
|
1058
|
+
CLIMATE_MODE_OFF = 0;
|
|
1059
|
+
CLIMATE_MODE_HEAT_COOL = 1;
|
|
1060
|
+
CLIMATE_MODE_COOL = 2;
|
|
1061
|
+
CLIMATE_MODE_HEAT = 3;
|
|
1062
|
+
CLIMATE_MODE_FAN_ONLY = 4;
|
|
1063
|
+
CLIMATE_MODE_DRY = 5;
|
|
1064
|
+
CLIMATE_MODE_AUTO = 6;
|
|
1065
|
+
}
|
|
1066
|
+
enum ClimateFanMode {
|
|
1067
|
+
CLIMATE_FAN_ON = 0;
|
|
1068
|
+
CLIMATE_FAN_OFF = 1;
|
|
1069
|
+
CLIMATE_FAN_AUTO = 2;
|
|
1070
|
+
CLIMATE_FAN_LOW = 3;
|
|
1071
|
+
CLIMATE_FAN_MEDIUM = 4;
|
|
1072
|
+
CLIMATE_FAN_HIGH = 5;
|
|
1073
|
+
CLIMATE_FAN_MIDDLE = 6;
|
|
1074
|
+
CLIMATE_FAN_FOCUS = 7;
|
|
1075
|
+
CLIMATE_FAN_DIFFUSE = 8;
|
|
1076
|
+
CLIMATE_FAN_QUIET = 9;
|
|
1077
|
+
}
|
|
1078
|
+
enum ClimateSwingMode {
|
|
1079
|
+
CLIMATE_SWING_OFF = 0;
|
|
1080
|
+
CLIMATE_SWING_BOTH = 1;
|
|
1081
|
+
CLIMATE_SWING_VERTICAL = 2;
|
|
1082
|
+
CLIMATE_SWING_HORIZONTAL = 3;
|
|
1083
|
+
}
|
|
1084
|
+
enum ClimateAction {
|
|
1085
|
+
CLIMATE_ACTION_OFF = 0;
|
|
1086
|
+
// values same as mode for readability
|
|
1087
|
+
CLIMATE_ACTION_COOLING = 2;
|
|
1088
|
+
CLIMATE_ACTION_HEATING = 3;
|
|
1089
|
+
CLIMATE_ACTION_IDLE = 4;
|
|
1090
|
+
CLIMATE_ACTION_DRYING = 5;
|
|
1091
|
+
CLIMATE_ACTION_FAN = 6;
|
|
1092
|
+
CLIMATE_ACTION_DEFROSTING = 7;
|
|
1093
|
+
}
|
|
1094
|
+
enum ClimatePreset {
|
|
1095
|
+
CLIMATE_PRESET_NONE = 0;
|
|
1096
|
+
CLIMATE_PRESET_HOME = 1;
|
|
1097
|
+
CLIMATE_PRESET_AWAY = 2;
|
|
1098
|
+
CLIMATE_PRESET_BOOST = 3;
|
|
1099
|
+
CLIMATE_PRESET_COMFORT = 4;
|
|
1100
|
+
CLIMATE_PRESET_ECO = 5;
|
|
1101
|
+
CLIMATE_PRESET_SLEEP = 6;
|
|
1102
|
+
CLIMATE_PRESET_ACTIVITY = 7;
|
|
1103
|
+
}
|
|
1104
|
+
message ListEntitiesClimateResponse {
|
|
1105
|
+
option (id) = 46;
|
|
1106
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
1107
|
+
option (source) = SOURCE_SERVER;
|
|
1108
|
+
option (ifdef) = "USE_CLIMATE";
|
|
1109
|
+
|
|
1110
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
1111
|
+
fixed32 key = 2 [(force) = true];
|
|
1112
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
1113
|
+
reserved 4; // Deprecated: was string unique_id
|
|
1114
|
+
|
|
1115
|
+
bool supports_current_temperature = 5; // Deprecated: use feature_flags
|
|
1116
|
+
bool supports_two_point_target_temperature = 6; // Deprecated: use feature_flags
|
|
1117
|
+
repeated ClimateMode supported_modes = 7 [(container_pointer_no_template) = "climate::ClimateModeMask"];
|
|
1118
|
+
float visual_min_temperature = 8;
|
|
1119
|
+
float visual_max_temperature = 9;
|
|
1120
|
+
float visual_target_temperature_step = 10;
|
|
1121
|
+
// for older peer versions - in new system this
|
|
1122
|
+
// is if CLIMATE_PRESET_AWAY exists is supported_presets
|
|
1123
|
+
// Deprecated in API version 1.5
|
|
1124
|
+
bool legacy_supports_away = 11 [deprecated=true];
|
|
1125
|
+
bool supports_action = 12; // Deprecated: use feature_flags
|
|
1126
|
+
repeated ClimateFanMode supported_fan_modes = 13 [(container_pointer_no_template) = "climate::ClimateFanModeMask"];
|
|
1127
|
+
repeated ClimateSwingMode supported_swing_modes = 14 [(container_pointer_no_template) = "climate::ClimateSwingModeMask"];
|
|
1128
|
+
repeated string supported_custom_fan_modes = 15 [(container_pointer_no_template) = "std::vector<const char *>"];
|
|
1129
|
+
repeated ClimatePreset supported_presets = 16 [(container_pointer_no_template) = "climate::ClimatePresetMask"];
|
|
1130
|
+
repeated string supported_custom_presets = 17 [(container_pointer_no_template) = "std::vector<const char *>"];
|
|
1131
|
+
bool disabled_by_default = 18;
|
|
1132
|
+
string icon = 19 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
1133
|
+
EntityCategory entity_category = 20;
|
|
1134
|
+
float visual_current_temperature_step = 21;
|
|
1135
|
+
bool supports_current_humidity = 22; // Deprecated: use feature_flags
|
|
1136
|
+
bool supports_target_humidity = 23; // Deprecated: use feature_flags
|
|
1137
|
+
float visual_min_humidity = 24;
|
|
1138
|
+
float visual_max_humidity = 25;
|
|
1139
|
+
uint32 device_id = 26 [(field_ifdef) = "USE_DEVICES"];
|
|
1140
|
+
uint32 feature_flags = 27;
|
|
1141
|
+
TemperatureUnit temperature_unit = 28;
|
|
1142
|
+
}
|
|
1143
|
+
message ClimateStateResponse {
|
|
1144
|
+
option (id) = 47;
|
|
1145
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
1146
|
+
option (source) = SOURCE_SERVER;
|
|
1147
|
+
option (ifdef) = "USE_CLIMATE";
|
|
1148
|
+
option (no_delay) = true;
|
|
1149
|
+
|
|
1150
|
+
fixed32 key = 1 [(force) = true];
|
|
1151
|
+
ClimateMode mode = 2;
|
|
1152
|
+
float current_temperature = 3;
|
|
1153
|
+
float target_temperature = 4;
|
|
1154
|
+
float target_temperature_low = 5;
|
|
1155
|
+
float target_temperature_high = 6;
|
|
1156
|
+
// For older peers, equal to preset == CLIMATE_PRESET_AWAY
|
|
1157
|
+
// Deprecated in API version 1.5
|
|
1158
|
+
bool unused_legacy_away = 7 [deprecated=true];
|
|
1159
|
+
ClimateAction action = 8;
|
|
1160
|
+
ClimateFanMode fan_mode = 9;
|
|
1161
|
+
ClimateSwingMode swing_mode = 10;
|
|
1162
|
+
string custom_fan_mode = 11;
|
|
1163
|
+
ClimatePreset preset = 12;
|
|
1164
|
+
string custom_preset = 13;
|
|
1165
|
+
float current_humidity = 14;
|
|
1166
|
+
float target_humidity = 15;
|
|
1167
|
+
uint32 device_id = 16 [(field_ifdef) = "USE_DEVICES"];
|
|
1168
|
+
}
|
|
1169
|
+
message ClimateCommandRequest {
|
|
1170
|
+
option (id) = 48;
|
|
1171
|
+
option (source) = SOURCE_CLIENT;
|
|
1172
|
+
option (ifdef) = "USE_CLIMATE";
|
|
1173
|
+
option (no_delay) = true;
|
|
1174
|
+
option (base_class) = "CommandProtoMessage";
|
|
1175
|
+
|
|
1176
|
+
fixed32 key = 1 [(force) = true];
|
|
1177
|
+
bool has_mode = 2;
|
|
1178
|
+
ClimateMode mode = 3;
|
|
1179
|
+
bool has_target_temperature = 4;
|
|
1180
|
+
float target_temperature = 5;
|
|
1181
|
+
bool has_target_temperature_low = 6;
|
|
1182
|
+
float target_temperature_low = 7;
|
|
1183
|
+
bool has_target_temperature_high = 8;
|
|
1184
|
+
float target_temperature_high = 9;
|
|
1185
|
+
// legacy, for older peers, newer ones should use CLIMATE_PRESET_AWAY in preset
|
|
1186
|
+
// Deprecated in API version 1.5
|
|
1187
|
+
bool unused_has_legacy_away = 10 [deprecated=true];
|
|
1188
|
+
// Deprecated in API version 1.5
|
|
1189
|
+
bool unused_legacy_away = 11 [deprecated=true];
|
|
1190
|
+
bool has_fan_mode = 12;
|
|
1191
|
+
ClimateFanMode fan_mode = 13;
|
|
1192
|
+
bool has_swing_mode = 14;
|
|
1193
|
+
ClimateSwingMode swing_mode = 15;
|
|
1194
|
+
bool has_custom_fan_mode = 16;
|
|
1195
|
+
string custom_fan_mode = 17;
|
|
1196
|
+
bool has_preset = 18;
|
|
1197
|
+
ClimatePreset preset = 19;
|
|
1198
|
+
bool has_custom_preset = 20;
|
|
1199
|
+
string custom_preset = 21;
|
|
1200
|
+
bool has_target_humidity = 22;
|
|
1201
|
+
float target_humidity = 23;
|
|
1202
|
+
uint32 device_id = 24 [(field_ifdef) = "USE_DEVICES"];
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
// ==================== WATER_HEATER ====================
|
|
1206
|
+
enum WaterHeaterMode {
|
|
1207
|
+
WATER_HEATER_MODE_OFF = 0;
|
|
1208
|
+
WATER_HEATER_MODE_ECO = 1;
|
|
1209
|
+
WATER_HEATER_MODE_ELECTRIC = 2;
|
|
1210
|
+
WATER_HEATER_MODE_PERFORMANCE = 3;
|
|
1211
|
+
WATER_HEATER_MODE_HIGH_DEMAND = 4;
|
|
1212
|
+
WATER_HEATER_MODE_HEAT_PUMP = 5;
|
|
1213
|
+
WATER_HEATER_MODE_GAS = 6;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
message ListEntitiesWaterHeaterResponse {
|
|
1217
|
+
option (id) = 132;
|
|
1218
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
1219
|
+
option (source) = SOURCE_SERVER;
|
|
1220
|
+
option (ifdef) = "USE_WATER_HEATER";
|
|
1221
|
+
|
|
1222
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
1223
|
+
fixed32 key = 2 [(force) = true];
|
|
1224
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
1225
|
+
string icon = 4 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
1226
|
+
bool disabled_by_default = 5;
|
|
1227
|
+
EntityCategory entity_category = 6;
|
|
1228
|
+
uint32 device_id = 7 [(field_ifdef) = "USE_DEVICES"];
|
|
1229
|
+
float min_temperature = 8;
|
|
1230
|
+
float max_temperature = 9;
|
|
1231
|
+
float target_temperature_step = 10;
|
|
1232
|
+
repeated WaterHeaterMode supported_modes = 11 [(container_pointer_no_template) = "water_heater::WaterHeaterModeMask"];
|
|
1233
|
+
// Bitmask of WaterHeaterFeature flags
|
|
1234
|
+
uint32 supported_features = 12;
|
|
1235
|
+
TemperatureUnit temperature_unit = 13;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
message WaterHeaterStateResponse {
|
|
1239
|
+
option (id) = 133;
|
|
1240
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
1241
|
+
option (source) = SOURCE_SERVER;
|
|
1242
|
+
option (ifdef) = "USE_WATER_HEATER";
|
|
1243
|
+
option (no_delay) = true;
|
|
1244
|
+
|
|
1245
|
+
fixed32 key = 1 [(force) = true];
|
|
1246
|
+
float current_temperature = 2;
|
|
1247
|
+
float target_temperature = 3;
|
|
1248
|
+
WaterHeaterMode mode = 4;
|
|
1249
|
+
uint32 device_id = 5 [(field_ifdef) = "USE_DEVICES"];
|
|
1250
|
+
// Bitmask of current state flags (bit 0 = away, bit 1 = on)
|
|
1251
|
+
uint32 state = 6;
|
|
1252
|
+
float target_temperature_low = 7;
|
|
1253
|
+
float target_temperature_high = 8;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
// Bitmask for WaterHeaterCommandRequest.has_fields
|
|
1257
|
+
enum WaterHeaterCommandHasField {
|
|
1258
|
+
WATER_HEATER_COMMAND_HAS_NONE = 0;
|
|
1259
|
+
WATER_HEATER_COMMAND_HAS_MODE = 1;
|
|
1260
|
+
WATER_HEATER_COMMAND_HAS_TARGET_TEMPERATURE = 2;
|
|
1261
|
+
WATER_HEATER_COMMAND_HAS_STATE = 4 [deprecated=true];
|
|
1262
|
+
WATER_HEATER_COMMAND_HAS_TARGET_TEMPERATURE_LOW = 8;
|
|
1263
|
+
WATER_HEATER_COMMAND_HAS_TARGET_TEMPERATURE_HIGH = 16;
|
|
1264
|
+
WATER_HEATER_COMMAND_HAS_ON_STATE = 32;
|
|
1265
|
+
WATER_HEATER_COMMAND_HAS_AWAY_STATE = 64;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
message WaterHeaterCommandRequest {
|
|
1269
|
+
option (id) = 134;
|
|
1270
|
+
option (source) = SOURCE_CLIENT;
|
|
1271
|
+
option (ifdef) = "USE_WATER_HEATER";
|
|
1272
|
+
option (no_delay) = true;
|
|
1273
|
+
option (base_class) = "CommandProtoMessage";
|
|
1274
|
+
|
|
1275
|
+
fixed32 key = 1 [(force) = true];
|
|
1276
|
+
// Bitmask of which fields are set (see WaterHeaterCommandHasField)
|
|
1277
|
+
uint32 has_fields = 2;
|
|
1278
|
+
WaterHeaterMode mode = 3;
|
|
1279
|
+
float target_temperature = 4;
|
|
1280
|
+
uint32 device_id = 5 [(field_ifdef) = "USE_DEVICES"];
|
|
1281
|
+
// State flags bitmask (bit 0 = away, bit 1 = on)
|
|
1282
|
+
uint32 state = 6;
|
|
1283
|
+
float target_temperature_low = 7;
|
|
1284
|
+
float target_temperature_high = 8;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
// ==================== NUMBER ====================
|
|
1288
|
+
enum NumberMode {
|
|
1289
|
+
NUMBER_MODE_AUTO = 0;
|
|
1290
|
+
NUMBER_MODE_BOX = 1;
|
|
1291
|
+
NUMBER_MODE_SLIDER = 2;
|
|
1292
|
+
}
|
|
1293
|
+
message ListEntitiesNumberResponse {
|
|
1294
|
+
option (id) = 49;
|
|
1295
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
1296
|
+
option (source) = SOURCE_SERVER;
|
|
1297
|
+
option (ifdef) = "USE_NUMBER";
|
|
1298
|
+
|
|
1299
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
1300
|
+
fixed32 key = 2 [(force) = true];
|
|
1301
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
1302
|
+
reserved 4; // Deprecated: was string unique_id
|
|
1303
|
+
|
|
1304
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
1305
|
+
float min_value = 6;
|
|
1306
|
+
float max_value = 7;
|
|
1307
|
+
float step = 8;
|
|
1308
|
+
bool disabled_by_default = 9;
|
|
1309
|
+
EntityCategory entity_category = 10;
|
|
1310
|
+
string unit_of_measurement = 11 [(max_data_length) = 63];
|
|
1311
|
+
NumberMode mode = 12;
|
|
1312
|
+
string device_class = 13 [(max_data_length) = 47];
|
|
1313
|
+
uint32 device_id = 14 [(field_ifdef) = "USE_DEVICES"];
|
|
1314
|
+
}
|
|
1315
|
+
message NumberStateResponse {
|
|
1316
|
+
option (id) = 50;
|
|
1317
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
1318
|
+
option (source) = SOURCE_SERVER;
|
|
1319
|
+
option (ifdef) = "USE_NUMBER";
|
|
1320
|
+
option (no_delay) = true;
|
|
1321
|
+
|
|
1322
|
+
fixed32 key = 1 [(force) = true];
|
|
1323
|
+
float state = 2;
|
|
1324
|
+
// If the number does not have a valid state yet.
|
|
1325
|
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
|
|
1326
|
+
bool missing_state = 3;
|
|
1327
|
+
uint32 device_id = 4 [(field_ifdef) = "USE_DEVICES"];
|
|
1328
|
+
}
|
|
1329
|
+
message NumberCommandRequest {
|
|
1330
|
+
option (id) = 51;
|
|
1331
|
+
option (source) = SOURCE_CLIENT;
|
|
1332
|
+
option (ifdef) = "USE_NUMBER";
|
|
1333
|
+
option (no_delay) = true;
|
|
1334
|
+
option (base_class) = "CommandProtoMessage";
|
|
1335
|
+
|
|
1336
|
+
fixed32 key = 1 [(force) = true];
|
|
1337
|
+
float state = 2;
|
|
1338
|
+
uint32 device_id = 3 [(field_ifdef) = "USE_DEVICES"];
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
// ==================== SELECT ====================
|
|
1342
|
+
message ListEntitiesSelectResponse {
|
|
1343
|
+
option (id) = 52;
|
|
1344
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
1345
|
+
option (source) = SOURCE_SERVER;
|
|
1346
|
+
option (ifdef) = "USE_SELECT";
|
|
1347
|
+
|
|
1348
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
1349
|
+
fixed32 key = 2 [(force) = true];
|
|
1350
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
1351
|
+
reserved 4; // Deprecated: was string unique_id
|
|
1352
|
+
|
|
1353
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
1354
|
+
repeated string options = 6 [(container_pointer_no_template) = "FixedVector<const char *>"];
|
|
1355
|
+
bool disabled_by_default = 7;
|
|
1356
|
+
EntityCategory entity_category = 8;
|
|
1357
|
+
uint32 device_id = 9 [(field_ifdef) = "USE_DEVICES"];
|
|
1358
|
+
}
|
|
1359
|
+
message SelectStateResponse {
|
|
1360
|
+
option (id) = 53;
|
|
1361
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
1362
|
+
option (source) = SOURCE_SERVER;
|
|
1363
|
+
option (ifdef) = "USE_SELECT";
|
|
1364
|
+
option (no_delay) = true;
|
|
1365
|
+
|
|
1366
|
+
fixed32 key = 1 [(force) = true];
|
|
1367
|
+
string state = 2;
|
|
1368
|
+
// If the select does not have a valid state yet.
|
|
1369
|
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
|
|
1370
|
+
bool missing_state = 3;
|
|
1371
|
+
uint32 device_id = 4 [(field_ifdef) = "USE_DEVICES"];
|
|
1372
|
+
}
|
|
1373
|
+
message SelectCommandRequest {
|
|
1374
|
+
option (id) = 54;
|
|
1375
|
+
option (source) = SOURCE_CLIENT;
|
|
1376
|
+
option (ifdef) = "USE_SELECT";
|
|
1377
|
+
option (no_delay) = true;
|
|
1378
|
+
option (base_class) = "CommandProtoMessage";
|
|
1379
|
+
|
|
1380
|
+
fixed32 key = 1 [(force) = true];
|
|
1381
|
+
string state = 2;
|
|
1382
|
+
uint32 device_id = 3 [(field_ifdef) = "USE_DEVICES"];
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
// ==================== SIREN ====================
|
|
1386
|
+
message ListEntitiesSirenResponse {
|
|
1387
|
+
option (id) = 55;
|
|
1388
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
1389
|
+
option (source) = SOURCE_SERVER;
|
|
1390
|
+
option (ifdef) = "USE_SIREN";
|
|
1391
|
+
|
|
1392
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
1393
|
+
fixed32 key = 2 [(force) = true];
|
|
1394
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
1395
|
+
reserved 4; // Deprecated: was string unique_id
|
|
1396
|
+
|
|
1397
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
1398
|
+
bool disabled_by_default = 6;
|
|
1399
|
+
repeated string tones = 7 [(container_pointer_no_template) = "FixedVector<const char *>"];
|
|
1400
|
+
bool supports_duration = 8;
|
|
1401
|
+
bool supports_volume = 9;
|
|
1402
|
+
EntityCategory entity_category = 10;
|
|
1403
|
+
uint32 device_id = 11 [(field_ifdef) = "USE_DEVICES"];
|
|
1404
|
+
}
|
|
1405
|
+
message SirenStateResponse {
|
|
1406
|
+
option (id) = 56;
|
|
1407
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
1408
|
+
option (source) = SOURCE_SERVER;
|
|
1409
|
+
option (ifdef) = "USE_SIREN";
|
|
1410
|
+
option (no_delay) = true;
|
|
1411
|
+
|
|
1412
|
+
fixed32 key = 1 [(force) = true];
|
|
1413
|
+
bool state = 2;
|
|
1414
|
+
uint32 device_id = 3 [(field_ifdef) = "USE_DEVICES"];
|
|
1415
|
+
}
|
|
1416
|
+
message SirenCommandRequest {
|
|
1417
|
+
option (id) = 57;
|
|
1418
|
+
option (source) = SOURCE_CLIENT;
|
|
1419
|
+
option (ifdef) = "USE_SIREN";
|
|
1420
|
+
option (no_delay) = true;
|
|
1421
|
+
option (base_class) = "CommandProtoMessage";
|
|
1422
|
+
|
|
1423
|
+
fixed32 key = 1 [(force) = true];
|
|
1424
|
+
bool has_state = 2;
|
|
1425
|
+
bool state = 3;
|
|
1426
|
+
bool has_tone = 4;
|
|
1427
|
+
string tone = 5;
|
|
1428
|
+
bool has_duration = 6;
|
|
1429
|
+
uint32 duration = 7;
|
|
1430
|
+
bool has_volume = 8;
|
|
1431
|
+
float volume = 9;
|
|
1432
|
+
uint32 device_id = 10 [(field_ifdef) = "USE_DEVICES"];
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
// ==================== LOCK ====================
|
|
1436
|
+
enum LockState {
|
|
1437
|
+
LOCK_STATE_NONE = 0;
|
|
1438
|
+
LOCK_STATE_LOCKED = 1;
|
|
1439
|
+
LOCK_STATE_UNLOCKED = 2;
|
|
1440
|
+
LOCK_STATE_JAMMED = 3;
|
|
1441
|
+
LOCK_STATE_LOCKING = 4;
|
|
1442
|
+
LOCK_STATE_UNLOCKING = 5;
|
|
1443
|
+
LOCK_STATE_OPENING = 6;
|
|
1444
|
+
LOCK_STATE_OPEN = 7;
|
|
1445
|
+
}
|
|
1446
|
+
enum LockCommand {
|
|
1447
|
+
LOCK_UNLOCK = 0;
|
|
1448
|
+
LOCK_LOCK = 1;
|
|
1449
|
+
LOCK_OPEN = 2;
|
|
1450
|
+
}
|
|
1451
|
+
message ListEntitiesLockResponse {
|
|
1452
|
+
option (id) = 58;
|
|
1453
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
1454
|
+
option (source) = SOURCE_SERVER;
|
|
1455
|
+
option (ifdef) = "USE_LOCK";
|
|
1456
|
+
|
|
1457
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
1458
|
+
fixed32 key = 2 [(force) = true];
|
|
1459
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
1460
|
+
reserved 4; // Deprecated: was string unique_id
|
|
1461
|
+
|
|
1462
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
1463
|
+
bool disabled_by_default = 6;
|
|
1464
|
+
EntityCategory entity_category = 7;
|
|
1465
|
+
bool assumed_state = 8;
|
|
1466
|
+
|
|
1467
|
+
bool supports_open = 9;
|
|
1468
|
+
bool requires_code = 10;
|
|
1469
|
+
|
|
1470
|
+
// Not yet implemented:
|
|
1471
|
+
string code_format = 11;
|
|
1472
|
+
uint32 device_id = 12 [(field_ifdef) = "USE_DEVICES"];
|
|
1473
|
+
}
|
|
1474
|
+
message LockStateResponse {
|
|
1475
|
+
option (id) = 59;
|
|
1476
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
1477
|
+
option (source) = SOURCE_SERVER;
|
|
1478
|
+
option (ifdef) = "USE_LOCK";
|
|
1479
|
+
option (no_delay) = true;
|
|
1480
|
+
fixed32 key = 1 [(force) = true];
|
|
1481
|
+
LockState state = 2;
|
|
1482
|
+
uint32 device_id = 3 [(field_ifdef) = "USE_DEVICES"];
|
|
1483
|
+
}
|
|
1484
|
+
message LockCommandRequest {
|
|
1485
|
+
option (id) = 60;
|
|
1486
|
+
option (source) = SOURCE_CLIENT;
|
|
1487
|
+
option (ifdef) = "USE_LOCK";
|
|
1488
|
+
option (no_delay) = true;
|
|
1489
|
+
option (base_class) = "CommandProtoMessage";
|
|
1490
|
+
fixed32 key = 1 [(force) = true];
|
|
1491
|
+
LockCommand command = 2;
|
|
1492
|
+
|
|
1493
|
+
// Not yet implemented:
|
|
1494
|
+
bool has_code = 3;
|
|
1495
|
+
string code = 4;
|
|
1496
|
+
uint32 device_id = 5 [(field_ifdef) = "USE_DEVICES"];
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
// ==================== BUTTON ====================
|
|
1500
|
+
message ListEntitiesButtonResponse {
|
|
1501
|
+
option (id) = 61;
|
|
1502
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
1503
|
+
option (source) = SOURCE_SERVER;
|
|
1504
|
+
option (ifdef) = "USE_BUTTON";
|
|
1505
|
+
|
|
1506
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
1507
|
+
fixed32 key = 2 [(force) = true];
|
|
1508
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
1509
|
+
reserved 4; // Deprecated: was string unique_id
|
|
1510
|
+
|
|
1511
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
1512
|
+
bool disabled_by_default = 6;
|
|
1513
|
+
EntityCategory entity_category = 7;
|
|
1514
|
+
string device_class = 8 [(max_data_length) = 47];
|
|
1515
|
+
uint32 device_id = 9 [(field_ifdef) = "USE_DEVICES"];
|
|
1516
|
+
}
|
|
1517
|
+
message ButtonCommandRequest {
|
|
1518
|
+
option (id) = 62;
|
|
1519
|
+
option (source) = SOURCE_CLIENT;
|
|
1520
|
+
option (ifdef) = "USE_BUTTON";
|
|
1521
|
+
option (no_delay) = true;
|
|
1522
|
+
option (base_class) = "CommandProtoMessage";
|
|
1523
|
+
|
|
1524
|
+
fixed32 key = 1 [(force) = true];
|
|
1525
|
+
uint32 device_id = 2 [(field_ifdef) = "USE_DEVICES"];
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
// ==================== MEDIA PLAYER ====================
|
|
1529
|
+
enum MediaPlayerState {
|
|
1530
|
+
MEDIA_PLAYER_STATE_NONE = 0;
|
|
1531
|
+
MEDIA_PLAYER_STATE_IDLE = 1;
|
|
1532
|
+
MEDIA_PLAYER_STATE_PLAYING = 2;
|
|
1533
|
+
MEDIA_PLAYER_STATE_PAUSED = 3;
|
|
1534
|
+
MEDIA_PLAYER_STATE_ANNOUNCING = 4;
|
|
1535
|
+
MEDIA_PLAYER_STATE_OFF = 5;
|
|
1536
|
+
MEDIA_PLAYER_STATE_ON = 6;
|
|
1537
|
+
}
|
|
1538
|
+
enum MediaPlayerCommand {
|
|
1539
|
+
MEDIA_PLAYER_COMMAND_PLAY = 0;
|
|
1540
|
+
MEDIA_PLAYER_COMMAND_PAUSE = 1;
|
|
1541
|
+
MEDIA_PLAYER_COMMAND_STOP = 2;
|
|
1542
|
+
MEDIA_PLAYER_COMMAND_MUTE = 3;
|
|
1543
|
+
MEDIA_PLAYER_COMMAND_UNMUTE = 4;
|
|
1544
|
+
MEDIA_PLAYER_COMMAND_TOGGLE = 5;
|
|
1545
|
+
MEDIA_PLAYER_COMMAND_VOLUME_UP = 6;
|
|
1546
|
+
MEDIA_PLAYER_COMMAND_VOLUME_DOWN = 7;
|
|
1547
|
+
MEDIA_PLAYER_COMMAND_ENQUEUE = 8;
|
|
1548
|
+
MEDIA_PLAYER_COMMAND_REPEAT_ONE = 9;
|
|
1549
|
+
MEDIA_PLAYER_COMMAND_REPEAT_OFF = 10;
|
|
1550
|
+
MEDIA_PLAYER_COMMAND_CLEAR_PLAYLIST = 11;
|
|
1551
|
+
MEDIA_PLAYER_COMMAND_TURN_ON = 12;
|
|
1552
|
+
MEDIA_PLAYER_COMMAND_TURN_OFF = 13;
|
|
1553
|
+
}
|
|
1554
|
+
enum MediaPlayerFormatPurpose {
|
|
1555
|
+
MEDIA_PLAYER_FORMAT_PURPOSE_DEFAULT = 0;
|
|
1556
|
+
MEDIA_PLAYER_FORMAT_PURPOSE_ANNOUNCEMENT = 1;
|
|
1557
|
+
}
|
|
1558
|
+
message MediaPlayerSupportedFormat {
|
|
1559
|
+
option (ifdef) = "USE_MEDIA_PLAYER";
|
|
1560
|
+
|
|
1561
|
+
string format = 1;
|
|
1562
|
+
uint32 sample_rate = 2;
|
|
1563
|
+
uint32 num_channels = 3;
|
|
1564
|
+
MediaPlayerFormatPurpose purpose = 4;
|
|
1565
|
+
uint32 sample_bytes = 5;
|
|
1566
|
+
}
|
|
1567
|
+
message ListEntitiesMediaPlayerResponse {
|
|
1568
|
+
option (id) = 63;
|
|
1569
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
1570
|
+
option (source) = SOURCE_SERVER;
|
|
1571
|
+
option (ifdef) = "USE_MEDIA_PLAYER";
|
|
1572
|
+
|
|
1573
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
1574
|
+
fixed32 key = 2 [(force) = true];
|
|
1575
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
1576
|
+
reserved 4; // Deprecated: was string unique_id
|
|
1577
|
+
|
|
1578
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
1579
|
+
bool disabled_by_default = 6;
|
|
1580
|
+
EntityCategory entity_category = 7;
|
|
1581
|
+
|
|
1582
|
+
bool supports_pause = 8;
|
|
1583
|
+
|
|
1584
|
+
repeated MediaPlayerSupportedFormat supported_formats = 9;
|
|
1585
|
+
|
|
1586
|
+
uint32 device_id = 10 [(field_ifdef) = "USE_DEVICES"];
|
|
1587
|
+
|
|
1588
|
+
uint32 feature_flags = 11;
|
|
1589
|
+
}
|
|
1590
|
+
message MediaPlayerStateResponse {
|
|
1591
|
+
option (id) = 64;
|
|
1592
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
1593
|
+
option (source) = SOURCE_SERVER;
|
|
1594
|
+
option (ifdef) = "USE_MEDIA_PLAYER";
|
|
1595
|
+
option (no_delay) = true;
|
|
1596
|
+
fixed32 key = 1 [(force) = true];
|
|
1597
|
+
MediaPlayerState state = 2;
|
|
1598
|
+
float volume = 3;
|
|
1599
|
+
bool muted = 4;
|
|
1600
|
+
uint32 device_id = 5 [(field_ifdef) = "USE_DEVICES"];
|
|
1601
|
+
}
|
|
1602
|
+
message MediaPlayerCommandRequest {
|
|
1603
|
+
option (id) = 65;
|
|
1604
|
+
option (source) = SOURCE_CLIENT;
|
|
1605
|
+
option (ifdef) = "USE_MEDIA_PLAYER";
|
|
1606
|
+
option (no_delay) = true;
|
|
1607
|
+
option (base_class) = "CommandProtoMessage";
|
|
1608
|
+
|
|
1609
|
+
fixed32 key = 1 [(force) = true];
|
|
1610
|
+
|
|
1611
|
+
bool has_command = 2;
|
|
1612
|
+
MediaPlayerCommand command = 3;
|
|
1613
|
+
|
|
1614
|
+
bool has_volume = 4;
|
|
1615
|
+
float volume = 5;
|
|
1616
|
+
|
|
1617
|
+
bool has_media_url = 6;
|
|
1618
|
+
string media_url = 7;
|
|
1619
|
+
|
|
1620
|
+
bool has_announcement = 8;
|
|
1621
|
+
bool announcement = 9;
|
|
1622
|
+
uint32 device_id = 10 [(field_ifdef) = "USE_DEVICES"];
|
|
1623
|
+
}
|
|
1624
|
+
|
|
1625
|
+
// ==================== BLUETOOTH ====================
|
|
1626
|
+
message SubscribeBluetoothLEAdvertisementsRequest {
|
|
1627
|
+
option (id) = 66;
|
|
1628
|
+
option (source) = SOURCE_CLIENT;
|
|
1629
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1630
|
+
|
|
1631
|
+
uint32 flags = 1;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
// Deprecated - only used by deprecated BluetoothLEAdvertisementResponse
|
|
1635
|
+
message BluetoothServiceData {
|
|
1636
|
+
option deprecated = true;
|
|
1637
|
+
string uuid = 1;
|
|
1638
|
+
// Deprecated in API version 1.7
|
|
1639
|
+
repeated uint32 legacy_data = 2 [deprecated=true]; // Removed in api version 1.7
|
|
1640
|
+
bytes data = 3; // Added in api version 1.7
|
|
1641
|
+
}
|
|
1642
|
+
// Removed in ESPHome 2025.8.0 - use BluetoothLERawAdvertisementsResponse instead
|
|
1643
|
+
message BluetoothLEAdvertisementResponse {
|
|
1644
|
+
option deprecated = true;
|
|
1645
|
+
option (id) = 67;
|
|
1646
|
+
option (source) = SOURCE_SERVER;
|
|
1647
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1648
|
+
option (no_delay) = true;
|
|
1649
|
+
|
|
1650
|
+
uint64 address = 1;
|
|
1651
|
+
bytes name = 2;
|
|
1652
|
+
sint32 rssi = 3;
|
|
1653
|
+
|
|
1654
|
+
repeated string service_uuids = 4;
|
|
1655
|
+
repeated BluetoothServiceData service_data = 5;
|
|
1656
|
+
repeated BluetoothServiceData manufacturer_data = 6;
|
|
1657
|
+
|
|
1658
|
+
uint32 address_type = 7;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
message BluetoothLERawAdvertisement {
|
|
1662
|
+
option (inline_encode) = true;
|
|
1663
|
+
uint64 address = 1 [(force) = true, (mac_address) = true];
|
|
1664
|
+
sint32 rssi = 2 [(force) = true];
|
|
1665
|
+
uint32 address_type = 3 [(max_value) = 4];
|
|
1666
|
+
|
|
1667
|
+
bytes data = 4 [(fixed_array_size) = 62, (force) = true];
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
message BluetoothLERawAdvertisementsResponse {
|
|
1671
|
+
option (id) = 93;
|
|
1672
|
+
option (source) = SOURCE_SERVER;
|
|
1673
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1674
|
+
option (no_delay) = true;
|
|
1675
|
+
option (speed_optimized) = true;
|
|
1676
|
+
|
|
1677
|
+
repeated BluetoothLERawAdvertisement advertisements = 1 [(fixed_array_with_length_define) = "BLUETOOTH_PROXY_ADVERTISEMENT_BATCH_SIZE"];
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
enum BluetoothDeviceRequestType {
|
|
1681
|
+
BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT = 0 [deprecated = true]; // V1 removed, use V3 variants
|
|
1682
|
+
BLUETOOTH_DEVICE_REQUEST_TYPE_DISCONNECT = 1;
|
|
1683
|
+
BLUETOOTH_DEVICE_REQUEST_TYPE_PAIR = 2;
|
|
1684
|
+
BLUETOOTH_DEVICE_REQUEST_TYPE_UNPAIR = 3;
|
|
1685
|
+
BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT_V3_WITH_CACHE = 4;
|
|
1686
|
+
BLUETOOTH_DEVICE_REQUEST_TYPE_CONNECT_V3_WITHOUT_CACHE = 5;
|
|
1687
|
+
BLUETOOTH_DEVICE_REQUEST_TYPE_CLEAR_CACHE = 6;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
message BluetoothDeviceRequest {
|
|
1691
|
+
option (id) = 68;
|
|
1692
|
+
option (source) = SOURCE_CLIENT;
|
|
1693
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1694
|
+
|
|
1695
|
+
uint64 address = 1;
|
|
1696
|
+
BluetoothDeviceRequestType request_type = 2;
|
|
1697
|
+
bool has_address_type = 3; // Deprecated, should be removed in 2027.8 - https://github.com/esphome/esphome/pull/10318
|
|
1698
|
+
uint32 address_type = 4;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
message BluetoothDeviceConnectionResponse {
|
|
1702
|
+
option (id) = 69;
|
|
1703
|
+
option (source) = SOURCE_SERVER;
|
|
1704
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1705
|
+
|
|
1706
|
+
uint64 address = 1;
|
|
1707
|
+
bool connected = 2;
|
|
1708
|
+
uint32 mtu = 3;
|
|
1709
|
+
int32 error = 4;
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
message BluetoothGATTGetServicesRequest {
|
|
1713
|
+
option (id) = 70;
|
|
1714
|
+
option (source) = SOURCE_CLIENT;
|
|
1715
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1716
|
+
|
|
1717
|
+
uint64 address = 1;
|
|
1718
|
+
}
|
|
1719
|
+
|
|
1720
|
+
message BluetoothGATTDescriptor {
|
|
1721
|
+
repeated uint64 uuid = 1 [(fixed_array_size) = 2, (fixed_array_skip_zero) = true];
|
|
1722
|
+
uint32 handle = 2;
|
|
1723
|
+
|
|
1724
|
+
// New field for efficient UUID (v1.12+)
|
|
1725
|
+
// Only one of uuid or short_uuid will be set.
|
|
1726
|
+
// short_uuid is used for both 16-bit and 32-bit UUIDs with v1.12+ clients.
|
|
1727
|
+
// 128-bit UUIDs always use the uuid field for backwards compatibility.
|
|
1728
|
+
uint32 short_uuid = 3; // 16-bit or 32-bit UUID
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
message BluetoothGATTCharacteristic {
|
|
1732
|
+
repeated uint64 uuid = 1 [(fixed_array_size) = 2, (fixed_array_skip_zero) = true];
|
|
1733
|
+
uint32 handle = 2;
|
|
1734
|
+
uint32 properties = 3;
|
|
1735
|
+
repeated BluetoothGATTDescriptor descriptors = 4 [(fixed_vector) = true];
|
|
1736
|
+
|
|
1737
|
+
// New field for efficient UUID (v1.12+)
|
|
1738
|
+
// Only one of uuid or short_uuid will be set.
|
|
1739
|
+
// short_uuid is used for both 16-bit and 32-bit UUIDs with v1.12+ clients.
|
|
1740
|
+
// 128-bit UUIDs always use the uuid field for backwards compatibility.
|
|
1741
|
+
uint32 short_uuid = 5; // 16-bit or 32-bit UUID
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
message BluetoothGATTService {
|
|
1745
|
+
repeated uint64 uuid = 1 [(fixed_array_size) = 2, (fixed_array_skip_zero) = true];
|
|
1746
|
+
uint32 handle = 2;
|
|
1747
|
+
repeated BluetoothGATTCharacteristic characteristics = 3 [(fixed_vector) = true];
|
|
1748
|
+
|
|
1749
|
+
// New field for efficient UUID (v1.12+)
|
|
1750
|
+
// Only one of uuid or short_uuid will be set.
|
|
1751
|
+
// short_uuid is used for both 16-bit and 32-bit UUIDs with v1.12+ clients.
|
|
1752
|
+
// 128-bit UUIDs always use the uuid field for backwards compatibility.
|
|
1753
|
+
uint32 short_uuid = 4; // 16-bit or 32-bit UUID
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
message BluetoothGATTGetServicesResponse {
|
|
1757
|
+
option (id) = 71;
|
|
1758
|
+
option (source) = SOURCE_SERVER;
|
|
1759
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1760
|
+
|
|
1761
|
+
uint64 address = 1;
|
|
1762
|
+
repeated BluetoothGATTService services = 2;
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
message BluetoothGATTGetServicesDoneResponse {
|
|
1766
|
+
option (id) = 72;
|
|
1767
|
+
option (source) = SOURCE_SERVER;
|
|
1768
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1769
|
+
|
|
1770
|
+
uint64 address = 1;
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
message BluetoothGATTReadRequest {
|
|
1774
|
+
option (id) = 73;
|
|
1775
|
+
option (source) = SOURCE_CLIENT;
|
|
1776
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1777
|
+
|
|
1778
|
+
uint64 address = 1;
|
|
1779
|
+
uint32 handle = 2;
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
message BluetoothGATTReadResponse {
|
|
1783
|
+
option (id) = 74;
|
|
1784
|
+
option (source) = SOURCE_SERVER;
|
|
1785
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1786
|
+
|
|
1787
|
+
uint64 address = 1;
|
|
1788
|
+
uint32 handle = 2;
|
|
1789
|
+
|
|
1790
|
+
bytes data = 3;
|
|
1791
|
+
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
message BluetoothGATTWriteRequest {
|
|
1795
|
+
option (id) = 75;
|
|
1796
|
+
option (source) = SOURCE_CLIENT;
|
|
1797
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1798
|
+
|
|
1799
|
+
uint64 address = 1;
|
|
1800
|
+
uint32 handle = 2;
|
|
1801
|
+
bool response = 3;
|
|
1802
|
+
|
|
1803
|
+
bytes data = 4;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
message BluetoothGATTReadDescriptorRequest {
|
|
1807
|
+
option (id) = 76;
|
|
1808
|
+
option (source) = SOURCE_CLIENT;
|
|
1809
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1810
|
+
|
|
1811
|
+
uint64 address = 1;
|
|
1812
|
+
uint32 handle = 2;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
message BluetoothGATTWriteDescriptorRequest {
|
|
1816
|
+
option (id) = 77;
|
|
1817
|
+
option (source) = SOURCE_CLIENT;
|
|
1818
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1819
|
+
|
|
1820
|
+
uint64 address = 1;
|
|
1821
|
+
uint32 handle = 2;
|
|
1822
|
+
|
|
1823
|
+
bytes data = 3;
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
message BluetoothGATTNotifyRequest {
|
|
1827
|
+
option (id) = 78;
|
|
1828
|
+
option (source) = SOURCE_CLIENT;
|
|
1829
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1830
|
+
|
|
1831
|
+
uint64 address = 1;
|
|
1832
|
+
uint32 handle = 2;
|
|
1833
|
+
bool enable = 3;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
message BluetoothGATTNotifyDataResponse {
|
|
1837
|
+
option (id) = 79;
|
|
1838
|
+
option (source) = SOURCE_SERVER;
|
|
1839
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1840
|
+
|
|
1841
|
+
uint64 address = 1;
|
|
1842
|
+
uint32 handle = 2;
|
|
1843
|
+
|
|
1844
|
+
bytes data = 3;
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
message SubscribeBluetoothConnectionsFreeRequest {
|
|
1848
|
+
option (id) = 80;
|
|
1849
|
+
option (source) = SOURCE_CLIENT;
|
|
1850
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
message BluetoothConnectionsFreeResponse {
|
|
1854
|
+
option (id) = 81;
|
|
1855
|
+
option (source) = SOURCE_SERVER;
|
|
1856
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1857
|
+
|
|
1858
|
+
uint32 free = 1;
|
|
1859
|
+
uint32 limit = 2;
|
|
1860
|
+
repeated uint64 allocated = 3 [
|
|
1861
|
+
(fixed_array_size_define) = "BLUETOOTH_PROXY_MAX_CONNECTIONS",
|
|
1862
|
+
(fixed_array_skip_zero) = true
|
|
1863
|
+
];
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
message BluetoothGATTErrorResponse {
|
|
1867
|
+
option (id) = 82;
|
|
1868
|
+
option (source) = SOURCE_SERVER;
|
|
1869
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1870
|
+
|
|
1871
|
+
uint64 address = 1;
|
|
1872
|
+
uint32 handle = 2;
|
|
1873
|
+
int32 error = 3;
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
message BluetoothGATTWriteResponse {
|
|
1877
|
+
option (id) = 83;
|
|
1878
|
+
option (source) = SOURCE_SERVER;
|
|
1879
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1880
|
+
|
|
1881
|
+
uint64 address = 1;
|
|
1882
|
+
uint32 handle = 2;
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
message BluetoothGATTNotifyResponse {
|
|
1886
|
+
option (id) = 84;
|
|
1887
|
+
option (source) = SOURCE_SERVER;
|
|
1888
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1889
|
+
|
|
1890
|
+
uint64 address = 1;
|
|
1891
|
+
uint32 handle = 2;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
message BluetoothDevicePairingResponse {
|
|
1895
|
+
option (id) = 85;
|
|
1896
|
+
option (source) = SOURCE_SERVER;
|
|
1897
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1898
|
+
|
|
1899
|
+
uint64 address = 1;
|
|
1900
|
+
bool paired = 2;
|
|
1901
|
+
int32 error = 3;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
message BluetoothDeviceUnpairingResponse {
|
|
1905
|
+
option (id) = 86;
|
|
1906
|
+
option (source) = SOURCE_SERVER;
|
|
1907
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1908
|
+
|
|
1909
|
+
uint64 address = 1;
|
|
1910
|
+
bool success = 2;
|
|
1911
|
+
int32 error = 3;
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
message UnsubscribeBluetoothLEAdvertisementsRequest {
|
|
1915
|
+
option (id) = 87;
|
|
1916
|
+
option (source) = SOURCE_CLIENT;
|
|
1917
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
message BluetoothDeviceClearCacheResponse {
|
|
1921
|
+
option (id) = 88;
|
|
1922
|
+
option (source) = SOURCE_SERVER;
|
|
1923
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1924
|
+
|
|
1925
|
+
uint64 address = 1;
|
|
1926
|
+
bool success = 2;
|
|
1927
|
+
int32 error = 3;
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
enum BluetoothScannerState {
|
|
1931
|
+
BLUETOOTH_SCANNER_STATE_IDLE = 0;
|
|
1932
|
+
BLUETOOTH_SCANNER_STATE_STARTING = 1;
|
|
1933
|
+
BLUETOOTH_SCANNER_STATE_RUNNING = 2;
|
|
1934
|
+
BLUETOOTH_SCANNER_STATE_FAILED = 3;
|
|
1935
|
+
BLUETOOTH_SCANNER_STATE_STOPPING = 4;
|
|
1936
|
+
BLUETOOTH_SCANNER_STATE_STOPPED = 5;
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
enum BluetoothScannerMode {
|
|
1940
|
+
BLUETOOTH_SCANNER_MODE_PASSIVE = 0;
|
|
1941
|
+
BLUETOOTH_SCANNER_MODE_ACTIVE = 1;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
message BluetoothScannerStateResponse {
|
|
1945
|
+
option(id) = 126;
|
|
1946
|
+
option(source) = SOURCE_SERVER;
|
|
1947
|
+
option(ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1948
|
+
|
|
1949
|
+
BluetoothScannerState state = 1;
|
|
1950
|
+
BluetoothScannerMode mode = 2;
|
|
1951
|
+
BluetoothScannerMode configured_mode = 3;
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
message BluetoothScannerSetModeRequest {
|
|
1955
|
+
option(id) = 127;
|
|
1956
|
+
option(source) = SOURCE_CLIENT;
|
|
1957
|
+
option(ifdef) = "USE_BLUETOOTH_PROXY";
|
|
1958
|
+
|
|
1959
|
+
BluetoothScannerMode mode = 1;
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
// ==================== VOICE ASSISTANT ====================
|
|
1963
|
+
enum VoiceAssistantSubscribeFlag {
|
|
1964
|
+
VOICE_ASSISTANT_SUBSCRIBE_NONE = 0;
|
|
1965
|
+
VOICE_ASSISTANT_SUBSCRIBE_API_AUDIO = 1;
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
message SubscribeVoiceAssistantRequest {
|
|
1969
|
+
option (id) = 89;
|
|
1970
|
+
option (source) = SOURCE_CLIENT;
|
|
1971
|
+
option (ifdef) = "USE_VOICE_ASSISTANT";
|
|
1972
|
+
|
|
1973
|
+
bool subscribe = 1;
|
|
1974
|
+
uint32 flags = 2;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
enum VoiceAssistantRequestFlag {
|
|
1978
|
+
VOICE_ASSISTANT_REQUEST_NONE = 0;
|
|
1979
|
+
VOICE_ASSISTANT_REQUEST_USE_VAD = 1;
|
|
1980
|
+
VOICE_ASSISTANT_REQUEST_USE_WAKE_WORD = 2;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
message VoiceAssistantAudioSettings {
|
|
1984
|
+
uint32 noise_suppression_level = 1;
|
|
1985
|
+
uint32 auto_gain = 2;
|
|
1986
|
+
float volume_multiplier = 3;
|
|
1987
|
+
}
|
|
1988
|
+
|
|
1989
|
+
message VoiceAssistantRequest {
|
|
1990
|
+
option (id) = 90;
|
|
1991
|
+
option (source) = SOURCE_SERVER;
|
|
1992
|
+
option (ifdef) = "USE_VOICE_ASSISTANT";
|
|
1993
|
+
|
|
1994
|
+
bool start = 1;
|
|
1995
|
+
string conversation_id = 2;
|
|
1996
|
+
uint32 flags = 3;
|
|
1997
|
+
VoiceAssistantAudioSettings audio_settings = 4;
|
|
1998
|
+
string wake_word_phrase = 5;
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
message VoiceAssistantResponse {
|
|
2002
|
+
option (id) = 91;
|
|
2003
|
+
option (source) = SOURCE_CLIENT;
|
|
2004
|
+
option (ifdef) = "USE_VOICE_ASSISTANT";
|
|
2005
|
+
|
|
2006
|
+
uint32 port = 1;
|
|
2007
|
+
bool error = 2;
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
enum VoiceAssistantEvent {
|
|
2011
|
+
VOICE_ASSISTANT_ERROR = 0;
|
|
2012
|
+
VOICE_ASSISTANT_RUN_START = 1;
|
|
2013
|
+
VOICE_ASSISTANT_RUN_END = 2;
|
|
2014
|
+
VOICE_ASSISTANT_STT_START = 3;
|
|
2015
|
+
VOICE_ASSISTANT_STT_END = 4;
|
|
2016
|
+
VOICE_ASSISTANT_INTENT_START = 5;
|
|
2017
|
+
VOICE_ASSISTANT_INTENT_END = 6;
|
|
2018
|
+
VOICE_ASSISTANT_TTS_START = 7;
|
|
2019
|
+
VOICE_ASSISTANT_TTS_END = 8;
|
|
2020
|
+
VOICE_ASSISTANT_WAKE_WORD_START = 9;
|
|
2021
|
+
VOICE_ASSISTANT_WAKE_WORD_END = 10;
|
|
2022
|
+
VOICE_ASSISTANT_STT_VAD_START = 11;
|
|
2023
|
+
VOICE_ASSISTANT_STT_VAD_END = 12;
|
|
2024
|
+
VOICE_ASSISTANT_TTS_STREAM_START = 98;
|
|
2025
|
+
VOICE_ASSISTANT_TTS_STREAM_END = 99;
|
|
2026
|
+
VOICE_ASSISTANT_INTENT_PROGRESS = 100;
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
message VoiceAssistantEventData {
|
|
2030
|
+
string name = 1;
|
|
2031
|
+
string value = 2;
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
message VoiceAssistantEventResponse {
|
|
2035
|
+
option (id) = 92;
|
|
2036
|
+
option (source) = SOURCE_CLIENT;
|
|
2037
|
+
option (ifdef) = "USE_VOICE_ASSISTANT";
|
|
2038
|
+
|
|
2039
|
+
VoiceAssistantEvent event_type = 1;
|
|
2040
|
+
repeated VoiceAssistantEventData data = 2;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
message VoiceAssistantAudio {
|
|
2044
|
+
option (id) = 106;
|
|
2045
|
+
option (source) = SOURCE_BOTH;
|
|
2046
|
+
option (ifdef) = "USE_VOICE_ASSISTANT";
|
|
2047
|
+
|
|
2048
|
+
bytes data = 1 [(pointer_to_buffer) = true];
|
|
2049
|
+
bool end = 2;
|
|
2050
|
+
bytes data2 = 3 [(pointer_to_buffer) = true];
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
enum VoiceAssistantTimerEvent {
|
|
2054
|
+
VOICE_ASSISTANT_TIMER_STARTED = 0;
|
|
2055
|
+
VOICE_ASSISTANT_TIMER_UPDATED = 1;
|
|
2056
|
+
VOICE_ASSISTANT_TIMER_CANCELLED = 2;
|
|
2057
|
+
VOICE_ASSISTANT_TIMER_FINISHED = 3;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
message VoiceAssistantTimerEventResponse {
|
|
2061
|
+
option (id) = 115;
|
|
2062
|
+
option (source) = SOURCE_CLIENT;
|
|
2063
|
+
option (ifdef) = "USE_VOICE_ASSISTANT";
|
|
2064
|
+
|
|
2065
|
+
VoiceAssistantTimerEvent event_type = 1;
|
|
2066
|
+
string timer_id = 2;
|
|
2067
|
+
string name = 3;
|
|
2068
|
+
uint32 total_seconds = 4;
|
|
2069
|
+
uint32 seconds_left = 5;
|
|
2070
|
+
bool is_active = 6;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
message VoiceAssistantAnnounceRequest {
|
|
2074
|
+
option (id) = 119;
|
|
2075
|
+
option (source) = SOURCE_CLIENT;
|
|
2076
|
+
option (ifdef) = "USE_VOICE_ASSISTANT";
|
|
2077
|
+
|
|
2078
|
+
string media_id = 1;
|
|
2079
|
+
string text = 2;
|
|
2080
|
+
string preannounce_media_id = 3;
|
|
2081
|
+
bool start_conversation = 4;
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
message VoiceAssistantAnnounceFinished {
|
|
2085
|
+
option (id) = 120;
|
|
2086
|
+
option (source) = SOURCE_SERVER;
|
|
2087
|
+
option (ifdef) = "USE_VOICE_ASSISTANT";
|
|
2088
|
+
|
|
2089
|
+
bool success = 1;
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
message VoiceAssistantWakeWord {
|
|
2093
|
+
string id = 1;
|
|
2094
|
+
string wake_word = 2;
|
|
2095
|
+
repeated string trained_languages = 3;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
message VoiceAssistantExternalWakeWord {
|
|
2099
|
+
string id = 1;
|
|
2100
|
+
string wake_word = 2;
|
|
2101
|
+
repeated string trained_languages = 3;
|
|
2102
|
+
string model_type = 4;
|
|
2103
|
+
uint32 model_size = 5;
|
|
2104
|
+
string model_hash = 6;
|
|
2105
|
+
string url = 7;
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
message VoiceAssistantConfigurationRequest {
|
|
2109
|
+
option (id) = 121;
|
|
2110
|
+
option (source) = SOURCE_CLIENT;
|
|
2111
|
+
option (ifdef) = "USE_VOICE_ASSISTANT";
|
|
2112
|
+
|
|
2113
|
+
repeated VoiceAssistantExternalWakeWord external_wake_words = 1;
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
message VoiceAssistantConfigurationResponse {
|
|
2117
|
+
option (id) = 122;
|
|
2118
|
+
option (source) = SOURCE_SERVER;
|
|
2119
|
+
option (ifdef) = "USE_VOICE_ASSISTANT";
|
|
2120
|
+
|
|
2121
|
+
repeated VoiceAssistantWakeWord available_wake_words = 1;
|
|
2122
|
+
repeated string active_wake_words = 2 [(container_pointer) = "std::vector"];
|
|
2123
|
+
uint32 max_active_wake_words = 3;
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
message VoiceAssistantSetConfiguration {
|
|
2127
|
+
option (id) = 123;
|
|
2128
|
+
option (source) = SOURCE_CLIENT;
|
|
2129
|
+
option (ifdef) = "USE_VOICE_ASSISTANT";
|
|
2130
|
+
|
|
2131
|
+
repeated string active_wake_words = 1;
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
// ==================== ALARM CONTROL PANEL ====================
|
|
2135
|
+
enum AlarmControlPanelState {
|
|
2136
|
+
ALARM_STATE_DISARMED = 0;
|
|
2137
|
+
ALARM_STATE_ARMED_HOME = 1;
|
|
2138
|
+
ALARM_STATE_ARMED_AWAY = 2;
|
|
2139
|
+
ALARM_STATE_ARMED_NIGHT = 3;
|
|
2140
|
+
ALARM_STATE_ARMED_VACATION = 4;
|
|
2141
|
+
ALARM_STATE_ARMED_CUSTOM_BYPASS = 5;
|
|
2142
|
+
ALARM_STATE_PENDING = 6;
|
|
2143
|
+
ALARM_STATE_ARMING = 7;
|
|
2144
|
+
ALARM_STATE_DISARMING = 8;
|
|
2145
|
+
ALARM_STATE_TRIGGERED = 9;
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
enum AlarmControlPanelStateCommand {
|
|
2149
|
+
ALARM_CONTROL_PANEL_DISARM = 0;
|
|
2150
|
+
ALARM_CONTROL_PANEL_ARM_AWAY = 1;
|
|
2151
|
+
ALARM_CONTROL_PANEL_ARM_HOME = 2;
|
|
2152
|
+
ALARM_CONTROL_PANEL_ARM_NIGHT = 3;
|
|
2153
|
+
ALARM_CONTROL_PANEL_ARM_VACATION = 4;
|
|
2154
|
+
ALARM_CONTROL_PANEL_ARM_CUSTOM_BYPASS = 5;
|
|
2155
|
+
ALARM_CONTROL_PANEL_TRIGGER = 6;
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
message ListEntitiesAlarmControlPanelResponse {
|
|
2159
|
+
option (id) = 94;
|
|
2160
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
2161
|
+
option (source) = SOURCE_SERVER;
|
|
2162
|
+
option (ifdef) = "USE_ALARM_CONTROL_PANEL";
|
|
2163
|
+
|
|
2164
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
2165
|
+
fixed32 key = 2 [(force) = true];
|
|
2166
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
2167
|
+
reserved 4; // Deprecated: was string unique_id
|
|
2168
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
2169
|
+
bool disabled_by_default = 6;
|
|
2170
|
+
EntityCategory entity_category = 7;
|
|
2171
|
+
uint32 supported_features = 8;
|
|
2172
|
+
bool requires_code = 9;
|
|
2173
|
+
bool requires_code_to_arm = 10;
|
|
2174
|
+
uint32 device_id = 11 [(field_ifdef) = "USE_DEVICES"];
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
message AlarmControlPanelStateResponse {
|
|
2178
|
+
option (id) = 95;
|
|
2179
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
2180
|
+
option (source) = SOURCE_SERVER;
|
|
2181
|
+
option (ifdef) = "USE_ALARM_CONTROL_PANEL";
|
|
2182
|
+
option (no_delay) = true;
|
|
2183
|
+
fixed32 key = 1 [(force) = true];
|
|
2184
|
+
AlarmControlPanelState state = 2;
|
|
2185
|
+
uint32 device_id = 3 [(field_ifdef) = "USE_DEVICES"];
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
message AlarmControlPanelCommandRequest {
|
|
2189
|
+
option (id) = 96;
|
|
2190
|
+
option (source) = SOURCE_CLIENT;
|
|
2191
|
+
option (ifdef) = "USE_ALARM_CONTROL_PANEL";
|
|
2192
|
+
option (no_delay) = true;
|
|
2193
|
+
option (base_class) = "CommandProtoMessage";
|
|
2194
|
+
fixed32 key = 1 [(force) = true];
|
|
2195
|
+
AlarmControlPanelStateCommand command = 2;
|
|
2196
|
+
string code = 3;
|
|
2197
|
+
uint32 device_id = 4 [(field_ifdef) = "USE_DEVICES"];
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
// ===================== TEXT =====================
|
|
2201
|
+
enum TextMode {
|
|
2202
|
+
TEXT_MODE_TEXT = 0;
|
|
2203
|
+
TEXT_MODE_PASSWORD = 1;
|
|
2204
|
+
}
|
|
2205
|
+
message ListEntitiesTextResponse {
|
|
2206
|
+
option (id) = 97;
|
|
2207
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
2208
|
+
option (source) = SOURCE_SERVER;
|
|
2209
|
+
option (ifdef) = "USE_TEXT";
|
|
2210
|
+
|
|
2211
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
2212
|
+
fixed32 key = 2 [(force) = true];
|
|
2213
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
2214
|
+
reserved 4; // Deprecated: was string unique_id
|
|
2215
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
2216
|
+
bool disabled_by_default = 6;
|
|
2217
|
+
EntityCategory entity_category = 7;
|
|
2218
|
+
|
|
2219
|
+
uint32 min_length = 8;
|
|
2220
|
+
uint32 max_length = 9;
|
|
2221
|
+
string pattern = 10;
|
|
2222
|
+
TextMode mode = 11;
|
|
2223
|
+
uint32 device_id = 12 [(field_ifdef) = "USE_DEVICES"];
|
|
2224
|
+
}
|
|
2225
|
+
message TextStateResponse {
|
|
2226
|
+
option (id) = 98;
|
|
2227
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
2228
|
+
option (source) = SOURCE_SERVER;
|
|
2229
|
+
option (ifdef) = "USE_TEXT";
|
|
2230
|
+
option (no_delay) = true;
|
|
2231
|
+
|
|
2232
|
+
fixed32 key = 1 [(force) = true];
|
|
2233
|
+
string state = 2;
|
|
2234
|
+
// If the Text does not have a valid state yet.
|
|
2235
|
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
|
|
2236
|
+
bool missing_state = 3;
|
|
2237
|
+
uint32 device_id = 4 [(field_ifdef) = "USE_DEVICES"];
|
|
2238
|
+
}
|
|
2239
|
+
message TextCommandRequest {
|
|
2240
|
+
option (id) = 99;
|
|
2241
|
+
option (source) = SOURCE_CLIENT;
|
|
2242
|
+
option (ifdef) = "USE_TEXT";
|
|
2243
|
+
option (no_delay) = true;
|
|
2244
|
+
option (base_class) = "CommandProtoMessage";
|
|
2245
|
+
|
|
2246
|
+
fixed32 key = 1 [(force) = true];
|
|
2247
|
+
string state = 2;
|
|
2248
|
+
uint32 device_id = 3 [(field_ifdef) = "USE_DEVICES"];
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
|
|
2252
|
+
// ==================== DATETIME DATE ====================
|
|
2253
|
+
message ListEntitiesDateResponse {
|
|
2254
|
+
option (id) = 100;
|
|
2255
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
2256
|
+
option (source) = SOURCE_SERVER;
|
|
2257
|
+
option (ifdef) = "USE_DATETIME_DATE";
|
|
2258
|
+
|
|
2259
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
2260
|
+
fixed32 key = 2 [(force) = true];
|
|
2261
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
2262
|
+
reserved 4; // Deprecated: was string unique_id
|
|
2263
|
+
|
|
2264
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
2265
|
+
bool disabled_by_default = 6;
|
|
2266
|
+
EntityCategory entity_category = 7;
|
|
2267
|
+
uint32 device_id = 8 [(field_ifdef) = "USE_DEVICES"];
|
|
2268
|
+
}
|
|
2269
|
+
message DateStateResponse {
|
|
2270
|
+
option (id) = 101;
|
|
2271
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
2272
|
+
option (source) = SOURCE_SERVER;
|
|
2273
|
+
option (ifdef) = "USE_DATETIME_DATE";
|
|
2274
|
+
option (no_delay) = true;
|
|
2275
|
+
|
|
2276
|
+
fixed32 key = 1 [(force) = true];
|
|
2277
|
+
// If the date does not have a valid state yet.
|
|
2278
|
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
|
|
2279
|
+
bool missing_state = 2;
|
|
2280
|
+
uint32 year = 3;
|
|
2281
|
+
uint32 month = 4;
|
|
2282
|
+
uint32 day = 5;
|
|
2283
|
+
uint32 device_id = 6 [(field_ifdef) = "USE_DEVICES"];
|
|
2284
|
+
}
|
|
2285
|
+
message DateCommandRequest {
|
|
2286
|
+
option (id) = 102;
|
|
2287
|
+
option (source) = SOURCE_CLIENT;
|
|
2288
|
+
option (ifdef) = "USE_DATETIME_DATE";
|
|
2289
|
+
option (no_delay) = true;
|
|
2290
|
+
option (base_class) = "CommandProtoMessage";
|
|
2291
|
+
|
|
2292
|
+
fixed32 key = 1 [(force) = true];
|
|
2293
|
+
uint32 year = 2;
|
|
2294
|
+
uint32 month = 3;
|
|
2295
|
+
uint32 day = 4;
|
|
2296
|
+
uint32 device_id = 5 [(field_ifdef) = "USE_DEVICES"];
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
// ==================== DATETIME TIME ====================
|
|
2300
|
+
message ListEntitiesTimeResponse {
|
|
2301
|
+
option (id) = 103;
|
|
2302
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
2303
|
+
option (source) = SOURCE_SERVER;
|
|
2304
|
+
option (ifdef) = "USE_DATETIME_TIME";
|
|
2305
|
+
|
|
2306
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
2307
|
+
fixed32 key = 2 [(force) = true];
|
|
2308
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
2309
|
+
reserved 4; // Deprecated: was string unique_id
|
|
2310
|
+
|
|
2311
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
2312
|
+
bool disabled_by_default = 6;
|
|
2313
|
+
EntityCategory entity_category = 7;
|
|
2314
|
+
uint32 device_id = 8 [(field_ifdef) = "USE_DEVICES"];
|
|
2315
|
+
}
|
|
2316
|
+
message TimeStateResponse {
|
|
2317
|
+
option (id) = 104;
|
|
2318
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
2319
|
+
option (source) = SOURCE_SERVER;
|
|
2320
|
+
option (ifdef) = "USE_DATETIME_TIME";
|
|
2321
|
+
option (no_delay) = true;
|
|
2322
|
+
|
|
2323
|
+
fixed32 key = 1 [(force) = true];
|
|
2324
|
+
// If the time does not have a valid state yet.
|
|
2325
|
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
|
|
2326
|
+
bool missing_state = 2;
|
|
2327
|
+
uint32 hour = 3;
|
|
2328
|
+
uint32 minute = 4;
|
|
2329
|
+
uint32 second = 5;
|
|
2330
|
+
uint32 device_id = 6 [(field_ifdef) = "USE_DEVICES"];
|
|
2331
|
+
}
|
|
2332
|
+
message TimeCommandRequest {
|
|
2333
|
+
option (id) = 105;
|
|
2334
|
+
option (source) = SOURCE_CLIENT;
|
|
2335
|
+
option (ifdef) = "USE_DATETIME_TIME";
|
|
2336
|
+
option (no_delay) = true;
|
|
2337
|
+
option (base_class) = "CommandProtoMessage";
|
|
2338
|
+
|
|
2339
|
+
fixed32 key = 1 [(force) = true];
|
|
2340
|
+
uint32 hour = 2;
|
|
2341
|
+
uint32 minute = 3;
|
|
2342
|
+
uint32 second = 4;
|
|
2343
|
+
uint32 device_id = 5 [(field_ifdef) = "USE_DEVICES"];
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
// ==================== EVENT ====================
|
|
2347
|
+
message ListEntitiesEventResponse {
|
|
2348
|
+
option (id) = 107;
|
|
2349
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
2350
|
+
option (source) = SOURCE_SERVER;
|
|
2351
|
+
option (ifdef) = "USE_EVENT";
|
|
2352
|
+
|
|
2353
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
2354
|
+
fixed32 key = 2 [(force) = true];
|
|
2355
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
2356
|
+
reserved 4; // Deprecated: was string unique_id
|
|
2357
|
+
|
|
2358
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
2359
|
+
bool disabled_by_default = 6;
|
|
2360
|
+
EntityCategory entity_category = 7;
|
|
2361
|
+
string device_class = 8 [(max_data_length) = 47];
|
|
2362
|
+
|
|
2363
|
+
repeated string event_types = 9 [(container_pointer_no_template) = "FixedVector<const char *>"];
|
|
2364
|
+
uint32 device_id = 10 [(field_ifdef) = "USE_DEVICES"];
|
|
2365
|
+
}
|
|
2366
|
+
message EventResponse {
|
|
2367
|
+
option (id) = 108;
|
|
2368
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
2369
|
+
option (source) = SOURCE_SERVER;
|
|
2370
|
+
option (ifdef) = "USE_EVENT";
|
|
2371
|
+
|
|
2372
|
+
fixed32 key = 1 [(force) = true];
|
|
2373
|
+
string event_type = 2;
|
|
2374
|
+
uint32 device_id = 3 [(field_ifdef) = "USE_DEVICES"];
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
// ==================== VALVE ====================
|
|
2378
|
+
message ListEntitiesValveResponse {
|
|
2379
|
+
option (id) = 109;
|
|
2380
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
2381
|
+
option (source) = SOURCE_SERVER;
|
|
2382
|
+
option (ifdef) = "USE_VALVE";
|
|
2383
|
+
|
|
2384
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
2385
|
+
fixed32 key = 2 [(force) = true];
|
|
2386
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
2387
|
+
reserved 4; // Deprecated: was string unique_id
|
|
2388
|
+
|
|
2389
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
2390
|
+
bool disabled_by_default = 6;
|
|
2391
|
+
EntityCategory entity_category = 7;
|
|
2392
|
+
string device_class = 8 [(max_data_length) = 47];
|
|
2393
|
+
|
|
2394
|
+
bool assumed_state = 9;
|
|
2395
|
+
bool supports_position = 10;
|
|
2396
|
+
bool supports_stop = 11;
|
|
2397
|
+
uint32 device_id = 12 [(field_ifdef) = "USE_DEVICES"];
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2400
|
+
enum ValveOperation {
|
|
2401
|
+
VALVE_OPERATION_IDLE = 0;
|
|
2402
|
+
VALVE_OPERATION_IS_OPENING = 1;
|
|
2403
|
+
VALVE_OPERATION_IS_CLOSING = 2;
|
|
2404
|
+
}
|
|
2405
|
+
message ValveStateResponse {
|
|
2406
|
+
option (id) = 110;
|
|
2407
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
2408
|
+
option (source) = SOURCE_SERVER;
|
|
2409
|
+
option (ifdef) = "USE_VALVE";
|
|
2410
|
+
option (no_delay) = true;
|
|
2411
|
+
|
|
2412
|
+
fixed32 key = 1 [(force) = true];
|
|
2413
|
+
float position = 2;
|
|
2414
|
+
ValveOperation current_operation = 3;
|
|
2415
|
+
uint32 device_id = 4 [(field_ifdef) = "USE_DEVICES"];
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
message ValveCommandRequest {
|
|
2419
|
+
option (id) = 111;
|
|
2420
|
+
option (source) = SOURCE_CLIENT;
|
|
2421
|
+
option (ifdef) = "USE_VALVE";
|
|
2422
|
+
option (no_delay) = true;
|
|
2423
|
+
option (base_class) = "CommandProtoMessage";
|
|
2424
|
+
|
|
2425
|
+
fixed32 key = 1 [(force) = true];
|
|
2426
|
+
bool has_position = 2;
|
|
2427
|
+
float position = 3;
|
|
2428
|
+
bool stop = 4;
|
|
2429
|
+
uint32 device_id = 5 [(field_ifdef) = "USE_DEVICES"];
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
// ==================== DATETIME DATETIME ====================
|
|
2433
|
+
message ListEntitiesDateTimeResponse {
|
|
2434
|
+
option (id) = 112;
|
|
2435
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
2436
|
+
option (source) = SOURCE_SERVER;
|
|
2437
|
+
option (ifdef) = "USE_DATETIME_DATETIME";
|
|
2438
|
+
|
|
2439
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
2440
|
+
fixed32 key = 2 [(force) = true];
|
|
2441
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
2442
|
+
reserved 4; // Deprecated: was string unique_id
|
|
2443
|
+
|
|
2444
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
2445
|
+
bool disabled_by_default = 6;
|
|
2446
|
+
EntityCategory entity_category = 7;
|
|
2447
|
+
uint32 device_id = 8 [(field_ifdef) = "USE_DEVICES"];
|
|
2448
|
+
}
|
|
2449
|
+
message DateTimeStateResponse {
|
|
2450
|
+
option (id) = 113;
|
|
2451
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
2452
|
+
option (source) = SOURCE_SERVER;
|
|
2453
|
+
option (ifdef) = "USE_DATETIME_DATETIME";
|
|
2454
|
+
option (no_delay) = true;
|
|
2455
|
+
|
|
2456
|
+
fixed32 key = 1 [(force) = true];
|
|
2457
|
+
// If the datetime does not have a valid state yet.
|
|
2458
|
+
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
|
|
2459
|
+
bool missing_state = 2;
|
|
2460
|
+
fixed32 epoch_seconds = 3;
|
|
2461
|
+
uint32 device_id = 4 [(field_ifdef) = "USE_DEVICES"];
|
|
2462
|
+
}
|
|
2463
|
+
message DateTimeCommandRequest {
|
|
2464
|
+
option (id) = 114;
|
|
2465
|
+
option (source) = SOURCE_CLIENT;
|
|
2466
|
+
option (ifdef) = "USE_DATETIME_DATETIME";
|
|
2467
|
+
option (no_delay) = true;
|
|
2468
|
+
option (base_class) = "CommandProtoMessage";
|
|
2469
|
+
|
|
2470
|
+
fixed32 key = 1 [(force) = true];
|
|
2471
|
+
fixed32 epoch_seconds = 2;
|
|
2472
|
+
uint32 device_id = 3 [(field_ifdef) = "USE_DEVICES"];
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
// ==================== UPDATE ====================
|
|
2476
|
+
message ListEntitiesUpdateResponse {
|
|
2477
|
+
option (id) = 116;
|
|
2478
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
2479
|
+
option (source) = SOURCE_SERVER;
|
|
2480
|
+
option (ifdef) = "USE_UPDATE";
|
|
2481
|
+
|
|
2482
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
2483
|
+
fixed32 key = 2 [(force) = true];
|
|
2484
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
2485
|
+
reserved 4; // Deprecated: was string unique_id
|
|
2486
|
+
|
|
2487
|
+
string icon = 5 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
2488
|
+
bool disabled_by_default = 6;
|
|
2489
|
+
EntityCategory entity_category = 7;
|
|
2490
|
+
string device_class = 8 [(max_data_length) = 47];
|
|
2491
|
+
uint32 device_id = 9 [(field_ifdef) = "USE_DEVICES"];
|
|
2492
|
+
}
|
|
2493
|
+
message UpdateStateResponse {
|
|
2494
|
+
option (id) = 117;
|
|
2495
|
+
option (base_class) = "StateResponseProtoMessage";
|
|
2496
|
+
option (source) = SOURCE_SERVER;
|
|
2497
|
+
option (ifdef) = "USE_UPDATE";
|
|
2498
|
+
option (no_delay) = true;
|
|
2499
|
+
|
|
2500
|
+
fixed32 key = 1 [(force) = true];
|
|
2501
|
+
bool missing_state = 2;
|
|
2502
|
+
bool in_progress = 3;
|
|
2503
|
+
bool has_progress = 4;
|
|
2504
|
+
float progress = 5;
|
|
2505
|
+
string current_version = 6;
|
|
2506
|
+
string latest_version = 7;
|
|
2507
|
+
string title = 8;
|
|
2508
|
+
string release_summary = 9;
|
|
2509
|
+
string release_url = 10;
|
|
2510
|
+
uint32 device_id = 11 [(field_ifdef) = "USE_DEVICES"];
|
|
2511
|
+
}
|
|
2512
|
+
enum UpdateCommand {
|
|
2513
|
+
UPDATE_COMMAND_NONE = 0;
|
|
2514
|
+
UPDATE_COMMAND_UPDATE = 1;
|
|
2515
|
+
UPDATE_COMMAND_CHECK = 2;
|
|
2516
|
+
}
|
|
2517
|
+
message UpdateCommandRequest {
|
|
2518
|
+
option (id) = 118;
|
|
2519
|
+
option (source) = SOURCE_CLIENT;
|
|
2520
|
+
option (ifdef) = "USE_UPDATE";
|
|
2521
|
+
option (no_delay) = true;
|
|
2522
|
+
option (base_class) = "CommandProtoMessage";
|
|
2523
|
+
|
|
2524
|
+
fixed32 key = 1 [(force) = true];
|
|
2525
|
+
UpdateCommand command = 2;
|
|
2526
|
+
uint32 device_id = 3 [(field_ifdef) = "USE_DEVICES"];
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
// ==================== Z-WAVE ====================
|
|
2530
|
+
|
|
2531
|
+
message ZWaveProxyFrame {
|
|
2532
|
+
option (id) = 128;
|
|
2533
|
+
option (source) = SOURCE_BOTH;
|
|
2534
|
+
option (ifdef) = "USE_ZWAVE_PROXY";
|
|
2535
|
+
option (no_delay) = true;
|
|
2536
|
+
option (speed_optimized) = true;
|
|
2537
|
+
|
|
2538
|
+
bytes data = 1;
|
|
2539
|
+
}
|
|
2540
|
+
|
|
2541
|
+
enum ZWaveProxyRequestType {
|
|
2542
|
+
ZWAVE_PROXY_REQUEST_TYPE_SUBSCRIBE = 0;
|
|
2543
|
+
ZWAVE_PROXY_REQUEST_TYPE_UNSUBSCRIBE = 1;
|
|
2544
|
+
ZWAVE_PROXY_REQUEST_TYPE_HOME_ID_CHANGE = 2;
|
|
2545
|
+
}
|
|
2546
|
+
message ZWaveProxyRequest {
|
|
2547
|
+
option (id) = 129;
|
|
2548
|
+
option (source) = SOURCE_BOTH;
|
|
2549
|
+
option (ifdef) = "USE_ZWAVE_PROXY";
|
|
2550
|
+
|
|
2551
|
+
ZWaveProxyRequestType type = 1;
|
|
2552
|
+
bytes data = 2;
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
// ==================== INFRARED ====================
|
|
2556
|
+
// Note: Feature and capability flag enums are defined in
|
|
2557
|
+
// esphome/components/infrared/infrared.h
|
|
2558
|
+
|
|
2559
|
+
// Listing of infrared instances
|
|
2560
|
+
message ListEntitiesInfraredResponse {
|
|
2561
|
+
option (id) = 135;
|
|
2562
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
2563
|
+
option (source) = SOURCE_SERVER;
|
|
2564
|
+
option (ifdef) = "USE_INFRARED";
|
|
2565
|
+
|
|
2566
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
2567
|
+
fixed32 key = 2 [(force) = true];
|
|
2568
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
2569
|
+
string icon = 4 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
2570
|
+
bool disabled_by_default = 5;
|
|
2571
|
+
EntityCategory entity_category = 6;
|
|
2572
|
+
uint32 device_id = 7 [(field_ifdef) = "USE_DEVICES"];
|
|
2573
|
+
uint32 capabilities = 8; // Bitfield of InfraredCapabilityFlags
|
|
2574
|
+
uint32 receiver_frequency = 9; // Demodulation frequency of the IR receiver in Hz (0 = unspecified)
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
// Command to transmit infrared/RF data using raw timings
|
|
2578
|
+
message InfraredRFTransmitRawTimingsRequest {
|
|
2579
|
+
option (id) = 136;
|
|
2580
|
+
option (source) = SOURCE_CLIENT;
|
|
2581
|
+
option (ifdef) = "USE_IR_RF || USE_RADIO_FREQUENCY";
|
|
2582
|
+
|
|
2583
|
+
uint32 device_id = 1 [(field_ifdef) = "USE_DEVICES"];
|
|
2584
|
+
fixed32 key = 2 [(force) = true]; // Key identifying the transmitter instance
|
|
2585
|
+
uint32 carrier_frequency = 3; // Carrier frequency in Hz
|
|
2586
|
+
uint32 repeat_count = 4; // Number of times to transmit (1 = once, 2 = twice, etc.)
|
|
2587
|
+
repeated sint32 timings = 5 [packed = true, (packed_buffer) = true]; // Raw timings in microseconds (zigzag-encoded): positive = mark (LED/TX on), negative = space (LED/TX off)
|
|
2588
|
+
uint32 modulation = 6; // RadioFrequencyModulation enum value (0 = OOK; ignored for IR entities)
|
|
2589
|
+
}
|
|
2590
|
+
|
|
2591
|
+
// Event message for received infrared/RF data
|
|
2592
|
+
message InfraredRFReceiveEvent {
|
|
2593
|
+
option (id) = 137;
|
|
2594
|
+
option (source) = SOURCE_SERVER;
|
|
2595
|
+
option (ifdef) = "USE_IR_RF || USE_RADIO_FREQUENCY";
|
|
2596
|
+
option (no_delay) = true;
|
|
2597
|
+
option (speed_optimized) = true;
|
|
2598
|
+
|
|
2599
|
+
uint32 device_id = 1 [(field_ifdef) = "USE_DEVICES"];
|
|
2600
|
+
fixed32 key = 2 [(force) = true]; // Key identifying the receiver instance
|
|
2601
|
+
repeated sint32 timings = 3 [packed = true, (container_pointer_no_template) = "std::vector<int32_t>"]; // Raw timings in microseconds (zigzag-encoded): alternating mark/space periods
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
// ==================== RADIO FREQUENCY ====================
|
|
2605
|
+
|
|
2606
|
+
// Lists available radio frequency entity instances
|
|
2607
|
+
message ListEntitiesRadioFrequencyResponse {
|
|
2608
|
+
option (id) = 148;
|
|
2609
|
+
option (base_class) = "InfoResponseProtoMessage";
|
|
2610
|
+
option (source) = SOURCE_SERVER;
|
|
2611
|
+
option (ifdef) = "USE_RADIO_FREQUENCY";
|
|
2612
|
+
|
|
2613
|
+
string object_id = 1 [(max_data_length) = 120, (force) = true];
|
|
2614
|
+
fixed32 key = 2 [(force) = true];
|
|
2615
|
+
string name = 3 [(max_data_length) = 120, (force) = true];
|
|
2616
|
+
string icon = 4 [(field_ifdef) = "USE_ENTITY_ICON", (max_data_length) = 63];
|
|
2617
|
+
bool disabled_by_default = 5;
|
|
2618
|
+
EntityCategory entity_category = 6;
|
|
2619
|
+
uint32 device_id = 7 [(field_ifdef) = "USE_DEVICES"];
|
|
2620
|
+
uint32 capabilities = 8; // Bitmask of RadioFrequencyCapabilityFlags: bit 0 = transmitter, bit 1 = receiver
|
|
2621
|
+
uint32 frequency_min = 9; // Minimum tunable frequency in Hz; if min == max (non-zero): fixed frequency; 0 = unspecified
|
|
2622
|
+
uint32 frequency_max = 10; // Maximum tunable frequency in Hz; 0 = unspecified
|
|
2623
|
+
uint32 supported_modulations = 11; // Bitmask of supported RadioFrequencyModulation values (bit N = modulation N supported)
|
|
2624
|
+
}
|
|
2625
|
+
|
|
2626
|
+
// ==================== SERIAL PROXY ====================
|
|
2627
|
+
|
|
2628
|
+
enum SerialProxyParity {
|
|
2629
|
+
SERIAL_PROXY_PARITY_NONE = 0;
|
|
2630
|
+
SERIAL_PROXY_PARITY_EVEN = 1;
|
|
2631
|
+
SERIAL_PROXY_PARITY_ODD = 2;
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
// Configure UART parameters for a serial proxy instance
|
|
2635
|
+
message SerialProxyConfigureRequest {
|
|
2636
|
+
option (id) = 138;
|
|
2637
|
+
option (source) = SOURCE_CLIENT;
|
|
2638
|
+
option (ifdef) = "USE_SERIAL_PROXY";
|
|
2639
|
+
|
|
2640
|
+
uint32 instance = 1; // Instance index (0-based)
|
|
2641
|
+
uint32 baudrate = 2; // Baud rate in bits per second
|
|
2642
|
+
bool flow_control = 3; // Enable hardware flow control
|
|
2643
|
+
SerialProxyParity parity = 4; // Parity setting
|
|
2644
|
+
uint32 stop_bits = 5; // Number of stop bits (1 or 2)
|
|
2645
|
+
uint32 data_size = 6; // Number of data bits (5-8)
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
// Data received from a serial device, forwarded to clients
|
|
2649
|
+
message SerialProxyDataReceived {
|
|
2650
|
+
option (id) = 139;
|
|
2651
|
+
option (source) = SOURCE_SERVER;
|
|
2652
|
+
option (ifdef) = "USE_SERIAL_PROXY";
|
|
2653
|
+
option (no_delay) = true;
|
|
2654
|
+
option (speed_optimized) = true;
|
|
2655
|
+
|
|
2656
|
+
uint32 instance = 1; // Instance index (0-based)
|
|
2657
|
+
bytes data = 2; // Raw data received from the serial device
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
// Write data to a serial device
|
|
2661
|
+
message SerialProxyWriteRequest {
|
|
2662
|
+
option (id) = 140;
|
|
2663
|
+
option (source) = SOURCE_CLIENT;
|
|
2664
|
+
option (ifdef) = "USE_SERIAL_PROXY";
|
|
2665
|
+
option (no_delay) = true;
|
|
2666
|
+
|
|
2667
|
+
uint32 instance = 1; // Instance index (0-based)
|
|
2668
|
+
bytes data = 2; // Raw data to write to the serial device
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
// Set modem control pin states (RTS and DTR)
|
|
2672
|
+
message SerialProxySetModemPinsRequest {
|
|
2673
|
+
option (id) = 141;
|
|
2674
|
+
option (source) = SOURCE_CLIENT;
|
|
2675
|
+
option (ifdef) = "USE_SERIAL_PROXY";
|
|
2676
|
+
|
|
2677
|
+
uint32 instance = 1; // Instance index (0-based)
|
|
2678
|
+
uint32 line_states = 2; // Bitmask of SerialProxyLineStateFlags
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
// Request current modem control pin states
|
|
2682
|
+
message SerialProxyGetModemPinsRequest {
|
|
2683
|
+
option (id) = 142;
|
|
2684
|
+
option (source) = SOURCE_CLIENT;
|
|
2685
|
+
option (ifdef) = "USE_SERIAL_PROXY";
|
|
2686
|
+
|
|
2687
|
+
uint32 instance = 1; // Instance index (0-based)
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
// Response with current modem control pin states
|
|
2691
|
+
message SerialProxyGetModemPinsResponse {
|
|
2692
|
+
option (id) = 143;
|
|
2693
|
+
option (source) = SOURCE_SERVER;
|
|
2694
|
+
option (ifdef) = "USE_SERIAL_PROXY";
|
|
2695
|
+
|
|
2696
|
+
uint32 instance = 1; // Instance index (0-based)
|
|
2697
|
+
uint32 line_states = 2; // Bitmask of SerialProxyLineStateFlags
|
|
2698
|
+
}
|
|
2699
|
+
|
|
2700
|
+
enum SerialProxyRequestType {
|
|
2701
|
+
SERIAL_PROXY_REQUEST_TYPE_SUBSCRIBE = 0; // Subscribe to receive data from this serial proxy instance
|
|
2702
|
+
SERIAL_PROXY_REQUEST_TYPE_UNSUBSCRIBE = 1; // Unsubscribe from this serial proxy instance
|
|
2703
|
+
SERIAL_PROXY_REQUEST_TYPE_FLUSH = 2; // Flush the serial port (block until all TX data is sent)
|
|
2704
|
+
}
|
|
2705
|
+
|
|
2706
|
+
enum SerialProxyStatus {
|
|
2707
|
+
SERIAL_PROXY_STATUS_OK = 0; // Completed successfully; TX drain confirmed
|
|
2708
|
+
SERIAL_PROXY_STATUS_ASSUMED_SUCCESS = 1; // Platform cannot confirm TX drain; success assumed
|
|
2709
|
+
SERIAL_PROXY_STATUS_ERROR = 2; // Driver or hardware error
|
|
2710
|
+
SERIAL_PROXY_STATUS_TIMEOUT = 3; // Timed out before TX completed
|
|
2711
|
+
SERIAL_PROXY_STATUS_NOT_SUPPORTED = 4; // Request type not supported by this instance
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
// Generic request message for simple serial proxy operations
|
|
2715
|
+
message SerialProxyRequest {
|
|
2716
|
+
option (id) = 144;
|
|
2717
|
+
option (source) = SOURCE_CLIENT;
|
|
2718
|
+
option (ifdef) = "USE_SERIAL_PROXY";
|
|
2719
|
+
|
|
2720
|
+
uint32 instance = 1; // Instance index (0-based)
|
|
2721
|
+
SerialProxyRequestType type = 2; // Request type
|
|
2722
|
+
}
|
|
2723
|
+
|
|
2724
|
+
// Response to a SerialProxyRequest (e.g. flush completion or failure)
|
|
2725
|
+
message SerialProxyRequestResponse {
|
|
2726
|
+
option (id) = 147;
|
|
2727
|
+
option (source) = SOURCE_SERVER;
|
|
2728
|
+
option (ifdef) = "USE_SERIAL_PROXY";
|
|
2729
|
+
|
|
2730
|
+
uint32 instance = 1; // Instance index (0-based)
|
|
2731
|
+
SerialProxyRequestType type = 2; // Which request type this responds to
|
|
2732
|
+
SerialProxyStatus status = 3; // Result status
|
|
2733
|
+
string error_message = 4; // Additional detail on failure (optional)
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
// ==================== BLUETOOTH CONNECTION PARAMS ====================
|
|
2737
|
+
message BluetoothSetConnectionParamsRequest {
|
|
2738
|
+
option (id) = 145;
|
|
2739
|
+
option (source) = SOURCE_CLIENT;
|
|
2740
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
2741
|
+
|
|
2742
|
+
uint64 address = 1;
|
|
2743
|
+
uint32 min_interval = 2; // units of 1.25ms
|
|
2744
|
+
uint32 max_interval = 3; // units of 1.25ms
|
|
2745
|
+
uint32 latency = 4;
|
|
2746
|
+
uint32 timeout = 5; // units of 10ms
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2749
|
+
message BluetoothSetConnectionParamsResponse {
|
|
2750
|
+
option (id) = 146;
|
|
2751
|
+
option (source) = SOURCE_SERVER;
|
|
2752
|
+
option (ifdef) = "USE_BLUETOOTH_PROXY";
|
|
2753
|
+
|
|
2754
|
+
uint64 address = 1;
|
|
2755
|
+
int32 error = 2;
|
|
2756
|
+
}
|