This project is for anyone who wants to make their Lelit Mara X (V2) espresso machine smarter. Fortunately the MaraX has a serial interface providing some data that can be read! The project is a fork from https://github.com/SaibotFlow/marax-monitor. Inspirations came also from https://github.com/alexrus/marax_timer and from https://github.com/Vin-X-Mod/OLED-Splash-Screen-LOGO/tree/main.
I use a Pythonscript for generating a version.hpp
for transmitting a version via MQTT. If you don't need that, or if you don't have python installed please remove the line extra_scripts = pre:lib\Version\version_gen.py*
in platformio.ini.
- ESP32 Node MCU (You can use any other equivalent board)
- USB Cable with power supply for ESP32
- Jumper-Wires
- 0,96" SSD1306 OLED Display
- 3D printed case https://www.thingiverse.com/thing:2937731
The MaraX has a 6-PIN Connector for the serial interface on the bottom. We only use PIN-3 (Mara RX - Black Wire - Green Rectangle) and PIN-4 (Mara TX - Orange Wire - White Rectangle). For testing you can use the jumper-wires later you should replace them with temperature protected cables.
- PIN3 Mara to TX2
- PIN4 Mara to RX2
RX Mara to TX2 ESP32 and TX Mara to RX2 ESP32
The connector for serial interface itself
Note: A Reed sensor on the vibration pump is not necessary for the MaraX anymore as the interface provides the pump status information now.
You will receive the following data each ~400ms.
Example Data: C1.06,116,124,093,0840,1,0\n
- The delimitter is: ,
- The end of data is: \n
- Length: 26
Data | Description |
---|---|
+ | Machine-Mode (Model 2022): + = CoffeeMode; C = SteamMode |
1.06 | Firmware |
116 | Current Steam Temperature in Celsius |
124 | Target Steam Temperature in Celsius |
093 | Curent Hx Temperature in Celsius |
0840 | Countdown Boost-Mode |
1 | Heat state (0 = off; 1= on) |
0 | Pump state (0 = off; 1= on) |
Pin Display | Pin ESP32 |
---|---|
VIN | 3.3V |
GND | GND |
SCL | D22 |
SDA | D21 |
The address selection is 0x3D or 0x3C. You can recognize it by the solder bridge on the back side
By editing the credentials in espwifi.h and mqtt.h you can transmit the MaraX data to your MQTT server.
Here are the preconfigured topics:
Topic | Payload Datatype | Description |
---|---|---|
marax/mode | Char | Machine-Mode |
marax/steam/temp/current | Int | Current Steam Temperature in Celsius |
marax/steam/temp/target | Int | Target Steam Temperature in Celsius |
marax/hx/temp/current | Int | Curent Hx Temperature in Celsius |
marax/heating/state | Int | Heating state |
marax/pump/state | Int | Pump state |
- Wire.h (OLED)
- Adafruit_GFX.h (OLED)
- Adafruit_SSD1306.h (OLED)
- PubSubClient (MQTT)