mirror of
https://github.com/esphome/esphome.git
synced 2025-09-02 03:12:20 +01:00
renaming
This commit is contained in:
@@ -70,8 +70,8 @@ service APIConnection {
|
|||||||
|
|
||||||
rpc alarm_control_panel_command (AlarmControlPanelCommandRequest) returns (void) {}
|
rpc alarm_control_panel_command (AlarmControlPanelCommandRequest) returns (void) {}
|
||||||
|
|
||||||
rpc zwave_proxy_read(ZWaveProxyReadRequest) returns (void) {}
|
rpc zwave_proxy_from_device(ZWaveProxyFromDeviceRequest) returns (void) {}
|
||||||
rpc zwave_proxy_write(ZWaveProxyWriteRequest) returns (void) {}
|
rpc zwave_proxy_to_device(ZWaveProxyToDeviceRequest) returns (void) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2284,14 +2284,14 @@ message UpdateCommandRequest {
|
|||||||
|
|
||||||
// ==================== Z-WAVE ====================
|
// ==================== Z-WAVE ====================
|
||||||
|
|
||||||
message ZWaveProxyReadRequest {
|
message ZWaveProxyFromDeviceRequest {
|
||||||
option (id) = 128;
|
option (id) = 128;
|
||||||
option (source) = SOURCE_CLIENT;
|
option (source) = SOURCE_CLIENT;
|
||||||
option (ifdef) = "USE_ZWAVE_PROXY";
|
option (ifdef) = "USE_ZWAVE_PROXY";
|
||||||
option (no_delay) = true;
|
option (no_delay) = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ZWaveProxyReadResponse {
|
message ZWaveProxyFromDeviceResponse {
|
||||||
option (id) = 129;
|
option (id) = 129;
|
||||||
option (source) = SOURCE_SERVER;
|
option (source) = SOURCE_SERVER;
|
||||||
option (ifdef) = "USE_ZWAVE_PROXY";
|
option (ifdef) = "USE_ZWAVE_PROXY";
|
||||||
@@ -2300,7 +2300,7 @@ message ZWaveProxyReadResponse {
|
|||||||
string data = 1;
|
string data = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ZWaveProxyWriteRequest {
|
message ZWaveProxyToDeviceRequest {
|
||||||
option (id) = 130;
|
option (id) = 130;
|
||||||
option (source) = SOURCE_CLIENT;
|
option (source) = SOURCE_CLIENT;
|
||||||
option (ifdef) = "USE_ZWAVE_PROXY";
|
option (ifdef) = "USE_ZWAVE_PROXY";
|
||||||
@@ -2309,7 +2309,7 @@ message ZWaveProxyWriteRequest {
|
|||||||
string data = 1;
|
string data = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message ZWaveProxyWriteResponse {
|
message ZWaveProxyToDeviceResponse {
|
||||||
option (id) = 131;
|
option (id) = 131;
|
||||||
option (source) = SOURCE_SERVER;
|
option (source) = SOURCE_SERVER;
|
||||||
option (ifdef) = "USE_ZWAVE_PROXY";
|
option (ifdef) = "USE_ZWAVE_PROXY";
|
||||||
|
@@ -1207,8 +1207,8 @@ void APIConnection::voice_assistant_set_configuration(const VoiceAssistantSetCon
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
void APIConnection::zwave_proxy_read(const ZWaveProxyReadRequest &msg) {}
|
void APIConnection::zwave_proxy_from_device(const ZWaveProxyFromDeviceRequest &msg) {}
|
||||||
void APIConnection::zwave_proxy_write(const ZWaveProxyWriteRequest &msg) {
|
void APIConnection::zwave_proxy_to_device(const ZWaveProxyToDeviceRequest &msg) {
|
||||||
zwave_proxy::global_zwave_proxy->send_frame(msg.data);
|
zwave_proxy::global_zwave_proxy->send_frame(msg.data);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -172,8 +172,8 @@ class APIConnection final : public APIServerConnection {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
void zwave_proxy_read(const ZWaveProxyReadRequest &msg) override;
|
void zwave_proxy_from_device(const ZWaveProxyFromDeviceRequest &msg) override;
|
||||||
void zwave_proxy_write(const ZWaveProxyWriteRequest &msg) override;
|
void zwave_proxy_to_device(const ZWaveProxyToDeviceRequest &msg) override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_ALARM_CONTROL_PANEL
|
#ifdef USE_ALARM_CONTROL_PANEL
|
||||||
|
@@ -3008,9 +3008,9 @@ bool UpdateCommandRequest::decode_32bit(uint32_t field_id, Proto32Bit value) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
void ZWaveProxyReadResponse::encode(ProtoWriteBuffer buffer) const { buffer.encode_string(1, this->data_ref_); }
|
void ZWaveProxyFromDeviceResponse::encode(ProtoWriteBuffer buffer) const { buffer.encode_string(1, this->data_ref_); }
|
||||||
void ZWaveProxyReadResponse::calculate_size(ProtoSize &size) const { size.add_length(1, this->data_ref_.size()); }
|
void ZWaveProxyFromDeviceResponse::calculate_size(ProtoSize &size) const { size.add_length(1, this->data_ref_.size()); }
|
||||||
bool ZWaveProxyWriteRequest::decode_length(uint32_t field_id, ProtoLengthDelimited value) {
|
bool ZWaveProxyToDeviceRequest::decode_length(uint32_t field_id, ProtoLengthDelimited value) {
|
||||||
switch (field_id) {
|
switch (field_id) {
|
||||||
case 1:
|
case 1:
|
||||||
this->data = value.as_string();
|
this->data = value.as_string();
|
||||||
|
@@ -2914,12 +2914,12 @@ class UpdateCommandRequest final : public CommandProtoMessage {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
class ZWaveProxyReadRequest final : public ProtoMessage {
|
class ZWaveProxyFromDeviceRequest final : public ProtoMessage {
|
||||||
public:
|
public:
|
||||||
static constexpr uint8_t MESSAGE_TYPE = 128;
|
static constexpr uint8_t MESSAGE_TYPE = 128;
|
||||||
static constexpr uint8_t ESTIMATED_SIZE = 0;
|
static constexpr uint8_t ESTIMATED_SIZE = 0;
|
||||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||||
const char *message_name() const override { return "z_wave_proxy_read_request"; }
|
const char *message_name() const override { return "z_wave_proxy_from_device_request"; }
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||||
void dump_to(std::string &out) const override;
|
void dump_to(std::string &out) const override;
|
||||||
@@ -2927,12 +2927,12 @@ class ZWaveProxyReadRequest final : public ProtoMessage {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
};
|
};
|
||||||
class ZWaveProxyReadResponse final : public ProtoMessage {
|
class ZWaveProxyFromDeviceResponse final : public ProtoMessage {
|
||||||
public:
|
public:
|
||||||
static constexpr uint8_t MESSAGE_TYPE = 129;
|
static constexpr uint8_t MESSAGE_TYPE = 129;
|
||||||
static constexpr uint8_t ESTIMATED_SIZE = 9;
|
static constexpr uint8_t ESTIMATED_SIZE = 9;
|
||||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||||
const char *message_name() const override { return "z_wave_proxy_read_response"; }
|
const char *message_name() const override { return "z_wave_proxy_from_device_response"; }
|
||||||
#endif
|
#endif
|
||||||
StringRef data_ref_{};
|
StringRef data_ref_{};
|
||||||
void set_data(const StringRef &ref) { this->data_ref_ = ref; }
|
void set_data(const StringRef &ref) { this->data_ref_ = ref; }
|
||||||
@@ -2944,12 +2944,12 @@ class ZWaveProxyReadResponse final : public ProtoMessage {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
};
|
};
|
||||||
class ZWaveProxyWriteRequest final : public ProtoDecodableMessage {
|
class ZWaveProxyToDeviceRequest final : public ProtoDecodableMessage {
|
||||||
public:
|
public:
|
||||||
static constexpr uint8_t MESSAGE_TYPE = 130;
|
static constexpr uint8_t MESSAGE_TYPE = 130;
|
||||||
static constexpr uint8_t ESTIMATED_SIZE = 9;
|
static constexpr uint8_t ESTIMATED_SIZE = 9;
|
||||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||||
const char *message_name() const override { return "z_wave_proxy_write_request"; }
|
const char *message_name() const override { return "z_wave_proxy_to_device_request"; }
|
||||||
#endif
|
#endif
|
||||||
std::string data{};
|
std::string data{};
|
||||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||||
@@ -2959,12 +2959,12 @@ class ZWaveProxyWriteRequest final : public ProtoDecodableMessage {
|
|||||||
protected:
|
protected:
|
||||||
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
|
bool decode_length(uint32_t field_id, ProtoLengthDelimited value) override;
|
||||||
};
|
};
|
||||||
class ZWaveProxyWriteResponse final : public ProtoMessage {
|
class ZWaveProxyToDeviceResponse final : public ProtoMessage {
|
||||||
public:
|
public:
|
||||||
static constexpr uint8_t MESSAGE_TYPE = 131;
|
static constexpr uint8_t MESSAGE_TYPE = 131;
|
||||||
static constexpr uint8_t ESTIMATED_SIZE = 0;
|
static constexpr uint8_t ESTIMATED_SIZE = 0;
|
||||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||||
const char *message_name() const override { return "z_wave_proxy_write_response"; }
|
const char *message_name() const override { return "z_wave_proxy_to_device_response"; }
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||||
void dump_to(std::string &out) const override;
|
void dump_to(std::string &out) const override;
|
||||||
|
@@ -2101,10 +2101,10 @@ void UpdateCommandRequest::dump_to(std::string &out) const {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
void ZWaveProxyReadRequest::dump_to(std::string &out) const { out.append("ZWaveProxyReadRequest {}"); }
|
void ZWaveProxyFromDeviceRequest::dump_to(std::string &out) const { out.append("ZWaveProxyFromDeviceRequest {}"); }
|
||||||
void ZWaveProxyReadResponse::dump_to(std::string &out) const { dump_field(out, "data", this->data_ref_); }
|
void ZWaveProxyFromDeviceResponse::dump_to(std::string &out) const { dump_field(out, "data", this->data_ref_); }
|
||||||
void ZWaveProxyWriteRequest::dump_to(std::string &out) const { dump_field(out, "data", this->data); }
|
void ZWaveProxyToDeviceRequest::dump_to(std::string &out) const { dump_field(out, "data", this->data); }
|
||||||
void ZWaveProxyWriteResponse::dump_to(std::string &out) const { out.append("ZWaveProxyWriteResponse {}"); }
|
void ZWaveProxyToDeviceResponse::dump_to(std::string &out) const { out.append("ZWaveProxyToDeviceResponse {}"); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} // namespace esphome::api
|
} // namespace esphome::api
|
||||||
|
@@ -597,24 +597,24 @@ void APIServerConnectionBase::read_message(uint32_t msg_size, uint32_t msg_type,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
case ZWaveProxyReadRequest::MESSAGE_TYPE: {
|
case ZWaveProxyFromDeviceRequest::MESSAGE_TYPE: {
|
||||||
ZWaveProxyReadRequest msg;
|
ZWaveProxyFromDeviceRequest msg;
|
||||||
// Empty message: no decode needed
|
// Empty message: no decode needed
|
||||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||||
ESP_LOGVV(TAG, "on_z_wave_proxy_read_request: %s", msg.dump().c_str());
|
ESP_LOGVV(TAG, "on_z_wave_proxy_from_device_request: %s", msg.dump().c_str());
|
||||||
#endif
|
#endif
|
||||||
this->on_z_wave_proxy_read_request(msg);
|
this->on_z_wave_proxy_from_device_request(msg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
case ZWaveProxyWriteRequest::MESSAGE_TYPE: {
|
case ZWaveProxyToDeviceRequest::MESSAGE_TYPE: {
|
||||||
ZWaveProxyWriteRequest msg;
|
ZWaveProxyToDeviceRequest msg;
|
||||||
msg.decode(msg_data, msg_size);
|
msg.decode(msg_data, msg_size);
|
||||||
#ifdef HAS_PROTO_MESSAGE_DUMP
|
#ifdef HAS_PROTO_MESSAGE_DUMP
|
||||||
ESP_LOGVV(TAG, "on_z_wave_proxy_write_request: %s", msg.dump().c_str());
|
ESP_LOGVV(TAG, "on_z_wave_proxy_to_device_request: %s", msg.dump().c_str());
|
||||||
#endif
|
#endif
|
||||||
this->on_z_wave_proxy_write_request(msg);
|
this->on_z_wave_proxy_to_device_request(msg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -932,16 +932,16 @@ void APIServerConnection::on_alarm_control_panel_command_request(const AlarmCont
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
void APIServerConnection::on_z_wave_proxy_read_request(const ZWaveProxyReadRequest &msg) {
|
void APIServerConnection::on_z_wave_proxy_from_device_request(const ZWaveProxyFromDeviceRequest &msg) {
|
||||||
if (this->check_authenticated_()) {
|
if (this->check_authenticated_()) {
|
||||||
this->zwave_proxy_read(msg);
|
this->zwave_proxy_from_device(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
void APIServerConnection::on_z_wave_proxy_write_request(const ZWaveProxyWriteRequest &msg) {
|
void APIServerConnection::on_z_wave_proxy_to_device_request(const ZWaveProxyToDeviceRequest &msg) {
|
||||||
if (this->check_authenticated_()) {
|
if (this->check_authenticated_()) {
|
||||||
this->zwave_proxy_write(msg);
|
this->zwave_proxy_to_device(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -207,11 +207,11 @@ class APIServerConnectionBase : public ProtoService {
|
|||||||
virtual void on_update_command_request(const UpdateCommandRequest &value){};
|
virtual void on_update_command_request(const UpdateCommandRequest &value){};
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
virtual void on_z_wave_proxy_read_request(const ZWaveProxyReadRequest &value){};
|
virtual void on_z_wave_proxy_from_device_request(const ZWaveProxyFromDeviceRequest &value){};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
virtual void on_z_wave_proxy_write_request(const ZWaveProxyWriteRequest &value){};
|
virtual void on_z_wave_proxy_to_device_request(const ZWaveProxyToDeviceRequest &value){};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -342,10 +342,10 @@ class APIServerConnection : public APIServerConnectionBase {
|
|||||||
virtual void alarm_control_panel_command(const AlarmControlPanelCommandRequest &msg) = 0;
|
virtual void alarm_control_panel_command(const AlarmControlPanelCommandRequest &msg) = 0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
virtual void zwave_proxy_read(const ZWaveProxyReadRequest &msg) = 0;
|
virtual void zwave_proxy_from_device(const ZWaveProxyFromDeviceRequest &msg) = 0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
virtual void zwave_proxy_write(const ZWaveProxyWriteRequest &msg) = 0;
|
virtual void zwave_proxy_to_device(const ZWaveProxyToDeviceRequest &msg) = 0;
|
||||||
#endif
|
#endif
|
||||||
protected:
|
protected:
|
||||||
void on_hello_request(const HelloRequest &msg) override;
|
void on_hello_request(const HelloRequest &msg) override;
|
||||||
@@ -470,10 +470,10 @@ class APIServerConnection : public APIServerConnectionBase {
|
|||||||
void on_alarm_control_panel_command_request(const AlarmControlPanelCommandRequest &msg) override;
|
void on_alarm_control_panel_command_request(const AlarmControlPanelCommandRequest &msg) override;
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
void on_z_wave_proxy_read_request(const ZWaveProxyReadRequest &msg) override;
|
void on_z_wave_proxy_from_device_request(const ZWaveProxyFromDeviceRequest &msg) override;
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZWAVE_PROXY
|
#ifdef USE_ZWAVE_PROXY
|
||||||
void on_z_wave_proxy_write_request(const ZWaveProxyWriteRequest &msg) override;
|
void on_z_wave_proxy_to_device_request(const ZWaveProxyToDeviceRequest &msg) override;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user