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

    DuetLapse3

    Scheduled Pinned Locked Moved
    Third-party software
    20
    296
    30.1k
    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.
    • jltxundefined
      jltx @osterac
      last edited by

      @osterac I am willing to try it stand alone. Any help will likely get me unblocked. Thanks.

      osteracundefined 1 Reply Last reply Reply Quote 0
      • osteracundefined
        osterac @jltx
        last edited by osterac

        @jltx In the standalone there is no configuration file. I put the the program files in the home directory, within an FTP share, so that I can access the videos over FTP. You can also access them from a web browser. The configuration is done upon launch with command switches. This is what I use, it is for 2 cameras:

        sudo python3 /home/pi/ftp/files/DuetLapse/DuetLapse3.py -duet 192.168.1.8 -minvideo 3 -maxvideo 12 -seconds 3 -detect none -dontwait -restart -camera1 stream -weburl1 http://cam.local:8081/101/stream -camera2 stream -weburl2 http://cam.local:8081/102/stream -basedir /home/pi/ftp/files/DuetLapse -standby -deletepics -verbose -keeplogs -port 8094 -extratime 2 -fps 30
        
        

        This produces a maximum of 12 seconds of video (less if the print time is very short). If the print time is longer, the frame rate goes up instead of the duration of the video. At the end, there will be 2 seconds of a still image of the finished print. This is for a corexy printer, if you have a bedslinger you will need to have commands to center the bed for each snapshot, and you would probably want to do it between layers.
        In order to run duetlapse at startup, I put the preceeding command in my "/etc/rc.local" file.
        In order to automatically trigger duetlapse, you need to create 4 (ideally) .g files in your printers' system folder. I have it set up like this:
        DuetLapse3Start.g

        M291 P"DuetLapse3.start" S1 T5 ;Start DuetLapse3
        

        DuetLapse3Pause.g

        M291 P"DuetLapse3.pause" S1 T5 ;pause DuetLapse3
        

        DuetLapse3Continue.g

        M291 P"DuetLapse3.continue" S1 T5 ;resume DuetLapse3
        

        DuetLapse3Stop.g

        M291 P"DuetLapse3.completed" S1 T5 ;Stop DuetLapse3
        G4 S10   ;pause for 10 seconds
        

        in my pause.g file, I add this line:

        M98 P"DuetLapse3pause.g" ;Pause DuetLapse 3
        

        This pauses the timelapse when you pause the print.
        In my resume.g file I add this line:

        M98 P"DuetLapse3continue.g" ;resume timelapse
        

        This resumes the timelapse when I resume a print.

        In order to trigger the timelapse upon the start of a print, I need to add commands to my slicer's start and end gcode.
        To the start gcode:

        M98 P"DuetLapse3Start.g" ;start timelapse
        

        Place this after your command to turn on LED Lighting, if you have it.
        To the end gcode:

        M98 P"DuetLapse3Stop.g" ;Stop Timelapse
        M400	;Wait for timelapse to stop
        

        Place this line before your command to turn off your LED lighting, if you have it.

        That should about do it

        jltxundefined 1 Reply Last reply Reply Quote 0
        • jltxundefined
          jltx @osterac
          last edited by

          @osterac Thanks. What firmware version are you on? The version of DeutLapse3 that I'm trying to set up for 3.5.4 has the M291 deprecated. But I can see what you did so I will try to adapt it.

          stuartofmtundefined 1 Reply Last reply Reply Quote 0
          • stuartofmtundefined
            stuartofmt @jltx
            last edited by stuartofmt

            @jltx
            I have been "offline" for about 6 months and am just now restarting having rebuilt my system.

            For SBC the 3.5 version in github is the one you should be using. I'll push out a 3.6 version shortly (I don't think there will be any changes - but ...)

            There was one broken link in the documentation which I just fixed. This is likely the main info you are missing
            https://github.com/stuartofmt/DuetLapse3/blob/main/Documents/plugin installation guide.md

            The software grew in capability over time - so its important to start of simply and not be overwhelmed by too many options. See the examples here (they are for standalone but the config file examples are the same for the plugin version)
            https://github.com/stuartofmt/DuetLapse3/blob/main/Documents/DuetLapse3 Useage Examples.md

            The example and the fixed link should get you started. When testing - make sure you include -verbose so that errors and warnings can be seen.

            Once you have it basically configured and can use the plugin UI - you can then start tweaking configurations and doing "fancy stuff" with gcodes.

            Let me know if you get stuck.

            jltxundefined 1 Reply Last reply Reply Quote 0
            • jltxundefined
              jltx @stuartofmt
              last edited by

              @stuartofmt thank you! That was the missing information I needed. I have it installed and running. Now to test some gcode…

              stuartofmtundefined 1 Reply Last reply Reply Quote 0
              • stuartofmtundefined
                stuartofmt @jltx
                last edited by

                @jltx
                πŸ‘

                jltxundefined 1 Reply Last reply Reply Quote 0
                • jltxundefined
                  jltx @stuartofmt
                  last edited by

                  @stuartofmt Hmm, not sure if this is right but it pauses 2.7 seconds on every layer which is not going to work for me as it will ruin many prints. Got several msgqueue full pop-ups. After the print there are no images in /opt/dsf/sd/DuetLapse3/. The plug-in said deactivated, though it was working when I started. I did capture manually and the camera works. Idea where to debug?

                  stuartofmtundefined 1 Reply Last reply Reply Quote 0
                  • stuartofmtundefined
                    stuartofmt @jltx
                    last edited by stuartofmt

                    @jltx
                    Lets have a look at your config file.
                    Also - to be clear, you are running 3.5.4 SBC on Bookworm? Buster?
                    Also - since there are no images being collected - there is something wrong - so please include a log file that was created with -verbose.

                    The images are not created in that directory. See the info tab for the directory location. You should also be able to see them in the files tab.

                    Its best to get basic operation working correctly before adding pauses and such.

                    jltxundefined 1 Reply Last reply Reply Quote 0
                    • jltxundefined
                      jltx @stuartofmt
                      last edited by

                      @stuartofmt I will have to try again since I just switched to 3.6. I was on 3.5.4 bookworm. I started getting odd system delays after I bumped the swap file up to 4G. So I need to investigate that first.

                      T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
                      • T3P3Tonyundefined
                        T3P3Tony administrators @jltx
                        last edited by

                        @jltx I would start with the Duet pi image without making changes to swap etc.

                        www.duet3d.com

                        stuartofmtundefined 1 Reply Last reply Reply Quote 0
                        • stuartofmtundefined
                          stuartofmt @T3P3Tony
                          last edited by stuartofmt

                          @jltx

                          As I indicated above - the 3.6 version is not yet available. It looks like there was a change or two to the plugin framework since 3.5 - so I have to track that down.
                          The 3.5 version will not install on a 3.6.0-beta.4 release. If you think it has installed - then something is wrong or you are not using the plugin installation method from DWC.

                          The documentation has several cautions about the use of the pause capability. It has the ability to set delays and can also interact poorly with the default pause capability.
                          I strongly recommend you get a basic config working first.

                          When you report back - with the config file and logfile info I requested above. That way we can see what is going on.

                          stuartofmtundefined 1 Reply Last reply Reply Quote 0
                          • stuartofmtundefined
                            stuartofmt @stuartofmt
                            last edited by stuartofmt

                            @jltx

                            Hi - attached is a version of DuetLapse3 for 3.6.0-beta.4
                            If you want to try it be sure to remove the .txt extension

                            [DuetLapse3-5.3.7.zip.txt]

                            jltxundefined 1 Reply Last reply Reply Quote 0
                            • jltxundefined
                              jltx @stuartofmt
                              last edited by

                              @stuartofmt Thank you for the update. I was able to install in 3.6 beta.

                              I am still seeing the same behavior. I removed the -verbose switch and still seeing message queue full. I am getting the long (~2 second) pauses at each layer which damages the print.

                              Here is how I am using: First I call M3291 B"DuetLapse3.start" in my start gcode. Then for each layer change I call M3291 B"DuetLapse3.snapshot". Finally in end gcode I call M3291 B"DuetLapse3.completed".

                              I don't think I understand how this plugin works. I'm not clear why I need to start anything. Isn't the snapshot command on each layer change sufficient to grab a frame? the final command I assume assembles all the frames into a video and cleans up. That's how I imagine it works (and what I want). But then other things don't make any sense to me. For example, there should be no need for anything like pause, resume, etc. because if you pause the print you will not advance any layers and thus the Timelapse, so that concept is automatic, no? I think my mental model is so different I can't figure out what I am supposed to do with all the available options.

                              stuartofmtundefined 1 Reply Last reply Reply Quote 0
                              • stuartofmtundefined
                                stuartofmt @jltx
                                last edited by

                                @jltx

                                Your mental model is orthogonal to the intended use πŸ™‚

                                Lets get something simple started and take it from there...

                                The usual approach is to start recording images at the start of the print. At the end of the print DuetLapse will create a video (you don't need to so so). You tell DuetLapse HOW you want images recorded with the options. These options are in the configuration file. At a broad level, images can be captured by layer, by time or even a combination.

                                What you were doing with your approach was asking DuetLapse the create a snapshot VIDEO on every layer change. It could not do that (not enough images) so it was spinning its wheels ...

                                I also suspect there may be other issues with your configuration (your reported delay between layers) but lets start off simply.

                                Why don't you try this config file - YOU DO NOT NEED TO PRINT . When you start the DuetLapse plugin you should see something like the screenshot below (after a few seconds). It will capture a new image every 10 seconds.

                                I'm assuming you are using a camera that streams via http. If that's not the case then tell my what you are doing.

                                -duet <your duet ip address>
                                -port <something other than 8080 e.g. 8084> 
                                -basedir /opt/dsf/sd/DuetLapse3
                                -camera1 stream
                                -weburl1 <your camera stream source e.g. http://192.168.10.140:8090/stream>
                                -seconds 10
                                -dontwait
                                -keepfiles
                                -restart
                                -verbose
                                

                                Make sure you have a working installation. Something like this after about 15 seconds.

                                60a6a451-212c-4c4d-a17c-cafbb2c9c226-image.png

                                Wait until you have over 51 images (Status tab keeps count) - this will take about 8 minutes. You can wave your hand in front of the camera or something to while away the time πŸ™‚
                                Then:
                                [1] From the DWC interface send M3291 B"DuetLapse3.completed"
                                [2] Wait 15 seconds or so - video creation can take 10s of minutes with a large number of images.
                                [3] In DuetLapse UI -- Go to the Files tab - you should see a video has been created. You can click on it.

                                If there are issues with the above then before I can help - I will need a copy of the log file and configuration file.
                                You can click on the logfile from the Files Tab and it will download via your browser.

                                When you have this verified - come back here and I can give you a couple of changes to config and let you loose on a print job.

                                ALSO _ PLEASE USE THIS VERSION OF THE PLUGIN. I have been making some minor changes and introduced a bug. I am not sure what I had done / not done with the version I posted a few days ago.

                                DuetLapse3-5.3.7.zip.txt

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Unless otherwise noted, all forum content is licensed under CC-BY-SA