[]()
[
]()
A OctoPrint-Plugin that sends the current progress of a print via M117 command to the printer-display and also to the top navigation bar.
This plugin, as well as my other plugins were developed in my spare time. If you like it, I would be thankful about a cup of coffee :)
It shows:
Progress, M73Progress, EstimatedEndTime, PrintTimeLeft,
CurrentLayer, TotalLayerCount, last/average LayerDuration,
CurrentHeight, TotalHeight, Feedrate, Fanspeed,
ChangeFilamentTimeLeft, EstimatedChangeFilamentTime and ChangefilamentCount (based on M600 command location in file)
Printer State
Currently printed filename
Bed and Tool Temperatures
Some output examples:
50% L=60/120 H=23mm/47mm
60 / 120 Height: 23mm of 47mm
12% 19:32 o'clock
Output pattern is adjustable!
Detailed description how the plugin works, could be find in the wiki: https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/wiki/How-does-the-plugin-works
ATTENTION:
;LAYER:10
). Then these indicators are parsed via a regular-expression.M117 INDICATOR-Layer
). This is necessary, because during printing OctoPrint removes all comments from g-code.;MAXZ:([0-9]+[.]*[0-9]*).*
to evaluate the max height Issue #82Comment Format Examples:
CURA: ;LAYER:10
Simplify3D: ; layer 10, Z = 1.640
The implementation is based on four steps:
A more detailed technical description could be found in this wiki-page: How-does-the-plugin-works
If you receive a popup message: "Layer indicator not found in file!", then check Layer-Indicator comments in the layer-settings section against your g-code. If you adjust the layer expression, then you need to reupload your g-code file again.
Install via the bundled Plugin Manager or manually using this URL:
https://github.com/OllisGit/OctoPrint-DisplayLayerProgress/releases/latest/download/master.zip
After installation, you can listen on three release channels (since 1.28.0). What does this mean: Each channel has its own release-version and each release has a different kind of functionality and stability.
Changing between each release is done via the "Software Update section" in the settings.
!!! If you use the development-channel, you can use the latest feature and can improve the quality of the plugin !!!
Hint: "Easy-switching" is possible with OctoPrint-Version 1.8.0 (see https://github.com/OctoPrint/OctoPrint/issues/4238). At the meantime you need to uninstall and install the version you like from the selected channel...or stay in one channel ;-)
It is possible to change the Output. See Plugin-Settings:
see Release-Overview
You can receive the layer/height and other values via a GET-Call.
curl -H "X-Api-Key:57FECA453FE94D46851EFC94BC9B5265" http://localhost:5000/plugin/DisplayLayerProgress/values
{
"currentFilename": "AE10_xyzCalibration_cube.gcode",
"fanSpeed": "69%",
"feedrate": "3000",
"feedrateG0": "3000",
"feedrateG1": "953.8",
"height": {
"current": "8.00",
"currentFormatted": "8"
"total": "15.00",
"totalFormatted": "15",
"totalWithExtrusion": "10.0", //DEPRECATED don't use it will be removed in version 1.19.0
"totalWithExtrusionFormatted": "10" //DEPRECATED don't use it will be removed in version 1.19.0
},
"layer": {
"averageLayerDuration": "0h:01m:03s",
"averageLayerDurationInSeconds": 63,
"current": "39",
"lastLayerDuration": "0h:00m:58s",
"lastLayerDurationInSeconds": 58,
"total": "49"
},
"print": {
"printerState": "printing",
"progress": "73",
"m73progress": "86",
"timeLeft": "40s",
"timeLeftInSeconds": 40,
"estimatedEndTime": "20:24",
"changeFilamentCount": 3,
"changeFilamentTimeLeft": "32s",
"changeFilamentTimeLeftInSeconds": 32,
"estimatedChangedFilamentTime": "22:36",
}
}
Plugin sends the following custom events to the eventbus like this:
eventManager().fire(eventKey, eventPayload)
EventKeys |
---|
DisplayLayerProgress_frontEndCall |
DisplayLayerProgress_progressChanged |
DisplayLayerProgress_layerChanged |
DisplayLayerProgress_heightChanged |
DisplayLayerProgress_feedrateChanged |
DisplayLayerProgress_fanspeedChanged |
DisplayLayerProgress_printerStateChanged |
DisplayLayerProgress_m73ProgressChanged |
DisplayLayerProgress_m600Occurred |
Payload
{
'updateReason', // values: frontEndCall, heightChanged, progressChanged,
// m73ProgressChanged, layerChanged, ... see EventKeys
'totalLayer':'66',
'currentLayer':'22',
'currentHeight':'6.80',
'currentHeightFormatted':'6',
'totalHeight':15
'totalHeightFormatted':'15',
'totalHeightWithExtrusion':'20.0', //DEPRECATED don't use it will be removed in version 1.19.0
'totalHeightWithExtrusionFormatted':'20', //DEPRECATED don't use it will be removed in next version 1.19.0
'feedrate':'2700',
'feedrateG0':'7200',
'feedrateG1':'2700',
'fanspeed':'100%',
'progress':'28',
'm73progress':'33',
'printerState':'printing',
'lastLayerDuration':'0h:00m:03s',
'lastLayerDurationInSeconds':3,
'averageLayerDuration':'0h:00m:02s',
'averageLayerDurationInSeconds':2,
'printTimeLeft':'2m3s',
'printTimeLeftInSeconds':123,
'estimatedEndTime':'20:24',
'estimatedChangedFilamentTime': '20:22',
'changeFilamentTimeLeft': '1m12s,
'changeFilamentTimeLeftInSeconds': 72,
'changeFilamentCount': 2,
'currentFilename': 'AE10_xyzCalibration_cube.gcode'
}
Other Plugins could listen to this events in there python-code like this:
eventmanager.subscribe("DisplayLayerProgress_layerChanged", self._myEventListener)
or use octoprint.plugin.EventHandlerPlugin
with something like this:
def on_event(self, event, payload):
if event == "DisplayLayerProgress_layerChanged":
## do something usefull
If enabled in the plugin-settings the above event-payload is also send via websocket to the client.
Other Plugins could listen to this events in there javascript-code like this:
self.onDataUpdaterPluginMessage = function (plugin, data) {
if (plugin == "DisplayLayerProgress-websocket-payload") {
// .. do somethig useful with the data
return;
}
Goes to: