Skip to content

Commit

Permalink
Add health telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
thebentern committed Oct 2, 2024
1 parent 61d7ca6 commit 94ef58c
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
12 changes: 12 additions & 0 deletions meshtastic/module_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,18 @@ message ModuleConfig {
* air quality metrics to the mesh
*/
bool power_screen_enabled = 10;

/*
* Preferences for the (Health) Telemetry Module
* Enable/Disable the telemetry measurement module measurement collection
*/
bool health_measurement_enabled = 3;

Check failure on line 587 in meshtastic/module_config.proto

View workflow job for this annotation

GitHub Actions / build

message meshtastic.ModuleConfig.TelemetryConfig: fields environment_measurement_enabled and health_measurement_enabled both have the same tag 3

/*
* Interval in seconds of how often we should try to send our
* health metrics to the mesh
*/
uint32 health_update_interval = 2;

Check failure on line 593 in meshtastic/module_config.proto

View workflow job for this annotation

GitHub Actions / build

message meshtastic.ModuleConfig.TelemetryConfig: fields environment_update_interval and health_update_interval both have the same tag 2
}

/*
Expand Down
3 changes: 3 additions & 0 deletions meshtastic/telemetry.options
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@

*LocalStats.num_online_nodes int_size:16
*LocalStats.num_total_nodes int_size:16

*HealthMetrics.heart_bpm int_size:8
*HealthMetrics.spO2 int_size:8
30 changes: 30 additions & 0 deletions meshtastic/telemetry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,26 @@ message LocalStats {
uint32 num_total_nodes = 8;
}

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

/*
* Types of Measurements the telemetry module is equipped to handle
*/
Expand Down Expand Up @@ -307,6 +327,11 @@ message Telemetry {
* Local device mesh statistics
*/
LocalStats local_stats = 6;

/*
* Health telemetry metrics
*/
HealthMetrics health_metrics = 7;
}
}

Expand Down Expand Up @@ -463,6 +488,11 @@ enum TelemetrySensorType {
* Custom I2C sensor implementation based on https://github.com/meshtastic/i2c-sensor
*/
CUSTOM_SENSOR = 29;

/*
* MAX30102 Pulse Oximeter and Heart-Rate Sensor
*/
MAX30102 = 30;
}

/*
Expand Down

0 comments on commit 94ef58c

Please sign in to comment.