AlexVerrico / octoprint-stats

Stats for your octoprint instance. Mirrored from https://github.com/amsbr/OctoPrint-Stats originally
14 stars 8 forks source link

[Feature Request] Integration with Plugin PrintJobHistory #29

Open beunoutch opened 3 years ago

beunoutch commented 3 years ago

Hello, In order to have statistics on all the printing history of the life of the printer, we use another PrintJobHistory plug-in which builds an SQLITE database on all printing components. https://plugins.octoprint.org/plugins/PrintJobHistory/ is it possible to use this database to feed your plug-in which is really very well done. I contacted the creator of PrintJobHistory so that he could add stats like yours to his plug-in but here is his response:

_""Hi @beunoutch, statistics/reports is an endless topic. Each user wants different data in a different format. That's the reason why I decided to just make a simple stats-popup instead of a full blown stats-plugin, like https://plugins.octoprint.org/plugins/stats/

But my goal is to "open" all the PrintJob-Data to other plugins, via WebService, WebSocket or Plugin-APIs. And I also want to store the data into a "real" database. So, that the user can connect to the database and generate it's own report. Maybe you can ask in the the stats-plugin author about an integration or ask in the OP-Forum (https://community.octoprint.org/) about developing such plugin.""_


I think that linking your 2 databases would be really great. could you adapt your plugin to analyze in addition to your database, the printJobHistory database I chose printJobHistory because there is filament management, the name of the parts with comments, photos .... so in addition to all your statistics it would be very interesting for example to have. -statistics by combining your 2 SQLITE databases.

AlexVerrico commented 3 years ago

G'Day @beunoutch This sounds like a great idea, but also quite a lot of work 😅 I am interested in looking into potentially integrating with the PrintJobHistory plugin, however I currently don't have much free time to work on this. Another concern that I have is that accessing the database directly could lead to issues if the PrintJobHistory plugin releases a backwards-incompatible update. For this reason, it would be better if an API was created to allow for exchange of data, allowing the author of PrintJobHistory greater freedom when developing their plugin. For these reasons, I am not able to put a timeframe on developing this feature. Cheers, Alex.


Attention any potential contributors: Contributions towards this feature are welcome, however please discuss here before you start working on it.

beunoutch commented 3 years ago

could you get in touch with him to see how to do this?

beunoutch commented 3 years ago

in the meantime, can you tell me where is the statistical printer database file used to make your graphs ?