Setting OctoPrint's remaining time via Slic3r PE 1.40's M73 gcode


TL;DR: can a plugin change the progress and ETA as given by Slic3r's new M73 gcode or does it require a core change?

Hello all,
Prusa's Slic3r PE 1.40 offers a feature that adds M73 codes using a specific format to display the remaining print time on compatible printers:

Slic3r PE 1.41.0-alpha3 combined with our new firmware has this feature already implemented. Starting with the alpha2 release of Slic3r PE, a new M73 code is added in G-codes and the printer will inform the user about the time remaining. This value is refreshed every minute and works both for the Normal and Stealth (silent) mode. Please note you need firmware 3.3.0 or higher.
The format of the new M73 code is the following:
M73 Pxxx Qxxx Rxxx Sxxx
where P is the percentage of the total time already printed in normal mode, R is the time remaining for normal mode in minutes, Q is the percentage of the total time printed in the stealth mode, and S is the time remaining to the end of print in the stealth mode.

I found it to be both quite accurate and quite different form OctoPrint's estimate; even the percentage varies because I think that Prusa's algorithm is based on actual print volume whereas OctoPrint's is likely based on how far into the gcode file it's gotten.

I was wondering if there's any way for OctoPrint to use such M73 format to update its own display of remaining time and percentage; of course it wouldn't be able to know if the printer is in normal or stealth mode, but the normal mode would be a safe default in my opinion. Its usage may be limited to Prusa's printers but I imagine Marlin may start implementing at least the R parameter at some point (P is already supported, and indeed there's a plugin for OctoPrint that injects M73 lines while printing by reading the percentage.)

Could a plugin do this at all? I briefly looked at the docs, and it looks like the current print progress can be detected via on_print_progress(), but I'm not sure if it can be overwritten without changing the "core" code of OctoPrint.



It sounds like there's already a thread on the same subject. The suggestion then would be the same.


It is indeed, my apologies. I had started typing this a few days ago, then got sidetracked, and was sure I had searched again before finishing the post and sending it. (Oops!)

I can't seem to delete it so I'm going to mark your post as solving the issue. Thanks for the patience :slight_smile:


who's for !!!!!!! sake is choosing the codes !?!?!? M73 is SAVE MODAL STATE ?!?! M codes 100 and up are custom codes, why the !!!!!!!!! is constantly selecting codes that actually do have already assigned function to do new stuff ?!




More like Makterbot than Slic3r, according to they were the first to use M73 for that (Marlin also takes it, if support is compiled in). Prusa just expanded it with other parameters so they're the lesser sinners, in my humblest opinion. :slight_smile:


I missed the other ones (would not notice the slic3r is doing it if I didn't by accident read it here) .. I'm confused why the !!!!! they just don't google for the code they want to add and see what it is used for currently ?!?!? like it's a problem to say cool, noone is using M99xxx let us use M99000 till M99999 for new 3d printing stuff ?! njah .. we still don't have a simple serial communication standard defined so that one can know what to expect, let alone make ppl acknowledge they are using standardized code and that just randomly selecting codes they wanna use ... :frowning:


@arhi I'm personally using M888 (dibs on that).

M888: Set DRM hash

Sets the digital rights management hash for decrypting the extrusion amount as seen in the file. The hash value represents the Keccak256 hash of the Ethereum transaction in which the print job has been authorized for the DRM client's particular MAC address.

I'd add that to the public reprap wiki but as soon as I do, I'm bound to get some competition and a bunch of blockchain wannabe's trying to jack my style.


no, noooo, noooooooooooooooooooo, noooooooooooooooooooooooooooooooo the bc madness entered the 3d printing world to ... nooooooooooooooooooooooooooooooooooooo


Appears someone beat me to it....