Skip to content
Featured

Aranet

Full-stack sensor monitoring from BLE to dashboards, with offline storage and IoT integrations

Rust libraries and tools for Aranet environmental sensors (CO2, temperature, humidity, radon, radiation) via Bluetooth Low Energy.

Rust BLE SQLite Tokio egui ratatui Prometheus
Screenshot of Aranet

Architecture

flowchart TB
    subgraph Sensors["Aranet Sensors"]
        A4["Aranet4<br/>CO2, Temp, Humidity"]
        ARn["AranetRn+<br/>Radon"]
        ARad["Aranet Radiation"]
    end
    subgraph Core["aranet-core"]
        BLE["BLE Scanner"]
        Proto["Protocol Parser"]
    end
    subgraph Store["aranet-store"]
        DB[("SQLite<br/>Local Storage")]
    end
    subgraph Interfaces["User Interfaces"]
        CLI["aranet-cli"]
        TUI["aranet-tui<br/>Terminal Dashboard"]
        GUI["aranet-gui<br/>Desktop App"]
    end
    subgraph Service["aranet-service"]
        REST["REST API"]
        WS["WebSocket"]
        MQTT["MQTT Publisher"]
        Prom["Prometheus Metrics"]
    end
    Sensors -->|"BLE Advertisements"| BLE
    BLE --> Proto
    Proto --> DB
    DB --> CLI
    DB --> TUI
    DB --> GUI
    DB --> REST
    REST --> WS
    REST --> Prom
    REST --> MQTT

The Problem

Aranet environmental sensors produce valuable air quality data, but the official tooling is limited to mobile apps with no automation, no local storage, and no integration path for monitoring infrastructure. Researchers, home automation enthusiasts, and air quality-conscious developers need programmatic access to sensor readings, historical data, and alerting without depending on cloud services or closed ecosystems.

The Solution

Built a Rust workspace of seven crates spanning the full stack: a core BLE library for direct sensor communication, local SQLite persistence with incremental sync, a CLI with scan/read/history commands, a terminal dashboard with sparkline charts and threshold alerts, a desktop GUI, and a background service exposing a REST API with WebSocket streaming, Prometheus metrics, MQTT publishing, and webhook notifications.

The Results

  • Cross-platform support for macOS, Linux, and Windows
  • Multi-sensor coverage: Aranet4, Aranet2, AranetRn+, and Aranet Radiation
  • Passive BLE monitoring without requiring device connections
  • Published to crates.io and Homebrew for easy installation
7
Crates
4 devices
Sensors
CLI, TUI, GUI, API
Interfaces
Prometheus, MQTT, InfluxDB
Integrations

Aranet is a comprehensive Rust implementation for connecting to Aranet environmental sensors via Bluetooth Low Energy. The workspace provides everything from low-level BLE communication to polished user interfaces and production monitoring integrations.

Key Features

  • Multi-sensor support: CO2, temperature, pressure, humidity, radon, and radiation readings from four Aranet device families
  • Historical data download: Resumable checkpoints, date filters, and incremental sync with local SQLite storage
  • Passive monitoring: Read BLE advertisements without establishing a device connection
  • Terminal dashboard: Sparkline charts, CO2/radon threshold alerts, vim keybindings, and CSV export via ratatui
  • Desktop GUI: Multi-panel egui interface with alert system and system tray
  • Background service: REST API with WebSocket streaming for real-time data
  • Observability: Prometheus metrics endpoint with pre-built Grafana dashboard template
  • IoT integration: MQTT publisher with Home Assistant auto-discovery, InfluxDB export, webhook notifications

Why Rust

Environmental monitoring runs continuously on modest hardware. Rust’s zero-cost abstractions and memory safety make it the right choice for a long-running BLE daemon that needs to be reliable without consuming resources. The workspace structure keeps each concern in its own crate while sharing the core protocol implementation across every interface.

Architecture decisions

The seven-crate workspace follows a clear layering:

  • aranet-types provides platform-agnostic shared types
  • aranet-core handles all BLE communication and protocol parsing
  • aranet-store manages local SQLite persistence with deduplication and incremental sync
  • aranet-service adds the daemon layer with REST, WebSocket, MQTT, Prometheus, and webhook integrations
  • aranet-cli, aranet-tui, and aranet-gui are thin interfaces over the core and store crates

This separation means adding a new integration or interface requires no changes to the sensor communication layer.

Distribution

The project ships via multiple channels to minimize friction:

  • Homebrew: brew tap cameronrye/aranet && brew install aranet
  • crates.io: cargo install aranet-cli
  • GitHub Releases: Shell and PowerShell installers, macOS DMG bundles
  • Docker Compose: Pre-configured stack with Prometheus and Grafana

Outcome

Aranet proves that embedded sensor tooling does not need to be locked behind mobile apps or cloud services. By building from BLE packets up through storage, APIs, and dashboards in a single Rust workspace, the project gives users full control over their environmental data with the reliability and performance characteristics that monitoring infrastructure demands.

Was this helpful?

Want to learn more?

Ask can answer questions about this project's implementation, technologies, and more.