RSS Amplifier

Miguel Piedrafita · Jan 11, 2024

Monitoring air quality with Rust.

0
Sign in to vote or save

This page did not load. You can still read it on the original site — the toolbar below keeps your place in the directory.

let device = aranet::connect().await?; let measurements = device.measurements().await?; dbg!(measurements); // [src/main.rs:6] measurements = SensorData { // со2: 962, // battery: 76, // humidity: 49, // status: GREEN, // pressure: 1017, // interval: 300s, // temperature: 25.75, // since_last_update: 127s, // } I've owned an Aranet4 CO₂ monitor for a while now, and while the device itself is…

let device = aranet::connect().await?;
let measurements = device.measurements().await?;
dbg!(measurements);
// [src/main.rs:6] measurements = SensorData {
//   со2: 962,
//   battery: 76,
//   humidity: 49,
//   status: GREEN,
//   pressure: 1017,
//   interval: 300s,
//   temperature: 25.75,
//   since_last_update: 127s,
// }

I've owned an Aranet4 CO₂ monitor for a while now, and while the device itself is great, it's not compatible with any smart home systems.

I wanted to get push notifications when the CO₂ levels in my room were too high, so I reverse-engineered the BLE protocol it uses and built a simple Rust library to interact with it.

View on GitHub

Read on miguel.build

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.