From 005c5c02cce7013863a9eb1eb39f1c9fbce000e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sat, 18 Jan 2025 09:11:47 +0100 Subject: [PATCH 1/2] add dfrobot gravity rain gauge --- meshtastic/telemetry.proto | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/meshtastic/telemetry.proto b/meshtastic/telemetry.proto index 688abf713..4b5b3f294 100644 --- a/meshtastic/telemetry.proto +++ b/meshtastic/telemetry.proto @@ -134,6 +134,16 @@ message EnvironmentMetrics { */ optional float radiation = 18; + /* + * Rainfall in the last hour in mm + */ + optional float rainfall_1h = 19; + + /* + * Rainfall in the last 24 hours in mm + */ + optional float rainfall_24h = 20; + } /* @@ -542,6 +552,11 @@ enum TelemetrySensorType { */ INA226 = 34; + /* + * DFRobot Gravity tipping bucket rain gauge + */ + DFROBOT_RAIN = 35; + } /* From 4907cced6837f73b17bc637b72f64ff388872815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Wed, 2 Jul 2025 23:49:06 +0200 Subject: [PATCH 2/2] Indicator WIP --- meshtastic/interdevice.options | 1 + meshtastic/interdevice.proto | 45 +++++++++++++++++----------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/meshtastic/interdevice.options b/meshtastic/interdevice.options index 97df282f7..6c39feb50 100644 --- a/meshtastic/interdevice.options +++ b/meshtastic/interdevice.options @@ -1 +1,2 @@ *InterdeviceMessage.nmea max_size:1024 +*InterdeviceMessage.beep int_size:16 diff --git a/meshtastic/interdevice.proto b/meshtastic/interdevice.proto index 54e950f3c..37142508a 100644 --- a/meshtastic/interdevice.proto +++ b/meshtastic/interdevice.proto @@ -8,37 +8,36 @@ option java_outer_classname = "InterdeviceProtos"; option java_package = "com.geeksville.mesh"; option swift_prefix = ""; -// encapsulate up to 1k of NMEA string data - -enum MessageType { - ACK = 0; - COLLECT_INTERVAL = 160; // in ms - BEEP_ON = 161; // duration ms - BEEP_OFF = 162; // cancel prematurely - SHUTDOWN = 163; - POWER_ON = 164; - SCD41_TEMP = 176; - SCD41_HUMIDITY = 177; - SCD41_CO2 = 178; - AHT20_TEMP = 179; - AHT20_HUMIDITY = 180; - TVOC_INDEX = 181; +message I2CCommand { + enum Operation { + START = 0; + STOP = 1; + WRITE = 2; + READ = 3; + } + Operation op = 1; + uint32 addr = 2; + uint32 data = 3; + bool ack = 4; } -message SensorData { - // The message type - MessageType type = 1; - // The sensor data, either as a float or an uint32 - oneof data { - float float_value = 2; - uint32 uint32_value = 3; +message I2CResponse { + enum Status { + OK = 0; + NACK = 1; + ERROR = 2; } + Status status = 1; + uint32 data = 2; } +// Main message for interdevice communication message InterdeviceMessage { // The message data oneof data { string nmea = 1; - SensorData sensor = 2; + I2CCommand i2c_command = 2; + I2CResponse i2c_response = 3; + uint32 beep = 4; } }