This manual explains how to get the cocktail machine running, set it up, use it and maintain it.
You need Rust with the ESP toolchain (espup install), plus espflash and ldproxy.
.cargo/config.toml.example to .cargo/config.toml and enter WIFI_SSID and WIFI_PASS there.cargo run --release in the project folder. The firmware is then transferred to the ESP32 via USB.http://cockimate/ or the IP address shown in the serial monitor.Guests see only the drink selection, plus the status, the cog ⚙️, the homing symbol 🏠 and the emergency stop.
Tap the cog ⚙️ and enter the password (default 1234). This reveals the German-labelled tabs Getränke, Einrichtung, Manuell and Skripte. The lock 🔒 locks the menu again.
src/servo-control-migrated.html (SETUP_PASSWORD). It keeps guests from changing settings but is not real access protection.In the Einrichtung (setup) tab, you teach the machine its positions once:
Under Einrichtung → Getränke verwalten (setup → manage drinks) press “➕ Neues Getränk anlegen” (create new drink). Choose a name, icon and recipe (“slot × portions”), tap “✔ Getränk übernehmen” (apply drink) and then “Getränkeliste speichern” (save drink list).
The supplied sample drinks can be edited or deleted.
In the Getränke (drinks) tab, tap a tile and confirm. As soon as “Fertig! 🥂” (done) appears, you can take the glass.
Homing from the main screen: If “Referenzfahrt nötig, hier tippen” (homing required, tap here) appears, tap it. The machine moves Z clear first, then X. This also works without a password.
Router mode (default): The machine uses the Wi-Fi set in .cargo/config.toml.
Standalone mode: Under Einrichtung → Netzwerk (setup → network) switch the mode and press “Speichern & neu starten” (save & restart). Then connect to the Wi-Fi network “Cockimate” (password cocktail123) and open http://192.168.71.1/.
Set up a kiosk browser app on an Android tablet, for example “Fully Kiosk Browser”. Enter the machine's address as the start page and switch on full screen and “keep screen awake”.
The red NOT-AUS (emergency stop, also via ESC) stops the motors and the pump immediately and discards pending commands. Then press “Fortsetzen” (continue) in the Manuell tab and home the machine again.
Further protection comes from software end stops, speed limits, aborting a failed homing run, debounced limit switches and limited queues.
| Axis | Function | GPIO |
|---|---|---|
| X | Step / Dir / Enable / limit switch | 32 / 33 / 14 / 21 |
| Z | Step / Dir / Enable / limit switch | 25 / 26 / 27 / 22 |
| - | Pump relay (HIGH = on) | 19 |
The pins are defined in src/main.rs (section “HARDWARE-SETUP”), travel and limits in src/config.rs. If an axis moves the wrong way, flip X_DIR_INVERTED or Z_DIR_INVERTED in src/config.rs accordingly.
Check the SSID and password in .cargo/config.toml and make sure the network uses 2.4 GHz. The IP address is shown in the serial monitor. If all else fails, connect to the “Cockimate” Wi-Fi network.
Open Einrichtung, teach the missing position or Z height and save.
Check that the slot is set to “Pumpe” (pump), that the relay is connected to GPIO 19 and that “ms pro Portion” has a sensible value.
Run a homing cycle. The taught slots stay saved.