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

    DuetLapse available for Alpha testing

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

        @PaulHew said in DuetLapse available for Alpha testing:

        @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

        Yes, those errors are from the flag you added. Don't add a flag between -o and the file name.

        Also, the raspistill default is 35, so there is not much point in overriding to 25, that's not all that different.

        and it seems to be taking pictures whilst my bed leveling is happening

        If you have a bed leveling command in the print job, then yes, it will be capturing pictures, because the printer is running a job.

        If you are manually initiating the bed leveling, do not start the script until after you bed level, but before you start the print job.

        If there is some other situation, let me know.

        Delta / Kossel printer fanatic

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

          @PaulHew said in DuetLapse available for Alpha testing:

          @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.

          What camera? What command did you issue to start the script?

          Delta / Kossel printer fanatic

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

            @zapta said in DuetLapse available for Alpha testing:

            @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.

            Keep the ideas coming!

            Delta / Kossel printer fanatic

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

              @Danal said in DuetLapse available for Alpha testing:

              What camera? What command did you issue to start the script?

              Morning Danal
              I used ./DuetLapse.py -camera pi -duet 192.168.0.7

              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
              • PaulHewundefined
                PaulHew
                last edited by

                Using -q 40 with the other TL program my filesizes are ...
                e8dfaffd-3cd0-47a5-83d0-8a510c77c8a7-image.png
                This is the line it used.

                raspistill -bm -q 40 -w 640 -h 480 -o $snapshot && curl -X POST http://localhost:8000/snapshot -d '{"name":"'$snapshot'"}'
                

                These are the sizes of the files using DuetLapse
                85723112-d0eb-4a55-8bfd-bbd9689b295a-image.png

                I was getting 'malloc' errors with the other program and it would fail when running the FFMPEG but when I dropped the filesize using the -q it worked. Do not know if the 640x480 had a part in it also.
                I can try if it helps you.

                As I previously mentioned, I am not a Linux / Python guru, just trying to help and fix things myself and also contribute.

                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
                • chas2706undefined
                  chas2706
                  last edited by

                  @Danal

                  Absolutely brilliant. It works a treat.
                  Fantastic work!

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

                    @PaulHew You can add the -q 25 (or whatever you wish to try), just put it before the -o. Or, more correctly, not between the -o and the filename.

                    At this moment, none of my Pi cameras can reach to see a printer. Ribbon too short. I have some longer ribbon, and an Arducam, on the way. Amazon keeps moving the date (which I totally understand). I'll be able to fine tune this more when I receive that stuff.

                    Meanwhile, keep the specifics coming! (And, you are a lot more of a Guru than you think)

                    Delta / Kossel printer fanatic

                    1 Reply Last reply Reply Quote 0
                    • gtj0undefined
                      gtj0
                      last edited by

                      Just about to try it but noticed that it seems to be opening and closing the unix socket twice a second. Not usually an issue except I run the DCS with debug logging so it's kinda distracting. Any chance of just keeping the socket open or better yet, just getting the model updates as they happen?

                      Danalundefined 1 Reply Last reply Reply Quote 0
                      • gtj0undefined
                        gtj0
                        last edited by

                        Getting

                        # python3 ./DuetLapse.py -camera usb -duet 127.0.0.1 -seconds 5 -detect none
                        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   = usb                 #
                        # printer  = 127.0.0.1           #
                        # seconds  = 5.0                 #
                        # detect   = none                #
                        # pause    = no                  #
                        # movehead =   0.00   0.00       #
                        ##################################
                        
                        Waiting for print to start on printer 127.0.0.1
                        Print start sensed.
                        End of print will be sensed, and frames will be converted into video.
                        Capturing frame     0 after 1586032541.73 seconds elapsed.
                        Unable to find a compatible palette format.
                        Capturing frame     1 after 5.01 seconds elapsed.
                        Unable to find a compatible palette format.
                        

                        Nothing written to /tmp/DuetLapse.

                        Any ideas?

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

                          Which USB camera?

                          Delta / Kossel printer fanatic

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

                            @gtj0 said in DuetLapse available for Alpha testing:

                            Just about to try it but noticed that it seems to be opening and closing the unix socket twice a second. Not usually an issue except I run the DCS with debug logging so it's kinda distracting. Any chance of just keeping the socket open or better yet, just getting the model updates as they happen?

                            It doesn't touch the unix socket. It is opening and closing a websocket connection, and not persisting it. This was a design choice in startup to not track state. I will look into persisting that connection.

                            Delta / Kossel printer fanatic

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

                              @Danal said in DuetLapse available for Alpha testing:

                              Keep the ideas coming!

                              Danal, here is an idea, not necessary specific for this timelapse app, but since you know how to monitor the duet during printing and generate visualization, would be interesting to have something that plot the different time left estimations that the Duet provides.

                              Think of an x/y graph. X is print time from 0 to total print time T. Y is the time left for completion. The ideal reporting is a straight line from (0,T) to (T,0). And then you can sample the duet and plot the time left graphs by the various methods the Duet uses.

                              The output can be an actual graph or a csv file that can be plotted with a spreadsheet and the likes.

                              IMG-1985.JPG

                              1 Reply Last reply Reply Quote 0
                              • gtj0undefined
                                gtj0 @Danal
                                last edited by

                                @Danal said in DuetLapse available for Alpha testing:

                                Which USB camera?

                                Teslong USB "Endoscope". It only supports MJPEG as a palette and I just noticed that you've got YUYV hard coded on the fswebcam command line. Maybe don't specify '-p' and let it default?

                                @Danal said in DuetLapse available for Alpha testing:

                                @gtj0 said in DuetLapse available for Alpha testing:

                                Just about to try it but noticed that it seems to be opening and closing the unix socket twice a second. Not usually an issue except I run the DCS with debug logging so it's kinda distracting. Any chance of just keeping the socket open or better yet, just getting the model updates as they happen?

                                It doesn't touch the unix socket. It is opening and closing a websocket connection, and not persisting it. This was a design choice in startup to not track state. I will look into persisting that connection.

                                Ah yeah, the websocket will result in the same messages. It's not critical so don't spend all that much time on it.

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

                                  @gtj0 said in DuetLapse available for Alpha testing:

                                  Teslong USB "Endoscope". It only supports MJPEG as a palette and I just noticed that you've got YUYV hard coded on the fswebcam command line. Maybe don't specify '-p' and let it default?

                                  I think I did that and it required it for some reason. I will try a couple of different things to get it as automatic as possible.

                                  Delta / Kossel printer fanatic

                                  gtj0undefined 1 Reply Last reply Reply Quote 0
                                  • kingfisherundefined
                                    kingfisher
                                    last edited by

                                    Thanks for sharing I. I'll try installing this in whilst in lockdown.
                                    I had an idea to use a pi remotely to control RGB LEDs based on the printer status. (eg red = heating, white = printing, green = finished)
                                    I might try and learn how to do this based on your code/logic

                                    Danalundefined 1 Reply Last reply Reply Quote 0
                                    • UnderDoneSushiundefined
                                      UnderDoneSushi
                                      last edited by

                                      Would it be possible to use an old iphone as the camera?

                                      Danalundefined 1 Reply Last reply Reply Quote 0
                                      • tekkydaveundefined
                                        tekkydave
                                        last edited by

                                        I noticed that if you have a password set (M551 P"Password") then DuetLapse can't connect to the Duet.

                                        Attempting to connect to printer at 192.168.1.104
                                        http://192.168.1.104  does not appear to be a RRF2 or RRF3 printer
                                        Device at 192.168.1.104 either did not respond or is not a Duet V2 or V3 printer.
                                        
                                        

                                        Do you have any plans to add this feature in the future?
                                        Cheers

                                        ~ tekkydave ~
                                        D-Bot: 300x300mm | Duet WiFi + Duex2 | 3 independent z motors | X,Y & Z linear rails | E3D Titan Aero + V6 | Precision Piezo z-probe
                                        FreeCAD, PrusaSlicer

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

                                          @Danal said in DuetLapse available for Alpha testing:

                                          @gtj0 said in DuetLapse available for Alpha testing:

                                          Teslong USB "Endoscope". It only supports MJPEG as a palette and I just noticed that you've got YUYV hard coded on the fswebcam command line. Maybe don't specify '-p' and let it default?

                                          I think I did that and it required it for some reason. I will try a couple of different things to get it as automatic as possible.

                                          fswebcam doesn't require it at least for my camera. It figured out MJPEG by itself. Maybe it's an issue if the camera supports more than 1 palette. You could check for the existence of ~/.fswebcam and if it's there, add a -c ~/.fswebcam to the options. This way a user can put whatever options they want in it.

                                          Once I changed the palette, it worked great!

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

                                            @kingfisher said in DuetLapse available for Alpha testing:

                                            Thanks for sharing I. I'll try installing this in whilst in lockdown.
                                            I had an idea to use a pi remotely to control RGB LEDs based on the printer status. (eg red = heating, white = printing, green = finished)
                                            I might try and learn how to do this based on your code/logic

                                            The "interface" is in a separate library, for just that reason.

                                            Delta / Kossel printer fanatic

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