add grpc support
This commit is contained in:
63
proto/weather/weather.proto
Normal file
63
proto/weather/weather.proto
Normal file
@ -0,0 +1,63 @@
|
||||
syntax = "proto3";
|
||||
package ambient.weather;
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option go_package = "gitea.libretechconsulting.com/rmcguire/ambient-local-exporter/api/v1alpha1/weather";
|
||||
|
||||
message GetWeatherRequest {
|
||||
GetWeatherOpts opts = 1;
|
||||
}
|
||||
|
||||
message GetWeatherResponse{
|
||||
google.protobuf.Timestamp last_updated = 1;
|
||||
repeated WeatherUpdate weather_updates = 2;
|
||||
}
|
||||
|
||||
message GetWeatherOpts {
|
||||
optional string station_name = 1;
|
||||
optional string station_type = 2;
|
||||
}
|
||||
|
||||
message WeatherUpdate {
|
||||
string station_name = 1;
|
||||
string station_type = 2;
|
||||
string station_id = 3;
|
||||
optional double temp_outdoor_f = 4;
|
||||
optional double temp_indoor_f = 5;
|
||||
optional int32 humidity_outdoor = 6;
|
||||
optional int32 humidity_indoor = 7;
|
||||
optional double wind_speed_mph = 8;
|
||||
optional double wind_gust_mph = 9;
|
||||
optional double max_daily_gust = 10;
|
||||
optional int32 wind_dir = 11;
|
||||
optional int32 wind_dir_avg_10m = 12;
|
||||
optional int32 uv = 13;
|
||||
optional double solar_radiation = 14;
|
||||
optional double hourly_rain_in = 15;
|
||||
optional double event_rain_in = 16;
|
||||
optional double daily_rain_in = 17;
|
||||
optional double weekly_rain_in = 18;
|
||||
optional double monthly_rain_in = 19;
|
||||
optional double yearly_rain_in = 20;
|
||||
optional double total_rain_in = 21;
|
||||
repeated BatteryStatus batteries = 22;
|
||||
optional double barom_relative_in = 23;
|
||||
optional double barom_absolute_in = 24;
|
||||
optional double dew_point_f = 25;
|
||||
optional double wind_chill_f = 26;
|
||||
repeated TempHumiditySensor temp_humidity_sensors = 27;
|
||||
}
|
||||
|
||||
// Represents a temperature and humidity sensor
|
||||
message TempHumiditySensor {
|
||||
string name = 1;
|
||||
optional double temp_f = 2;
|
||||
optional int32 humidity = 3;
|
||||
}
|
||||
|
||||
// Represents battery status for different components
|
||||
message BatteryStatus {
|
||||
string component = 1;
|
||||
optional int32 status = 2;
|
||||
}
|
Reference in New Issue
Block a user