update telemetry proto

This commit is contained in:
liamcottle
2024-12-17 15:47:24 +13:00
parent 1b3d4c9635
commit 58e256de5d

View File

@ -15,27 +15,27 @@ message DeviceMetrics {
/* /*
* 0-100 (>100 means powered) * 0-100 (>100 means powered)
*/ */
uint32 battery_level = 1; optional uint32 battery_level = 1;
/* /*
* Voltage measured * Voltage measured
*/ */
float voltage = 2; optional float voltage = 2;
/* /*
* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise). * Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise).
*/ */
float channel_utilization = 3; optional float channel_utilization = 3;
/* /*
* Percent of airtime for transmission used within the last hour. * Percent of airtime for transmission used within the last hour.
*/ */
float air_util_tx = 4; optional float air_util_tx = 4;
/* /*
* How long the device has been running since the last reboot (in seconds) * How long the device has been running since the last reboot (in seconds)
*/ */
uint32 uptime_seconds = 5; optional uint32 uptime_seconds = 5;
} }
/* /*
@ -45,38 +45,95 @@ message EnvironmentMetrics {
/* /*
* Temperature measured * Temperature measured
*/ */
float temperature = 1; optional float temperature = 1;
/* /*
* Relative humidity percent measured * Relative humidity percent measured
*/ */
float relative_humidity = 2; optional float relative_humidity = 2;
/* /*
* Barometric pressure in hPA measured * Barometric pressure in hPA measured
*/ */
float barometric_pressure = 3; optional float barometric_pressure = 3;
/* /*
* Gas resistance in MOhm measured * Gas resistance in MOhm measured
*/ */
float gas_resistance = 4; optional float gas_resistance = 4;
/* /*
* Voltage measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) * Voltage measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x)
*/ */
float voltage = 5; optional float voltage = 5;
/* /*
* Current measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x) * Current measured (To be depreciated in favor of PowerMetrics in Meshtastic 3.x)
*/ */
float current = 6; optional float current = 6;
/* /*
* relative scale IAQ value as measured by Bosch BME680 . value 0-500. * 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. * Belongs to Air Quality but is not particle but VOC measurement. Other VOC values can also be put in here.
*/ */
uint32 iaq = 7; optional uint32 iaq = 7;
/*
* RCWL9620 Doppler Radar Distance Sensor, used for water level detection. Float value in mm.
*/
optional float distance = 8;
/*
* VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor.
*/
optional float lux = 9;
/*
* VEML7700 high accuracy white light(irradiance) not calibrated digital 16-bit resolution sensor.
*/
optional float white_lux = 10;
/*
* Infrared lux
*/
optional float ir_lux = 11;
/*
* Ultraviolet lux
*/
optional float uv_lux = 12;
/*
* Wind direction in degrees
* 0 degrees = North, 90 = East, etc...
*/
optional uint32 wind_direction = 13;
/*
* Wind speed in m/s
*/
optional float wind_speed = 14;
/*
* Weight in KG
*/
optional float weight = 15;
/*
* Wind gust in m/s
*/
optional float wind_gust = 16;
/*
* Wind lull in m/s
*/
optional float wind_lull = 17;
/*
* Radiation in µR/h
*/
optional float radiation = 18;
} }
/* /*
@ -86,32 +143,32 @@ message PowerMetrics {
/* /*
* Voltage (Ch1) * Voltage (Ch1)
*/ */
float ch1_voltage = 1; optional float ch1_voltage = 1;
/* /*
* Current (Ch1) * Current (Ch1)
*/ */
float ch1_current = 2; optional float ch1_current = 2;
/* /*
* Voltage (Ch2) * Voltage (Ch2)
*/ */
float ch2_voltage = 3; optional float ch2_voltage = 3;
/* /*
* Current (Ch2) * Current (Ch2)
*/ */
float ch2_current = 4; optional float ch2_current = 4;
/* /*
* Voltage (Ch3) * Voltage (Ch3)
*/ */
float ch3_voltage = 5; optional float ch3_voltage = 5;
/* /*
* Current (Ch3) * Current (Ch3)
*/ */
float ch3_current = 6; optional float ch3_current = 6;
} }
/* /*
@ -121,62 +178,147 @@ message AirQualityMetrics {
/* /*
* Concentration Units Standard PM1.0 * Concentration Units Standard PM1.0
*/ */
uint32 pm10_standard = 1; optional uint32 pm10_standard = 1;
/* /*
* Concentration Units Standard PM2.5 * Concentration Units Standard PM2.5
*/ */
uint32 pm25_standard = 2; optional uint32 pm25_standard = 2;
/* /*
* Concentration Units Standard PM10.0 * Concentration Units Standard PM10.0
*/ */
uint32 pm100_standard = 3; optional uint32 pm100_standard = 3;
/* /*
* Concentration Units Environmental PM1.0 * Concentration Units Environmental PM1.0
*/ */
uint32 pm10_environmental = 4; optional uint32 pm10_environmental = 4;
/* /*
* Concentration Units Environmental PM2.5 * Concentration Units Environmental PM2.5
*/ */
uint32 pm25_environmental = 5; optional uint32 pm25_environmental = 5;
/* /*
* Concentration Units Environmental PM10.0 * Concentration Units Environmental PM10.0
*/ */
uint32 pm100_environmental = 6; optional uint32 pm100_environmental = 6;
/* /*
* 0.3um Particle Count * 0.3um Particle Count
*/ */
uint32 particles_03um = 7; optional uint32 particles_03um = 7;
/* /*
* 0.5um Particle Count * 0.5um Particle Count
*/ */
uint32 particles_05um = 8; optional uint32 particles_05um = 8;
/* /*
* 1.0um Particle Count * 1.0um Particle Count
*/ */
uint32 particles_10um = 9; optional uint32 particles_10um = 9;
/* /*
* 2.5um Particle Count * 2.5um Particle Count
*/ */
uint32 particles_25um = 10; optional uint32 particles_25um = 10;
/* /*
* 5.0um Particle Count * 5.0um Particle Count
*/ */
uint32 particles_50um = 11; optional uint32 particles_50um = 11;
/* /*
* 10.0um Particle Count * 10.0um Particle Count
*/ */
uint32 particles_100um = 12; optional uint32 particles_100um = 12;
/*
* 10.0um Particle Count
*/
optional uint32 co2 = 13;
}
/*
* Local device mesh statistics
*/
message LocalStats {
/*
* How long the device has been running since the last reboot (in seconds)
*/
uint32 uptime_seconds = 1;
/*
* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise).
*/
float channel_utilization = 2;
/*
* Percent of airtime for transmission used within the last hour.
*/
float air_util_tx = 3;
/*
* Number of packets sent
*/
uint32 num_packets_tx = 4;
/*
* Number of packets received (both good and bad)
*/
uint32 num_packets_rx = 5;
/*
* Number of packets received that are malformed or violate the protocol
*/
uint32 num_packets_rx_bad = 6;
/*
* Number of nodes online (in the past 2 hours)
*/
uint32 num_online_nodes = 7;
/*
* Number of nodes total
*/
uint32 num_total_nodes = 8;
/*
* Number of received packets that were duplicates (due to multiple nodes relaying).
* If this number is high, there are nodes in the mesh relaying packets when it's unnecessary, for example due to the ROUTER/REPEATER role.
*/
uint32 num_rx_dupe = 9;
/*
* Number of packets we transmitted that were a relay for others (not originating from ourselves).
*/
uint32 num_tx_relay = 10;
/*
* Number of times we canceled a packet to be relayed, because someone else did it before us.
* This will always be zero for ROUTERs/REPEATERs. If this number is high, some other node(s) is/are relaying faster than you.
*/
uint32 num_tx_relay_canceled = 11;
}
/*
* Health telemetry metrics
*/
message HealthMetrics {
/*
* Heart rate (beats per minute)
*/
optional uint32 heart_bpm = 1;
/*
* SpO2 (blood oxygen saturation) level
*/
optional uint32 spO2 = 2;
/*
* Body temperature in degrees Celsius
*/
optional float temperature = 3;
} }
/* /*
@ -208,6 +350,16 @@ message Telemetry {
* Power Metrics * Power Metrics
*/ */
PowerMetrics power_metrics = 5; PowerMetrics power_metrics = 5;
/*
* Local device mesh statistics
*/
LocalStats local_stats = 6;
/*
* Health telemetry metrics
*/
HealthMetrics health_metrics = 7;
} }
} }
@ -294,4 +446,115 @@ enum TelemetrySensorType {
* BMP085/BMP180 High accuracy temperature and pressure (older Version of BMP280) * BMP085/BMP180 High accuracy temperature and pressure (older Version of BMP280)
*/ */
BMP085 = 15; BMP085 = 15;
/*
* RCWL-9620 Doppler Radar Distance Sensor, used for water level detection
*/
RCWL9620 = 16;
/*
* Sensirion High accuracy temperature and humidity
*/
SHT4X = 17;
/*
* VEML7700 high accuracy ambient light(Lux) digital 16-bit resolution sensor.
*/
VEML7700 = 18;
/*
* 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;
/*
* NAU7802 Scale Chip or compatible
*/
NAU7802 = 25;
/*
* BMP3XX High accuracy temperature and pressure
*/
BMP3XX = 26;
/*
* ICM-20948 9-Axis digital motion processor
*/
ICM20948 = 27;
/*
* MAX17048 1S lipo battery sensor (voltage, state of charge, time to go)
*/
MAX17048 = 28;
/*
* Custom I2C sensor implementation based on https://github.com/meshtastic/i2c-sensor
*/
CUSTOM_SENSOR = 29;
/*
* MAX30102 Pulse Oximeter and Heart-Rate Sensor
*/
MAX30102 = 30;
/*
* MLX90614 non-contact IR temperature sensor
*/
MLX90614 = 31;
/*
* SCD40/SCD41 CO2, humidity, temperature sensor
*/
SCD4X = 32;
/*
* ClimateGuard RadSens, radiation, Geiger-Muller Tube
*/
RADSENS = 33;
/*
* High accuracy current and voltage
*/
INA226 = 34;
}
/*
* 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;
} }