From ee114d4e89baba458e24bfb4e0d8468a632b4391 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Mon, 28 Jul 2025 12:34:53 +0200 Subject: [PATCH 01/14] Add admin commands for SCDXX CO2 sensors --- meshtastic/admin.proto | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 0259c2a..ef2e25d 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -471,6 +471,11 @@ message AdminMessage { * Tell the node to reset the nodedb. */ int32 nodedb_reset = 100; + + /* + * SCDXX CO2 sensor configuration + */ + SCDXX_config scdxx_config = 102; } } @@ -575,3 +580,30 @@ message KeyVerificationAdmin { */ optional uint32 security_number = 4; } + +message SCDXX_config { + /* + * Set Automatic self-calibration enabled + */ + optional bool set_asc = 1; + + /* + * Recalibration target CO2 concentration in ppm (FRC or ASC) + */ + optional uint32 target_co2_conc = 2; + + /* + * Reference temperature in degC + */ + optional float temperature = 4; + + /* + * Altitude of sensor in meters above sea level. 0 - 3000m (overrides ambient pressure) + */ + optional uint32 altitude = 5; + + /* + * Sensor ambient pressure in Pa. 70000 - 120000 Pa (overrides altitude) + */ + optional uint32 ambient_pressure = 6; +} From e6906159512a5152d398b9765ae0b6f5593846d2 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Mon, 28 Jul 2025 21:52:49 +0200 Subject: [PATCH 02/14] Admin message for different sensor configs --- meshtastic/admin.proto | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index ef2e25d..b329174 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -473,9 +473,9 @@ message AdminMessage { int32 nodedb_reset = 100; /* - * SCDXX CO2 sensor configuration + * Parameters and sensor configuration */ - SCDXX_config scdxx_config = 102; + SensorConfig sensor_config = 102; } } @@ -581,6 +581,13 @@ message KeyVerificationAdmin { optional uint32 security_number = 4; } +message SensorConfig { + /* + * SCDXX CO2 Sensor configuration + */ + SCDXX_config scdxx_config = 1; +} + message SCDXX_config { /* * Set Automatic self-calibration enabled From 27d40f03d2750e4bbc4d167d091b19edd27f0edf Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Tue, 29 Jul 2025 14:27:08 +0200 Subject: [PATCH 03/14] Add factory reset for scdxx --- meshtastic/admin.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index b329174..65e3eac 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -613,4 +613,9 @@ message SCDXX_config { * Sensor ambient pressure in Pa. 70000 - 120000 Pa (overrides altitude) */ optional uint32 ambient_pressure = 6; + + /* + * Perform a factory reset of the sensor + */ + optional bool factory_reset = 7; } From 6a26b23faf7cb4bb221db702ab7b2ab19096dc72 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Fri, 1 Aug 2025 13:38:29 +0200 Subject: [PATCH 04/14] Add low power and change to SCD4X --- meshtastic/admin.proto | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 65e3eac..a981080 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -583,12 +583,12 @@ message KeyVerificationAdmin { message SensorConfig { /* - * SCDXX CO2 Sensor configuration + * SCD4X CO2 Sensor configuration */ - SCDXX_config scdxx_config = 1; + SCD4X_config scd4x_config = 1; } -message SCDXX_config { +message SCD4X_config { /* * Set Automatic self-calibration enabled */ @@ -618,4 +618,9 @@ message SCDXX_config { * Perform a factory reset of the sensor */ optional bool factory_reset = 7; + + /* + * Low Power mode for sensor + */ + optional bool low_power = 8; } From 05eee86c47304f0de859e5a79f9bfda9b0bd4a55 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Mon, 4 Aug 2025 13:23:05 +0200 Subject: [PATCH 05/14] Minor fixes on scd4x_config protobuf --- meshtastic/admin.proto | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index a981080..3d68eea 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -597,22 +597,22 @@ message SCD4X_config { /* * Recalibration target CO2 concentration in ppm (FRC or ASC) */ - optional uint32 target_co2_conc = 2; + optional uint32 set_target_co2_conc = 2; /* * Reference temperature in degC */ - optional float temperature = 4; + optional float set_temperature = 4; /* * Altitude of sensor in meters above sea level. 0 - 3000m (overrides ambient pressure) */ - optional uint32 altitude = 5; + optional uint32 set_altitude = 5; /* * Sensor ambient pressure in Pa. 70000 - 120000 Pa (overrides altitude) */ - optional uint32 ambient_pressure = 6; + optional uint32 set_ambient_pressure = 6; /* * Perform a factory reset of the sensor @@ -620,7 +620,7 @@ message SCD4X_config { optional bool factory_reset = 7; /* - * Low Power mode for sensor + * Power mode for sensor (true for low power, false for normal) */ - optional bool low_power = 8; + optional bool set_power_mode = 8; } From e8544c529fc5a83593e206620ca795f8dadd9b96 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Mon, 4 Aug 2025 14:56:54 +0200 Subject: [PATCH 06/14] Fix protobuf definition for SCD4X --- meshtastic/admin.proto | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 3d68eea..f35b689 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -602,25 +602,25 @@ message SCD4X_config { /* * Reference temperature in degC */ - optional float set_temperature = 4; + optional float set_temperature = 3; /* * Altitude of sensor in meters above sea level. 0 - 3000m (overrides ambient pressure) */ - optional uint32 set_altitude = 5; + optional uint32 set_altitude = 4; /* * Sensor ambient pressure in Pa. 70000 - 120000 Pa (overrides altitude) */ - optional uint32 set_ambient_pressure = 6; + optional uint32 set_ambient_pressure = 5; /* * Perform a factory reset of the sensor */ - optional bool factory_reset = 7; + optional bool factory_reset = 6; /* * Power mode for sensor (true for low power, false for normal) */ - optional bool set_power_mode = 8; + optional bool set_power_mode = 7; } From d5b96c77e13d20c09053bde262b62e33439418d9 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Tue, 5 Aug 2025 14:03:16 +0200 Subject: [PATCH 07/14] Add protobuf for SEN5X state --- meshtastic/telemetry.proto | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index d65432d..c9b9958 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -797,3 +797,18 @@ message Nau7802Config { */ float calibrationFactor = 2; } + +/* + * SEN5X State, for saving to flash + */ +message SEN5XState { + /* + * Last cleaning time for SEN5X + */ + int32 last_cleaning_time = 1; + + /* + * Last cleaning time for SEN5X - valid flag + */ + bool last_cleaning_valid = 2; +} From 70950c6aa8461038c1678923b2f4aae0e6ba88ad Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Tue, 5 Aug 2025 17:38:48 +0200 Subject: [PATCH 08/14] Minor fix in cleaning time type --- meshtastic/telemetry.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index c9b9958..fb92189 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -805,7 +805,7 @@ message SEN5XState { /* * Last cleaning time for SEN5X */ - int32 last_cleaning_time = 1; + uint32 last_cleaning_time = 1; /* * Last cleaning time for SEN5X - valid flag From e44958478be0a81bde5fec4c1cf500c0578273bc Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Thu, 7 Aug 2025 16:05:14 +0200 Subject: [PATCH 09/14] SEN5X State protobuf --- meshtastic/telemetry.proto | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index 036ffde..0789fc5 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -811,4 +811,19 @@ message SEN5XState { * Last cleaning time for SEN5X - valid flag */ bool last_cleaning_valid = 2; + + /* + * VOC state time for SEN5X + */ + optional fixed64 voc_state = 3; + + /* + * Last VOC state time for SEN5X + */ + optional uint32 voc_time = 4; + + /* + * Last VOC state validity flag for SEN5X + */ + bool voc_valid = 5; } From 06a69c09db3017ba2f6991266112ce2b9d2670e6 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Fri, 8 Aug 2025 10:59:31 +0200 Subject: [PATCH 10/14] Add config message for sen5x --- meshtastic/admin.proto | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index f35b689..ada357b 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -586,6 +586,11 @@ message SensorConfig { * SCD4X CO2 Sensor configuration */ SCD4X_config scd4x_config = 1; + + /* + * SEN5X PM Sensor configuration + */ + SEN5X_config sen5x_config = 2; } message SCD4X_config { @@ -624,3 +629,10 @@ message SCD4X_config { */ optional bool set_power_mode = 7; } + +message SEN5X_config { + /* + * Reference temperature in degC + */ + optional float set_temperature = 1; +} \ No newline at end of file From 51b444ec10b08c2f921768e84aef09b8c7fc6b31 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Tue, 26 Aug 2025 19:03:11 +0200 Subject: [PATCH 11/14] Add config flag for low power mode --- meshtastic/admin.proto | 5 +++++ meshtastic/telemetry.proto | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index ada357b..a34c4aa 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -635,4 +635,9 @@ message SEN5X_config { * Reference temperature in degC */ optional float set_temperature = 1; + + /* + * One-shot mode (true for low power - one-shot mode, false for normal - contionuous mode) + */ + optional bool set_one_shot_mode = 2; } \ No newline at end of file diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index 0789fc5..93e8f21 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -826,4 +826,9 @@ message SEN5XState { * Last VOC state validity flag for SEN5X */ bool voc_valid = 5; + + /* + * Config flag for one-shot mode (see admin.proto) + */ + bool one_shot_mode = 6; } From 77b00ce690a7c447b5b274d6e9e5efc73e08a285 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Fri, 29 Aug 2025 15:28:20 +0200 Subject: [PATCH 12/14] Minor changes on VOC state array and docs --- meshtastic/admin.proto | 2 +- meshtastic/telemetry.proto | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index a34c4aa..c64306f 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -637,7 +637,7 @@ message SEN5X_config { optional float set_temperature = 1; /* - * One-shot mode (true for low power - one-shot mode, false for normal - contionuous mode) + * One-shot mode (true for low power - one-shot mode, false for normal - continuous mode) */ optional bool set_one_shot_mode = 2; } \ No newline at end of file diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index 93e8f21..32996f4 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -812,23 +812,23 @@ message SEN5XState { */ bool last_cleaning_valid = 2; - /* - * VOC state time for SEN5X - */ - optional fixed64 voc_state = 3; - - /* - * Last VOC state time for SEN5X - */ - optional uint32 voc_time = 4; - - /* - * Last VOC state validity flag for SEN5X - */ - bool voc_valid = 5; - /* * Config flag for one-shot mode (see admin.proto) */ - bool one_shot_mode = 6; + bool one_shot_mode = 3; + + /* + * Last VOC state time for SEN55 + */ + optional uint32 voc_state_time = 4; + + /* + * Last VOC state validity flag for SEN55 + */ + optional bool voc_state_valid = 5; + + /* + * VOC state array (8x uint8t) for SEN55 + */ + optional fixed64 voc_state_array = 6; } From af5d147428068aad4c0f3539c77e22fe13155ba4 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Sat, 17 Jan 2026 13:12:01 +0100 Subject: [PATCH 13/14] Fix numbering in sensor config --- meshtastic/admin.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 229d7de..9cd2ea2 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -500,12 +500,12 @@ message AdminMessage { /* * Tell the node to reset into the OTA Loader */ - OTAEvent ota_request = 101; + OTAEvent ota_request = 102; /* * Parameters and sensor configuration */ - SensorConfig sensor_config = 102; + SensorConfig sensor_config = 103; } } From 32906d5cdde821a89e9ac27fa3f2b116efe52e4f Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Tue, 20 Jan 2026 09:53:48 +0100 Subject: [PATCH 14/14] Format --- meshtastic/admin.proto | 46 +++++++++++++++++++++--------------------- meshtastic/mesh.proto | 2 +- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/meshtastic/admin.proto b/meshtastic/admin.proto index 9cd2ea2..8190ca1 100644 --- a/meshtastic/admin.proto +++ b/meshtastic/admin.proto @@ -638,61 +638,61 @@ message KeyVerificationAdmin { message SensorConfig { /* - * SCD4X CO2 Sensor configuration - */ + * SCD4X CO2 Sensor configuration + */ SCD4X_config scd4x_config = 1; /* - * SEN5X PM Sensor configuration - */ + * SEN5X PM Sensor configuration + */ SEN5X_config sen5x_config = 2; } message SCD4X_config { /* - * Set Automatic self-calibration enabled - */ + * Set Automatic self-calibration enabled + */ optional bool set_asc = 1; /* - * Recalibration target CO2 concentration in ppm (FRC or ASC) - */ + * Recalibration target CO2 concentration in ppm (FRC or ASC) + */ optional uint32 set_target_co2_conc = 2; /* - * Reference temperature in degC - */ + * Reference temperature in degC + */ optional float set_temperature = 3; /* - * Altitude of sensor in meters above sea level. 0 - 3000m (overrides ambient pressure) - */ + * Altitude of sensor in meters above sea level. 0 - 3000m (overrides ambient pressure) + */ optional uint32 set_altitude = 4; /* - * Sensor ambient pressure in Pa. 70000 - 120000 Pa (overrides altitude) - */ + * Sensor ambient pressure in Pa. 70000 - 120000 Pa (overrides altitude) + */ optional uint32 set_ambient_pressure = 5; /* - * Perform a factory reset of the sensor - */ + * Perform a factory reset of the sensor + */ optional bool factory_reset = 6; /* - * Power mode for sensor (true for low power, false for normal) - */ + * Power mode for sensor (true for low power, false for normal) + */ optional bool set_power_mode = 7; } message SEN5X_config { /* - * Reference temperature in degC - */ + * Reference temperature in degC + */ optional float set_temperature = 1; /* - * One-shot mode (true for low power - one-shot mode, false for normal - continuous mode) - */ + * One-shot mode (true for low power - one-shot mode, false for normal - continuous mode) + */ optional bool set_one_shot_mode = 2; -} \ No newline at end of file +} diff --git a/meshtastic/mesh.proto b/meshtastic/mesh.proto index ecb8803..f620b76 100644 --- a/meshtastic/mesh.proto +++ b/meshtastic/mesh.proto @@ -846,7 +846,7 @@ enum HardwareModel { MESHSTICK_1262 = 121; /* - * LilyGo T-Beam 1W + * LilyGo T-Beam 1W */ TBEAM_1_WATT = 122;