mulcmu / esphome-marlin-uart

Custom ESPhome device
MIT License
1 stars 2 forks source link

WOW brilliant did it support any printer running marlin 2.0 #1

Open GamerClassN7 opened 2 years ago

GamerClassN7 commented 2 years ago

Would be possible to use it with Carlity Ender 3 With board 4.2.7 which have exposed 5v gnd rx tx pins ?

Maybe would be nice to have button to auto home printer right or to send costume gcode for example to turn off fans and geating by automation after printer finished the print :)

I am open to co-operation in development if possible :)

P.S. Would be nice to convert this repo to officinal ESP external component standard, so it is more easy accessible to other users :) https://esphome.io/components/external_components.html

mulcmu commented 2 years ago

It should work with any Marlin 2 firmware, having serial output that matches the expected format for the parsing to work is the biggest compatibility factor.

Looks like others have gotten ESP3D running on the Ender 4.2.7 board so this ESPhome module should work.

My printer has the built in ESP8266 module so hardware buttons would be hard to implement. I have some software scripts setup in HA that act like buttons for the preheat services. image

I'd like to keep the services dedicated to single gcode command vs ability to send an arbitrary string due to no success/error feedback.

I was still treating this like a work in progress, using the slicer computed time was the next thing I was going to implement. I'll add the External Components formatting to the todo list.

GamerClassN7 commented 2 years ago

Then if i can suggest would by possible to implement auto-home, and bed leveling commands ?

GamerClassN7 commented 2 years ago

image image

I get to test your component how ever id don't work for me. any idea why ?

GamerClassN7 commented 2 years ago

Manage to get that working by changing baudrate image how ever only temperatures are reported :(

mulcmu commented 2 years ago

Which ESP8266 are you using?

Can you connect a USB to serial adapter to confirm proper connection and the baud rate?

GamerClassN7 commented 2 years ago

Which ESP8266 are you using?

Can you connect a USB to serial adapter to confirm proper connection and the baud rate?

🆙 read my previous comment image I think there is something wrong with UART messages send by controller

I am using Wemos D1 mini

GamerClassN7 commented 2 years ago

how ever i dont really know how to use external serial adapter to read those messages

GamerClassN7 commented 2 years ago

What is the last part ? image first two sets are Temperatures but rest ?

GamerClassN7 commented 2 years ago

image image

also on print finish status finally changed to Finished but now it stayed there new print is still marked as finished

mulcmu commented 2 years ago

Are you printing from SD or USB?

GamerClassN7 commented 2 years ago

SD image also others are set only on 100% of print

but not updated

mulcmu commented 2 years ago

It looks like the string I was using to detect start of print doesn't appear in your output so state never transitions to printing where remaining time and percent are updated.

https://github.com/mulcmu/esphome-marlin-uart/blob/527486af7d94756abe7f7ef56df65c60100e166f/esphome-marlin-uart.h#L358-L371

Try replacing line 359 with

if(MarlinOutput.startsWith(String("File selected"))) {

GamerClassN7 commented 2 years ago

hmm printing state is workin as soon as i start the print other values also

GamerClassN7 commented 2 years ago

i will send some feedback tomorow

GamerClassN7 commented 2 years ago

Hmm 🤔 another interesting thing is that when print is stopped random remaining times and elapsed are reported

GamerClassN7 commented 2 years ago

i cecked whole file esphome-marlin-uart/esphome-marlin-uart.h and made MR with typo error i found which was causing some issue during use :) Fell free to merge it :) also want to ask would be possible to incorporate service to send any gcode from hass ? that way would be almos everything possible, even autohome button as i mentioned above :D

mulcmu commented 2 years ago

Hmm 🤔 another interesting thing is that when print is stopped random remaining times and elapsed are reported

Could you post the ESPHome log file showing the printer stopping and the random values being sent?

GamerClassN7 commented 2 years ago

Hmm 🤔 another interesting thing is that when print is stopped random remaining times and elapsed are reported

Could you post the ESPHome log file showing the printer stopping and the random values being sent?

Will do on weekend since during workdays i dont haw as much time :(

GamerClassN7 commented 2 years ago

Hee you go image

GamerClassN7 commented 2 years ago

Any idea why ?

mulcmu commented 2 years ago

The remaining print time is an estimate based on the percentage complete and the current elapsed time. The percentage complete is based on file size of the .gcode file which may not be a good approximation for the actual percentage complete depending on the model characteristics. In your screen shot above Elapsed time of 327 seconds and 1.2% complete gives estimate of 27,250 seconds or 7.5 hours to complete.

One of the TODO items was to use the slicer computed total time instead of the estimate. This will require some extra start gcode be added to support. The time computed by CURA seems to be pretty accurate on my machine. Different slicers will have different formats but this is what I was using for CURA:

M117 Estimated print time: {print_time};
M118 P0 Estimated print time {print_time};
GamerClassN7 commented 2 years ago

I don't have problem with print time but with, screenshot i send are data when print is stopped, that i meant by random values shouldn't she state be stoped and other values set to unknown since printer is not printing ?

GamerClassN7 commented 1 year ago

@mulcmu just noticed that your component stoped working in latest wersion of marlin can i so something mo kae it work again ?

mulcmu commented 1 year ago

What wasn't working, Are there any error messages? I'll look into updating my delta to see if I can figure it out.

GamerClassN7 commented 1 year ago

y delta to

Hi just all values reguarding the marlin module are unknown

GamerClassN7 commented 1 year ago

image other values as uptime are corectly reported

GamerClassN7 commented 1 year ago

Any luck @mulcmu

mulcmu commented 1 year ago

Still working on updating to release 2.1.2 on my printer...

Can you send command M155 S10 to the printer via usb and cut and paste the temperature response? Should be something like this:

T:157.35 /0.00 B:56.56 /0.00 @:0 B@:0
or
T:219.64 /220.00 (313.7500) B:60.05 /60.00 (3426.9375) @:86 B@:46
GamerClassN7 commented 1 year ago

How preciselly i can do that ower USB ?

mulcmu commented 1 year ago

Here was link for using Pronterface is nice as it has terminal window to send commands in addition to the GUI.

mulcmu commented 1 year ago

Can you try the .h from this branch to see if it works now?

https://github.com/mulcmu/esphome-marlin-uart/tree/temp_changes

GamerClassN7 commented 1 year ago

Hello unforchunately it is stil same :/

image image

GamerClassN7 commented 1 year ago

Hi @mulcmu, Finally had some time to little bit of thinkering, i noticed thant marlin changed default baud rate to difrent value from 9600 now it is 115200 I am able to read soome values now image

but image

Are always null.... :( should i try to update marlin firmware again ?

mulcmu commented 1 year ago

Looks like some progress. Could yo post a screen shot of the ESPhome logs starting and aborting a print like this prior one.

GamerClassN7 commented 1 year ago

shure Will Doo :)

GamerClassN7 commented 1 year ago

here you ho @mulcmu
image

GamerClassN7 commented 11 months ago

Any news ? @mulcmu

mulcmu commented 10 months ago

I just pushed some changes to main that generalize the logic for detecting when printer starts printing.

Could you give these a try?

GamerClassN7 commented 10 months ago

Console output is deferent, but values are still unknown :( image image

GamerClassN7 commented 10 months ago

hmm interesting image

GamerClassN7 commented 10 months ago

image it show some walue in tooltip hmm maybe something wrong with new version of esp home ?

GamerClassN7 commented 10 months ago

maybe format of send data is not correct ?

mulcmu commented 10 months ago

Could you print 2 or 3 small test parts and send the esphome logs for the complete prints using the download logs button? During one print could you pause it via UI and then resume. If you have a runout sensor could you force a runout too.

image

GamerClassN7 commented 10 months ago

Could you print 2 or 3 small test parts and send the esphome logs for the complete prints using the download logs button? During one print could you pause it via UI and then resume. If you have a runout sensor could you force a runout too.

image

Will try to do :) also after deletion and reregistration of device i get at least state entity ok image

fran6120 commented 9 months ago

First of all, thank you for this component. I use it on an esp32cam connected to an Artillery Genius 3D printer, with marlin 2.1.1

Like @RGamerClassN7, I can't see the progress, time left or print time.

The status entity, when the printer is idle shows "idle" but when it is printing it shows "preheat" In this case it does not correspond.

Captura de pantalla 2023-11-27 172048

Another issue is that I cannot compile this component using the "esp-idf" framework instead of "arduino" since the camera component has better performance on esp-idf.

logs:

INFO ESPHome 2023.12.0-dev
INFO Reading configuration /config/artillery-genius.yaml...
INFO Detected timezone 'Etc/UTC'
WARNING GPIO0 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
WARNING GPIO5 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing artillery-genius (board: esp32cam; framework: espidf; platform: platformio/espressif32@5.4.0)
--------------------------------------------------------------------------------
Library Manager: Installing esphome/noise-c @ 0.1.4
INFO Installing esphome/noise-c @ 0.1.4
Unpacking  [####################################]  100%
Library Manager: noise-c@0.1.4 has been installed!
INFO noise-c@0.1.4 has been installed!
Library Manager: Resolving dependencies...
INFO Resolving dependencies...
Library Manager: Installing esphome/libsodium @ 1.10018.1
INFO Installing esphome/libsodium @ 1.10018.1
Unpacking  [####################################]  100%
Library Manager: libsodium@1.10018.1 has been installed!
INFO libsodium@1.10018.1 has been installed!
Library Manager: Installing espressif/esp32-camera @ 1.0.0
INFO Installing espressif/esp32-camera @ 1.0.0
Unpacking  [####################################]  100%
Library Manager: esp32-camera@1.0.0 has been installed!
INFO esp32-camera@1.0.0 has been installed!
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - framework-espidf @ 3.40405.230623 (4.4.5) 
 - tool-cmake @ 3.16.4 
 - tool-ninja @ 1.7.1 
 - toolchain-esp32ulp @ 2.35.0-20220830 
 - toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
Reading CMake configuration...
Generating assembly for certificate bundle...
Dependency Graph
|-- noise-c @ 0.1.4
|-- esp32-camera @ 1.0.0
Compiling .pioenvs/artillery-genius/src/esphome/components/api/api_connection.o
Compiling .pioenvs/artillery-genius/src/esphome/components/api/api_frame_helper.o
Compiling .pioenvs/artillery-genius/src/esphome/components/api/api_pb2.o
Compiling .pioenvs/artillery-genius/src/esphome/components/api/api_pb2_service.o
Compiling .pioenvs/artillery-genius/src/esphome/components/api/api_server.o
Compiling .pioenvs/artillery-genius/src/esphome/components/api/list_entities.o
Compiling .pioenvs/artillery-genius/src/esphome/components/api/proto.o
Compiling .pioenvs/artillery-genius/src/esphome/components/api/subscribe_state.o
Compiling .pioenvs/artillery-genius/src/esphome/components/api/user_services.o
Compiling .pioenvs/artillery-genius/src/esphome/components/button/button.o
Compiling .pioenvs/artillery-genius/src/esphome/components/captive_portal/captive_portal.o
Compiling .pioenvs/artillery-genius/src/esphome/components/custom/sensor/custom_sensor.o
Compiling .pioenvs/artillery-genius/src/esphome/components/custom/text_sensor/custom_text_sensor.o
Compiling .pioenvs/artillery-genius/src/esphome/components/esp32/core.o
Compiling .pioenvs/artillery-genius/src/esphome/components/esp32/gpio.o
Compiling .pioenvs/artillery-genius/src/esphome/components/esp32/preferences.o
Compiling .pioenvs/artillery-genius/src/esphome/components/esp32_camera/esp32_camera.o
Compiling .pioenvs/artillery-genius/src/esphome/components/esp32_camera_web_server/camera_web_server.o
Compiling .pioenvs/artillery-genius/src/esphome/components/gpio/switch/gpio_switch.o
Compiling .pioenvs/artillery-genius/src/esphome/components/homeassistant/time/homeassistant_time.o
Compiling .pioenvs/artillery-genius/src/esphome/components/internal_temperature/internal_temperature.o
Compiling .pioenvs/artillery-genius/src/esphome/components/ledc/ledc_output.o
Compiling .pioenvs/artillery-genius/src/esphome/components/light/addressable_light.o
Compiling .pioenvs/artillery-genius/src/esphome/components/light/automation.o
Compiling .pioenvs/artillery-genius/src/esphome/components/light/esp_color_correction.o
Compiling .pioenvs/artillery-genius/src/esphome/components/light/esp_hsv_color.o
Compiling .pioenvs/artillery-genius/src/esphome/components/light/esp_range_view.o
Compiling .pioenvs/artillery-genius/src/esphome/components/light/light_call.o
Compiling .pioenvs/artillery-genius/src/esphome/components/light/light_json_schema.o
Compiling .pioenvs/artillery-genius/src/esphome/components/light/light_output.o
Compiling .pioenvs/artillery-genius/src/esphome/components/light/light_state.o
Compiling .pioenvs/artillery-genius/src/esphome/components/logger/logger.o
Compiling .pioenvs/artillery-genius/src/esphome/components/md5/md5.o
Compiling .pioenvs/artillery-genius/src/esphome/components/mdns/mdns_component.o
Compiling .pioenvs/artillery-genius/src/esphome/components/mdns/mdns_esp32.o
Compiling .pioenvs/artillery-genius/src/esphome/components/mdns/mdns_esp8266.o
Compiling .pioenvs/artillery-genius/src/esphome/components/mdns/mdns_host.o
Compiling .pioenvs/artillery-genius/src/esphome/components/mdns/mdns_libretiny.o
Compiling .pioenvs/artillery-genius/src/esphome/components/mdns/mdns_rp2040.o
Compiling .pioenvs/artillery-genius/src/esphome/components/network/util.o
Compiling .pioenvs/artillery-genius/src/esphome/components/ota/ota_backend_arduino_esp32.o
Compiling .pioenvs/artillery-genius/src/esphome/components/ota/ota_backend_arduino_esp8266.o
Compiling .pioenvs/artillery-genius/src/esphome/components/ota/ota_backend_arduino_libretiny.o
Compiling .pioenvs/artillery-genius/src/esphome/components/ota/ota_backend_arduino_rp2040.o
Compiling .pioenvs/artillery-genius/src/esphome/components/ota/ota_backend_esp_idf.o
Compiling .pioenvs/artillery-genius/src/esphome/components/ota/ota_component.o
Compiling .pioenvs/artillery-genius/src/esphome/components/output/automation.o
Compiling .pioenvs/artillery-genius/src/esphome/components/output/float_output.o
Compiling .pioenvs/artillery-genius/src/esphome/components/psram/psram.o
Compiling .pioenvs/artillery-genius/src/esphome/components/restart/button/restart_button.o
Compiling .pioenvs/artillery-genius/src/esphome/components/sensor/automation.o
Compiling .pioenvs/artillery-genius/src/esphome/components/sensor/filter.o
Compiling .pioenvs/artillery-genius/src/esphome/components/sensor/sensor.o
Compiling .pioenvs/artillery-genius/src/esphome/components/socket/bsd_sockets_impl.o
Compiling .pioenvs/artillery-genius/src/esphome/components/socket/lwip_raw_tcp_impl.o
Compiling .pioenvs/artillery-genius/src/esphome/components/socket/lwip_sockets_impl.o
Compiling .pioenvs/artillery-genius/src/esphome/components/socket/socket.o
Compiling .pioenvs/artillery-genius/src/esphome/components/status_led/light/status_led_light.o
Compiling .pioenvs/artillery-genius/src/esphome/components/switch/automation.o
Compiling .pioenvs/artillery-genius/src/esphome/components/switch/switch.o
Compiling .pioenvs/artillery-genius/src/esphome/components/template/sensor/template_sensor.o
Compiling .pioenvs/artillery-genius/src/esphome/components/text_sensor/filter.o
Compiling .pioenvs/artillery-genius/src/esphome/components/text_sensor/text_sensor.o
Compiling .pioenvs/artillery-genius/src/esphome/components/time/automation.o
Compiling .pioenvs/artillery-genius/src/esphome/components/time/real_time_clock.o
Compiling .pioenvs/artillery-genius/src/esphome/components/uart/uart.o
Compiling .pioenvs/artillery-genius/src/esphome/components/uart/uart_component.o
Compiling .pioenvs/artillery-genius/src/esphome/components/uart/uart_component_esp32_arduino.o
Compiling .pioenvs/artillery-genius/src/esphome/components/uart/uart_component_esp8266.o
Compiling .pioenvs/artillery-genius/src/esphome/components/uart/uart_component_esp_idf.o
Compiling .pioenvs/artillery-genius/src/esphome/components/uart/uart_component_libretiny.o
Compiling .pioenvs/artillery-genius/src/esphome/components/uart/uart_component_rp2040.o
Compiling .pioenvs/artillery-genius/src/esphome/components/uart/uart_debugger.o
Compiling .pioenvs/artillery-genius/src/esphome/components/uptime/uptime_sensor.o
Compiling .pioenvs/artillery-genius/src/esphome/components/version/version_text_sensor.o
Compiling .pioenvs/artillery-genius/src/esphome/components/web_server_base/web_server_base.o
Compiling .pioenvs/artillery-genius/src/esphome/components/web_server_idf/web_server_idf.o
Compiling .pioenvs/artillery-genius/src/esphome/components/wifi/wifi_component.o
Compiling .pioenvs/artillery-genius/src/esphome/components/wifi/wifi_component_esp32_arduino.o
Compiling .pioenvs/artillery-genius/src/esphome/components/wifi/wifi_component_esp8266.o
Compiling .pioenvs/artillery-genius/src/esphome/components/wifi/wifi_component_esp_idf.o
Compiling .pioenvs/artillery-genius/src/esphome/components/wifi/wifi_component_libretiny.o
Compiling .pioenvs/artillery-genius/src/esphome/components/wifi/wifi_component_pico_w.o
Compiling .pioenvs/artillery-genius/src/esphome/components/wifi_info/wifi_info_text_sensor.o
Compiling .pioenvs/artillery-genius/src/esphome/components/wifi_signal/wifi_signal_sensor.o
Compiling .pioenvs/artillery-genius/src/esphome/core/application.o
Compiling .pioenvs/artillery-genius/src/esphome/core/color.o
Compiling .pioenvs/artillery-genius/src/esphome/core/component.o
Compiling .pioenvs/artillery-genius/src/esphome/core/component_iterator.o
Compiling .pioenvs/artillery-genius/src/esphome/core/controller.o
Compiling .pioenvs/artillery-genius/src/esphome/core/entity_base.o
Compiling .pioenvs/artillery-genius/src/esphome/core/helpers.o
Compiling .pioenvs/artillery-genius/src/esphome/core/log.o
Compiling .pioenvs/artillery-genius/src/esphome/core/scheduler.o
Compiling .pioenvs/artillery-genius/src/esphome/core/string_ref.o
Compiling .pioenvs/artillery-genius/src/esphome/core/time.o
Compiling .pioenvs/artillery-genius/src/esphome/core/util.o
Compiling .pioenvs/artillery-genius/src/main.o
Generating LD script .pioenvs/artillery-genius/memory.ld
Compiling .pioenvs/artillery-genius/app_trace/app_trace.o
Compiling .pioenvs/artillery-genius/app_trace/app_trace_util.o
Compiling .pioenvs/artillery-genius/app_trace/host_file_io.o
Compiling .pioenvs/artillery-genius/app_trace/gcov/gcov_rtio.o
Compiling .pioenvs/artillery-genius/app_update/esp_ota_ops.o
Archiving .pioenvs/artillery-genius/esp-idf/app_trace/libapp_trace.a
Compiling .pioenvs/artillery-genius/app_update/esp_app_desc.o
Compiling .pioenvs/artillery-genius/bootloader_support/src/bootloader_common.o
Archiving .pioenvs/artillery-genius/esp-idf/app_update/libapp_update.a
Compiling .pioenvs/artillery-genius/bootloader_support/src/bootloader_common_loader.o
Compiling .pioenvs/artillery-genius/bootloader_support/src/bootloader_clock_init.o
Compiling .pioenvs/artillery-genius/bootloader_support/src/bootloader_flash.o
Compiling .pioenvs/artillery-genius/bootloader_support/src/bootloader_mem.o
Compiling .pioenvs/artillery-genius/bootloader_support/src/bootloader_random.o
Compiling .pioenvs/artillery-genius/bootloader_support/src/bootloader_random_esp32.o
Compiling .pioenvs/artillery-genius/bootloader_support/src/bootloader_utility.o
Compiling .pioenvs/artillery-genius/bootloader_support/src/esp_image_format.o
Compiling .pioenvs/artillery-genius/bootloader_support/src/flash_encrypt.o
Compiling .pioenvs/artillery-genius/bootloader_support/src/secure_boot.o
In file included from src/main.cpp:61:
src/esphome-marlin-uart.h: In member function 'int component_MarlinUART::process_tempfeedback(float*, float*, float*, float*)':
src/esphome-marlin-uart.h:235:37: error: no matching function for call to 'std::__cxx11::basic_string<char>::replace(const char [2], const char [1])'
         MarlinOutput.replace(" ", "");
                                     ^
In file included from /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/string:52,
                 from /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/stdexcept:39,
                 from /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/array:39,
                 from src/esphome/components/api/api_noise_context.h:3,
                 from src/esphome/components/api/api_frame_helper.h:13,
                 from src/esphome/components/api/api_connection.h:3,
                 from src/esphome.h:3,
                 from src/main.cpp:3:
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1880:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(size_type __pos, size_type __n, const basic_string& __str)
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1880:7: note:   candidate expects 3 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1902:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(size_type __pos1, size_type __n1, const basic_string& __str,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1902:7: note:   candidate expects 5 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1927:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(size_type __pos, size_type __n1, const _CharT* __s,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1927:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1952:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(size_type __pos, size_type __n1, const _CharT* __s)
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1952:7: note:   candidate expects 3 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1976:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1976:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1994:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*]'
       replace(__const_iterator __i1, __const_iterator __i2,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1994:7: note:   candidate expects 3 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2014:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(__const_iterator __i1, __const_iterator __i2,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2014:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2036:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*]'
       replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s)
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2036:7: note:   candidate expects 3 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2057:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(__const_iterator __i1, __const_iterator __i2, size_type __n,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2057:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2084:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator, _InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
         replace(const_iterator __i1, const_iterator __i2,
         ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2084:9: note:   template argument deduction/substitution failed:
In file included from src/main.cpp:61:
src/esphome-marlin-uart.h:235:37: note:   candidate expects 4 arguments, 2 provided
         MarlinOutput.replace(" ", "");
                                     ^
In file included from /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/string:52,
                 from /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/stdexcept:39,
                 from /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/array:39,
                 from src/esphome/components/api/api_noise_context.h:3,
                 from src/esphome/components/api/api_frame_helper.h:13,
                 from src/esphome/components/api/api_connection.h:3,
                 from src/esphome.h:3,
                 from src/main.cpp:3:
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2114:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, _CharT*, _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*]'
       replace(__const_iterator __i1, __const_iterator __i2,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2114:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2125:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, const _CharT*, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*]'
       replace(__const_iterator __i1, __const_iterator __i2,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2125:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2136:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::pointer = char*]'
       replace(__const_iterator __i1, __const_iterator __i2,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2136:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2147:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >]'
       replace(__const_iterator __i1, __const_iterator __i2,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2147:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2172:21: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator, std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*]'
       basic_string& replace(const_iterator __i1, const_iterator __i2,
                     ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2172:21: note:   candidate expects 3 arguments, 2 provided
In file included from src/main.cpp:61:
src/esphome-marlin-uart.h:236:38: error: no matching function for call to 'std::__cxx11::basic_string<char>::replace(const char [3], const char [1])'
         MarlinOutput.replace("ok", "");
                                      ^
In file included from /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/string:52,
                 from /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/stdexcept:39,
                 from /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/array:39,
                 from src/esphome/components/api/api_noise_context.h:3,
                 from src/esphome/components/api/api_frame_helper.h:13,
                 from src/esphome/components/api/api_connection.h:3,
                 from src/esphome.h:3,
                 from src/main.cpp:3:
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1880:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(size_type __pos, size_type __n, const basic_string& __str)
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1880:7: note:   candidate expects 3 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1902:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(size_type __pos1, size_type __n1, const basic_string& __str,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1902:7: note:   candidate expects 5 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1927:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(size_type __pos, size_type __n1, const _CharT* __s,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1927:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1952:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(size_type __pos, size_type __n1, const _CharT* __s)
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1952:7: note:   candidate expects 3 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1976:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1976:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1994:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*]'
       replace(__const_iterator __i1, __const_iterator __i2,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:1994:7: note:   candidate expects 3 arguments, 2 provided
Compiling .pioenvs/artillery-genius/bootloader_support/src/flash_partitions.o
Compiling .pioenvs/artillery-genius/bootloader_support/src/flash_qio_mode.o
Compiling .pioenvs/artillery-genius/bootloader_support/src/bootloader_flash_config_esp32.o
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2014:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, const _CharT*, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(__const_iterator __i1, __const_iterator __i2,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2014:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2036:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*]'
       replace(__const_iterator __i1, __const_iterator __i2, const _CharT* __s)
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2036:7: note:   candidate expects 3 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2057:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type, _CharT) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type = unsigned int]'
       replace(__const_iterator __i1, __const_iterator __i2, size_type __n,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2057:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2084:9: note: candidate: 'template<class _InputIterator, class> std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator, _InputIterator, _InputIterator) [with _InputIterator = _InputIterator; <template-parameter-2-2> = <template-parameter-1-2>; _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]'
         replace(const_iterator __i1, const_iterator __i2,
         ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2084:9: note:   template argument deduction/substitution failed:
In file included from src/main.cpp:61:
src/esphome-marlin-uart.h:236:38: note:   candidate expects 4 arguments, 2 provided
         MarlinOutput.replace("ok", "");
                                      ^
In file included from /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/string:52,
                 from /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/stdexcept:39,
                 from /config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/array:39,
                 from src/esphome/components/api/api_noise_context.h:3,
                 from src/esphome/components/api/api_frame_helper.h:13,
                 from src/esphome/components/api/api_connection.h:3,
                 from src/esphome.h:3,
                 from src/main.cpp:3:
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2114:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, _CharT*, _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*]'
       replace(__const_iterator __i1, __const_iterator __i2,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2114:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2125:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, const _CharT*, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*]'
       replace(__const_iterator __i1, __const_iterator __i2,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2125:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2136:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::iterator = __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::pointer = char*]'
       replace(__const_iterator __i1, __const_iterator __i2,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2136:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2147:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::__const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >]'
       replace(__const_iterator __i1, __const_iterator __i2,
       ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2147:7: note:   candidate expects 4 arguments, 2 provided
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2172:21: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator, std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator, std::initializer_list<_Tp>) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_iterator = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >; typename __gnu_cxx::__alloc_traits<typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<_CharT>::other>::const_pointer = const char*]'
       basic_string& replace(const_iterator __i1, const_iterator __i2,
                     ^~~~~~~
/config/.esphome/platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:2172:21: note:   candidate expects 3 arguments, 2 provided
In file included from src/main.cpp:61:
src/esphome-marlin-uart.h: In member function 'void component_MarlinUART::process_line()':
src/esphome-marlin-uart.h:277:25: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'startsWith'
         if(MarlinOutput.startsWith(String(" T:"))   ||
                         ^~~~~~~~~~
src/esphome-marlin-uart.h:278:25: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'startsWith'
            MarlinOutput.startsWith(String("T:"))    ||
                         ^~~~~~~~~~
src/esphome-marlin-uart.h:279:25: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'startsWith'
            MarlinOutput.startsWith(String("ok T:")) ||
                         ^~~~~~~~~~
src/esphome-marlin-uart.h:280:25: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'startsWith'
            MarlinOutput.startsWith(String(" ok T:"))   ) {
                         ^~~~~~~~~~
src/esphome-marlin-uart.h:306:24: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'startsWith'
        if(MarlinOutput.startsWith(String("SD printing byte "))) {
                        ^~~~~~~~~~
src/esphome-marlin-uart.h:309:36: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'?
             current = MarlinOutput.substring(17).toInt();
                                    ^~~~~~~~~
                                    substr
src/esphome-marlin-uart.h:310:34: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'?
             total = MarlinOutput.substring(MarlinOutput.indexOf('/')+1).toInt();
                                  ^~~~~~~~~
                                  substr
src/esphome-marlin-uart.h:310:57: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'indexOf'
             total = MarlinOutput.substring(MarlinOutput.indexOf('/')+1).toInt();
                                                         ^~~~~~~
src/esphome-marlin-uart.h:330:24: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'startsWith'
        if(MarlinOutput.startsWith(String("echo:Print time: "))) {
                        ^~~~~~~~~~
src/esphome-marlin-uart.h:334:35: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'?
             S_time = MarlinOutput.substring(16);
                                   ^~~~~~~~~
                                   substr
src/esphome-marlin-uart.h:388:25: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'indexOf'
         if(MarlinOutput.indexOf(String("FilamentRunout")) != -1) {
                         ^~~~~~~
src/esphome-marlin-uart.h:394:25: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'indexOf'
Compiling .pioenvs/artillery-genius/bootloader_support/src/bootloader_efuse.o
         if(MarlinOutput.indexOf(String("paused")) != -1) {
                         ^~~~~~~
src/esphome-marlin-uart.h:401:25: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'indexOf'
         if(MarlinOutput.indexOf(String("Done printing")) != -1) {
                         ^~~~~~~
src/esphome-marlin-uart.h:412:25: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'indexOf'
         if(MarlinOutput.indexOf(String("resume")) != -1) {
                         ^~~~~~~
src/esphome-marlin-uart.h:420:25: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'startsWith'
         if(MarlinOutput.startsWith(String("Estimated print time "))) {
                         ^~~~~~~~~~
src/esphome-marlin-uart.h:422:35: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'substring'; did you mean 'substr'?
             S_time = MarlinOutput.substring(20);
                                   ^~~~~~~~~
                                   substr
src/esphome-marlin-uart.h:435:25: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'indexOf'
         if(MarlinOutput.indexOf(String("Printer halted")) != -1) {
                         ^~~~~~~
src/esphome-marlin-uart.h:441:25: error: 'using String = std::__cxx11::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'indexOf'
         if(MarlinOutput.indexOf(String("Print Aborted")) != -1) {
                         ^~~~~~~
Compiling .pioenvs/artillery-genius/bootloader_support/src/idf/bootloader_sha.o
Compiling .pioenvs/artillery-genius/cbor/tinycbor/src/cborencoder_close_container_checked.o
Compiling .pioenvs/artillery-genius/cbor/tinycbor/src/cborencoder.o
Archiving .pioenvs/artillery-genius/esp-idf/bootloader_support/libbootloader_support.a
Compiling .pioenvs/artillery-genius/cbor/tinycbor/src/cborerrorstrings.o
Compiling .pioenvs/artillery-genius/cbor/tinycbor/src/cborparser_dup_string.o
Compiling .pioenvs/artillery-genius/cbor/tinycbor/src/cborparser.o
Compiling .pioenvs/artillery-genius/cbor/tinycbor/src/cborpretty_stdio.o
Compiling .pioenvs/artillery-genius/cbor/tinycbor/src/cborpretty.o
Compiling .pioenvs/artillery-genius/cbor/tinycbor/src/cbortojson.o
*** [.pioenvs/artillery-genius/src/main.o] Error 1
========================= [FAILED] Took 30.80 seconds =========================

Still, thank you very much for this.

mulcmu commented 9 months ago

@fran6120 I'll look into the esp-idf compile issue.

Also, if you are able to get/post some logs that would be helpful to get the status issue figured out. Basically need to figure out what output the printer sends when a print starts/finished/aborts.

fran6120 commented 9 months ago

@fran6120 I'll look into the esp-idf compile issue.

Also, if you are able to get/post some logs that would be helpful to get the status issue figured out. Basically need to figure out what output the printer sends when a print starts/finished/aborts.

I did some tests with the esphome log running.

First I heated the extruder, then I cooled it.

I also started a print, then paused it.

I tried continuing the printing and stopping it.

Finally I also made an emergency stop.

All of that should be in the attached log.

logs_artillery-genius (copia)_logs.txt

I hope it is helpful. Thank you so much

mulcmu commented 9 months ago

@fran6120 @GamerClassN7

Does your marlin configuration_adv.h have HOST_ACTION_COMMANDS defined?

GamerClassN7 commented 9 months ago

ok into the esp-idf compile issue.

Also, if you are able to ge

Sorry did not had time to create the dump, yes i have HOST_ACTION_COMMANDS in marlin config

fran6120 commented 9 months ago

@fran6120 @GamerClassN7

Does your marlin configuration_adv.h have HOST_ACTION_COMMANDS defined?

This is what is in Configuration_adv.h

#define HOST_ACTION_COMMANDS                               // DIGA-Tech:
#if ENABLED(HOST_ACTION_COMMANDS)
  //#define HOST_PAUSE_M76                // Tell the host to pause in response to M76
  #define HOST_PROMPT_SUPPORT             // Initiate host prompts to get user feedback                      // DIGA-Tech:
  #if ENABLED(HOST_PROMPT_SUPPORT)
    #define HOST_STATUS_NOTIFICATIONS     // Send some status messages to the host as notifications          // DIGA-Tech:
  #endif
  //#define HOST_START_MENU_ITEM          // Add a menu item that tells the host to start
  //#define HOST_SHUTDOWN_MENU_ITEM       // Add a menu item that tells the host to shut down
#endif

Maybe I should uncomment "#define HOST_PAUSE_M76" "#define HOST_START_MENU_ITEM" and "#define HOST_SHUTDOWN_MENU_ITEM"?

How do they appear in your Configuration_adv.h?

Thanks so much!