Giter VIP home page Giter VIP logo

octoprint-m73etaoverride's Introduction

OctoPrint M73 ETA Override

Plugin that overrides OctoPrint ETA to values from last M73 gcode sent to the printer.

The last Sli3cr Prusa Edition implemented M73 gcode injecting to the generated gcodes. This M73 estimations works a much better for Prusa printers than normal OctoPrint ETA estimator. M73 are displayed on Prusa LCD already directly after receiving gcode so there is nothing to change but I think that it will be good to make this better estimation available also on other OctoPrint sources (web/mobile etc) so this plugin will override OctoPrint estimation with estimation from last M73 gcode sended.

Setup

Install via the bundled Plugin Manager or manually using this URL:

https://github.com/sysadminsh/OctoPrint-M73ETAOverride/archive/master.zip

Configuration

No configuration required. Just install plugin and it will start to overriding OctoPrint ETA with last M73 gcode.

Please note that if printer is starting (heating or leveling bed) ETA will show less than one minute.

octoprint-m73etaoverride's People

Contributors

jneilliii avatar sgomes avatar sysadminsh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

octoprint-m73etaoverride's Issues

Error while retrieving update information

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.

Feature request: Update ETA when "NORMAL MODE: Percent done..." is received via the serial console

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!

Plugin causes late MetadataAnalysisFinished event

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

always "Print Time Left: a minute"

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

Exact time not displayed

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.

Plugin's estimate first shown 5 minutes after a print started

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.

Bug report/feature request: allow fallback to normal estimate when M73 codes not present

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.