Skip to content

Seb-sti1/juracoffeemachine

Repository files navigation

This small python package makes it possible to brew coffee with a Jura E6 machin.

It is (will be) used in app that tracks how many coffees each employee takes. Therefore, it aims for high reliability and low maintenance.

Note

This code was tested on a Jura responding ty:EF532M V02.03 to TY: and tl:BL_RL78 V01.31 to TL:.

Installation

To be able to download the app, add the relevant pypi index in /etc/pip.conf:

[global]
extra-index-url =
    https://www.piwheels.org/simple
    https://__token__:[token]@gitlab.ensta.fr/api/v4/groups/3178/-/packages/pypi/simple

Note

The token needs to be created here with read_api scope and developer role.

Then install pipx with the official tutorial. Finally, install this app with pipx install juracoffeemachine.

Note

pipx is the recommended installation method, but you can also use regular python virtual environment

Usage

For the wiring, please look at the diagram here. Don't forget that the TX/RX of the controller should be connected to the RX/TX of the machin.

To brew a coffee juracoffeemachine --port /dev/ttyUSB0, then while the coffee machine is running (there is no safety regarding this for now), press +/- to increase/decrease coffee beans/water.

API Example

The minimal example to brew a coffee is as follows:

from juracoffeemachine.coffee_machine import CoffeeMaker
from juracoffeemachine.jura import JuraProtocol

machin = CoffeeMaker(JuraProtocol("/dev/ttyUSB0"))
machin.brew_coffee(machin.CoffeeType.COFFEE)

Jura's protocol

If you're only interested in the protocol itself and which information can be retrieved, check out:

  • encode, decode: functions to send message to the jura
  • JuraCommand: the list of message that is used in this package
  • GROUP_REGEX: part of the signification of the response from the jura

Gitlab CI

The python package is automatically built when a branch is merged on main, a release is created here, and it is published to the GitLab pypi index to be available for download.

The pipeline first tests and then builds the package with the build module, then with GitLab API and the twine module publishes the release and the package. Please refer to .gitlab-ci.yml for the exact details of the pipeline.

Tip

To allow releases creation, create a token here with the permission api, write_repository with the role Developer, then create the variable RELEASE_TOKEN here.

Acknowledgments, contributions & license

Acknowledgments

Other work exists to try and control Jura coffee machines. All the protocol used in this project was decoded by COM8 in his project protocol-cpp (see also the organisation JuttaProto). Juramote, q42, at.ua was also of great help to extract relevant information from the Jura.

Contributions

All contribution are welcomed, submit an issue for bug reports/feature requests (or open a pull request if you already implemented the feature).

License

See LICENSE

About

Control your jura coffee machine using its uart port. Official mirror of https://gitlab.ensta.fr/u2is-coffee-team/jura-uart

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages