-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time until M600 feature? #115
Comments
So I've been working on this. I've got a standalone python script that works pulling from your api endpoint. Below is my code (sorry if it is so shabby.) if I'm able to figure out how to parse for the M600 in the files on octoprint, then I think I could somehow make this plugin import requests #layerChange=sys.argv[1] def secondsToText(secs): def getData(): def calculateAndPrint(data):
getData() |
'Current Layer is: 408' I added a time to change it for QOL. I would love to make this a thing |
Hi, nice idea! This function is still missing in OctoPrint! so if I would start to write a plugin that predict the filament change times. My plugin will look like this: Use the event-bus instead of the api, because I need a push-notification if a layer is changed instead of polling each second about the current layer-number. Use the on_event function and listen on "fileSelected" and "DisplayLayerProgress_layerChanged".
Look into my sourcecode, there you can find the event-handling and also the line by line parsing after selecting the file. ...maybe I can include your idea into my plugin....or maybe even better you want to contribute and add that feature to my plugin....what do you think? BR |
Hi @brandonscholet, I like the idea so much that I already started the implementation ;-) |
I've been looking through your source code and started the tutorial, but as I'm more of a bash guy and not python it's hard to give up grep. I was trying to figure out the best way to parse for the m600's and then look for the layer number in the next line. I totally get the 9-5, I'm at my 8-4 :) I feel like it would be easier to add in line with your script and extend your json API. I wonder if the printtimegenius and dashboard peeps would be interested in this too. It's cool to see that you like my idea. Let me know what I can test or what I can help with. |
Do you thing that this would be a great addition to the dashboard? Would PrintTimeGenius be able to calculate something like this? |
I've already got that request here: eyal0/OctoPrint-PrintTimeGenius#150 I have a good idea about how to do it, I just need to find the time to do it. :-) |
Sure, It sounds great but I have a couple of problems. My father in law recently passed away so I'm quite busy atm. I've also re-purposed my dev RPi to monitor his old house and I haven't had the time to set up a new dev env yet. |
Btw. the implementation is done. Hopefully I can cleanup some code today and push my implementation as a dev-release to github. |
@OllisGit Funny, I just made the same thing! I wonder if we used the same techniques. https://github.com/eyal0/OctoPrint-TimeToFilament |
Hi, You can download it via: @eyal0 I looked into your implementation and it looks totally different. My Plugin:
Please test and give me a feedback! |
The data structure looks nice. The first issue I see is that the average layer duration is zero, so the whole first layerit thinks the change is this minute. This average will always be wild until the first few solid layers are done. When I wrote my proof of concept, I took remaining time / remaining layers and that gave me a pretty good result. It even helped estimate when the second layer change was. Maybe there is a good middle ground for this? Otherwise I love it. Thanks for keeping the dream alive. |
Hi @brandonscholet , To be honest I didn't thought a lot about a good prediction time. |
…Python3 bug - #115 optimize the first output of the filamentchangetime
Hi @brandonscholet, |
I'll need to see if the update changes from the dev one you gave me, the issue with calculating by average layer time is still an issue. Sometimes it can take hours to get back to change the filament out and that can rapidly balloon the avg layer time I waited 20 minutes and did the change. It was then showing that the 2nd filament change is 1.5 days passed the estimated time of completion of the print, which should be fairly accurate at this point. it took around 70 layers for it to catch up to where the filament change was less than the print time. The change was at an even third of the print lightweight. I love the display for the update and when this print is done, I'll be able to check it out. This is why when I did the POC I divided estimated time remaining by layer count left until change. I thought about it a bit today and there could be a best solution, but returns vs amount or work ight not be worth it. This could be done by parsing the TimeElapsed before the layer numbers, subtracting it from the total estimated print time and then counting back. Maybe by averaging that with the POC result it could yield a fairly accurate result. Let me know what you think. Below are some screenshots with the estimates |
Hi @brandonscholet , I see the issue...
Because I don't have a printer that support M600, how often do you need a change? It's depending on the model I know, but is it more layer based or also in a current layer-print? |
This issue has been automatically marked for closing, because it has not had activity in 30 days. It will be closed if no further activity occurs in 10 days. |
I may try and write my first plugin to see how long until an M600. I'd probably try to display it in Dashboard.
Do you have any advice how where I should start? I know that you have where it can estimate how long until the end, but how hard would it be to find the M600's and use that layer for the estimate?
The text was updated successfully, but these errors were encountered: