generated from rmcguire/go-server-with-otel
implement econet exporter
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
syntax = "proto3";
|
||||
package econet.v1alpha1;
|
||||
|
||||
import "buf/validate/validate.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "gitea.libretechconsulting.com/rmcguire/econet-exporter/api/econet/v1alpha1";
|
||||
|
||||
// Device is the live state of a single Rheem EcoNet device
|
||||
// (typically a water heater) as reported by the Rheem cloud.
|
||||
message Device {
|
||||
string serial_number = 1;
|
||||
string device_id = 2;
|
||||
string friendly_name = 3;
|
||||
string type = 4; // water_heater, thermostat, unknown
|
||||
string generic_type = 5; // e.g. heatpumpWaterHeater, gasWaterHeater
|
||||
bool connected = 6;
|
||||
int32 wifi_signal = 7; // dB, MQTT-only
|
||||
string mode = 8; // kebab-case, e.g. heat-pump, energy-saving
|
||||
bool enabled = 9;
|
||||
bool running = 10;
|
||||
string running_state = 11;
|
||||
int32 setpoint = 12; // degrees Fahrenheit
|
||||
int32 setpoint_min = 13;
|
||||
int32 setpoint_max = 14;
|
||||
int32 hot_water_availability = 15; // 0/33/66/100, -1 unknown
|
||||
int32 alert_count = 16;
|
||||
bool away = 17;
|
||||
google.protobuf.Timestamp last_updated = 18;
|
||||
}
|
||||
|
||||
message ListDevicesRequest {}
|
||||
|
||||
message ListDevicesResponse {
|
||||
repeated Device devices = 1;
|
||||
}
|
||||
|
||||
message GetDeviceRequest {
|
||||
string serial_number = 1 [(buf.validate.field).string.min_len = 1];
|
||||
}
|
||||
|
||||
message GetDeviceResponse {
|
||||
Device device = 1;
|
||||
}
|
||||
|
||||
// EconetService exposes read-only access to Rheem EcoNet device state.
|
||||
service EconetService {
|
||||
rpc ListDevices(ListDevicesRequest) returns (ListDevicesResponse) {
|
||||
option (google.api.http) = {get: "/v1alpha1/devices"};
|
||||
}
|
||||
rpc GetDevice(GetDeviceRequest) returns (GetDeviceResponse) {
|
||||
option (google.api.http) = {get: "/v1alpha1/devices/{serial_number}"};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user