This project was designed to be used with a Lelit MaraX espresso machine.
This repository is a rewrite of espresso_timer that has better doccumentation and is easier to use.
- NodeMCU (ESP8266) like the Wemos D1 Mini
- 0.96" oled display
- Reed sensor
- 3d printed case (3D Printer Monitor for Octoprint ESP8266 NodeMCU/3D Printer Monitor for OctoPrint Wemos D1 ESP8266)
In order to make NodeMCU working with Arduino IDE follow these instructions: https://www.instructables.com/id/Quick-Start-to-Nodemcu-ESP8266-on-Arduino-IDE/. If you having troubles insalling the Github dependencies follow this guide: Installing Arduino Library from GitHub.
This project uses the following dependencies:
- https://github.com/adafruit/Adafruit_SSD1306
- https://github.com/adafruit/Adafruit_BusIO
- https://github.com/adafruit/Adafruit-GFX-Library
- https://github.com/knolleary/pubsubclient/
- https://github.com/JChristensen/Timer
You connect the oled display like this:
- Glue the reed switch onto the machine's vibration pump
- The reed switch goes to ground and D7
Open the underside of the machine and you will see a 6 pin connector.
- Connect pin 3 of the machine (RX) to pin D6 (TX) of nodeMCU
- Connect pin 4 of the machine (TX) to pin D5 (RX) of nodeMCU
In case this does not work, change the pins connection (pin 3 to D5 & pin 4 to D6)
The timer display will power on and off with the MaraX.
When the pump will start, the timer on the screen will also start counting.
When the pump is stopped, the time will remain printed on the screen (if more that 15 seconds have passed) until the next time the pump is activated.
The time is not recorded unless 15 seconds have passed because MaraX machine starts the pump by itself from time to time to fill the boiler with water.
If you connect the ESP to the wifi and provide a MQTT bridge the following messages will be broadcasted:
/marax/power
withon
oroff
/marax/pump
withon
oroff
/marax/hx
with the current temperature of the heat exchanger/marax/steam
with the current temperature of the steam boiler/marax/shot
with the duration of the last shot (if the shot took longer than 15 seconds)/marax/machineheating
withon
oroff
/marax/machineheatingboost
withon
oroff
If you want to get this to work with your homeassistant server do the following.
Install Mosquitto broker on your homeassistant server and setup Home Assistant to connect to the broker as per the oficial instructions
Once the broker is up and running and Home Assistant is able to connect to it you will want to add the MQTT sensors into your configuration, for Home Assistant to pick them up. Use the following code for this.
sensor:
# Espresso timer Mara X
- platform: mqtt
name: Marax Brew Temp
state_topic: "/marax/hx"
unit_of_measurement: "C"
- platform: mqtt
name: Marax Steam Temp
state_topic: "/marax/steam"
unit_of_measurement: "C"
- platform: mqtt
name: Marax Shot Timer
state_topic: "/marax/shot"
unit_of_measurement: "Seconds"
state_class: measurement
binary_sensor:
#Espresso timer Mara X
- platform: mqtt
name: Marax Machine power
state_topic: "/marax/power"
payload_on: 'on'
payload_off: 'off'
- platform: mqtt
name: Marax Machine pump
state_topic: "/marax/pump"
payload_on: 'on'
payload_off: 'off'
- platform: mqtt
name: Marax Heating
state_topic: "/marax/machineheating"
payload_on: 'on'
payload_off: 'off'
- platform: mqtt
name: Marax Steam Boost
state_topic: "/marax/machineheatingboost"
payload_on: 'on'
payload_off: 'off'
When all this is done reboot the Home Assistant server and you will then be able to use the MQTT sensors in cards as in the following picture.