An IoT-powered automated liquid dispenser controlled via a web interface. A Spring Boot server communicates in real-time with an ESP32 microcontroller over WebSocket - select your volume, hit Pour, and RoboShot does the rest.
Browser ──HTTP──▶ Spring Boot Server (MVC + Thymeleaf)
│
WebSocket
│
ESP32 (PlatformIO)
│
Pump
- The server serves a Thymeleaf web page and manages the WebSocket connection with the ESP32.
- The ESP32 connects to the server over WebSocket, listens for pour commands, and controls the pump.
- 🟢 Live ESP32 connection status indicator
- 🧪 Adjustable pour volume (ml)
- 🚰 One-click pour via WebSocket command
- 📡 Real-time bidirectional communication (no polling)
RoboShot/
├── RoboShot-server/ # Spring Boot application
│ ├── src/
│ │ ├── main/
│ │ │ ├── java/
│ │ │ │ └── ... # Controllers, WebSocket config
│ │ │ └── resources/
│ │ │ └── templates/
│ │ │ └── index.html # Thymeleaf template
│ └── pom.xml
│
└── RoboShot-esp/ # ESP32 firmware (PlatformIO)
├── src/
│ └── main.cpp
├── include/
│ ├── secrets.h # WiFi credentials (not committed)
│ └── secrets.example.h
└── platformio.ini
Built with Java + Spring Boot using the MVC pattern. Serves the frontend via Thymeleaf templates and manages a WebSocket endpoint that the ESP32 connects to.
- Java 17+
- Maven
cd RoboShot-server
mvn clean install
mvn spring-boot:runThe server will be available at http://localhost:8080.
Written in C++ using the PlatformIO environment. The ESP32 connects to your WiFi network, establishes a WebSocket connection to the server, and waits for pour commands.
- PlatformIO (VS Code extension or CLI)
- ESP32 board
Copy secrets.example.h to secrets.h and fill in your credentials:
cp RoboShot-esp/include/secrets.example.h RoboShot-esp/include/secrets.h// secrets.h
const char* ssid = "YOUR_WIFI_SSID";
const char* password = "YOUR_WIFI_PASSWORD";
⚠️ secrets.his listed in.gitignoreand will never be committed.
cd RoboShot-esp
pio run --target uploadOnce the ESP32 connects, the server marks it as online and the pour button becomes available.
When the user selects a volume and clicks Pour, the server sends a WebSocket message to the ESP32:
{ "command": "pour", "volume": 50 }The ESP32 runs the pump for the calculated duration and optionally sends a confirmation back.
- Clone the repository:
git clone https://github.com/Kambolo/RoboShot.git
cd RoboShot-
Set up WiFi credentials in
RoboShot-esp/include/secrets.h -
Start the server:
cd RoboShot-server && mvn spring-boot:run- Flash the ESP32:
cd RoboShot-esp && pio run --target upload- Open
http://localhost:8080in your browser — if the ESP32 is online, you're ready to pour 🥃
Kamil Bołoz