• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

DuetLapse3

Scheduled Pinned Locked Moved
Third-party software
20
296
30.0k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    stuartofmt @Proschi3D
    last edited by 16 Jan 2023, 18:38

    @Proschi78 said in DuetLapse3:

    ok i do it again with verbose

    Version 5.0.3 has been posted to github. It has a few changes from the version I gave you access to. Mostly these are cosmetic but its best to be on this version.

    1 Reply Last reply Reply Quote 0
    • undefined
      stuartofmt @osterac
      last edited by 18 Jan 2023, 15:26

      @osterac

      Wanted to bring to your attention Verson 5.0.x.
      I got side-tracked with some significant code re-arangement ( same functionality). The ability to set max video length is formally included.

      Please let me know what you think.

      undefined 1 Reply Last reply 22 Jan 2023, 03:53 Reply Quote 0
      • undefined
        stuartofmt @Proschi3D
        last edited by 21 Jan 2023, 17:10

        @Proschi78 said in DuetLapse3:

        ok i do it again with verbose

        Is everything running correctly now ?

        undefined 1 Reply Last reply 21 Jan 2023, 19:16 Reply Quote 0
        • undefined
          Proschi3D @stuartofmt
          last edited by 21 Jan 2023, 19:16

          @stuartofmt I couldn't try it anymore. But the new version didn't start at all

          Love my Duet 3 Mini.
          https://www.instagram.com/proschi3d
          https://youtube.com/@proschi3d
          https://www.proschi3d.de

          undefined 1 Reply Last reply 22 Jan 2023, 01:38 Reply Quote 0
          • undefined
            stuartofmt @Proschi3D
            last edited by 22 Jan 2023, 01:38

            @Proschi78 said in DuetLapse3:

            @stuartofmt I couldn't try it anymore. But the new version didn't start at all

            A logfile with -verbose will reveal all.

            1 Reply Last reply Reply Quote 0
            • undefined
              osterac @stuartofmt
              last edited by osterac 22 Jan 2023, 03:53

              @stuartofmt said in DuetLapse3:

              @osterac

              Wanted to bring to your attention Verson 5.0.x.
              I got side-tracked with some significant code re-arangement ( same functionality). The ability to set max video length is formally included.

              Please let me know what you think.

              @stuartofmt Thanks, I'll take a look!

              1 Reply Last reply Reply Quote 0
              • undefined
                osterac
                last edited by 26 Jan 2023, 01:06

                It doesn't seem to be making any videos for me. I see that the temporary folder is created during the print but no video. I'll attach a log file.
                481_1_overhang_test_mini.log.txt

                undefined 1 Reply Last reply 26 Jan 2023, 18:15 Reply Quote 0
                • undefined
                  stuartofmt @osterac
                  last edited by 26 Jan 2023, 18:15

                  @osterac

                  Thanks for the logfile. There may be two problems and a "condition".

                  The likely problem.

                  You start Duetlapse in standby state but nothing tells it to go to start state. As a result there is no attempt to capture images hence no video can be created.

                  In the options:

                  2023-01-24 17:40:55,863 - terminate - -standby  =  True
                  

                  The logfile shows DuetLapse entering standby state:

                  2023-01-24 17:40:55,944 - terminate - ++++++ Entering standby state ++++++
                  

                  But there is nothing that takes it out of standby state. In fact, throughout most of the log, DuetLapse is simply looking for a command.

                  In the logfile, towards the end of the print (I'm assuming), there is a command to DuetLapse

                  2023-01-25 16:48:23,135 - gcodeLoop - M117 Command: DuetLapse3.completed
                  

                  Did you intended the gcode to take DuetLapse out of standby mode with:

                  M117 DuetLapse3.start   ; start
                  G4 S10
                  

                  Either , the command is missing from the gcode or DuetLapse did not "see" the command.

                  The condition

                  There are a few instances where there are network issues in the log. Most are sub-second (not uncommon in my experience). It is possible that DuetLapse did not see the start command because it was sent during a network issue. This would be plain bad luck 😞

                  There is a network disconnect that lasts about 3 minutes. On reconnect, DuetLapse goes back to its previous (standby) state :

                  2023-01-25 10:39:05,717 - gcodeLoop - Cannot connect to the printer
                  <snip>
                  2023-01-25 10:42:52,139 - checkforConnection - -----------------------  Reconnected to printer ----------------------
                  <snip>
                  2023-01-25 10:42:57,145 - nextAction - nextAction resuming after reconnect target = standby
                  

                  The same pattern occurs at 11:50

                  The second problem

                  At the end after the command to complete the print job; DuetLapse tries, correctly (for the first time), to get an image and make copies to satisfy the -extratime 2 option.

                  There is an error because this command failed
                  wget --auth-no-challenge -nv -O /home/pi/ftp/files/DuetLapse/octopi/192-168-1-8/481_1_overhang_test_mini/Camera1_00000102.jpeg "http://cam.local:8765/picture/1/current/"
                  i.e. it could not get an image from the camera.

                  I'm concerned about this for two reasons (1) Is the camera working / are the parameters correct and (2) I do not expect to see the image file being requested as number 102

                  I recommend you verify that you can capture images using the following from the command line:

                  wget --auth-no-challenge -nv -O ./test.jpeg "http://cam.local:8765/picture/1/current/"
                  

                  I will take a look and see why the image number is not what I expect. Its possible that I have a bug that somehow prevented attempts to capture images but the code logic does not change based on camera type.

                  2023-01-25 16:48:31,220 - nextAction - Command Exception: wget --auth-no-challenge -nv -O /home/pi/ftp/files/DuetLapse/octopi/192-168-1-8/481_1_overhang_test_mini/Camera1_00000102.jpeg "http://cam.local:8765/picture/1/current/"  > /dev/null 2>&1
                  2023-01-25 16:48:31,221 - nextAction - Command 'wget --auth-no-challenge -nv -O /home/pi/ftp/files/DuetLapse/octopi/192-168-1-8/481_1_overhang_test_mini/Camera1_00000102.jpeg "http://cam.local:8765/picture/1/current/"  > /dev/null 2>&1' returned non-zero exit status 1.
                  2023-01-25 16:48:31,222 - nextAction - !!!!!  There was a problem capturing an image !!!!!
                  2023-01-25 16:48:31,222 - nextAction - Copying last frame to extend video by 2 seconds
                  
                  undefined 1 Reply Last reply 5 Feb 2023, 16:20 Reply Quote 0
                  • undefined
                    osterac @stuartofmt
                    last edited by osterac 2 May 2023, 16:32 5 Feb 2023, 16:20

                    @stuartofmt
                    I executed the command that you listed

                    wget --auth-no-challenge -nv -O ./test.jpeg "http://cam.local:8765/picture/1/current/"
                    

                    and an image file was created. I downloaded it and it was what I expected. I updated my router firmware and changed some settings, I also added a -port modifier to duetlapse, but I still get the wget --auth-no-challenge error and no images are captured. Here's another log file if it helps.
                    604_3_Fidgit3_resize.log.txt

                    PS I also did an apt full-upgrade on my duetlapse pi and my camera server and updated to the latest dev version of motioneye.

                    undefined 1 Reply Last reply 5 Feb 2023, 20:31 Reply Quote 0
                    • undefined
                      stuartofmt @osterac
                      last edited by stuartofmt 2 Jun 2023, 16:23 5 Feb 2023, 20:31

                      @osterac said in DuetLapse3:

                      wget --auth-no-challenge -nv -O

                      The earler problem was clearly the lack of start command. Now however, its clearly the wget that is unhappy.

                      I'm not sure why because the command is being reported as syntactically identical when executed by DuetLapse3 as the one you proved to be working at the command line.

                      Try this version of DuetLapse3. All I have done is use a different form of the wget command ( -v instead of -nv) when -verbose is set.
                      Hopefully this will generate better output from wget as to why it is unhappy.

                      DuetLapse3.py

                      undefined 1 Reply Last reply 5 Feb 2023, 23:45 Reply Quote 0
                      • undefined
                        osterac @stuartofmt
                        last edited by 5 Feb 2023, 23:45

                        @stuartofmt
                        ran a print with the new script. log:
                        604_1_xyzCalibration_cube.log.txt

                        undefined 2 Replies Last reply 6 Feb 2023, 16:22 Reply Quote 0
                        • undefined
                          stuartofmt @osterac
                          last edited by stuartofmt 6 Feb 2023, 16:22

                          @osterac

                          Unfortunately the error output from wget only had marginally more information 😞 Not enough to suggest WHY it is unhappy. This may be because Python is calling wget and not all the error response is getting through.

                          I've added another line of code to, maybe, capture some more info.

                          [DuetLapse3.py]

                          I googled a bit and it MAY be because the url has a trailing slash. With the newer script, can you try with:

                          http://cam.local:8765/picture/1/current
                          

                          To save a lot of time during testing - you do not need to be printing. Just set something like:

                          -seconds 15
                          -dontwait
                          

                          and remove -standby

                          This way DuetLapse will start capturing images every N seconds even though there is no print job running. Let it run until you see (or not) an image capture error in the console, then use the UI to download the current logfile. The logfile will be startup.log since there is no actual print job.

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            stuartofmt @osterac
                            last edited by 6 Feb 2023, 19:58

                            @osterac
                            If trying above does not give any luck, it could be a Motioneye nuance. Seems there MAY be an issue getting still images if there is no streaming enabled.
                            If this is the case - you could try setting -camera1 stream and weburl1 to the streaming URL (as opposed to the still picture url). In any case, this may be a better solution as you would not have Motioneye getting still images at one frequency and DuetLapse doing so at another frequency.

                            undefined 1 Reply Last reply 7 Feb 2023, 19:10 Reply Quote 0
                            • undefined
                              osterac @stuartofmt
                              last edited by 7 Feb 2023, 19:10

                              @stuartofmt
                              I did a print with those settings. It managed to capture the jpg files, but it's 30 minutes after the print and it is still writing to the log file and hasn't deleted the images or made a video yet. Log file attached.
                              598_1_printer_square_calibration.log.txt

                              undefined 1 Reply Last reply 7 Feb 2023, 19:44 Reply Quote 0
                              • undefined
                                stuartofmt @osterac
                                last edited by stuartofmt 2 Jul 2023, 20:54 7 Feb 2023, 19:44

                                @osterac said in DuetLapse3:

                                @stuartofmt
                                I did a print with those settings. It managed to capture the jpg files, but it's 30 minutes after the print and it is still writing to the log file and hasn't deleted the images or made a video yet.

                                It is working just fine. 88 images captured according to the log, every 20 seconds --> almost exactly 30 minutes.

                                It will continue to do so until one of two things happens:

                                1. you start a print job that runs to completion
                                2. you tell it to stop.

                                One way to tell it to stop:
                                Use the UI.
                                https://github.com/stuartofmt/DuetLapse3/blob/main/Documents/User Interface.md

                                Controls --> Terminate --> Graceful (this will generate a video)

                                Looks like you are good to go !

                                BTW. I installed motioneye and found that wget is definitely not happy about something. Unfortunately it only returns a generic error code. I also noticed that the still capture from motioneye did not seem to work from a web browser.

                                Using the streaming interface seems the way to go.

                                undefined 1 Reply Last reply 7 Feb 2023, 23:35 Reply Quote 0
                                • undefined
                                  osterac @stuartofmt
                                  last edited by osterac 2 Jul 2023, 23:36 7 Feb 2023, 23:35

                                  @stuartofmt
                                  I did a graceful terminate and waited a couple of hours but it is still updating the log file. Web UI says this:

                                  DuetLapse3 Version 5.0.3
                                  Connected to printer at: 192.168.1.8:8086
                                  
                                  Process Id: 598
                                  Last Update: Tuesday - 15:32
                                  Capture Status:= Completed
                                  DuetLapse3 State:= completed
                                  Duet Status:= processing
                                  Images Captured:= 88
                                  Current Layer:= 33
                                  
                                  

                                  Updated log file
                                  598_1_printer_square_calibration.log.txt

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    stuartofmt
                                    last edited by stuartofmt 2 Aug 2023, 15:32 8 Feb 2023, 15:29

                                    @osterac

                                    I'm not able to see the same issue on my test system (using Motioneye). It all works fine for me.
                                    I think there may be an edge condition associated with the use of -extratime as this is where the program encountered issues. Unfortunately, if it was a Python issue (syntax or similar), it cannot be captured in the logs. It would only be visible in the , now, long gone console output. 😞

                                    It may also be associated with the polling of Duet as I saw a situation (in your log) that I have never seen before. In any case, the program got itself into a bind.

                                    I am also not sure exactly what's happening at your end . I can see you used Terminate but I also see 8 instances of M117 DuetLapse2.completed command. This suggests either you are isuing the commands from DWC or from one or more print jobs ? Can you help by explaining what happened ?

                                    I have a couple of ideas I need to think through but feel confident that I can avoid this condition.

                                    If you have some time on your hands; you could try another run (without - extratime). Just set the program running (no print job needed), let it run until the UI Video tab tells you there are enough images to create a video) and then use Terminate-->Graceful. This should work just fine and if it does (or does not) will narrow the scope of what's happening in your case.

                                    undefined 1 Reply Last reply 8 Feb 2023, 17:33 Reply Quote 0
                                    • undefined
                                      osterac @stuartofmt
                                      last edited by 8 Feb 2023, 17:33

                                      @stuartofmt
                                      As for the multiple stop commands, it may be because I printed several things after duetlapse got stuck so commands were sent to duetlapse from that. In my end gcode I use this command:

                                      M98 P"DuetLapse3Stop.g" ;stop timelapse
                                      

                                      Which calls a .g file that contains this command:

                                      M117 DuetLapse3.completed ;Stop DuetLapse3
                                      G4 S10 ;Wait 10 seconds
                                      

                                      I have several of those files, one for start, pause, continue, and stop. I have references to them in my start and stop gcode, and in my pause.g, resume.g, and cancel.g.
                                      I tried doing a run without extratime and I was able to get a video. here's the log file.

                                      2081_1_YACS_vertical.log.txt

                                      It may look a little odd because I started recording and then started a print and duetlapse caught on to that. I ended the recording before the print was done.

                                      undefined 1 Reply Last reply 9 Feb 2023, 16:34 Reply Quote 0
                                      • undefined
                                        osterac @osterac
                                        last edited by 9 Feb 2023, 16:34

                                        @osterac
                                        So will I be able to use extratime at some point in the future?

                                        undefined 2 Replies Last reply 9 Feb 2023, 22:20 Reply Quote 0
                                        • undefined
                                          stuartofmt @osterac
                                          last edited by 9 Feb 2023, 22:20

                                          @osterac said in DuetLapse3:

                                          @osterac
                                          So will I be able to use extratime at some point in the future?

                                          Yes, absolutely. Hopefully over the weekend.

                                          undefined 1 Reply Last reply 15 Feb 2023, 00:07 Reply Quote 0
                                          • First post
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA