9 releases

0.1.8 Jan 13, 2024
0.1.7 Jan 13, 2024
0.1.6 Mar 6, 2023
0.1.5 Feb 24, 2023
0.1.4 Nov 29, 2022

#233 in Hardware support

27 downloads per month

Apache-2.0 OR MIT

170KB
4K SLoC

longshot docs.rs crates.io

Brew coffee from the command-line!

Details

Longshot is an API and command-line application to brew coffee from the command-line (or whatever front-end is built). At this time it supports DeLonghi ECAM-based Bluetooth-Low-Energy devices, and has only been tested on the Dinamica Plus over Bluetooth.

The protocol for status and monitoring has been mostly decoded, but at this time is only available in source form.

Command-Line Examples

Monitor the given device (will continue until you press Ctrl+C):

$ longshot monitor --device-name (device)
Dispensing... [###############################===========]

Get the brew information for a given beverage:

$ longshot brew  --device-name (device) --beverage regularcoffee
...

Brew a beverage:

$ longshot brew  --device-name (device) --beverage regularcoffee --coffee 180 --taste strong
Fetching recipe for RegularCoffee...
Fetching recipes...
Brewing RegularCoffee...

API Examples

Brew a long coffee with 250 impulses of water (approximately the size of an average North American coffee mug, or slightly more).

let ecam = ecam_lookup(device_name).await?;
let req = Request::BeverageDispensingMode(
    EcamBeverageId::LongCoffee.into(),
    EcamOperationTrigger::Start.into(),
    vec![RecipeInfo::new(EcamIngredients::Coffee, 250)],
    EcamBeverageTasteType::Prepare.into(),
);
ecam.write_request(req).await?;

Demo

Demo of brewing a cappuccino

Dependencies

~16–47MB
~708K SLoC