No description
| marax.ino | ||
| README.md | ||
MaraX ESP8266 Monitor
ESP8266 firmware for monitoring a Lelit MaraX espresso machine via UART and a VL53L1X time-of-flight (ToF) sensor. The device exposes a live web UI, publishes telemetry to MQTT, and supports OTA updates. Configuration is stored in LittleFS and editable through the web UI.
Features
- Live dashboard and status pages served from the ESP8266
- MQTT publishing for temperatures, heater/pump state, water level, and device status
- VL53L1X ToF distance sensor mapped to water level percentage
- UART parsing for MaraX telemetry
- OTA firmware updates
- AP fallback (
ConfigAP) when Wi-Fi or config is missing
Hardware
- ESP8266 (targeted at Wemos D1 Mini)
- MaraX UART connection on
GPIO14(D5) - VL53L1X ToF sensor on I2C:
- SDA:
D2 - SCL:
D1
- SDA:
Web Endpoints
/Live dashboard (temperatures, water level, heater/pump)/statusStatus + UART log/configConfiguration form/savePOST to save config and reboot/distanceRaw ToF distance (mm)/live.jsonLive data JSON/status.jsonStatus JSON/log?since=<version>Incremental UART log
Configuration
On first boot (or if config is missing), the device starts an AP named ConfigAP. Connect and open the IP shown by your OS to access /config.
Configuration fields:
- SSID / Password
- MQTT server, port, topic
- ToF min / max (mm) used to map distance to water level (0–100%)
Config is stored in LittleFS as /config.txt with one value per line in this order:
- SSID
- Password
- MQTT server
- MQTT port
- MQTT topic
- ToF min (mm)
- ToF max (mm)
MQTT Topics
Base topic is the configured MQTT topic. The firmware publishes:
- Raw UART line to
<base> - Parsed data:
<base>/mode<base>/version<base>/steamTemp<base>/targetSteamTemp<base>/hxTemp<base>/boostCountdown<base>/heaterOn<base>/pumpOn
- ToF and water level:
<base>/tof(avg mm)<base>/tof_raw(last mm)<base>/waterlevel(0–100%)
- Status:
<base>/status/uart<base>/status/tof<base>/status/uart_last_ms<base>/status/wifi_rssi<base>/status/ip<base>/status/uptime_s<base>/status/wifi_reconnects<base>/status/uart_invalid_count<base>/status/uart_last_invalid
- Heap:
<base>/heap/free<base>/heap/frag
- Boot info:
<base>/status/reset_reason<base>/status/reset_info<base>/status/sdk_version<base>/status/build_name<base>/status/build_time
- Device IP published once at connect:
<base>/ip
Build & Flash
This is a standard Arduino sketch. Ensure the following libraries are installed:
- ESP8266 core
- ESPAsyncTCP
- ESPAsyncWebServer
- PubSubClient
- LittleFS (ESP8266)
- Adafruit VL53L1X
Then build and upload marax.ino using Arduino IDE:
- Install the ESP8266 board package in Boards Manager.
- Select your board (e.g. "Wemos D1 Mini") and the correct port.
- Install the listed libraries via Library Manager (or add them manually).
- Open
marax.inoand click Upload.
Notes
- UART parsing expects a 7-field, comma-separated line (MaraX format). Invalid frames are counted and published.
- When OTA is in progress, the JSON endpoints return
{"ota":true}with HTTP 503.