ESPHome 2025.10.0-dev
Loading...
Searching...
No Matches
api_pb2_service.cpp
Go to the documentation of this file.
1// This file was automatically generated with a tool.
2// See script/api_protobuf/api_protobuf.py
3#include "api_pb2_service.h"
4#include "esphome/core/log.h"
5
6namespace esphome::api {
7
8static const char *const TAG = "api.service";
9
10#ifdef HAS_PROTO_MESSAGE_DUMP
11void APIServerConnectionBase::log_send_message_(const char *name, const std::string &dump) {
12 ESP_LOGVV(TAG, "send_message %s: %s", name, dump.c_str());
13}
14#endif
15
16void APIServerConnectionBase::read_message(uint32_t msg_size, uint32_t msg_type, uint8_t *msg_data) {
17 switch (msg_type) {
19 HelloRequest msg;
20 msg.decode(msg_data, msg_size);
21#ifdef HAS_PROTO_MESSAGE_DUMP
22 ESP_LOGVV(TAG, "on_hello_request: %s", msg.dump().c_str());
23#endif
24 this->on_hello_request(msg);
25 break;
26 }
27#ifdef USE_API_PASSWORD
30 msg.decode(msg_data, msg_size);
31#ifdef HAS_PROTO_MESSAGE_DUMP
32 ESP_LOGVV(TAG, "on_authentication_request: %s", msg.dump().c_str());
33#endif
35 break;
36 }
37#endif
40 // Empty message: no decode needed
41#ifdef HAS_PROTO_MESSAGE_DUMP
42 ESP_LOGVV(TAG, "on_disconnect_request: %s", msg.dump().c_str());
43#endif
44 this->on_disconnect_request(msg);
45 break;
46 }
49 // Empty message: no decode needed
50#ifdef HAS_PROTO_MESSAGE_DUMP
51 ESP_LOGVV(TAG, "on_disconnect_response: %s", msg.dump().c_str());
52#endif
53 this->on_disconnect_response(msg);
54 break;
55 }
57 PingRequest msg;
58 // Empty message: no decode needed
59#ifdef HAS_PROTO_MESSAGE_DUMP
60 ESP_LOGVV(TAG, "on_ping_request: %s", msg.dump().c_str());
61#endif
62 this->on_ping_request(msg);
63 break;
64 }
66 PingResponse msg;
67 // Empty message: no decode needed
68#ifdef HAS_PROTO_MESSAGE_DUMP
69 ESP_LOGVV(TAG, "on_ping_response: %s", msg.dump().c_str());
70#endif
71 this->on_ping_response(msg);
72 break;
73 }
76 // Empty message: no decode needed
77#ifdef HAS_PROTO_MESSAGE_DUMP
78 ESP_LOGVV(TAG, "on_device_info_request: %s", msg.dump().c_str());
79#endif
80 this->on_device_info_request(msg);
81 break;
82 }
85 // Empty message: no decode needed
86#ifdef HAS_PROTO_MESSAGE_DUMP
87 ESP_LOGVV(TAG, "on_list_entities_request: %s", msg.dump().c_str());
88#endif
89 this->on_list_entities_request(msg);
90 break;
91 }
94 // Empty message: no decode needed
95#ifdef HAS_PROTO_MESSAGE_DUMP
96 ESP_LOGVV(TAG, "on_subscribe_states_request: %s", msg.dump().c_str());
97#endif
99 break;
100 }
103 msg.decode(msg_data, msg_size);
104#ifdef HAS_PROTO_MESSAGE_DUMP
105 ESP_LOGVV(TAG, "on_subscribe_logs_request: %s", msg.dump().c_str());
106#endif
107 this->on_subscribe_logs_request(msg);
108 break;
109 }
110#ifdef USE_COVER
113 msg.decode(msg_data, msg_size);
114#ifdef HAS_PROTO_MESSAGE_DUMP
115 ESP_LOGVV(TAG, "on_cover_command_request: %s", msg.dump().c_str());
116#endif
117 this->on_cover_command_request(msg);
118 break;
119 }
120#endif
121#ifdef USE_FAN
124 msg.decode(msg_data, msg_size);
125#ifdef HAS_PROTO_MESSAGE_DUMP
126 ESP_LOGVV(TAG, "on_fan_command_request: %s", msg.dump().c_str());
127#endif
128 this->on_fan_command_request(msg);
129 break;
130 }
131#endif
132#ifdef USE_LIGHT
135 msg.decode(msg_data, msg_size);
136#ifdef HAS_PROTO_MESSAGE_DUMP
137 ESP_LOGVV(TAG, "on_light_command_request: %s", msg.dump().c_str());
138#endif
139 this->on_light_command_request(msg);
140 break;
141 }
142#endif
143#ifdef USE_SWITCH
146 msg.decode(msg_data, msg_size);
147#ifdef HAS_PROTO_MESSAGE_DUMP
148 ESP_LOGVV(TAG, "on_switch_command_request: %s", msg.dump().c_str());
149#endif
150 this->on_switch_command_request(msg);
151 break;
152 }
153#endif
154#ifdef USE_API_HOMEASSISTANT_SERVICES
157 // Empty message: no decode needed
158#ifdef HAS_PROTO_MESSAGE_DUMP
159 ESP_LOGVV(TAG, "on_subscribe_homeassistant_services_request: %s", msg.dump().c_str());
160#endif
162 break;
163 }
164#endif
166 GetTimeResponse msg;
167 msg.decode(msg_data, msg_size);
168#ifdef HAS_PROTO_MESSAGE_DUMP
169 ESP_LOGVV(TAG, "on_get_time_response: %s", msg.dump().c_str());
170#endif
171 this->on_get_time_response(msg);
172 break;
173 }
174#ifdef USE_API_HOMEASSISTANT_STATES
177 // Empty message: no decode needed
178#ifdef HAS_PROTO_MESSAGE_DUMP
179 ESP_LOGVV(TAG, "on_subscribe_home_assistant_states_request: %s", msg.dump().c_str());
180#endif
182 break;
183 }
184#endif
185#ifdef USE_API_HOMEASSISTANT_STATES
188 msg.decode(msg_data, msg_size);
189#ifdef HAS_PROTO_MESSAGE_DUMP
190 ESP_LOGVV(TAG, "on_home_assistant_state_response: %s", msg.dump().c_str());
191#endif
193 break;
194 }
195#endif
196#ifdef USE_API_SERVICES
199 msg.decode(msg_data, msg_size);
200#ifdef HAS_PROTO_MESSAGE_DUMP
201 ESP_LOGVV(TAG, "on_execute_service_request: %s", msg.dump().c_str());
202#endif
204 break;
205 }
206#endif
207#ifdef USE_CAMERA
210 msg.decode(msg_data, msg_size);
211#ifdef HAS_PROTO_MESSAGE_DUMP
212 ESP_LOGVV(TAG, "on_camera_image_request: %s", msg.dump().c_str());
213#endif
214 this->on_camera_image_request(msg);
215 break;
216 }
217#endif
218#ifdef USE_CLIMATE
221 msg.decode(msg_data, msg_size);
222#ifdef HAS_PROTO_MESSAGE_DUMP
223 ESP_LOGVV(TAG, "on_climate_command_request: %s", msg.dump().c_str());
224#endif
226 break;
227 }
228#endif
229#ifdef USE_NUMBER
232 msg.decode(msg_data, msg_size);
233#ifdef HAS_PROTO_MESSAGE_DUMP
234 ESP_LOGVV(TAG, "on_number_command_request: %s", msg.dump().c_str());
235#endif
236 this->on_number_command_request(msg);
237 break;
238 }
239#endif
240#ifdef USE_SELECT
243 msg.decode(msg_data, msg_size);
244#ifdef HAS_PROTO_MESSAGE_DUMP
245 ESP_LOGVV(TAG, "on_select_command_request: %s", msg.dump().c_str());
246#endif
247 this->on_select_command_request(msg);
248 break;
249 }
250#endif
251#ifdef USE_SIREN
254 msg.decode(msg_data, msg_size);
255#ifdef HAS_PROTO_MESSAGE_DUMP
256 ESP_LOGVV(TAG, "on_siren_command_request: %s", msg.dump().c_str());
257#endif
258 this->on_siren_command_request(msg);
259 break;
260 }
261#endif
262#ifdef USE_LOCK
265 msg.decode(msg_data, msg_size);
266#ifdef HAS_PROTO_MESSAGE_DUMP
267 ESP_LOGVV(TAG, "on_lock_command_request: %s", msg.dump().c_str());
268#endif
269 this->on_lock_command_request(msg);
270 break;
271 }
272#endif
273#ifdef USE_BUTTON
276 msg.decode(msg_data, msg_size);
277#ifdef HAS_PROTO_MESSAGE_DUMP
278 ESP_LOGVV(TAG, "on_button_command_request: %s", msg.dump().c_str());
279#endif
280 this->on_button_command_request(msg);
281 break;
282 }
283#endif
284#ifdef USE_MEDIA_PLAYER
287 msg.decode(msg_data, msg_size);
288#ifdef HAS_PROTO_MESSAGE_DUMP
289 ESP_LOGVV(TAG, "on_media_player_command_request: %s", msg.dump().c_str());
290#endif
292 break;
293 }
294#endif
295#ifdef USE_BLUETOOTH_PROXY
298 msg.decode(msg_data, msg_size);
299#ifdef HAS_PROTO_MESSAGE_DUMP
300 ESP_LOGVV(TAG, "on_subscribe_bluetooth_le_advertisements_request: %s", msg.dump().c_str());
301#endif
303 break;
304 }
305#endif
306#ifdef USE_BLUETOOTH_PROXY
309 msg.decode(msg_data, msg_size);
310#ifdef HAS_PROTO_MESSAGE_DUMP
311 ESP_LOGVV(TAG, "on_bluetooth_device_request: %s", msg.dump().c_str());
312#endif
314 break;
315 }
316#endif
317#ifdef USE_BLUETOOTH_PROXY
320 msg.decode(msg_data, msg_size);
321#ifdef HAS_PROTO_MESSAGE_DUMP
322 ESP_LOGVV(TAG, "on_bluetooth_gatt_get_services_request: %s", msg.dump().c_str());
323#endif
325 break;
326 }
327#endif
328#ifdef USE_BLUETOOTH_PROXY
331 msg.decode(msg_data, msg_size);
332#ifdef HAS_PROTO_MESSAGE_DUMP
333 ESP_LOGVV(TAG, "on_bluetooth_gatt_read_request: %s", msg.dump().c_str());
334#endif
336 break;
337 }
338#endif
339#ifdef USE_BLUETOOTH_PROXY
342 msg.decode(msg_data, msg_size);
343#ifdef HAS_PROTO_MESSAGE_DUMP
344 ESP_LOGVV(TAG, "on_bluetooth_gatt_write_request: %s", msg.dump().c_str());
345#endif
347 break;
348 }
349#endif
350#ifdef USE_BLUETOOTH_PROXY
353 msg.decode(msg_data, msg_size);
354#ifdef HAS_PROTO_MESSAGE_DUMP
355 ESP_LOGVV(TAG, "on_bluetooth_gatt_read_descriptor_request: %s", msg.dump().c_str());
356#endif
358 break;
359 }
360#endif
361#ifdef USE_BLUETOOTH_PROXY
364 msg.decode(msg_data, msg_size);
365#ifdef HAS_PROTO_MESSAGE_DUMP
366 ESP_LOGVV(TAG, "on_bluetooth_gatt_write_descriptor_request: %s", msg.dump().c_str());
367#endif
369 break;
370 }
371#endif
372#ifdef USE_BLUETOOTH_PROXY
375 msg.decode(msg_data, msg_size);
376#ifdef HAS_PROTO_MESSAGE_DUMP
377 ESP_LOGVV(TAG, "on_bluetooth_gatt_notify_request: %s", msg.dump().c_str());
378#endif
380 break;
381 }
382#endif
383#ifdef USE_BLUETOOTH_PROXY
386 // Empty message: no decode needed
387#ifdef HAS_PROTO_MESSAGE_DUMP
388 ESP_LOGVV(TAG, "on_subscribe_bluetooth_connections_free_request: %s", msg.dump().c_str());
389#endif
391 break;
392 }
393#endif
394#ifdef USE_BLUETOOTH_PROXY
397 // Empty message: no decode needed
398#ifdef HAS_PROTO_MESSAGE_DUMP
399 ESP_LOGVV(TAG, "on_unsubscribe_bluetooth_le_advertisements_request: %s", msg.dump().c_str());
400#endif
402 break;
403 }
404#endif
405#ifdef USE_VOICE_ASSISTANT
408 msg.decode(msg_data, msg_size);
409#ifdef HAS_PROTO_MESSAGE_DUMP
410 ESP_LOGVV(TAG, "on_subscribe_voice_assistant_request: %s", msg.dump().c_str());
411#endif
413 break;
414 }
415#endif
416#ifdef USE_VOICE_ASSISTANT
419 msg.decode(msg_data, msg_size);
420#ifdef HAS_PROTO_MESSAGE_DUMP
421 ESP_LOGVV(TAG, "on_voice_assistant_response: %s", msg.dump().c_str());
422#endif
424 break;
425 }
426#endif
427#ifdef USE_VOICE_ASSISTANT
430 msg.decode(msg_data, msg_size);
431#ifdef HAS_PROTO_MESSAGE_DUMP
432 ESP_LOGVV(TAG, "on_voice_assistant_event_response: %s", msg.dump().c_str());
433#endif
435 break;
436 }
437#endif
438#ifdef USE_ALARM_CONTROL_PANEL
441 msg.decode(msg_data, msg_size);
442#ifdef HAS_PROTO_MESSAGE_DUMP
443 ESP_LOGVV(TAG, "on_alarm_control_panel_command_request: %s", msg.dump().c_str());
444#endif
446 break;
447 }
448#endif
449#ifdef USE_TEXT
452 msg.decode(msg_data, msg_size);
453#ifdef HAS_PROTO_MESSAGE_DUMP
454 ESP_LOGVV(TAG, "on_text_command_request: %s", msg.dump().c_str());
455#endif
456 this->on_text_command_request(msg);
457 break;
458 }
459#endif
460#ifdef USE_DATETIME_DATE
463 msg.decode(msg_data, msg_size);
464#ifdef HAS_PROTO_MESSAGE_DUMP
465 ESP_LOGVV(TAG, "on_date_command_request: %s", msg.dump().c_str());
466#endif
467 this->on_date_command_request(msg);
468 break;
469 }
470#endif
471#ifdef USE_DATETIME_TIME
474 msg.decode(msg_data, msg_size);
475#ifdef HAS_PROTO_MESSAGE_DUMP
476 ESP_LOGVV(TAG, "on_time_command_request: %s", msg.dump().c_str());
477#endif
478 this->on_time_command_request(msg);
479 break;
480 }
481#endif
482#ifdef USE_VOICE_ASSISTANT
485 msg.decode(msg_data, msg_size);
486#ifdef HAS_PROTO_MESSAGE_DUMP
487 ESP_LOGVV(TAG, "on_voice_assistant_audio: %s", msg.dump().c_str());
488#endif
489 this->on_voice_assistant_audio(msg);
490 break;
491 }
492#endif
493#ifdef USE_VALVE
496 msg.decode(msg_data, msg_size);
497#ifdef HAS_PROTO_MESSAGE_DUMP
498 ESP_LOGVV(TAG, "on_valve_command_request: %s", msg.dump().c_str());
499#endif
500 this->on_valve_command_request(msg);
501 break;
502 }
503#endif
504#ifdef USE_DATETIME_DATETIME
507 msg.decode(msg_data, msg_size);
508#ifdef HAS_PROTO_MESSAGE_DUMP
509 ESP_LOGVV(TAG, "on_date_time_command_request: %s", msg.dump().c_str());
510#endif
512 break;
513 }
514#endif
515#ifdef USE_VOICE_ASSISTANT
518 msg.decode(msg_data, msg_size);
519#ifdef HAS_PROTO_MESSAGE_DUMP
520 ESP_LOGVV(TAG, "on_voice_assistant_timer_event_response: %s", msg.dump().c_str());
521#endif
523 break;
524 }
525#endif
526#ifdef USE_UPDATE
529 msg.decode(msg_data, msg_size);
530#ifdef HAS_PROTO_MESSAGE_DUMP
531 ESP_LOGVV(TAG, "on_update_command_request: %s", msg.dump().c_str());
532#endif
533 this->on_update_command_request(msg);
534 break;
535 }
536#endif
537#ifdef USE_VOICE_ASSISTANT
540 msg.decode(msg_data, msg_size);
541#ifdef HAS_PROTO_MESSAGE_DUMP
542 ESP_LOGVV(TAG, "on_voice_assistant_announce_request: %s", msg.dump().c_str());
543#endif
545 break;
546 }
547#endif
548#ifdef USE_VOICE_ASSISTANT
551 msg.decode(msg_data, msg_size);
552#ifdef HAS_PROTO_MESSAGE_DUMP
553 ESP_LOGVV(TAG, "on_voice_assistant_configuration_request: %s", msg.dump().c_str());
554#endif
556 break;
557 }
558#endif
559#ifdef USE_VOICE_ASSISTANT
562 msg.decode(msg_data, msg_size);
563#ifdef HAS_PROTO_MESSAGE_DUMP
564 ESP_LOGVV(TAG, "on_voice_assistant_set_configuration: %s", msg.dump().c_str());
565#endif
567 break;
568 }
569#endif
570#ifdef USE_API_NOISE
573 msg.decode(msg_data, msg_size);
574#ifdef HAS_PROTO_MESSAGE_DUMP
575 ESP_LOGVV(TAG, "on_noise_encryption_set_key_request: %s", msg.dump().c_str());
576#endif
578 break;
579 }
580#endif
581#ifdef USE_BLUETOOTH_PROXY
584 msg.decode(msg_data, msg_size);
585#ifdef HAS_PROTO_MESSAGE_DUMP
586 ESP_LOGVV(TAG, "on_bluetooth_scanner_set_mode_request: %s", msg.dump().c_str());
587#endif
589 break;
590 }
591#endif
592#ifdef USE_ZWAVE_PROXY
594 ZWaveProxyFrame msg;
595 msg.decode(msg_data, msg_size);
596#ifdef HAS_PROTO_MESSAGE_DUMP
597 ESP_LOGVV(TAG, "on_z_wave_proxy_frame: %s", msg.dump().c_str());
598#endif
599 this->on_z_wave_proxy_frame(msg);
600 break;
601 }
602#endif
603#ifdef USE_ZWAVE_PROXY
606 msg.decode(msg_data, msg_size);
607#ifdef HAS_PROTO_MESSAGE_DUMP
608 ESP_LOGVV(TAG, "on_z_wave_proxy_request: %s", msg.dump().c_str());
609#endif
610 this->on_z_wave_proxy_request(msg);
611 break;
612 }
613#endif
614 default:
615 break;
616 }
617}
618
620 if (!this->send_hello_response(msg)) {
621 this->on_fatal_error();
622 }
623}
624#ifdef USE_API_PASSWORD
630#endif
632 if (!this->send_disconnect_response(msg)) {
633 this->on_fatal_error();
634 }
635}
637 if (!this->send_ping_response(msg)) {
638 this->on_fatal_error();
639 }
640}
642 if (!this->send_device_info_response(msg)) {
643 this->on_fatal_error();
644 }
645}
651#ifdef USE_API_HOMEASSISTANT_SERVICES
656#endif
657#ifdef USE_API_HOMEASSISTANT_STATES
661#endif
662#ifdef USE_API_SERVICES
664#endif
665#ifdef USE_API_NOISE
671#endif
672#ifdef USE_BUTTON
674#endif
675#ifdef USE_CAMERA
677#endif
678#ifdef USE_CLIMATE
680#endif
681#ifdef USE_COVER
683#endif
684#ifdef USE_DATETIME_DATE
686#endif
687#ifdef USE_DATETIME_DATETIME
691#endif
692#ifdef USE_FAN
694#endif
695#ifdef USE_LIGHT
697#endif
698#ifdef USE_LOCK
700#endif
701#ifdef USE_MEDIA_PLAYER
705#endif
706#ifdef USE_NUMBER
708#endif
709#ifdef USE_SELECT
711#endif
712#ifdef USE_SIREN
714#endif
715#ifdef USE_SWITCH
717#endif
718#ifdef USE_TEXT
720#endif
721#ifdef USE_DATETIME_TIME
723#endif
724#ifdef USE_UPDATE
726#endif
727#ifdef USE_VALVE
729#endif
730#ifdef USE_BLUETOOTH_PROXY
735#endif
736#ifdef USE_BLUETOOTH_PROXY
740#endif
741#ifdef USE_BLUETOOTH_PROXY
745#endif
746#ifdef USE_BLUETOOTH_PROXY
750#endif
751#ifdef USE_BLUETOOTH_PROXY
755#endif
756#ifdef USE_BLUETOOTH_PROXY
760#endif
761#ifdef USE_BLUETOOTH_PROXY
765#endif
766#ifdef USE_BLUETOOTH_PROXY
770#endif
771#ifdef USE_BLUETOOTH_PROXY
778#endif
779#ifdef USE_BLUETOOTH_PROXY
784#endif
785#ifdef USE_BLUETOOTH_PROXY
789#endif
790#ifdef USE_VOICE_ASSISTANT
794#endif
795#ifdef USE_VOICE_ASSISTANT
801#endif
802#ifdef USE_VOICE_ASSISTANT
806#endif
807#ifdef USE_ALARM_CONTROL_PANEL
811#endif
812#ifdef USE_ZWAVE_PROXY
814#endif
815#ifdef USE_ZWAVE_PROXY
817#endif
818
819void APIServerConnection::read_message(uint32_t msg_size, uint32_t msg_type, uint8_t *msg_data) {
820 // Check authentication/connection requirements for messages
821 switch (msg_type) {
822 case HelloRequest::MESSAGE_TYPE: // No setup required
823#ifdef USE_API_PASSWORD
824 case AuthenticationRequest::MESSAGE_TYPE: // No setup required
825#endif
826 case DisconnectRequest::MESSAGE_TYPE: // No setup required
827 case PingRequest::MESSAGE_TYPE: // No setup required
828 break; // Skip all checks for these messages
829 case DeviceInfoRequest::MESSAGE_TYPE: // Connection setup only
830 if (!this->check_connection_setup_()) {
831 return; // Connection not setup
832 }
833 break;
834 default:
835 // All other messages require authentication (which includes connection check)
836 if (!this->check_authenticated_()) {
837 return; // Authentication failed
838 }
839 break;
840 }
841
842 // Call base implementation to process the message
843 APIServerConnectionBase::read_message(msg_size, msg_type, msg_data);
844}
845
846} // namespace esphome::api
virtual void on_voice_assistant_configuration_request(const VoiceAssistantConfigurationRequest &value)
virtual void on_bluetooth_gatt_get_services_request(const BluetoothGATTGetServicesRequest &value)
void read_message(uint32_t msg_size, uint32_t msg_type, uint8_t *msg_data) override
virtual void on_alarm_control_panel_command_request(const AlarmControlPanelCommandRequest &value)
virtual void on_siren_command_request(const SirenCommandRequest &value)
virtual void on_hello_request(const HelloRequest &value)
virtual void on_subscribe_home_assistant_states_request(const SubscribeHomeAssistantStatesRequest &value)
virtual void on_bluetooth_gatt_notify_request(const BluetoothGATTNotifyRequest &value)
virtual void on_bluetooth_device_request(const BluetoothDeviceRequest &value)
virtual void on_home_assistant_state_response(const HomeAssistantStateResponse &value)
virtual void on_get_time_response(const GetTimeResponse &value)
virtual void on_voice_assistant_set_configuration(const VoiceAssistantSetConfiguration &value)
virtual void on_bluetooth_gatt_read_descriptor_request(const BluetoothGATTReadDescriptorRequest &value)
virtual void on_list_entities_request(const ListEntitiesRequest &value)
virtual void on_noise_encryption_set_key_request(const NoiseEncryptionSetKeyRequest &value)
virtual void on_z_wave_proxy_frame(const ZWaveProxyFrame &value)
virtual void on_lock_command_request(const LockCommandRequest &value)
virtual void on_media_player_command_request(const MediaPlayerCommandRequest &value)
virtual void on_bluetooth_gatt_write_request(const BluetoothGATTWriteRequest &value)
virtual void on_subscribe_states_request(const SubscribeStatesRequest &value)
virtual void on_ping_response(const PingResponse &value)
virtual void on_valve_command_request(const ValveCommandRequest &value)
virtual void on_bluetooth_gatt_read_request(const BluetoothGATTReadRequest &value)
virtual void on_disconnect_request(const DisconnectRequest &value)
void log_send_message_(const char *name, const std::string &dump)
virtual void on_cover_command_request(const CoverCommandRequest &value)
virtual void on_subscribe_bluetooth_le_advertisements_request(const SubscribeBluetoothLEAdvertisementsRequest &value)
virtual void on_text_command_request(const TextCommandRequest &value)
virtual void on_select_command_request(const SelectCommandRequest &value)
virtual void on_fan_command_request(const FanCommandRequest &value)
virtual void on_camera_image_request(const CameraImageRequest &value)
virtual void on_subscribe_logs_request(const SubscribeLogsRequest &value)
virtual void on_bluetooth_gatt_write_descriptor_request(const BluetoothGATTWriteDescriptorRequest &value)
virtual void on_voice_assistant_audio(const VoiceAssistantAudio &value)
virtual void on_subscribe_voice_assistant_request(const SubscribeVoiceAssistantRequest &value)
virtual void on_voice_assistant_announce_request(const VoiceAssistantAnnounceRequest &value)
virtual void on_climate_command_request(const ClimateCommandRequest &value)
virtual void on_ping_request(const PingRequest &value)
virtual void on_voice_assistant_response(const VoiceAssistantResponse &value)
virtual void on_light_command_request(const LightCommandRequest &value)
virtual void on_subscribe_bluetooth_connections_free_request(const SubscribeBluetoothConnectionsFreeRequest &value)
virtual void on_date_time_command_request(const DateTimeCommandRequest &value)
virtual void on_subscribe_homeassistant_services_request(const SubscribeHomeassistantServicesRequest &value)
virtual void on_switch_command_request(const SwitchCommandRequest &value)
virtual void on_voice_assistant_timer_event_response(const VoiceAssistantTimerEventResponse &value)
virtual void on_button_command_request(const ButtonCommandRequest &value)
virtual void on_voice_assistant_event_response(const VoiceAssistantEventResponse &value)
virtual void on_z_wave_proxy_request(const ZWaveProxyRequest &value)
virtual void on_number_command_request(const NumberCommandRequest &value)
virtual void on_authentication_request(const AuthenticationRequest &value)
virtual void on_execute_service_request(const ExecuteServiceRequest &value)
virtual void on_bluetooth_scanner_set_mode_request(const BluetoothScannerSetModeRequest &value)
virtual void on_date_command_request(const DateCommandRequest &value)
virtual void on_unsubscribe_bluetooth_le_advertisements_request(const UnsubscribeBluetoothLEAdvertisementsRequest &value)
virtual void on_update_command_request(const UpdateCommandRequest &value)
virtual void on_disconnect_response(const DisconnectResponse &value)
virtual void on_device_info_request(const DeviceInfoRequest &value)
virtual void on_time_command_request(const TimeCommandRequest &value)
virtual bool send_authenticate_response(const AuthenticationRequest &msg)=0
virtual bool send_voice_assistant_get_configuration_response(const VoiceAssistantConfigurationRequest &msg)=0
void on_z_wave_proxy_frame(const ZWaveProxyFrame &msg) override
void on_z_wave_proxy_request(const ZWaveProxyRequest &msg) override
virtual void voice_assistant_set_configuration(const VoiceAssistantSetConfiguration &msg)=0
void on_media_player_command_request(const MediaPlayerCommandRequest &msg) override
void on_subscribe_bluetooth_connections_free_request(const SubscribeBluetoothConnectionsFreeRequest &msg) override
void on_number_command_request(const NumberCommandRequest &msg) override
virtual void lock_command(const LockCommandRequest &msg)=0
virtual void text_command(const TextCommandRequest &msg)=0
void on_ping_request(const PingRequest &msg) override
virtual void subscribe_logs(const SubscribeLogsRequest &msg)=0
void on_subscribe_logs_request(const SubscribeLogsRequest &msg) override
virtual void light_command(const LightCommandRequest &msg)=0
void on_device_info_request(const DeviceInfoRequest &msg) override
void on_camera_image_request(const CameraImageRequest &msg) override
virtual void select_command(const SelectCommandRequest &msg)=0
virtual void unsubscribe_bluetooth_le_advertisements(const UnsubscribeBluetoothLEAdvertisementsRequest &msg)=0
virtual void camera_image(const CameraImageRequest &msg)=0
void on_date_time_command_request(const DateTimeCommandRequest &msg) override
void read_message(uint32_t msg_size, uint32_t msg_type, uint8_t *msg_data) override
void on_bluetooth_gatt_write_request(const BluetoothGATTWriteRequest &msg) override
void on_update_command_request(const UpdateCommandRequest &msg) override
virtual void valve_command(const ValveCommandRequest &msg)=0
virtual void bluetooth_gatt_get_services(const BluetoothGATTGetServicesRequest &msg)=0
void on_bluetooth_gatt_notify_request(const BluetoothGATTNotifyRequest &msg) override
void on_text_command_request(const TextCommandRequest &msg) override
void on_select_command_request(const SelectCommandRequest &msg) override
virtual void climate_command(const ClimateCommandRequest &msg)=0
virtual void execute_service(const ExecuteServiceRequest &msg)=0
void on_lock_command_request(const LockCommandRequest &msg) override
virtual void zwave_proxy_frame(const ZWaveProxyFrame &msg)=0
void on_execute_service_request(const ExecuteServiceRequest &msg) override
void on_button_command_request(const ButtonCommandRequest &msg) override
virtual void bluetooth_gatt_read_descriptor(const BluetoothGATTReadDescriptorRequest &msg)=0
virtual bool send_noise_encryption_set_key_response(const NoiseEncryptionSetKeyRequest &msg)=0
void on_list_entities_request(const ListEntitiesRequest &msg) override
virtual void bluetooth_device_request(const BluetoothDeviceRequest &msg)=0
virtual bool send_subscribe_bluetooth_connections_free_response(const SubscribeBluetoothConnectionsFreeRequest &msg)=0
virtual void subscribe_home_assistant_states(const SubscribeHomeAssistantStatesRequest &msg)=0
void on_siren_command_request(const SirenCommandRequest &msg) override
virtual void fan_command(const FanCommandRequest &msg)=0
void on_subscribe_home_assistant_states_request(const SubscribeHomeAssistantStatesRequest &msg) override
void on_subscribe_voice_assistant_request(const SubscribeVoiceAssistantRequest &msg) override
void on_hello_request(const HelloRequest &msg) override
void on_climate_command_request(const ClimateCommandRequest &msg) override
virtual void list_entities(const ListEntitiesRequest &msg)=0
void on_subscribe_bluetooth_le_advertisements_request(const SubscribeBluetoothLEAdvertisementsRequest &msg) override
virtual void number_command(const NumberCommandRequest &msg)=0
void on_unsubscribe_bluetooth_le_advertisements_request(const UnsubscribeBluetoothLEAdvertisementsRequest &msg) override
void on_fan_command_request(const FanCommandRequest &msg) override
virtual void bluetooth_gatt_read(const BluetoothGATTReadRequest &msg)=0
void on_subscribe_homeassistant_services_request(const SubscribeHomeassistantServicesRequest &msg) override
virtual void bluetooth_gatt_write(const BluetoothGATTWriteRequest &msg)=0
virtual void button_command(const ButtonCommandRequest &msg)=0
virtual void siren_command(const SirenCommandRequest &msg)=0
virtual void bluetooth_gatt_notify(const BluetoothGATTNotifyRequest &msg)=0
virtual bool send_device_info_response(const DeviceInfoRequest &msg)=0
virtual bool send_ping_response(const PingRequest &msg)=0
void on_alarm_control_panel_command_request(const AlarmControlPanelCommandRequest &msg) override
virtual void time_command(const TimeCommandRequest &msg)=0
virtual void subscribe_voice_assistant(const SubscribeVoiceAssistantRequest &msg)=0
void on_bluetooth_gatt_get_services_request(const BluetoothGATTGetServicesRequest &msg) override
virtual void cover_command(const CoverCommandRequest &msg)=0
virtual void bluetooth_scanner_set_mode(const BluetoothScannerSetModeRequest &msg)=0
virtual void update_command(const UpdateCommandRequest &msg)=0
virtual void subscribe_states(const SubscribeStatesRequest &msg)=0
virtual void switch_command(const SwitchCommandRequest &msg)=0
void on_bluetooth_gatt_read_request(const BluetoothGATTReadRequest &msg) override
virtual void datetime_command(const DateTimeCommandRequest &msg)=0
void on_bluetooth_scanner_set_mode_request(const BluetoothScannerSetModeRequest &msg) override
void on_date_command_request(const DateCommandRequest &msg) override
void on_time_command_request(const TimeCommandRequest &msg) override
virtual void bluetooth_gatt_write_descriptor(const BluetoothGATTWriteDescriptorRequest &msg)=0
virtual void subscribe_homeassistant_services(const SubscribeHomeassistantServicesRequest &msg)=0
void on_disconnect_request(const DisconnectRequest &msg) override
virtual void date_command(const DateCommandRequest &msg)=0
void on_voice_assistant_configuration_request(const VoiceAssistantConfigurationRequest &msg) override
void on_cover_command_request(const CoverCommandRequest &msg) override
void on_valve_command_request(const ValveCommandRequest &msg) override
void on_light_command_request(const LightCommandRequest &msg) override
virtual void alarm_control_panel_command(const AlarmControlPanelCommandRequest &msg)=0
virtual bool send_hello_response(const HelloRequest &msg)=0
virtual void media_player_command(const MediaPlayerCommandRequest &msg)=0
void on_voice_assistant_set_configuration(const VoiceAssistantSetConfiguration &msg) override
void on_bluetooth_device_request(const BluetoothDeviceRequest &msg) override
void on_bluetooth_gatt_read_descriptor_request(const BluetoothGATTReadDescriptorRequest &msg) override
void on_subscribe_states_request(const SubscribeStatesRequest &msg) override
void on_authentication_request(const AuthenticationRequest &msg) override
void on_bluetooth_gatt_write_descriptor_request(const BluetoothGATTWriteDescriptorRequest &msg) override
virtual void subscribe_bluetooth_le_advertisements(const SubscribeBluetoothLEAdvertisementsRequest &msg)=0
virtual void zwave_proxy_request(const ZWaveProxyRequest &msg)=0
virtual bool send_disconnect_response(const DisconnectRequest &msg)=0
void on_noise_encryption_set_key_request(const NoiseEncryptionSetKeyRequest &msg) override
void on_switch_command_request(const SwitchCommandRequest &msg) override
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:374
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1825
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2046
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1952
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1991
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2254
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1683
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1320
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1400
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:697
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2674
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2874
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:459
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:407
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:420
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1264
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:760
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1193
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:333
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1162
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:835
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:581
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1645
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1752
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1047
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1478
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:433
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:446
void decode(const uint8_t *buffer, size_t length)
Definition proto.cpp:10
std::string dump() const
Definition proto.cpp:80
virtual void on_fatal_error()=0
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1530
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1583
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:1008
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:607
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2271
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:954
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2621
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2728
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2938
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2822
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2412
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2366
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2349
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2322
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2512
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2956
static constexpr uint8_t MESSAGE_TYPE
Definition api_pb2.h:2974