2025-03-05 19:03:06 +01:00
2025-03-03 09:47:28 +01:00
2025-03-05 19:03:06 +01:00
2025-03-05 19:03:06 +01:00
2025-03-05 19:03:06 +01:00
2025-03-05 19:03:06 +01:00
2025-03-05 17:42:01 +01:00
2024-12-30 10:39:19 +01:00
2024-12-30 10:39:19 +01:00

#ESPHome - Marlin2

A component that reads Marlin status and messages from the uart.

alt text

Home Assistant Dashboard Example

A configured uart is required.

Example:

api:
  actions:
    - action: 'set_bed_temperature'
      variables:
        temperature: int
      then:
        - marlin2.write_g_code
            gcode: !lampda "return temperature"
  ...
  
marlin2:
  uart_id: uart_bus

switch:
  - platform: restart
    name: "Restart Printer"

sensor:
  - platform: marlin2
    bed_temperature:
      name: Current Bed Temp
    bed_set_temperature:
      name: Set Bed Temp
    ext_temperature:
      name: Current Ext Temp
    ext_set_temperature:
      name: Set Ext Temp
    print_progress:
      name: Progress
    print_time:
      name: "pRINT_time"
    print_time_remaining:
      name: "pRINT_time_remaining"

text_sensor:
  - platform: marlin2
    printer_state:
      name: status

Notes:

Full COnfiguration:

esphome:
  name: vasek-ender-3
  friendly_name: vasek-ender-3

external_components:
  - source: components
  
esp8266:
  board: esp01_1m

logger:
  baud_rate: 0
  esp8266_store_log_strings_in_flash: False
  
# Enable Home Assistant API
api:
  encryption:
    key: "="

ota:
  - platform: esphome
    password: ""

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Vasek-Ender-3 Fallback Hotspot"
    password: ""

web_server:
  port: 80
  version: 3
  
uart:
  id: uart_bus
  tx_pin: GPIO1
  rx_pin: GPIO3
  baud_rate: 115200

marlin2:
  uart_id: uart_bus

switch:
  - platform: restart
    name: "Restart Printer"

sensor:
  - platform: uptime
    type: seconds
    name: Uptime Sensor

  - platform: marlin2
    bed_temperature:
      name: Current Bed Temp
    bed_set_temperature:
      name: Set Bed Temp
    ext_temperature:
      name: Current Ext Temp
    ext_set_temperature:
      name: Set Ext Temp
    print_progress:
      name: Progress
    print_time:
      name: "pRINT_time"
    print_time_remaining:
      name: "pRINT_time_remaining"

text_sensor:
  - platform: marlin2
    printer_state:
      name: status
Description
No description provided
Readme 364 KiB
Languages
C++ 68.9%
Python 31.1%