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 @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
      • Danalundefined
        Danal @tekkydave
        last edited by

        @tekkydave said in DuetLapse available for Alpha testing:

        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

        I didn't but based on your feedback, I will look into it.

        Delta / Kossel printer fanatic

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

          @UnderDoneSushi said in DuetLapse available for Alpha testing:

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

          Yes, if it runs software that will allow a still image to be retrieved via a know URL.

          Delta / Kossel printer fanatic

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

            HA! Just discovered another reason to use a config file if it exists... To turn off things like auto-focus. 🙂

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

              @gtj0 said in DuetLapse available for Alpha testing:

              HA! Just discovered another reason to use a config file if it exists... To turn off things like auto-focus. 🙂

              Excellent point.

              Delta / Kossel printer fanatic

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

                Found a solution to an issue I was having using DuetLapse with MotionEye.

                I have a raspicam which is connected to a Pi3B running Motioneye.

                MotionEye will allow a single image to retrieved at a URL similar to:

                http://192.168.1.106:8765/picture/1/current/?_username=admin&_signature=b75e2c8efb0c0694a7a4ac1f48037f90566fbead
                

                Using this URL with DuetLapse gives this error every time it tries to get an image

                Capturing frame     0 at X65.74 Y47.41 Z0.30
                http://192.168.1.106:8765/picture/1/current/?_username=admin:
                2020-04-07 15:10:57 ERROR 403: Forbidden.
                

                So I amended the following line in the onePhoto() function in DuetLapse.py

                cmd = 'wget --auth-no-challenge -nv -O '+fn+' '+weburl
                

                to

                cmd = 'wget --auth-no-challenge -nv -O '+fn+' "'+weburl+'"'
                

                to put quotes around the url. This seems to fix the problem 🙂

                ~ 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

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

                  THANK YOU

                  I will update

                  Delta / Kossel printer fanatic

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

                    Another tip if you want to play around with DuetLapse without having to set a print going.
                    Temporarily change

                            if ('processing' in status):
                    

                    to

                    #if ('processing' in status):
                    if ('M' in status):   # detect simulating instead of processing
                    

                    This will make DuetLapse think the Duet is printing when it is simulating. Remember to change it back later 😉

                    Maybe a -dry-run option can be added to do this in future?

                    ~ 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

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

                      I've just been starting a print, and then pause/canceling it.

                      Of course, it can do whatever we all agree to... and can code... and dry run is dead simple. I would note that it really only applies to -seconds. A dry run with any kind of -detect is never going to detect anything.

                      Delta / Kossel printer fanatic

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

                        @Danal said in DuetLapse available for Alpha testing:

                        I've just been starting a print, and then pause/canceling it.

                        Of course, it can do whatever we all agree to... and can code... and dry run is dead simple. I would note that it really only applies to -seconds. A dry run with any kind of -detect is never going to detect anything.

                        It detects layer changes when running a simulation but, as you say, since nothing is physically moving the video is going to be a bit boring. Useful if you are testing options or trying simple code changes though. I know squat about python so I need all the help I can get. I do find your code very easy to follow though 🙂

                        ~ 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
                        • Danalundefined
                          Danal @tekkydave
                          last edited by

                          @tekkydave said in DuetLapse available for Alpha testing:

                          @Danal said in DuetLapse available for Alpha testing:

                          I've just been starting a print, and then pause/canceling it.

                          Of course, it can do whatever we all agree to... and can code... and dry run is dead simple. I would note that it really only applies to -seconds. A dry run with any kind of -detect is never going to detect anything.

                          It detects layer changes when running a simulation but, as you say, since nothing is physically moving the video is going to be a bit boring. Useful if you are testing options or trying simple code changes though. I know squat about python so I need all the help I can get. I do find your code very easy to follow though 🙂

                          Thank you. I try to balance being "python-esq" with being readable. For me if nought else.

                          How about having the "detect printing" detect BOTH processing and simulation? Since we control if the script is running, I see very little downside to this.

                          Delta / Kossel printer fanatic

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

                            @Danal said in DuetLapse available for Alpha testing:

                            @tekkydave said in DuetLapse available for Alpha testing:

                            @Danal said in DuetLapse available for Alpha testing:

                            I've just been starting a print, and then pause/canceling it.

                            Of course, it can do whatever we all agree to... and can code... and dry run is dead simple. I would note that it really only applies to -seconds. A dry run with any kind of -detect is never going to detect anything.

                            It detects layer changes when running a simulation but, as you say, since nothing is physically moving the video is going to be a bit boring. Useful if you are testing options or trying simple code changes though. I know squat about python so I need all the help I can get. I do find your code very easy to follow though 🙂

                            Thank you. I try to balance being "python-esq" with being readable. For me if nought else.

                            How about having the "detect printing" detect BOTH processing and simulation? Since we control if the script is running, I see very little downside to this.

                            That would be the simplest solution I think.

                            ~ 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

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

                              @Danal said in DuetLapse available for Alpha testing:

                              Keep the ideas coming!

                              In my customised build of Raspbian with duetpi I created a timelapse.desktop entry so that I can access your program from my start menu.

                              By default I set it to take a picture upon Z movement.
                              So now, when I start a print and the printer is ready all I have to do is click on the program entry in the start menu.

                              timelapse.jpg

                              Thank you again danal for giving us this great program.

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

                                I've set it up and it works 🙂
                                I did get an error on a small print doing a quick test though
                                The error was "requests.exceptions.ConnectionError:

                                ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))"

                                My guess (Although I'm not a Python expert) is that the pi couldn't keep up saving the images as the layers were only taking 20sec (And its an old V2 pi)

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

                                  @kingfisher
                                  I actually think it might be my Duet wifi board causing an error. I've also got a duet maestro and running the same python settings on the maestro IP address hasn't resulted in the "('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))" error

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

                                    Updates based on feedback:

                                    • Added -dontwait flag. This causes the script to not wait for a print to start; it captures images immediately. Of course, it will only capture things that happen... Example: If told only to capture on layer changes, well, that won't happen prior to a print...

                                    • Added 'camparms -parms' subsection to command line flags. Anything in that subsection is passed to the camera command (whichever for the appropriate camera type, fswebcam, raspistill, or wget)

                                    • Removed pallet from fswebcam (USB attached cameras, despite its name). It will automatically attempt to find the best, or you can specify one, example:
                                      ./DuetLapse.py -duet 192.168.7.101 -dontwait -seconds 3 camparms -parms -p YUYV

                                    • Removed -q from fswebcam. Default is 35. You can override, same as above.

                                    • Slightly changed the loop timer, to beat on the printer a little less often.

                                    *** IMPORTANT *** Found a bug in DuetWebAPI and fixed it, you must download this as well. Therefore, pull these two things into the same directory. One way to do this would be:

                                    wget https://raw.githubusercontent.com/DanalEstes/DuetLapse/master/DuetLapse.py
                                    chmod 744 DuetLapse.py
                                    wget https://raw.githubusercontent.com/DanalEstes/DuetWebAPI/master/DuetWebAPI.py
                                    

                                    Delta / Kossel printer fanatic

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

                                      Also, added quotes around the wget URL.

                                      Delta / Kossel printer fanatic

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

                                        Still thinking about overlay of Z, print time, etc.

                                        Delta / Kossel printer fanatic

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

                                          @Danal said in DuetLapse available for Alpha testing:

                                          Also, added quotes around the wget URL.

                                          👍 😀

                                          ~ 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

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

                                            @Danal what ide / dev tools do you use for python development. I'm using Eclipse for c/c++ and Netbeans for Java. Is there a tool for python that will allow local (Ubuntu) testing and remote deployment to the pi?

                                            ~ 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

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