Home Assistant Integration for Lelit MaraX with ESPHome

I build an integration for my Lelit MaraX Espresso Machine for Home Assistant.

This integration is based on this great Reddit article

I used an Wemos Lolin32 to connect with the PID of the MaraX. The connection is done via UART.

The coffee machine sends the following data about 4 times a second:


First Character: C or S for Coffee-/Steam-Priority. Followed by the current firmware version. Second value: Actual steam temperature Third value: Target steam temperature Fourth value: Actual Heatexchanger temperature Fifth value: Remaining timer for fast heating Sixth value: Heating on/off

When data is received it is shown on the display (Actual temperature of heat exchanger and steam) and sent to Home Assistant.

ESP32 in Coffee mode

ESP32 in Coffee mode closeup

If no data is received for 5s the current time is shown instead.

ESP32 in Clock mode

In Home Assistant the data can be used to build dashboards.

ESP32 in Clock mode

ESP32 in Clock mode

Case: Wemos Lolin 32 OLED Box by pangodream - Thingiverse

The code can be found here

@manyos-robert Im just doing this same thing with my Lelit Elizabeth V3 I found the Gicar control box (its not as easy to get to as your MaraX), and just looking at the pins… could you remember or confirm which colours you added to which pins? it looks like pin 2 (green) and 3 (white) from left to right in this pic?

EDIT: Read the Reddit link article a bit closer and have my answer - Green wire (TXD) to Pin 3 and White (RXD) to Pin 4

1 Like

I absolutely love this!

I actually opened my Gicar unit to check the correct pinout, as it turns out (at least for the V2 version) all available pinouts are wrong. The 4th pin from the wall is the actual ground pin. By using this pin you can draw 12V fro the 12V pin of the buzzer connector labeled on the cartridge, that sits right next to the 6 pin aux port. The Tx pin is actually the one right next to the Ground pin (Pin 3 from the wall) and is all you need to hook up to read data from the Gicar. After all we don’t know any commands the Gicar understands anyway. Until somebody dumps the firmware of the ST mcu that does all the magic.

Marking on the MCU is:

1 Like

In case anyone is interested in trying to dump the ST MCU firmware, CN8 is the On-board Programming port. That being said, the firmware is very likely readout protected.

Fun fact, the board is extremely similar to the corresponding board in the Lelit Bianca, but the firmware is very different (in the Bianca, there’s an additional board, the LCC, which does all of the interesting stuff like PID, so for that machine role of this board is basically just an IO board).

I’ve documented the protocol on the Bianca at GitHub - magnusnordlander/lelit-bianca-protocol: Project notes for trying to sniff and reverse engineer the protocol used for LCC information on the Lelit Bianca. I’ve also considered designing an open source replacement for these boards (I’ve designed one that replaces the LCC), but I’ve only done low voltage boards before, so doing a mains voltage one scares me :sweat_smile:

1 Like

Do you know the pinout of the programming port? I have a stlink v2, I could try a dump fwiw.
I was also considering doing my own electronics, but I figured especially in the Mara X the logic might be slightly more sophisticated than slapping a pid on some temp probes, as it seems Lelit really knows how to keep the hx temps in sane ranges and spent quite some effort getting these right.

The only thing I’d ask would be to set my brewing temperatures independent of the 3 way switch we have in the mara. But I’m pretty sure that’s quite a stretch to ask for.

Nice work on the Bianca! I had an eye on here but she was just too far off budget, and I don’t have the space for her.

Just looking at an incomplete reverse engineering of the control board I did a while ago (where U5 is the MCU component):

Pin 1: +5V
Pin 2: U5_PD1
Pin 3: GND
Pin 4: U5_NRST

I’ve uploaded the partial schematic to https://github.com/open-lcc/control-board-schematic (pull requests are welcome).

By the way, you didn’t by any chance snap a photo of the high voltage side of the assembly? I’m a little interested to see if that is identical too.

1 Like