Operation, setup and maintenance of the cocktail machine.
Flashing the firmware requires Rust with the ESP toolchain (espup install) as well as espflash and ldproxy. Then:
.cargo/config.toml.example to .cargo/config.toml and fill in WIFI_SSID / WIFI_PASS there.cargo run --release – this compiles, flashes via USB and opens the serial monitor.http://cockimate/ or at this IP.By default – the way a guest sees it – the screen shows only the drink selection, plus the connection and machine status at the top, a discreet cog ⚙️, a homing symbol 🏠 and the emergency stop (NOT-AUS).
The admin menu is deliberately hidden. Tapping the cog ⚙️ and entering the password (default 1234) reveals the four tabs Getränke, Einrichtung, Manuell and Skripte (drinks, setup, manual, scripts). The cog then turns into a lock 🔒, which locks the menu again.
src/servo-control-migrated.html (constant SETUP_PASSWORD). It is an operating lock so that guests do not change any settings – not real access protection.In the Einrichtung (setup) tab, the machine is taught once. Everything is stored on the ESP32.
Under Einrichtung → Getränke verwalten (setup → manage drinks): “➕ Neues Getränk anlegen” (create new drink), choose a name and icon, then put together the recipe as a “Slot × Portionen” list (slot × portions). “✔ Getränk übernehmen” (apply drink), and finally “Getränkeliste speichern” (save drink list).
A freshly flashed machine already contains a few drinks with “Beispiel:” (example) in their name – only as suggestions. They can be edited or deleted.
In the Getränke (drinks) tab, tap a tile and briefly confirm the recipe – done. A banner shows the progress; “Fertig! 🥂” (done) means: take the glass.
Homing from the main screen: If the machine needs to be homed, a gold bar “Referenzfahrt nötig – hier tippen” (homing required – tap here) appears at the top and the 🏠 symbol pulses. One tap moves Z clear first, then X – a guest may trigger this too, without a password.
Router mode (default): The machine joins the existing Wi-Fi network (credentials in .cargo/config.toml).
Standalone mode: No router needed – the machine sets up its own Wi-Fi network “Cockimate” (password cocktail123). Switch over under Einrichtung → Netzwerk (setup → network) → “Speichern & neu starten” (save & restart). Then connect to the “Cockimate” Wi-Fi network and open http://192.168.71.1/ in a browser.
For a permanently installed panel, an inexpensive Android tablet with a kiosk browser app (e.g. “Fully Kiosk Browser”) is a good choice: enter the machine address as the start page, activate full screen and “keep screen on”. Guest mode (hidden menu) ensures that guests can only choose drinks and use the emergency stop.
The big red NOT-AUS (emergency stop) button can always be reached (also via the keyboard: ESC). It immediately stops both motors and the pump and discards all pending commands. To continue afterwards, press “Fortsetzen” (resume; Manuell tab) and home the machine again.
Further protective functions: software end positions, speed limits, homing abort if the limit switch is not reached, debounced limit switch, 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”), the travel ranges and limits in src/config.rs. If an axis moves the wrong way, edit src/config.rs and invert the constant X_DIR_INVERTED or Z_DIR_INVERTED accordingly.
Check the SSID/password in .cargo/config.toml (2.4 GHz!). The IP is shown in the serial monitor. If necessary, connect to the “Cockimate” Wi-Fi network.
Open Einrichtung, teach the missing position or Z height and save.
Is the slot set to “Pumpe”? Is the relay on GPIO 19? Is “ms pro Portion” set to a sensible value?
The ESP32 forgets the current axis position when switched off (the taught slots remain stored). Dispensing homes the machine automatically beforehand; manually, a homing run always helps.