Skip to content

Commit

Permalink
Merge pull request #560 from meshtastic/stats
Browse files Browse the repository at this point in the history
Local device mesh stats container
  • Loading branch information
thebentern authored Aug 16, 2024
2 parents 06d7ca5 + ceb1170 commit 4eb4f42
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
5 changes: 4 additions & 1 deletion meshtastic/telemetry.options
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
# https://jpa.kapsi.fi/nanopb/docs/reference.html#proto-file-options

*EnvironmentMetrics.iaq int_size:16
*EnvironmentMetrics.wind_direction int_size:16
*EnvironmentMetrics.wind_direction int_size:16

*LocalStats.num_online_nodes int_size:16
*LocalStats.num_total_nodes int_size:16
48 changes: 48 additions & 0 deletions meshtastic/telemetry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,49 @@ message AirQualityMetrics {
optional uint32 particles_100um = 12;
}

/*
* 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 good
*/
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;
}

/*
* Types of Measurements the telemetry module is equipped to handle
*/
Expand Down Expand Up @@ -259,6 +302,11 @@ message Telemetry {
* Power Metrics
*/
PowerMetrics power_metrics = 5;

/*
* Local device mesh statistics
*/
LocalStats local_stats = 6;
}
}

Expand Down

0 comments on commit 4eb4f42

Please sign in to comment.