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

    DuetLapse available for Alpha testing

    Scheduled Pinned Locked Moved
    Third-party software
    26
    239
    21.9k
    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.
    • Danalundefined
      Danal
      last edited by Danal

      https://github.com/DanalEstes/DuetLapse

      Time Lapse camera support for Duet based 3D printers. Works with firmware V2 or V3 (including stand alone V3 or Pi based V3).

      Designed to run on a Raspberry Pi, any Pi, not necessarily the one on the printer; may be adaptable to other platforms. Supports cameras via USB, Pi (ribbon cable), and Webcam. May support DSLR triggering in the future. Produces a video with H.264 encoding in an MP4 container. Does not, at this time, manage a library of videos, it simply drops the vid in home directory.

      Triggers images based on time, layer change, or pause. Works with existing pauses in G-Code, or can force pauses at other trigger events. Coming soon: Optionally moves head to a specified position before capturing paused images.

      See readme on github for the most current list of features, as they get implemented.

      Delta / Kossel printer fanatic

      zaptaundefined Baenwortundefined A Former User? A Former User? 4 Replies Last reply Reply Quote 10
      • gtj0undefined
        gtj0
        last edited by

        Should work with DSF since it uses your DuetWebAPI yeah?
        If so, I'll be testing later today!

        1 Reply Last reply Reply Quote 0
        • Danalundefined
          Danal
          last edited by Danal

          Yes, needs only network connectivity to V2 or V3 printer. A V3 can be stand-alone or Pi, doesn't matter. Also, to be clear, does NOT require running on the printer's Pi; of course, it can also be run there if you wish.

          It does have the "common sense" requirements regarding camera attach: USB and Ribbon cameras must be on the Pi where it runs, Webcam must be network reachable, etc.

          I know that people tend to not like command line... so it was written with as much "help you run it" as reasonably possible. For example, it won't just fail if a co-req module is missing; it will tell you what is missing and how to install it. I'll be adding more of that regarding cameras in the near future.

          Delta / Kossel printer fanatic

          1 Reply Last reply Reply Quote 1
          • chas2706undefined
            chas2706
            last edited by

            Hi Danal

            I have a duet 3 with SBC and running this on the printers pi.

            The script executes ok, reports that it is connected to my printer and webcam but then exits with an error message as such:

            Attempting to connect to printer at 127.0.0.1
            Connected to a Duet V3 printer at http://127.0.0.1

            ##################################

            Options in force for this run:

            Camera = web

            Printer = 127.0.0.1

            Seconds = 20.0

            Detect = none

            Pause = no

            Movehead = 0.00 0.00

            ##################################

            Waiting for print to start on printer 127.0.0.1
            Traceback (most recent call last):
            File "./DuetLapse.py", line 228, in <module>
            status=printer.getStatus()
            AttributeError: 'DuetWebAPI' object has no attribute 'getStatus'
            pi@Duet3:~/DuetLapse $

            Any ideas?

            Great work though!

            1 Reply Last reply Reply Quote 0
            • Danalundefined
              Danal
              last edited by

              Looks like you have an old copy of DuetWebAPI, the getStatus call was a recent add.

              Re-download it and put it in the same directory.

              Let me know...

              Delta / Kossel printer fanatic

              1 Reply Last reply Reply Quote 0
              • Danalundefined
                Danal
                last edited by

                Also, just committed support for forcing pauses and moving the head during pauses.

                Delta / Kossel printer fanatic

                1 Reply Last reply Reply Quote 0
                • chas2706undefined
                  chas2706
                  last edited by

                  @Danal said in DuetLapse available for Alpha testing:

                  Looks like you have an old copy of DuetWebAPI, the getStatus call was a recent add.
                  Re-download it and put it in the same directory.

                  Clicking on the link to DuetWebAPI leads me to the one and only copy that I can see there.

                  Danalundefined 1 Reply Last reply Reply Quote 0
                  • Danalundefined
                    Danal @chas2706
                    last edited by Danal

                    @chas2706 said in DuetLapse available for Alpha testing:

                    @Danal said in DuetLapse available for Alpha testing:

                    Looks like you have an old copy of DuetWebAPI, the getStatus call was a recent add.
                    Re-download it and put it in the same directory.

                    Clicking on the link to DuetWebAPI leads me to the one and only copy that I can see there.

                    AHA!! Something that I thought was linked together was not. This is why we alpha test! THANK YOU for exposing this.

                    And... there was a commit about one minute before this post, if you re-pull DuetWebAPI now, it will work.

                    https://github.com/DanalEstes/DuetWebAPI

                    Delta / Kossel printer fanatic

                    1 Reply Last reply Reply Quote 0
                    • chas2706undefined
                      chas2706
                      last edited by

                      Thank you so much. I will let you know how I get on.

                      1 Reply Last reply Reply Quote 0
                      • PaulHewundefined
                        PaulHew
                        last edited by PaulHew

                        Hi Danal

                        Eventually got it working, not very good with Linux!

                        When I ran the DuetLapse.py I got this message

                        rm: cannot remove '/tmp/DuetLapse': No such file or directory
                        

                        Couple of things, where are the images stored?
                        Does it delete them after a print?
                        and where does it put the video?

                        I am going to install Samba so I can access the finished videos on a PC and would be nice if we could define where we wanted them.

                        Great work, Thank you.

                        Regards,
                        Paul

                        Edit - I also had this error message

                         Python Library Module 'numpy' is required.
                        

                        Thought it was directed at me! 🙂

                        RailCore II - Duet Mini + 1LC, Voron V0.1 - Duet Mini
                        Voron 2.4 disassembled..... Waiting for the RailCore Mini....

                        1 Reply Last reply Reply Quote 0
                        • Danalundefined
                          Danal
                          last edited by Danal

                          Edit: That message should be suppressed, but is not. I will fix that.

                          It puts the images in /tmp/DuetLapse. They will stay until the next reboot, or next invocation of the script. They have sequence numbers, I don't remember the exact name format.

                          It puts the video in your home directory. The vid will be uniquely named with DDMMYYHHMM and you can certainly move it wherever, if you wish to keep them, etc.

                          Delta / Kossel printer fanatic

                          1 Reply Last reply Reply Quote 0
                          • Danalundefined
                            Danal
                            last edited by Danal

                            Re: The "numpy" message, it also should have told you how to install it.

                            Python Library Module 'numpy' is required.
                            Obtain via 'sudo python3 -m pip install numpy'
                            

                            Be sure you have the latest copy of DuetLapse.py, I am pushing four and five updates a day.

                            Delta / Kossel printer fanatic

                            1 Reply Last reply Reply Quote 0
                            • zaptaundefined
                              zapta @Danal
                              last edited by zapta

                              Project's documentation looks very clear and professionalWould be interesting to see here sample videos.

                              The layer sync without a wired connection to the printer is a creative idea. Is it possible to achieve somehow the 'stationary print head' effect? https://youtu.be/S2cpHMoK8mw?t=13

                              Edit: a feature idea, include automatically music in the generated video.

                              Edit: another feature idea, add automatic time indication in the generator video. E.g. an analog clock at the corner, or digital time.

                              Danalundefined 3 Replies Last reply Reply Quote 0
                              • Danalundefined
                                Danal @zapta
                                last edited by

                                @zapta said in DuetLapse available for Alpha testing:

                                Is it possible to achieve somehow the 'stationary print head' effect?

                                This is already implemented. Add -movehead 10 15 to flags that either detect or force pauses. The numbers are X and Y respectively.

                                Delta / Kossel printer fanatic

                                zaptaundefined 1 Reply Last reply Reply Quote 0
                                • Danalundefined
                                  Danal @zapta
                                  last edited by

                                  @zapta said in DuetLapse available for Alpha testing:

                                  Edit: another feature idea, add automatic time indication in the generator video. E.g. an analog clock at the corner, or digital time.

                                  Not a bad idea. I will add that to the "to do" list.

                                  Delta / Kossel printer fanatic

                                  zaptaundefined 1 Reply Last reply Reply Quote 0
                                  • Danalundefined
                                    Danal @zapta
                                    last edited by

                                    @zapta said in DuetLapse available for Alpha testing:

                                    Edit: a feature idea, include automatically music in the generated video.

                                    Probably going to let people do that in post-processing.

                                    Delta / Kossel printer fanatic

                                    1 Reply Last reply Reply Quote 0
                                    • PaulHewundefined
                                      PaulHew
                                      last edited by

                                      @Danal
                                      It has stopped processing at image46 out of 200.
                                      I had this issue with the other Timelapse, and dropped the resolution of the images.
                                      Is there somewhere I can tweak the resolution?

                                      I am not a Python Guru, my skills lie elsewhere.

                                      Regards,
                                      Paul.

                                      RailCore II - Duet Mini + 1LC, Voron V0.1 - Duet Mini
                                      Voron 2.4 disassembled..... Waiting for the RailCore Mini....

                                      Danalundefined 1 Reply Last reply Reply Quote 0
                                      • PaulHewundefined
                                        PaulHew
                                        last edited by

                                        @Danal
                                        Following on, I added the -q 25 to the DuetLapse.py for the Raspistill

                                                cmd = 'raspistill -o -q 25 '+fn
                                        

                                        I am getting some errors and it seems to be taking pictures whilst my bed leveling is happening

                                        End of print will be sensed, and frames will be converted into video.
                                        Capturing frame     0 at X25.00 Y25.00 Z117.31
                                        Invalid command line option (25)
                                        Capturing frame     1 at X25.00 Y25.00 Z121.31
                                        Invalid command line option (25)
                                        Capturing frame     2 at X-10.00 Y25.00 Z117.31
                                        Invalid command line option (25)
                                        Capturing frame     3 at X-10.00 Y25.00 Z121.31
                                        Invalid command line option (25)
                                        Capturing frame     4 at X-10.00 Y-8.00 Z117.31
                                        Invalid command line option (25)
                                        Capturing frame     5 at X150.00 Y150.00 Z122.31
                                        Invalid command line option (25)
                                        
                                        

                                        RailCore II - Duet Mini + 1LC, Voron V0.1 - Duet Mini
                                        Voron 2.4 disassembled..... Waiting for the RailCore Mini....

                                        Danalundefined 1 Reply Last reply Reply Quote 0
                                        • zaptaundefined
                                          zapta @Danal
                                          last edited by

                                          @Danal said in DuetLapse available for Alpha testing:

                                          This is already implemented. Add -movehead 10 15 to flags that either detect or force pauses. The numbers are X and Y respectively.

                                          Very nice! You are doing magic with network connections to the Duet.

                                          1 Reply Last reply Reply Quote 0
                                          • zaptaundefined
                                            zapta @Danal
                                            last edited by

                                            @Danal said in DuetLapse available for Alpha testing:

                                            Not a bad idea. I will add that to the "to do" list.

                                            While you do it you can add other visual indicators such as Z height, and filament used.

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