Code Monkey home page Code Monkey logo

octoprint-printhistory's People

Contributors

armicron avatar guysoft avatar imrahil avatar justin-chandra avatar lumbric avatar merlindk avatar tedder avatar wilkov avatar

Stargazers

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

Watchers

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

octoprint-printhistory's Issues

Deleting a print from history causes list to resort

Regardless of the beginning sort order, when i pressing to delete an entry, the record is deleted however the list resorts into a pattern that doesn't appear obvious. See screenshots 1 (pre-delete) and 2 (after deletion).

In addition,although likely a separate defect, if i delete a record while a print is in progress, the printer pauses on and off for ~3-5 seconds while the deletion is being processed.

I'm on a Pi2
latest Dev build of Octoprint (1.3.0 dev95...) but i have seen this behavior even prior to the 1.2 upgrade.
Running 0.6 version of print history

screenshot1
screenshot2

Set Default Sort Order

Could the default sort order be set to show the most resent print first? Or have the plugin remember the last sort order used?

Large delay when accessing /history

See OctoPrint/OctoPrint#1241 (comment)

Causing print stuttering issues when accessing the web interface with lots of history entries.

Is it possible to avoid accessing /history until the history tab is actually opened? That would be an immediate quick fix as it shouldn't need that data when not on the history tab.

Nothing Showing Up

Just installed this plugin fresh with a fully updated octoprint server. Nothing is showing up int he history tab. the tab is there with the framework, but it is not pulling in any print history. I installed via the plugin manager in octoprint. Any suggestions or missing steps that I can try?

Duplicate entries and missing entries

Greetings,

I'm using 1.0 and seeing some missing entries, double entries, and entries that are marked as failed prints.

I've attached history.db and history.bak. For good measure, I also include my old history.yaml which ended after the upgrade, but might prove useful. These are all zipped up in the attachment. If I can provide any additional information, please let me know.

Thank you,

John

PrintHistory-20161222.zip

Missing Data

I don't understand why sometimes there is data missing on successful prints. Sometimes it's just the time missing. Sometimes it's the time and the filament. Anyone know why this might be and if I can do something to prevent it?

image

Unable to read history

My History tab is empty, and I get this in my log:

2015-09-06 15:42:38,084 - octoprint - ERROR - Exception on /plugin/printhistory/history [GET]
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_printhistory/__init__.py", line 64, in getHistoryData
    raise IOError("Couldn't read history data from {path}".format(path=self._history_file_path))
IOError: Couldn't read history data from /home/pi/.octoprint/data/printhistory/history.yaml

The history.yaml file is accessible to the pi user (and cat'ing it works fine):

pi@octopi ~/.octoprint/logs $ ls -lh /home/pi/.octoprint/data/printhistory/history.yaml
-rw-r--r-- 1 pi pi 21K Sep  6 15:42 /home/pi/.octoprint/data/printhistory/history.yaml

octoprint is run by the pi user:

pi@octopi ~/.octoprint/logs $ ps auxwwf | grep octoprint
pi        2304 18.0  7.6 170728 29236 ?        Sl   10:35  59:12 /home/pi/oprint/bin/python /home/pi/oprint/bin/octoprint --host=127.0.0.1 --port=5000

It seems like this would be a permissions issue, but I can't figure out what exactly is causing this.

csv / excel export fails

Both exports gives the following error (runing on Octoprint 1.2.0-dev-834):

Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.

Even if the server is doing "nothing" so the "overloaded" isn't very possible...

Track User Prints

It would be nice to make use of the User Access Control feature to also log which user issued which print. On a multi-user environment having something like this could be particularly useful.
@imrahil do you think this is possible?

ProgrammingError: You did not supply a value for binding 3

Hi everyone!

Some of my Print History entries get lost due to a error in the plugin. For example:

Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint-1.3.0-py2.7.egg/octoprint/plugin/init.py", line 229, in call_plugin
result = getattr(plugin, method)(*args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_printhistory/init.py", line 118, in on_event
return eventHandler.eventHandler(self, event, payload)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_printhistory/eventHandler.py", line 97, in eventHandler
cur.execute("INSERT INTO print_history (fileName, note, filamentVolume, filamentLength, printTime, success, timestamp) VALUES (:fileName, :note, :filamentVolume, :filamentLength, :printTime, :success, :timestamp)", currentFile)
ProgrammingError: You did not supply a value for binding 3.

Not all entries get lost, some are working properly. See the attached log file for more examples.
octoprint.log.txt
I cannot figure out why this is happening or how I could prevent it.

I'm using Octoprint 1.3.0 Master with Print History 1.0.0 on a Raspberry Pi B+ with my Prusa i3 MK2.
As a remote control I use the app OctoDroid on Android 7.1.1

Thanks for any help!
And happy new year!

Print History Plugin (0.4) stopped working

I originally installed Print History Plugin (0.4) from the Plugin Manager and everything worked then one day when I went to the History tab no data showed up.

Uninstalled Print History from the Plugin Manager and rebooted
opened up terminal

source ~/oprint/bin/activate
cd ~/OctoPrint
git pull & git checkout devel
python setup.py clean
 python setup.py install
pip install https://github.com/imrahil/OctoPrint-PrintHistory/archive/master.zip
sudo service octoprint restart

Tried it again but no success. History tab opens but no data shows on the tab even after I printed some things

screen shot 2015-06-14 at 5 42 23 pm

Cannot Export CSV or Excel

I received this message when attempting to export the history in either CSV or Excel format.


Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.


This happened after I seem to have shocked the printer with electrostatic charge. After rebooting, everything else with octoprint seems to be working fine. This happened once before awhile back & just reinstalled everything to fix it.

I am running octoPrint
Version: 1.3.0-dev-2-g1796c92 (devel branch)
Print History Plugin (0.5.1)

I also have your Navbar Temperature Plugin (0.6) installed & that is working fine.

Lost to the history of printing.

I use plugins least two months, ever I had a lot of data, after the restart of octoprint I have set HISTORY empty. Is the ability to recover data?

All diagrams are empty

Hello!
After update to OctoPrint 1.2.7 all diagrams are empty. No more data is showen.

Print History Backup and Restore

Where is the data stored for the print history? If I am doing a clean installation of octoprint can I import my previous history?

Store Settings

It would be great to be able to open up the details of each print and see what settings it was done with. This would be really useful when I want to reproduce old prints. The extreme, and likely well beyond the scope of this plugin, version would be to archive/version the entire gcode file so that one really could just hit reprint.

Add API support

It would be fantastic if information from the history could be fetched via the OctoPrint API. Not sure what you'd have to do or if it's possible. I'd be interested in helping with this, if/as needed.

Fail reason logging

This is a feature suggestion: It would be really nice if I could select a reason for printing fail (e.g. unstuck print, hot end issue, malfunction, filament issue) and be able to see a breakdown of fail reasons in the stats. This would be best implemented by a fillable drop-down list - you click the failed print job and select an existing fail reason or add a new one. Thank you for an awesome tool! :)

Track Feed Rate

Your plugin is very insterresting in order to track our past prints but also to plan the next prints, it would be interresting to have the feedrate used in the prints in order to correlate/reproduce the print with the same settings.

I know that the feedrate can change during the print but capture the current feedrate at print end could be enough.

Plugin not working

Sorry if this is not the best place for this but I have not found any other resources. I installed your plugin on my new OctoPi installation and the plugin installed correctly but the history remains blank after a couple of days. Is there some configuration I am missing to enable this? I am able to connect to my printer and complete prints and I have a few other plugins installed that are working but I would like to get this one working as well.

Any help is appreciated, and thanks for creating this plugin.

octoprint.plugin - ERROR

Printhistory is not working on my raspberry pi 3 running octoprint 1.3.0. I installed PrintHistory from the plugin manager.

Here is there error message from the octoprint.log:

2017-01-01 05:18:21,162 - octoprint.plugin - ERROR - Error while calling plugin printhistory Traceback (most recent call last): File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint-1.3.0-py2.7.egg/octoprint/plugin/__init__.py", line 229, in call_plugin result = getattr(plugin, method)(*args, **kwargs) File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_printhistory/__init__.py", line 118, in on_event return eventHandler.eventHandler(self, event, payload) File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_printhistory/eventHandler.py", line 97, in eventHandler cur.execute("INSERT INTO print_history (fileName, note, filamentVolume, filamentLength, printTime, success, timestamp) VALUES (:fileName, :note, :filamentVolume, :filamentLength, :printTime, :success, :timestamp)", currentFile) ProgrammingError: You did not supply a value for binding 3.

Any assistance would be greatly appreciated.

Missing Trash Can

I have version 0.7 installed but I am not seeing the Trash Can for deleting jobs from the list.

Cancelled print reported as "success"

I've cancelled a print in middle (using web gui "cancel" button) but history shows it as "success" job. Cancelled shouldn't be considered a success.

Allow More Editing

I would like to have the ability to edit the data for completed prints to manually change success/fail or to manually set the filament used when it is blank because octoprint didn't calculate it.

Filament usage empty

Most of my prints do not have a value at filament usage. Yesterday I printed the same .gcode twice. Only one of them got a value in filament usage.

I would like to add the missing values by editing the file - would you please provide me the file format and a description of the fields.

Filament Usage blank

I just ran two test prints using V 0.7, and with both prints the Filament usage showed no data.

If I expand the print file to show more info in the File library however it does correctly show the filament and volume from the gcode, so OctoPrint itself appears to be ware of the materials data. It seems to not be recorded by the History plugin though. I've tried two prints, both were the same model, but were sliced using two different programs (Cura and Simplify3D) and exported in two different gCode flavors. (Ultimaker Native and RepRap)
screenshot 2016-01-08 22 09 37

Total Time for all prints not displayed

I do not know whether this worked before, but the total time for all prints displays as a "-" only. I looked in the octoprint.log file & this is the only error I see. 2015-07-23 18:24:26,620 - py.warnings - WARNING - /home/pi/oprint/local/lib/python2.7/site-packages/requests-2.7.0-py2.7.egg/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.

Here is a screen capture from my firefox browser running under Windows 7 Pro.
octoprint

[REQUEST] Add cost per print

Ideally we should be able to set up an associated "price per material/spool" for each print file, but if at first stage it's too much, just set up an "average price per spool" field and calculate price per print accordingly?

Lost History with new History Upgrade

Help - I completely lost all my previous History when I ran the last update to the History module. It was 10 months of printing history. Is there some way to recover that?

Could you add Change Spool?

Could you add option to track by spool or filament color? I was tracking my black spool usage, but changed to white last night and now the data doesn't help me calculate how much of my spool has been used.
Is there a way to reset all the data? If I can't separate by spool or color?

I would want the print statistics to maintain across spools.

Export Filament Usage

Hello,

Currently the total filament usage exported seems to be the total length. Any chance the script can be modified to export the filament usage by tool?

Thanks for the great plugin!
Ken

Print time and filament usage not showing

Hi,
On a fresh Octoprint 1.3 everything is working fine except as the title says. I've done 4 prints from it so far (all successful), but I only get the Date and the status of the print, no other information ("-").
Do I need to setup something?

Track filament spool

Feature Request:
If we can mark each print in the history as coming from a spool, then we can use this to track spool inventory.
Being able to enter what spools I have, how much they cost and how much filament is on the spool. Then for each print in the history, select a spool it came from.
A spool inventory screen could show all the spools and how much filament remains in each.

Filament usage not tracked every time

Hi I wonder under which circumstances (or what needs to be set) the used filement lenght gets tracked?
Sometimes there is a value - sometimes not. But used same slicer with same settings and both prints succeeded.
Can you clarify? Or update the Readme / Docs?

That would be great.

See attaced image for what i mean.
bildschirmfoto vom 2017-02-26 15-16-21

Missing filament usage info in history

Filament usage sometimes not recorded. I just got such print:
"filament-wall-holder2.gcode 2015-05-13 04:05 03:05:22 -"

Now it didn't save filament usage info and log doesn't say why:
2015-05-13 04:05:13,049 - octoprint.plugins.printhistory - INFO - event: PrintDone
2015-05-13 04:05:13,062 - octoprint.plugins.printhistory - INFO - metadata for filament-wall-holder2.gcode
2015-05-13 04:05:13,067 - octoprint.plugins.printhistory - INFO - printTime: 11122.7004569
2015-05-13 04:05:13,069 - octoprint.plugins.printhistory - INFO - success: True, timestamp: 1431482712.2

Add more stats

Need more stats:

  • average print time
  • total cost (need settings)
  • average cost
  • average filament length / volume

printhistory failing with AttributeError: 'NoneType' object has no attribute 'parse'

I installed printhistory plugin on octoprint 1.3.1, and I don't have any print history information, and I am getting the following error in the logs:

2017-03-03 00:26:21,166 - octoprint.plugins.detailedprogress - INFO - Printing stopped. Detailed progress stopped.
2017-03-03 00:26:21,222 - octoprint.plugin - ERROR - Error while calling plugin printhistory
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint-1.3.1-py2.7.egg/octoprint/plugin/init.py", line 229, in call_plugin
result = getattr(plugin, method)(*args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_printhistory/init.py", line 146, in on_event
return eventHandler.eventHandler(self, event, payload)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_printhistory/eventHandler.py", line 46, in eventHandler
parameters = gcode_parser.parse()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint_printhistory/parser.py", line 25, in parse
parameters = self.parser_factory.parse(self.file)
AttributeError: 'NoneType' object has no attribute 'parse'

Error while writing to history.yaml

Ever since I updated to the latest version of the plugin I've been getting this error when trying to write to the history.yaml file.

2016-04-06 06:35:06,619 - octoprint.plugin - ERROR - Error while calling plugin printhistory
Traceback (most recent call last):
  File "/home/ubuntu/OctoPrint/src/octoprint/plugin/__init__.py", line 204, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/octoprint_printhistory/__init__.py", line 63, in on_event
    return eventHandler.eventHandler(self, event, payload)
  File "/usr/local/lib/python2.7/dist-packages/octoprint_printhistory/eventHandler.py", line 115, in eventHandler
    self._console_logger.exception("Error while writing history.yaml to {path}".format(**locals()))
KeyError: 'path'

Log filament used and time for Failed Prints

Ideally number of failed prints is low, but there are times a print fails after 6 hours of printing. During that time your bot's been running for 6 hours and it's used a ton filament. It would be great to capture this so that users have a try value for bot usage and filament used as a whole.

Please let me know if there are other details required for this enhancement request. Thank you.

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.