Expand description
Historical data download.
This module provides functionality to download historical sensor readings stored on an Aranet device.
§Supported Devices
| Device | History Support | Notes |
|---|---|---|
| Aranet4 | Full | CO₂, temperature, pressure, humidity |
| Aranet2 | Full | Temperature, humidity |
| AranetRn+ (Radon) | Full | Radon, temperature, pressure, humidity |
| Aranet Radiation | Partial | History download not yet implemented |
Note: Aranet Radiation devices do not currently support history download.
The radiation_rate and radiation_total fields in HistoryRecord are
reserved for future implementation but are currently always None.
§Index Convention
All history indices are 1-based, following the Aranet device protocol:
- Index 1 = oldest reading
- Index N = newest reading (where N = total_readings)
This matches the device’s internal indexing. When specifying ranges:
ⓘ
let options = HistoryOptions {
start_index: Some(1), // First reading
end_index: Some(100), // 100th reading
..Default::default()
};§Protocols
Aranet devices support two history protocols:
- V1: Notification-based (older devices) - uses characteristic notifications
- V2: Read-based (newer devices, preferred) - direct read/write operations
Structs§
- History
Info - Information about the device’s stored history.
- History
Options - Options for downloading history.
- History
Progress - Progress information for history download.
Enums§
- History
Param - Parameter types for history requests.
Functions§
- raw_
to_ pressure - Convert raw pressure value to hPa.
- raw_
to_ temperature - Convert raw temperature value to Celsius.
Type Aliases§
- Progress
Callback - Type alias for progress callback function.