Rust implementation for Aranet environmental sensors.
Connect to your Aranet devices via Bluetooth LE to read measurements, download history, and monitor air quality.
- aranet-core — Core BLE library supporting Aranet4, Aranet2, AranetRn+ (Radon), and Aranet Radiation sensors
- Current readings (CO₂, temperature, pressure, humidity, radon, radiation)
- Historical data download with timestamps and resumable checkpoints
- Device settings (measurement interval, Bluetooth range)
- Auto-reconnection with configurable backoff and retry policies
- Real-time streaming and event system
- Passive monitoring via BLE advertisements (no connection required)
- Platform-specific configuration (macOS, Linux, Windows)
- Bluetooth diagnostics and troubleshooting utilities
- BLE adapter serialization with semaphore-based locking
- Explicit pairing on Linux: a sensor that isn't paired yet is paired on first connect, without registering a system-wide Bluetooth agent (aranet can't enter a PIN: pair a sensor that asks for one once by hand in an interactive
bluetoothctlsession, after removing any pairing aranet made) - Waits for BlueZ's service discovery on Linux, so first connections to an Aranet4 don't fail with "Service discovery timed out"
- aranet-cli — Command-line interface for quick readings and data export
- Multi-device reading with parallel connections
- Interactive device picker, device aliases
- Passive reading from BLE advertisements
- Progress bars for history download
--since/--untildate filters,--inhgpressure unit- Local data caching with
sync,cache, andreportcommands
- aranet-store — Local SQLite-based data persistence
- Incremental history sync (download only new records)
- Query cached data without device connection
- Automatic deduplication of history records
- aranet-tui — Terminal UI dashboard for real-time monitoring
- Multi-device monitoring with auto-refresh
- Sparkline charts with min/max labels
- CO2/radon threshold alerts with audio bell
- Light/dark theme, mouse support, vim keybindings
- Export history to CSV, comparison view
- Device filter, alias management, settings editing
- aranet-gui — Desktop application built with egui
- Multi-panel interface with device list, detail, history, comparison views
- Alert system with threshold management
- Export to CSV/JSON, system tray, light/dark themes
- Service management panel for aranet-service control
- aranet-service — Background daemon with REST API and integrations
- HTTP API for devices, readings, history queries
- WebSocket real-time streaming
- Prometheus metrics endpoint (
/metrics) with detailed health checks - MQTT publisher for IoT integration and Home Assistant auto-discovery
- System service management (install/start/stop as launchd/systemd service)
- Webhook notifications for CO₂/radon/battery threshold alerts (Slack/Discord/PagerDuty)
- InfluxDB v2 real-time export via line protocol
- mDNS service discovery (
_aranet._tcp.local.) - Pre-built Grafana dashboard template
- Built-in web dashboard with live sparklines, history charts, and service status
- Staleness detection on current readings (
age_seconds,stale)
| CLI | TUI | GUI |
|---|---|---|
![]() |
![]() |
![]() |
Install the CLI with Homebrew:
brew tap cameronrye/aranet
brew install aranetOr use the release installer scripts:
# macOS and Linux
curl --proto '=https' --tlsv1.2 -LsSf \
https://github.com/cameronrye/aranet/releases/latest/download/aranet-cli-installer.sh | sh
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://github.com/cameronrye/aranet/releases/latest/download/aranet-cli-installer.ps1 | iex"On a minimal Linux system, such as a container image, first install curl, ca-certificates, xz-utils and the D-Bus library (for example apt-get update && apt-get install -y curl ca-certificates xz-utils libdbus-1-3, as root or with sudo): the installer downloads with curl and unpacks a .tar.xz archive, and aranet needs libdbus-1.so.3 to talk to BlueZ.
The Linux builds need glibc 2.35 or newer: Ubuntu 22.04, Debian 12, Raspberry Pi OS Bookworm, Fedora 36 or later (not RHEL 9 or its rebuilds, which have glibc 2.34).
Or install from crates.io:
cargo install aranet-cliThis installs the aranet executable.
Or run with Docker:
docker compose up -d
# Dashboard: http://localhost:8080/dashboardOr build from source:
git clone https://github.com/cameronrye/aranet.git
cd aranet
cargo build --releaseAdd aranet-core to your Cargo.toml:
[dependencies]
aranet-core = "0.2"aranet scanaranet read --device <DEVICE_ADDRESS>aranet history --device <DEVICE_ADDRESS> --output history.csvaranet info --device <DEVICE_ADDRESS>aranet read -d device1 -d device2
aranet read -d living-room,bedroom # using aliasesaranet alias set living-room AA:BB:CC:DD:EE:FF
aranet alias list
aranet read -d living-roomaranet report --device living-room --period weekly
aranet report --all --format jsonaranet server --bind 127.0.0.1:8080
# Dashboard: http://127.0.0.1:8080/dashboardaranet doctoraranet/
├── crates/
│ ├── aranet-types/ # Platform-agnostic types (shared)
│ ├── aranet-core/ # Core BLE library
│ ├── aranet-store/ # Local SQLite data persistence
│ ├── aranet-service/ # Background service + REST API
│ ├── aranet-cli/ # CLI tool
│ ├── aranet-tui/ # Terminal dashboard
│ └── aranet-gui/ # Desktop GUI (egui)
├── docker/ # Docker Compose stack (Prometheus + Grafana)
├── grafana/ # Pre-built Grafana dashboard template
└── docs/ # Protocol documentation
| Device | Sensors | Current | History | Status |
|---|---|---|---|---|
| Aranet4 | CO₂, Temperature, Pressure, Humidity | Yes | Yes | Fully tested |
| Aranet2 | Temperature, Humidity | Yes | Yes | Supported |
| AranetRn+ (Radon) | Radon, Temperature, Pressure, Humidity | Yes | Yes | Fully tested |
| Aranet Radiation | Dose Rate, Total Dose | Yes | Partial | Supported (history not yet implemented) |
- Rust 1.90+
- Bluetooth adapter with BLE support
- Platform support:
- macOS (the prebuilt app needs macOS 11 or later)
- Linux (with BlueZ)
- Windows
Contributions are welcome! Please check the open issues for areas where you can help.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Here are some features and improvements that would be great additions to the project:
| Feature | Description | Difficulty |
|---|---|---|
| Aranet2 history download | Implement history data retrieval for Aranet2 devices | Medium |
| Aranet Radiation history | Complete history download support for Aranet Radiation sensors | Medium |
| Home Assistant component | Native Home Assistant custom component using aranet-core (MQTT integration already available) | Medium |
| Calibration support | Add device calibration commands for CO2 sensors | Medium |
| Data visualization | Enhanced charting and trend analysis in TUI/GUI | Medium |
If you're interested in tackling any of these, please open an issue to discuss your approach before starting work. We're happy to provide guidance and answer questions!
This project is licensed under the MIT License - see the LICENSE file for details.
- Aranet4-Python - Python implementation that inspired this project
- btleplug - Cross-platform Bluetooth LE library for Rust
Made with ❤️ by Cameron Rye
This project is not affiliated with, endorsed by, or sponsored by Aranet or SAF Tehnika JSC. Aranet is a trademark of SAF Tehnika JSC.


