Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add health telemetry #590

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = 11;

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

/*
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;
Comment on lines +285 to +288
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably have this comment list units, but I'm guessing percentage given the int_size of 8?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was my assumption


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