I want to implement a "bigger" plugin as in the past. The last released plugins were just smaller improvements
Using of database-communication in python
Implement a plugin with a clean software architecture, like "separation of concern", documentation, project-management stuff
ReUse of already released plugin informations
The backend part is already finished. It collects the following informations and stores the data in a local database:
username
filename/path/size
start/endDateTime, duration
state
bed/nozzel temperature
layers, height
spoolname, material, diameter, density, costs
used filament length
take a snapshot-image after the print
Some of the informations were collected by these plugins: PreHeat, FilamentManager, DisplayLayerProgress.
So, the goal is to reuse as many information from 3rd party plugins as possible.
On my todo-list (https://github.com/OllisGit/OctoPrint-PrintJobHistory/projects/1) you can find plugins like: Octolaps, MultiCam, CostEstimation, PrintTimGenius
In the planning board you can see the progress and what feature is implemented next (e.g. finish settings-dialog)
Now comes the tricky part: UI development...bloody damn hard.
Currently I used the table of Print History-Plugin.
Hopefully I can release a first development version next week.
Well, some basic features are still not implemented (e.g. Filter/Sorting of History-Table).
You can see the current state of release #1 implementation in the updated README.
Beside the missing features I want to change the whole database access implementation.
Currently I am working in parallel on a SpoolManager-Plugin (see Filament database) and this plugin use "peewee" as a databaseframework. It looks really promissing and offers a lot of features (e.g. reducing lines of code, support for different database-vendors).
So, I think it will take more then one or two weekends for a "well proofed" release.
Please be patient..or just install the current implementation and play round...if you find errors/improvements or just leave some information what kind of feature is really important for you, feel free to raise an issue in github.
peewee is a Object Relational Mapping toolkit and (IMHO) sqlite3 is just a barebone database access-layer. With peewee you don't need to work with sql-statements, you work with python objects.
If you switch e.g. from mysql to Postgresql you don"t need to handle the different columntypes/expressions, this is done by peewee.
I think if you use just a few tables (<5) you can handle this by sqlite3, but if you use a more complex database model with a lot of relationships it is much harder. With peewee you just query with the flag 'recursive' and you get all related object. The same for deleting entries.
And finally: you save a lot of lines of code.
E.g. you only need to create your model-class and then with two lines the entry is created in the database:
note1 = Note.create(text='Went to the cinema')
note1.save()
I'll give it a go as soon as my current print job finishes, got just under 6 hours on a 21.5 hour multi-color print left to go using my palette. I noticed on your planning board power consumption gathering possibly from one of my plugins. Right now, the tplinksmartplug plugin is the only one I've integrated power gathering but when you get to that point I'd be glad to help/make changes to get some synergy. To be honest, you might find pulling the stats direct from tasmota devices within your plugin is actually pretty easy utilizing just web requests. I don't have a power monitoring device but I think the link to pull would be this one.
The new version includes the option to use the thumbnail from UltimakerFormatPackage-Plugin.
It was planned for release 2, but it was easy to implement and I want to use the "momentum" of the new released plugin
The plan is that rc5 is the last before I am bringing my plugin into the official repository.
has this plugin been updated to work with the latest version of OP? It stopped working for me at the first RC and it still doesnโt on the latest stable release.
only one feature is still in progress (CSV-Import). It is soooooo close to be finished and to be an official released. And yes, it is working with 1.3.x and 1.4.0
Thanks. No hurry. I was just curious. I never really got to use this plugin since I installed it like 2 weeks before I updated to RC1, and I've been looking forward to being able to use it since then. Thanks for the update.
And let me know if you need any testers. I'm always game for testing out stuff that might not be 100% ready.
fantastic news about the imminent release, is there any chance the CSV-import can fetch the data from the old PrintHistory? (that would be too good to be true I guess)