Jyers / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. | Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
http://marlinfw.org
GNU General Public License v3.0
2.14k stars 387 forks source link

[FR] When printing from OctoPrint show the actual filename instead of "Host Print" #238

Closed Schnabulation closed 3 years ago

Schnabulation commented 3 years ago

Description

One of the biggest advantages of this firmware is when printing from a host like OctoPrint the DWIN display switches to the print screen and displays the same informations as when printing from SD card. ...except for one thing: on the top it displays "Host Print" instead of the actual filename:

IMG_3084

Would it be feasible to get the filename from OctoPrint and then display this? Maybe have "(Printing from OctoPrint)" on a second line or something...

I could not find any information regarding the functions needed to query the filename from OctoPrint and I believe this would be necessary to send the string to the display. Maybe someone else knows this - or else this can be closed. It's just an idea...

jjfs127 commented 3 years ago

Asked this question as well in a previous issue. I suspect that the reason this may not already be implemented is possibly due to the fact the maybe only the dos filename is available (8.3 w/extension). But I could be wrong.

Jyers commented 3 years ago

I haven't looked into this in a while, as it is easy enough to send the filename as part of your M117 information, but now that I think of it, I could implement a format of some kind which told the display to use the M117 as the filename above. It would require some way of sending the filename on connect, which might require coding a plugin or something of the like, but it would be possible.

Majestry commented 3 years ago

As workaround, you can use Cura with Post-processing plugin. There is an option Display filename and layer on LCD - by default it will add next commands to Gcode file for each line M117 Layer 1 of 44 {file name} Also, you can configure your own text there . But if you have DsiplayLayerProgress and it's configured to send M117 commands - then ,most probably, it will earlier or later overwrite the M117 from gcode.

Schnabulation commented 3 years ago

Thank you, I appreciate your workaround. However: I already have DisplayLayerProgress installed and as you can see it displays flawlessly all M117 commands. But M117 sets the LCD message which gets written into the dedicated text bar in the middle of the screen. I would like to have "Host Print" replaced with the filename.

But this is just a "nice to have" and nothing deal breaking as I can just check the filename in OctoPrint or my iOS app. It would certainly make the display look a bit cleaner.

Jyers commented 3 years ago

This has been implemented with the latest commit. All you need to do it add M117 <F>{{ event.name }} after M75 in your octoprint "Before print job starts" gcode script.

Schnabulation commented 3 years ago

Wow, this is great new - thank you very much for this!