2024-12-28 13:19:15 +00:00
|
|
|
#ESPHome - Marlin2
|
|
|
|
### A component that reads Marlin status and messages from the uart.
|
2024-12-28 13:14:50 +00:00
|
|
|
![alt text](image.png)
|
2024-12-27 10:35:43 +00:00
|
|
|
|
|
|
|
A configured uart is required.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
```yaml
|
2024-12-30 11:19:10 +00:00
|
|
|
|
|
|
|
marlin2:
|
|
|
|
uart_id: uart_bus
|
|
|
|
|
|
|
|
switch:
|
|
|
|
- platform: restart
|
|
|
|
name: "Restart Printer"
|
|
|
|
|
2024-12-27 10:35:43 +00:00
|
|
|
sensor:
|
2024-12-27 20:06:46 +00:00
|
|
|
- platform: marlin2
|
2024-12-27 14:04:48 +00:00
|
|
|
bed_temperature:
|
|
|
|
name: Current Bed Temp
|
2024-12-27 20:06:46 +00:00
|
|
|
bed_set_temperature:
|
|
|
|
name: Set Bed Temp
|
2024-12-27 14:04:48 +00:00
|
|
|
ext_temperature:
|
|
|
|
name: Current Ext Temp
|
2024-12-27 20:06:46 +00:00
|
|
|
ext_set_temperature:
|
|
|
|
name: Set Ext Temp
|
|
|
|
print_progress:
|
|
|
|
name: Progress
|
2024-12-30 11:19:10 +00:00
|
|
|
print_time:
|
|
|
|
name: "pRINT_time"
|
|
|
|
print_time_remaining:
|
|
|
|
name: "pRINT_time_remaining"
|
|
|
|
|
|
|
|
text_sensor:
|
|
|
|
- platform: marlin2
|
|
|
|
printer_state:
|
|
|
|
name: status
|
2024-12-27 10:35:43 +00:00
|
|
|
```
|
|
|
|
|
2024-12-28 13:14:50 +00:00
|
|
|
Notes:
|
2024-12-27 20:06:46 +00:00
|
|
|
* https://github.com/ssieb/esphome_components/tree/master/components/serial_csv
|
|
|
|
* https://github.com/esphome/esphome/blob/dev/esphome/components/dht/sensor.py#L34
|
2024-12-28 10:47:59 +00:00
|
|
|
* https://github.com/mulcmu/esphome-marlin-uart
|
2024-12-30 08:42:31 +00:00
|
|
|
* https://github.com/oxan/esphome-stream-server/blob/master/components/stream_server/stream_server.cpp
|
2024-12-31 07:18:35 +00:00
|
|
|
* https://github.com/esphome/esphome/blob/dev/esphome/components/api/__init__.py
|
2024-12-28 10:47:59 +00:00
|
|
|
|
2024-12-28 13:14:50 +00:00
|
|
|
Full COnfiguration:
|
|
|
|
```yaml
|
2024-12-28 10:47:59 +00:00
|
|
|
esphome:
|
|
|
|
name: vasek-ender-3
|
|
|
|
friendly_name: vasek-ender-3
|
|
|
|
|
|
|
|
external_components:
|
|
|
|
- source: components
|
2024-12-30 11:19:10 +00:00
|
|
|
|
2024-12-28 10:47:59 +00:00
|
|
|
esp8266:
|
2024-12-30 11:19:10 +00:00
|
|
|
board: esp01_1m
|
2024-12-28 10:47:59 +00:00
|
|
|
|
|
|
|
logger:
|
|
|
|
baud_rate: 0
|
|
|
|
esp8266_store_log_strings_in_flash: False
|
2024-12-30 11:19:10 +00:00
|
|
|
|
2024-12-28 10:47:59 +00:00
|
|
|
# Enable Home Assistant API
|
|
|
|
api:
|
|
|
|
encryption:
|
2024-12-30 11:19:10 +00:00
|
|
|
key: "="
|
2024-12-28 10:47:59 +00:00
|
|
|
|
|
|
|
ota:
|
|
|
|
- platform: esphome
|
|
|
|
password: ""
|
|
|
|
|
|
|
|
wifi:
|
|
|
|
ssid: !secret wifi_ssid
|
|
|
|
password: !secret wifi_password
|
2024-12-30 11:19:10 +00:00
|
|
|
|
2024-12-28 10:47:59 +00:00
|
|
|
# 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
|
|
|
|
|
2024-12-30 11:19:10 +00:00
|
|
|
marlin2:
|
|
|
|
uart_id: uart_bus
|
|
|
|
|
2024-12-28 10:47:59 +00:00
|
|
|
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
|
2024-12-30 11:19:10 +00:00
|
|
|
print_progress:
|
|
|
|
name: Progress
|
|
|
|
print_time:
|
|
|
|
name: "pRINT_time"
|
|
|
|
print_time_remaining:
|
|
|
|
name: "pRINT_time_remaining"
|
|
|
|
|
|
|
|
text_sensor:
|
|
|
|
- platform: marlin2
|
|
|
|
printer_state:
|
|
|
|
name: status
|
2024-12-28 10:47:59 +00:00
|
|
|
```
|