Coder Social home page Coder Social logo

longshot's Introduction

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

longshot's People

Contributors

mmastrac avatar zangror avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

longshot's Issues

List command not running on Linux

Hello, I am not able to run the list command in a Raspberry Pi 4 on linux.
Here is the error output I get:
Error: BTError(Other(DbusError(D-Bus error: Rejected send message, 2 matched rules; type="method_call", sender=":1.17" (uid=1000 pid=1078 comm="longshot list ") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error name="(unset)" requested_reply="0" destination="org.bluez" (uid=0 pid=533 comm="/usr/lib/bluetooth/bluetoothd ") (org.freedesktop.DBus.Error.AccessDenied))))

Has anyone faced this issue? Any solutions?

Recipes

Hi,

it looks like you can even manipulate recipes.

Here's the thing: Having been mistreated by very expensive coffee machines at work, I would love if a Cappuccino was made correctly just for once by a machine. That means that espresso is dispensed first, milk foam second, not the other way around.

Or maybe the DeLonghi does it correctly?

Build on non-mac platforms

This project needs some tweaking to remove the assumption that the device ID is always a UUID. Shouldn't be too tough, but will need testing and build support.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.