Merge pull request #128 from meshtastic/feature/telemetry_updates

Feature/telemetry updates
This commit is contained in:
Ben Meadors 2022-03-20 14:40:49 +00:00 committed by GitHub
commit c7bbc04ed3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 65 additions and 32 deletions

View file

@ -24,6 +24,7 @@ option optimize_for = LITE_RUNTIME;
option go_package = "github.com/meshtastic/gomeshproto";
import "portnums.proto";
import "telemetry.proto";
option java_outer_classname = "MeshProtos";
@ -58,11 +59,6 @@ message Position {
*/
int32 altitude = 3;
/*
* 1-100 (0 means not provided)
*/
int32 battery_level = 4;
/*
* 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
@ -985,7 +981,7 @@ message NodeInfo {
* Returns the Signal-to-noise ratio (SNR) of the last received message,
* as measured by the receiver. Return SNR of the last received message in dB
*/
float snr = 7;
float snr = 4;
/*
* TODO: REMOVE/INTEGRATE
@ -1017,7 +1013,11 @@ message NodeInfo {
/*
* Set to indicate the last time we received a packet from this node
*/
fixed32 last_heard = 4;
fixed32 last_heard = 5;
/*
* The latest telemetry data for the node.
*/
Telemetry telemetry = 6;
}
/*

View file

@ -755,51 +755,54 @@ message RadioConfig {
* TODO: REPLACE
*/
enum TelemetrySensorType {
/*
* No external telemetry sensor
*/
None = 0;
/*
* TODO: REPLACE
*/
DHT11 = 1;
/*
* TODO: REPLACE
*/
DHT11 = 0;
DS18B20 = 2;
/*
* TODO: REPLACE
*/
DS18B20 = 1;
DHT12 = 3;
/*
* TODO: REPLACE
*/
DHT12 = 2;
DHT21 = 4;
/*
* TODO: REPLACE
*/
DHT21 = 3;
DHT22 = 5;
/*
* TODO: REPLACE
*/
DHT22 = 4;
BME280 = 6;
/*
* TODO: REPLACE
*/
BME280 = 5;
BME680 = 7;
/*
* TODO: REPLACE
*/
BME680 = 6;
MCP9808 = 8;
/*
* TODO: REPLACE
*/
MCP9808 = 7;
/*
* TODO: REPLACE
*/
SHTC3 = 8;
SHTC3 = 9;
};
/*

View file

@ -7,32 +7,62 @@ option go_package = "github.com/meshtastic/gomeshproto";
message Telemetry {
/*
* TODO: REPLACE
* 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
*/
float temperature = 1;
fixed32 time = 1;
/*
* TODO: REPLACE
* 1-100 (0 means powered)
*/
float relative_humidity = 2;
int32 battery_level = 2;
/*
* TODO: REPLACE
* Utilization for the current channel, including well formed TX, RX and malformed RX (aka noise).
*/
float barometric_pressure = 3;
float channel_utilization = 3;
/*
* Percent of airtime for transmission used within the last hour.
*/
float air_util_tx = 4;
/*
* TODO: REPLACE
* This is sent by node only if it a router and if hop_limit is set to 0
* and is not being sent as a reliable message.
*/
float gas_resistance = 4;
bool router_heartbeat = 5;
/*
* TODO: REPLACE
* Temperature measured
*/
float voltage = 5;
float temperature = 6;
/*
* TODO: REPLACE
* Relative humidity percent measured
*/
float current = 6;
float relative_humidity = 7;
/*
* Barometric pressure in hPA measured
*/
float barometric_pressure = 8;
/*
* Gas resistance in mOhm measured
*/
float gas_resistance = 9;
/*
* Voltage measured
*/
float voltage = 10;
/*
* Current measured
*/
float current = 11;
}