eyal0 / OctoPrint-TimeToFilament

Display time until next filament change and other time-until-whatever info in OctoPrint
3 stars 1 forks source link

Problem with operation #2

Closed KenLucke closed 4 years ago

KenLucke commented 4 years ago

I have installed this, and I seem to get nothing other than a zero Time to FIlament Change.

I have re-uploaded the files as mentioned elsewhere, and there still seems to be no change.

Here are pointers to some images of the panel and the settings and the gcode file before uploading for these

CR-10v2 (Blue)  OctoPrint  10% 19:48 2020-05-27 13-02-31

CR-10v2 (Blue)  OctoPrint  10% 19:48 2020-05-27 13-01-15

Here is the relevant portion of this file:

;MESH:NONMESH
G0 F11250 X175.265 Y132.887 Z5.76
G0 X146.629 Y151.63
;TIME_ELAPSED:18597.302135

;LAYER:24
; multi color
M117 Change filament Now!
M600 X-145 Y-145

;MESH:Puzzle Chessboard Pieces.stl(2)
G0 X146.629 Y151.63 Z5.92
;TYPE:WALL-INNER
G1 F300 Z3.92
G1 F3300 E1194.87482
G1 F2250 X146.43 Y151.63 E1194.88012
G1 X133.423 Y151.63 E1195.22621
G1 X133.318 Y151.63 E1195.229
G1 X133.247 Y151.63 E1195.23089

BTW, this also failed using just a plain M600

I'm sure it's just an Eye-Dee-Ten-Tee error, but I'd appreciate telling this Eye-Dee-Ten-Tee where I'm being one.

KenLucke commented 4 years ago

After it passes the filament change, the Zero time line disappears, which I ass/ume is normal CR-120v2 (Blue)  OctoPrint  97% 01:47 2020-05-28 01-30-04

KenLucke commented 4 years ago

Weird. NOW, it's showing a time, but WAY off. From experience, printing this file (I have to do it 16 times to get all 64 pieces for the chessboard), the filament change is 5:22:00 and change into the print. Just restarted a new copy of the print, and it's telling me it's only 1:45:00 or so to go.

CR-120v2 (Blue)  OctoPrint  1% 04:33 2020-05-28 02-11-32

eyal0 commented 4 years ago

I need to look into it some more. Perhaps you can send me the gcode?

eyal0 commented 4 years ago

I put some debugging in. Please follow these instructions: https://github.com/eyal0/OctoPrint-PrintTimeGenius/issues/150#issuecomment-635727058

I hope that we can figure it out!

eyal0 commented 4 years ago

Maybe in fxing #3 I fixed your bug, too? Can you install the latest version and try again?

https://github.com/eyal0/OctoPrint-TimeToFilament/archive/master.zip

Thanks!

KenLucke commented 4 years ago

Maybe in fxing #3 I fixed your bug, too? Can you install the latest version and try again?

https://github.com/eyal0/OctoPrint-TimeToFilament/archive/master.zip

Thanks!

Latest version still does not solve the issue. Sorry it took so long to get back to you, had other issues with printers.

Filament change IS recognized as being there ("Filament change in:" line does not show up when there is no M600 in the code), just does not calculate time to it. [Oh, and I tried escaping the colon (";layer\:") in the parameters, with no difference.

Also, time to next layer NEVER shows up.

Yellow  OctoPrint  2% 23:16 2020-06-12 15-14-04 Yellow  OctoPrint  2% 23:16 2020-06-12 15-13-11

Relevant gcode section: `G1 F2250 X147.083 Y198.55 E1431.98028 G1 F2700 E1429.98028 G1 F300 Z3.86 G0 F11250 X139.02 Y190.208 Z3.86 G1 F300 Z3.36 G1 F2700 E1431.98028 G1 F2250 X142.711 Y186.517 E1432.08445 G0 F11250 X141.576 Y187.087 G1 F2250 X139.581 Y189.081 E1432.14073 G1 F2700 E1430.14073 G1 F300 Z3.86 @Object NONMESH G0 F11250 X144.387 Y112.696 Z3.86 ;TIME_ELAPSED:3021.004989

;LAYER:28 M117 INDICATOR-Layer28 ; multi color M117 Change filament Now! M600

@Object Full Set.3mf(10) G0 X144.387 Y112.696 Z3.98 ;TYPE:WALL-INNER G1 F300 Z3.48 G1 F2700 E1432.14073 G1 F2250 X143.678 Y112.844 E1432.15519 G1 X143.077 Y113.057 E1432.16791 G1 X142.529 Y113.341 E1432.18023 G1 X142.035 Y113.675 E1432.19213 G1 X141.627 Y114.029 E1432.20291 G1 X141.151 Y114.564 E1432.2172 G1 X140.757 Y115.17 E1432.23163 G1 X140.521 Y115.674 E1432.24273 G1 X140.448 Y115.861 E1432.24674 G1 X140.356 Y116.139 E1432.25258`

KenLucke commented 4 years ago

I think I may have found it... Your sample code is "; layer" (with a space), whereas my code is ";layer" with no space. I will have to wait to start another print to confirm, but that sure looks as if it may be what is messing me up.

KenLucke commented 4 years ago

I think I may have found it... Your sample code is "; layer" (with a space), whereas my code is ";layer" with no space. I will have to wait to start another print to confirm, but that sure looks as if it may be what is messing me up.

Nope, still nothing. Grrrr....

Are you looking for a particular CR/LF ending, perhaps?

KenLucke commented 4 years ago

I figured out the problem with showing the time to next layer. Your grep expression is case sensitive. My files use ";LAYER:" but your grep expression uses "; layer:"

Changing the lowercase to uppercase in your expressions (and removing the extraneous space) solved that portion of my issues. You should be using "grep -i" (case insensitive) in your code.

I still cannot figure out why it is not showing the time to the next ^M600.

KenLucke commented 4 years ago

FIXED IT!

I modified your search from ^M600 to ^M600.* [added a ".*"]

and the example code to ^M600.* [same addition]

WHY your simple search for ^M600 matched your example of M600 whatever and NOT my simple M600 actual line, I have NO idea whatsoever. I'll leave that for you to figure out.

KenLucke commented 4 years ago

Now a wrinkle. I removed the '*" [accidently], and it still works now, whereas it didn't with exactly the same parameters. So I give up, it's working, if it ain't broke don't fix it

eyal0 commented 4 years ago

Weird. I'm just doing a normal python regular expression. ^M600 matches from the start of the line to then end of the M600. I'm not sure if characters after cause the match to fail or not. I don't recall how python works there.

Anyway, looks like you got it working! If you have a suggestion that would be universally useful, I can put it in the code so that everyone can enjoy it.

eyal0 commented 4 years ago

You can edit this file at the spot and then submit a PR. It's pretty easy.

https://github.com/eyal0/OctoPrint-TimeToFilament/blob/4a580f118284419b027991212401859b9908a23b/octoprint_TimeToFilament/__init__.py#L32

KenLucke commented 4 years ago

Yeah, I know how it’s supposed to work :)

For some reason, it wasn’t.

On Jun 13, 2020, at 07:11, Eyal notifications@github.com wrote:

Weird. I'm just doing a normal python regular expression. ^M600 matches from the start of the line to then end of the M600. I'm not sure if characters after cause the match to fail or not. I don't recall how python works there.

Anyway, looks like you got it working! If you have a suggestion that would be universally useful, I can put it in the code so that everyone can enjoy it.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eyal0/OctoPrint-TimeToFilament/issues/2#issuecomment-643629113, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN2ATJRVNDOVNPQBPCNCUEDRWOCJNANCNFSM4NMO3LIQ.

eyal0 commented 4 years ago

:shrug: close the issue?

KenLucke commented 4 years ago

As far as I am concerned, you can.

On Jun 13, 2020, at 11:22, Eyal notifications@github.com wrote:

🤷 close the issue?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/eyal0/OctoPrint-TimeToFilament/issues/2#issuecomment-643659645, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN2ATJXU7M4QNBZSNM3QVH3RWO7WRANCNFSM4NMO3LIQ.