2021-01-18 02:13:59 +00:00
|
|
|
syntax = "proto3";
|
2022-03-26 19:09:18 +00:00
|
|
|
|
|
|
|
option java_package = "com.geeksville.mesh";
|
|
|
|
option optimize_for = LITE_RUNTIME;
|
2021-05-24 00:31:38 +00:00
|
|
|
option go_package = "github.com/meshtastic/gomeshproto";
|
2021-01-18 02:13:59 +00:00
|
|
|
|
2022-03-26 19:09:18 +00:00
|
|
|
option java_outer_classname = "TelemetryProtos";
|
|
|
|
|
2022-02-21 07:48:42 +00:00
|
|
|
/*
|
2022-03-26 19:09:18 +00:00
|
|
|
* Key native device metrics such as battery level
|
2022-02-21 07:48:42 +00:00
|
|
|
*/
|
2022-03-26 19:09:18 +00:00
|
|
|
message DeviceMetrics {
|
2022-03-18 22:24:20 +00:00
|
|
|
/*
|
2022-03-26 19:09:18 +00:00
|
|
|
* 1-100 (0 means powered)
|
2022-03-04 12:46:12 +00:00
|
|
|
*/
|
2022-03-26 19:09:18 +00:00
|
|
|
uint32 battery_level = 1;
|
|
|
|
|
2022-03-18 22:24:20 +00:00
|
|
|
/*
|
2022-03-26 19:09:18 +00:00
|
|
|
* Voltage measured
|
2022-03-04 12:46:12 +00:00
|
|
|
*/
|
2022-03-26 19:30:35 +00:00
|
|
|
float voltage = 2;
|
2022-03-04 12:46:12 +00:00
|
|
|
|
2022-03-18 22:24:20 +00:00
|
|
|
/*
|
2022-03-04 12:50:29 +00:00
|
|
|
* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise).
|
|
|
|
*/
|
|
|
|
float channel_utilization = 3;
|
2022-03-26 19:09:18 +00:00
|
|
|
|
2022-03-04 12:50:29 +00:00
|
|
|
/*
|
|
|
|
* Percent of airtime for transmission used within the last hour.
|
|
|
|
*/
|
|
|
|
float air_util_tx = 4;
|
2022-03-26 19:09:18 +00:00
|
|
|
}
|
2022-03-04 12:46:12 +00:00
|
|
|
|
2022-03-26 19:09:18 +00:00
|
|
|
/*
|
|
|
|
* Weather station or other environmental metrics
|
|
|
|
*/
|
|
|
|
message EnvironmentMetrics {
|
2022-02-21 07:48:42 +00:00
|
|
|
/*
|
2022-03-19 13:50:56 +00:00
|
|
|
* Temperature measured
|
2022-02-21 07:48:42 +00:00
|
|
|
*/
|
2022-03-26 19:09:18 +00:00
|
|
|
float temperature = 1;
|
2022-02-21 07:48:42 +00:00
|
|
|
|
|
|
|
/*
|
2022-03-19 13:50:56 +00:00
|
|
|
* Relative humidity percent measured
|
2022-02-21 07:48:42 +00:00
|
|
|
*/
|
2022-03-26 19:09:18 +00:00
|
|
|
float relative_humidity = 2;
|
2022-02-21 07:48:42 +00:00
|
|
|
|
|
|
|
/*
|
2022-03-19 13:50:56 +00:00
|
|
|
* Barometric pressure in hPA measured
|
2022-02-21 07:48:42 +00:00
|
|
|
*/
|
2022-03-26 19:09:18 +00:00
|
|
|
float barometric_pressure = 3;
|
2022-02-21 07:48:42 +00:00
|
|
|
|
|
|
|
/*
|
2022-03-19 13:50:56 +00:00
|
|
|
* Gas resistance in mOhm measured
|
2022-02-21 07:48:42 +00:00
|
|
|
*/
|
2022-03-26 19:09:18 +00:00
|
|
|
float gas_resistance = 4;
|
2022-02-21 07:48:42 +00:00
|
|
|
|
|
|
|
/*
|
2022-03-19 13:50:56 +00:00
|
|
|
* Voltage measured
|
2022-02-21 07:48:42 +00:00
|
|
|
*/
|
2022-03-26 19:41:53 +00:00
|
|
|
float voltage = 5;
|
2022-02-21 07:48:42 +00:00
|
|
|
|
|
|
|
/*
|
2022-03-19 13:50:56 +00:00
|
|
|
* Current measured
|
2022-02-21 07:48:42 +00:00
|
|
|
*/
|
2022-03-26 19:41:53 +00:00
|
|
|
float current = 6;
|
2021-11-30 19:45:01 +00:00
|
|
|
}
|
2022-03-26 19:09:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Types of Measurements the telemetry module is equipped to handle
|
|
|
|
*/
|
|
|
|
message Telemetry {
|
|
|
|
/*
|
|
|
|
* This is usually not sent over the mesh (to save space), but it is sent
|
|
|
|
* from the phone so that the local device can set its RTC If it is sent over
|
|
|
|
* the mesh (because there are devices on the mesh without GPS), it will only
|
|
|
|
* be sent by devices which has a hardware GPS clock (IE Mobile Phone).
|
|
|
|
* seconds since 1970
|
|
|
|
*/
|
|
|
|
fixed32 time = 1;
|
|
|
|
|
|
|
|
oneof variant {
|
|
|
|
/*
|
|
|
|
* Key native device metrics such as battery level
|
|
|
|
*/
|
|
|
|
DeviceMetrics device_metrics = 2;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Weather station or other environmental metrics
|
|
|
|
*/
|
|
|
|
EnvironmentMetrics environment_metrics = 3;
|
|
|
|
}
|
|
|
|
}
|
2022-05-01 19:22:54 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* TODO: REPLACE
|
|
|
|
*/
|
|
|
|
enum TelemetrySensorType {
|
|
|
|
/*
|
2022-06-11 13:45:36 +00:00
|
|
|
* No external telemetry sensor explicitly set
|
2022-05-01 19:22:54 +00:00
|
|
|
*/
|
|
|
|
NotSet = 0;
|
|
|
|
/*
|
2022-06-11 13:45:36 +00:00
|
|
|
* Moderate accuracy temperature
|
2022-05-01 19:22:54 +00:00
|
|
|
*/
|
|
|
|
DHT11 = 1;
|
|
|
|
|
|
|
|
/*
|
2022-06-11 13:45:36 +00:00
|
|
|
* High accuracy temperature
|
2022-05-01 19:22:54 +00:00
|
|
|
*/
|
|
|
|
DS18B20 = 2;
|
|
|
|
|
|
|
|
/*
|
2022-06-11 13:45:36 +00:00
|
|
|
* Moderate accuracy temperature and humidity
|
2022-05-01 19:22:54 +00:00
|
|
|
*/
|
|
|
|
DHT12 = 3;
|
|
|
|
|
|
|
|
/*
|
2022-06-11 13:45:36 +00:00
|
|
|
* Moderate accuracy temperature and humidity
|
2022-05-01 19:22:54 +00:00
|
|
|
*/
|
|
|
|
DHT21 = 4;
|
|
|
|
|
|
|
|
/*
|
2022-06-11 13:45:36 +00:00
|
|
|
* Moderate accuracy temperature and humidity
|
2022-05-01 19:22:54 +00:00
|
|
|
*/
|
|
|
|
DHT22 = 5;
|
|
|
|
|
|
|
|
/*
|
2022-06-11 13:45:36 +00:00
|
|
|
* High accuracy temperature, pressure, humidity
|
2022-05-01 19:22:54 +00:00
|
|
|
*/
|
|
|
|
BME280 = 6;
|
|
|
|
|
|
|
|
/*
|
2022-06-11 13:45:36 +00:00
|
|
|
* High accuracy temperature, pressure, humidity, and air resistance
|
2022-05-01 19:22:54 +00:00
|
|
|
*/
|
|
|
|
BME680 = 7;
|
|
|
|
|
|
|
|
/*
|
2022-06-11 13:45:36 +00:00
|
|
|
* Very high accuracy temperature
|
2022-05-01 19:22:54 +00:00
|
|
|
*/
|
|
|
|
MCP9808 = 8;
|
|
|
|
|
|
|
|
/*
|
2022-06-11 13:45:36 +00:00
|
|
|
* Moderate accuracy temperature and humidity
|
2022-05-01 19:22:54 +00:00
|
|
|
*/
|
|
|
|
SHTC3 = 9;
|
2022-06-11 13:45:36 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Moderate accuracy current and voltage
|
|
|
|
*/
|
|
|
|
INA260 = 10;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Moderate accuracy current and voltage
|
|
|
|
*/
|
|
|
|
INA219 = 11;
|
2022-05-01 19:22:54 +00:00
|
|
|
};
|