meshtastic-protobuf/meshtastic/telemetry.proto

404 wiersze
7.0 KiB
Protocol Buffer
Czysty Zwykły widok Historia

syntax = "proto3";
2022-03-26 19:09:18 +00:00
2023-01-17 11:03:10 +00:00
package meshtastic;
2022-12-06 16:14:04 +00:00
option csharp_namespace = "Meshtastic.Protobufs";
2023-05-20 09:29:34 +00:00
option go_package = "github.com/meshtastic/go/generated";
option java_outer_classname = "TelemetryProtos";
option java_package = "com.geeksville.mesh";
2023-01-21 15:26:47 +00:00
option swift_prefix = "";
2022-03-26 19:09:18 +00:00
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
/*
2023-03-09 18:52:46 +00:00
* 0-100 (>100 means powered)
2022-03-04 12:46:12 +00:00
*/
2022-03-26 19:09:18 +00:00
uint32 battery_level = 1;
2023-05-20 09:29:34 +00:00
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;
2023-05-20 09:29:34 +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;
2024-04-10 12:07:37 +00:00
/*
* How long the device has been running since the last reboot (in seconds)
*/
uint32 uptime_seconds = 5;
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
/*
2023-07-13 18:29:57 +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
/*
* Voltage measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x)
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
/*
* Current measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x)
2022-02-21 07:48:42 +00:00
*/
2022-03-26 19:41:53 +00:00
float current = 6;
/*
* relative scale IAQ value as measured by Bosch BME680 . value 0-500.
* Belongs to Air Quality but is not particle but VOC measurement. Other VOC values can also be put in here.
*/
uint32 iaq = 7;
2024-04-20 14:20:28 +00:00
/*
* RCWL9620 Doppler Radar Distance Sensor, used for water level detection. Float value in mm.
*/
2024-04-20 14:54:41 +00:00
float distance = 8;
/*
* VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor.
*/
float lux = 9;
/*
* VEML7700 high accuracy white light(irradiance) not calibrated digital 16-bit resolution sensor.
*/
float white_lux = 10;
/*
* Infrared lux
*/
float ir_lux = 11;
/*
* Ultraviolet lux
*/
float uv_lux = 12;
/*
* Wind direction in degrees
* 0 degrees = North, 90 = East, etc...
*/
uint32 wind_direction = 13;
/*
* Wind speed in m/s
*/
float wind_speed = 14;
2024-06-13 14:08:34 +00:00
/*
* Weight in KG
*/
float weight = 15;
}
2022-03-26 19:09:18 +00:00
/*
* Power Metrics (voltage / current / etc)
*/
message PowerMetrics {
/*
* Voltage (Ch1)
*/
float ch1_voltage = 1;
/*
* Current (Ch1)
*/
float ch1_current = 2;
/*
* Voltage (Ch2)
*/
float ch2_voltage = 3;
/*
* Current (Ch2)
*/
float ch2_current = 4;
/*
* Voltage (Ch3)
*/
float ch3_voltage = 5;
/*
* Current (Ch3)
*/
float ch3_current = 6;
}
2023-02-04 16:02:13 +00:00
/*
* Air quality metrics
*/
2023-05-20 09:29:34 +00:00
message AirQualityMetrics {
2023-02-04 16:02:13 +00:00
/*
* Concentration Units Standard PM1.0
*/
uint32 pm10_standard = 1;
/*
* Concentration Units Standard PM2.5
*/
uint32 pm25_standard = 2;
/*
* Concentration Units Standard PM10.0
*/
uint32 pm100_standard = 3;
/*
* Concentration Units Environmental PM1.0
*/
uint32 pm10_environmental = 4;
/*
* Concentration Units Environmental PM2.5
*/
uint32 pm25_environmental = 5;
/*
* Concentration Units Environmental PM10.0
*/
uint32 pm100_environmental = 6;
/*
* 0.3um Particle Count
*/
uint32 particles_03um = 7;
/*
* 0.5um Particle Count
*/
uint32 particles_05um = 8;
/*
* 1.0um Particle Count
*/
uint32 particles_10um = 9;
/*
* 2.5um Particle Count
*/
uint32 particles_25um = 10;
/*
* 5.0um Particle Count
*/
uint32 particles_50um = 11;
/*
* 10.0um Particle Count
*/
uint32 particles_100um = 12;
}
2022-03-26 19:09:18 +00:00
/*
* Types of Measurements the telemetry module is equipped to handle
*/
message Telemetry {
/*
2023-09-12 18:42:57 +00:00
* Seconds since 1970 - or 0 for unknown/unset
2022-03-26 19:09:18 +00:00
*/
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;
2023-02-04 16:02:13 +00:00
/*
* Air quality metrics
*/
AirQualityMetrics air_quality_metrics = 4;
/*
2024-03-29 09:23:22 +00:00
* Power Metrics
*/
PowerMetrics power_metrics = 5;
2022-03-26 19:09:18 +00:00
}
}
/*
2023-05-20 09:29:34 +00:00
* Supported I2C Sensors for telemetry in Meshtastic
*/
enum TelemetrySensorType {
/*
2023-05-20 09:29:34 +00:00
* No external telemetry sensor explicitly set
*/
SENSOR_UNSET = 0;
/*
2023-05-20 09:29:34 +00:00
* High accuracy temperature, pressure, humidity
*/
2022-07-29 16:10:26 +00:00
BME280 = 1;
/*
2023-05-20 09:29:34 +00:00
* High accuracy temperature, pressure, humidity, and air resistance
*/
2022-07-29 16:10:26 +00:00
BME680 = 2;
/*
2023-05-20 09:29:34 +00:00
* Very high accuracy temperature
*/
2022-07-29 16:10:26 +00:00
MCP9808 = 3;
2022-06-11 13:45:36 +00:00
/*
2023-05-20 09:29:34 +00:00
* Moderate accuracy current and voltage
*/
2022-07-29 16:10:26 +00:00
INA260 = 4;
2022-06-11 13:45:36 +00:00
/*
2023-05-20 09:29:34 +00:00
* Moderate accuracy current and voltage
*/
2022-07-29 16:10:26 +00:00
INA219 = 5;
2022-07-31 12:42:17 +00:00
/*
2023-05-20 09:29:34 +00:00
* High accuracy temperature and pressure
*/
2022-07-31 12:42:17 +00:00
BMP280 = 6;
2022-09-10 19:21:53 +00:00
/*
2023-05-20 09:29:34 +00:00
* High accuracy temperature and humidity
*/
2022-09-10 19:21:53 +00:00
SHTC3 = 7;
2023-05-20 09:29:34 +00:00
2022-09-10 19:21:53 +00:00
/*
2023-05-20 09:29:34 +00:00
* High accuracy pressure
*/
2022-09-10 19:21:53 +00:00
LPS22 = 8;
/*
2023-05-20 09:29:34 +00:00
* 3-Axis magnetic sensor
*/
QMC6310 = 9;
/*
2023-05-20 09:29:34 +00:00
* 6-Axis inertial measurement sensor
*/
QMI8658 = 10;
2023-05-20 09:29:34 +00:00
2022-11-12 09:59:54 +00:00
/*
2023-05-20 09:29:34 +00:00
* 3-Axis magnetic sensor
*/
2022-11-12 09:59:54 +00:00
QMC5883L = 11;
2022-12-25 15:35:10 +00:00
/*
2023-05-20 09:29:34 +00:00
* High accuracy temperature and humidity
*/
2022-12-25 15:35:10 +00:00
SHT31 = 12;
2023-02-04 16:02:13 +00:00
/*
* PM2.5 air quality sensor
*/
PMSA003I = 13;
/*
* INA3221 3 Channel Voltage / Current Sensor
*/
INA3221 = 14;
2024-03-02 21:29:28 +00:00
/*
* BMP085/BMP180 High accuracy temperature and pressure (older Version of BMP280)
*/
BMP085 = 15;
2024-04-20 14:20:28 +00:00
/*
* RCWL-9620 Doppler Radar Distance Sensor, used for water level detection
*/
RCWL9620 = 16;
/*
* Sensirion High accuracy temperature and humidity
*/
SHT4X = 17;
2024-05-15 12:07:22 +00:00
/*
* VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor.
*/
VEML7700 = 18;
2024-05-15 12:07:22 +00:00
/*
* MLX90632 non-contact IR temperature sensor.
*/
MLX90632 = 19;
/*
* TI OPT3001 Ambient Light Sensor
*/
OPT3001 = 20;
/*
* Lite On LTR-390UV-01 UV Light Sensor
*/
LTR390UV = 21;
/*
* AMS TSL25911FN RGB Light Sensor
*/
TSL25911FN = 22;
/*
* AHT10 Integrated temperature and humidity sensor
*/
AHT10 = 23;
/*
* DFRobot Lark Weather station (temperature, humidity, pressure, wind speed and direction)
*/
DFROBOT_LARK = 24;
2024-06-13 12:39:08 +00:00
/*
* NAU7802 Scale Chip or compatible
*/
NAU7802 = 25;
}
/*
* NAU7802 Telemetry configuration, for saving to flash
*/
message Nau7802Config {
/*
* The offset setting for the NAU7802
*/
int32 zeroOffset = 1;
/*
* The calibration factor for the NAU7802
*/
float calibrationFactor = 2;
}