sysadminsh / octoprint-m73etaoverride Goto Github PK
View Code? Open in Web Editor NEWPlugin that overrides OctoPrint ETA to values from last M73 gcode sent to the printer.
Plugin that overrides OctoPrint ETA to values from last M73 gcode sent to the printer.
The plugin's estimate is first shown 5 mins after a print started, even though valid M73 R... codes are being sent every minute, starting at the very beginning of the gcode. Until that, a value different from the one returned by the plugin is shown.
For example, I have a print that starts with M73 P0 R34. Octoprint shows remaining time 40 min for the first 5 minutes of the print, and after that it starts showing M73 times: 29 mins, 28 mins etc.
I have written estimates returned by M73PrintTimeEstimator.estimate method and it indeed returns proper values:
2019-01-31 18:12:32,688 - octoprint.plugins.m73etaoverride - INFO - M73 FOUND
2019-01-31 18:12:33,087 - octoprint.plugins.m73etaoverride - INFO - Estimate requested, m73time=34.0, estimate=2040
...
2019-01-31 18:12:33,087 - octoprint.plugins.m73etaoverride - INFO - Estimate requested, m73time=34.0, estimate=2040
...
2019-01-31 18:13:31,778 - octoprint.plugins.m73etaoverride - INFO - M73 FOUND
2019-01-31 18:13:31,890 - octoprint.plugins.m73etaoverride - INFO - Estimate requested, m73time=33.0, estimate=1980
...
2019-01-31 18:14:28,367 - octoprint.plugins.m73etaoverride - INFO - M73 FOUND
2019-01-31 18:14:28,772 - octoprint.plugins.m73etaoverride - INFO - Estimate requested, m73time=32.0, estimate=1920
...
2019-01-31 18:15:25,043 - octoprint.plugins.m73etaoverride - INFO - M73 FOUND
2019-01-31 18:15:25,124 - octoprint.plugins.m73etaoverride - INFO - Estimate requested, m73time=31.0, estimate=1860
...
2019-01-31 18:16:20,286 - octoprint.plugins.m73etaoverride - INFO - parsed value=30.0
2019-01-31 18:16:20,968 - octoprint.plugins.m73etaoverride - INFO - Estimate requested, m73time=30.0, estimate=1800
...
2019-01-31 18:17:17,093 - octoprint.plugins.m73etaoverride - INFO - M73 FOUND
2019-01-31 18:17:17,262 - octoprint.plugins.m73etaoverride - INFO - Estimate requested, m73time=29.0, estimate=1740
However, the Octoprint shows 40 minutes for the first 5 minutes, until the point the M73 R29 is received. Then it starts showing proper times.
Hi,
Thank you for great plugin, that's brilliant idea!
Now that octoprint knows exact time it'll finish. It would be nice if it could display it in format days, hours:minutes. It still uses the old displaying scheme of rounding up the remaining time to x hours left.
It seems with a recent update to Slic3r PE the M73 codes were disabled by default. Before I realized this was the case, and reenabled it, all my prints were stuck with an estimate of "1 minute, 0 seconds" throughout the entire print, rendering the eta estimate entirely nonfunctional. A much better behavior would be to automatically fallback to the conventional estimate when no M73 codes are present in the gcode.
When using this plugin, and have notifications for metadata analysis enabled, the finished event (MetadataAnalysisFinished
) doesn't occur until after the print has completed.
Any idea why?
Here's my last print log
2019-08-19 12:30:11,324 - octoprint.filemanager.analysis - INFO - Starting analysis of local:eb14a36b-c79f-40ee-a169-cdd7036fff5b_0.2mm_PLA_MK3S.gcode
2019-08-19 12:30:11,349 - octoprint.filemanager.analysis - INFO - Invoking analysis command: /home/octo/src/OctoPrint/venv/bin/python -m octoprint analysis gcode --speed-x=6000 --speed-y=6000 --max-t=10 --throttle=0.0 --
throttle-lines=100 /home/octo/.octoprint/uploads/eb14a36b-c79f-40ee-a169-cdd7036fff5b_0.2mm_PLA_MK3S.gcode
2019-08-19 12:30:11,524 - octoprint.printer.standard.job - INFO - Print job selected - origin: local, path: eb14a36b-c79f-40ee-a169-cdd7036fff5b_0.2mm_PLA_MK3S.gcode, owner: admin, user: admin
2019-08-19 12:30:11,595 - octoprint.util.comm - INFO - Changing monitoring state from "Operational" to "Starting"
2019-08-19 12:30:11,618 - octoprint.printer.standard.job - INFO - Print job started - origin: local, path: eb14a36b-c79f-40ee-a169-cdd7036fff5b_0.2mm_PLA_MK3S.gcode, owner: admin, user: admin
2019-08-19 12:30:11,647 - octoprint.util.comm - INFO - M110 detected, setting current line number to 0
2019-08-19 12:30:11,674 - octoprint.util.comm - INFO - Changing monitoring state from "Starting" to "Printing"
2019-08-19 12:30:12,899 - octoprint.plugins.tracking - INFO - Sent tracking event print_started, payload: {'origin': 'local', 'file': 'e1e517a89a2eff0a8db39072f840e56a504acec8'}
2019-08-19 12:36:33,254 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2019-08-19 12:37:02,171 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 143132}
2019-08-19 12:51:33,257 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2019-08-19 12:52:02,263 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 144032}
2019-08-19 13:06:33,260 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2019-08-19 13:07:02,255 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 144932}
2019-08-19 13:14:09,062 - octoprint.util.comm - INFO - Finished in 2637.469 s.
2019-08-19 13:14:09,064 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Finishing"
2019-08-19 13:14:09,071 - octoprint.filemanager.analysis - INFO - Starting analysis of local:eb14a36b-c79f-40ee-a169-cdd7036fff5b_0.2mm_PLA_MK3S.gcode
2019-08-19 13:14:09,075 - octoprint.filemanager.analysis - INFO - Invoking analysis command: /home/octo/src/OctoPrint/venv/bin/python -m octoprint analysis gcode --speed-x=6000 --speed-y=6000 --max-t=10 --throttle=0.0 --throttle-lines=100 /home/octo/.octoprint/uploads/eb14a36b-c79f-40ee-a169-cdd7036fff5b_0.2mm_PLA_MK3S.gcode
2019-08-19 13:14:09,111 - octoprint.plugins.filamentmanager - INFO - Filament used: 2356.99606 mm (tool0)
2019-08-19 13:14:09,126 - octoprint.printer.standard.job - INFO - Print job done - origin: local, path: eb14a36b-c79f-40ee-a169-cdd7036fff5b_0.2mm_PLA_MK3S.gcode, owner: admin
2019-08-19 13:14:09,186 - octoprint.util.comm - INFO - Changing monitoring state from "Finishing" to "Operational"
2019-08-19 13:14:09,743 - octoprint.events - INFO - Executing a system command
2019-08-19 13:14:10,760 - octoprint.plugins.tracking - INFO - Sent tracking event print_done, payload: {'origin': 'local', 'file': 'e1e517a89a2eff0a8db39072f840e56a504acec8', 'elapsed': 2637}
2019-08-19 13:14:32,642 - octoprint.filemanager.analysis - INFO - Analysis of entry local:eb14a36b-c79f-40ee-a169-cdd7036fff5b_0.2mm_PLA_MK3S.gcode finished, needed 23.57s
Please add Python 3 Compatibility as outlined here.
just installed it on octopi through the plugin manager and this is a 10hr print but the whole time it's been: Print Time Left: a minute
The display on the Prusa works fine
OctoPrint 1.3.9 running on OctoPi 0.14.0
Slic3rPE 1.41.0
Please add Python 3 Compatibility as outlined here.
Printer LCD screen says 2:15 remaining
Octoprint says 2.5 remaining.
Seems way off?
Noticed this in my logs while trying to find why my octoprint server died.
2018-10-28 15:20:17,381 - octoprint.plugins.softwareupdate - ERROR - Error while retrieving update information from plugin m73etaoverride
Traceback (most recent call last):
File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/softwareupdate/init.py", line 111, in _get_configured_checks
hook_checks = hook()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_m73etaoverride/init.py", line 19, in get_update_information
displayName=self._plugin_name,
NameError: global name 'self' is not defined
I don't think its my main issue but would be nice to know if your plugin has an update.
When starting a print from the printer's SD card, the plugin will never receive the M73 gcodes. However when those are executed by the printer, the following line is received on the serial console:
NORMAL MODE: Percent done: 82; print time remaining in mins: 220
A suggestion would be to update the ETA when these are received if M73 gcodes are not being received. This would enable the accurate ETA for SD card prints.
Thank you in advance!
It looks like the Plugin doesn't have any effect on the displayed remaining time. Using OctiPi 0.17 with OctoPrint 1.4.0
Change in feed rate should affect the displayed time estimate.
E.g. if the time left for print is 10 min at 100%, then at 150% it should be 10/150% = 6,7 min.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.