Skip to main content

Crate storz_rs

Crate storz_rs 

Source
Expand description

§storz-rs

Rust library for controlling Storz & Bickel vaporizers via Bluetooth Low Energy.

Supports Volcano Hybrid, Venty, Veazy, and Crafty+.

§Quick Start

use std::time::Duration;
use storz_rs::{discover_vaporizers, get_adapter, connect, VaporizerControl};

// 1. Get a Bluetooth adapter
let adapter = get_adapter().await?;

// 2. Scan for vaporizers
let peripherals = discover_vaporizers(&adapter, Duration::from_secs(10)).await?;
let peripheral = peripherals.into_iter().next().expect("No devices found");

// 3. Connect and get a controller
let device = connect(peripheral).await?;

// 4. Read temperature
let temp = device.get_current_temperature().await?;
println!("Current temperature: {temp}°C");

// 5. Set target temperature
device.set_target_temperature(185.0).await?;

§Supported Features

FeatureVolcanoVenty/VeazyCrafty
Temperature control
Heater on/off
Pump on/off
Brightness
Vibration
Boost temperature
Auto-shutdown timer
Factory reset
Device info (serial, firmware)
Workflow automation

Re-exports§

pub use device::DeviceInfo;
pub use device::DeviceModel;
pub use device::DeviceState;
pub use device::HeaterMode;
pub use discovery::discover_vaporizers;
pub use discovery::get_adapter;
pub use discovery::select_peripheral;
pub use error::StorzError;
pub use protocol::Crafty;
pub use protocol::VaporizerControl;
pub use protocol::Venty;
pub use protocol::VolcanoHybrid;
pub use workflow::Workflow;
pub use workflow::WorkflowRunner;
pub use workflow::WorkflowState;
pub use workflow::WorkflowStep;

Modules§

device
discovery
error
protocol
Protocol implementations for Storz & Bickel devices.
utils
uuids
workflow
Automated workflow execution for Volcano Hybrid.

Functions§

connect
Connect to a discovered peripheral and return a trait-object controller.
connect_with_timeout
Connect to a peripheral with a timeout.
detect_model
Auto-detect the device model from its advertised BLE services.