• 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
    GoremanX
    last edited by GoremanX 20 Feb 2021, 07:12

    This post is deleted!
    undefined 1 Reply Last reply 20 Feb 2021, 17:13 Reply Quote 0
    • undefined
      GoremanX @GoremanX
      last edited by 20 Feb 2021, 17:13

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • undefined
        stuartofmt
        last edited by stuartofmt 20 Feb 2021, 17:53

        @GoremanX

        You posted a problem you encountered about using -camparam1 from startDuetLapse3.py and have since deleted it. I am making this post for the benefit of others.

        Basically - you noted that starting an instance of DuetLapse3 from startDuetLapse3 failed when the command was of the form

        http://{ip:port}/?command=start&args={some DuetLapse3 options}  -camparam1="'{some camera parameters}' +fn+debug"
        

        I tested your command options on my pi (with pi camera) in "standalone mode and it worked fine.

        I then tested it by starting with startDuetLapse3 (running in foreground so I could see more of what was happening) and it failed just as you had reported.

        The problem is because "+" symbols are not allowed in urls. To overcome this when using startDuetLapse3 or otherwise sending a URL - substitute "%2B" for the plus symbols (no quotes). E.g.

        http://{ip:port}/?command=start&args={some DuetLapse3 options}  -camparam1="'{some camera parameters} ' %2Bfn%2Bdebug"
        

        Also - make sure there is a space between the last camera parameter and the fn argument since some commands will be expecting one. E.g.

        <snip> --output ' %2Bfn%2Bdebug
        ^
        space here between the t and the '

        I will update the documentation to alert others to this "trap for young players" - like me ๐Ÿ™‚

        Note: there may be an additional issue which I am looking into.

        undefined 1 Reply Last reply 20 Feb 2021, 18:06 Reply Quote 1
        • undefined
          GoremanX @stuartofmt
          last edited by 20 Feb 2021, 18:06

          @stuartofmt Just to clarify, the issue in my specific case was a missing space after --output and the closing single quote in -camparam1, which was causing the filename to be appended to the end of the argument with no space in between. Turning on -verbose showed me my error, which was a stupid one, and therefore I chose to hide my shame by deleting the original post ๐Ÿ˜‚

          undefined 1 Reply Last reply 20 Feb 2021, 18:12 Reply Quote 0
          • undefined
            stuartofmt @GoremanX
            last edited by 20 Feb 2021, 18:12

            @GoremanX said in DuetLapse3:

            @stuartofmt Just to clarify, the issue in my specific case was a missing space after --output and the closing single quote in -camparam1, which was causing the filename to be appended to the end of the argument with no space in between. Turning on -verbose showed me my error, which was a stupid one, and therefore I chose to hide my shame by deleting the original post ๐Ÿ˜‚

            Hmm - maybe I got it wrong too (about the escape characters) . Can you post your working command please - so I can take a closer look?

            undefined 1 Reply Last reply 20 Feb 2021, 18:44 Reply Quote 0
            • undefined
              GoremanX @stuartofmt
              last edited by GoremanX 20 Feb 2021, 18:44

              @stuartofmt You were right, the + symbol in the url was also an issue. The reason I got it working by just adding the missing space is because I was testing directly with the DuetLapse3.py file. My new, working http request is:

              http://localhost:8083/?command=start&args=-dontwait -verbose -duet 192.168.220.2 -basedir /mnt/remote -seconds 15 -detect none -instances single -camera1 other -camparam1="'raspistill --nopreview --timeout 1 --saturation 15 --sharpness 50 --contrast 25 --ev 1 --quality 95 --awb off --awbgains 3.0,1.9 --shutter 50000 --ISO 100 --output ' %2Bfn%2Bdebug"
              

              It did not work with + symbols in the url

              1 Reply Last reply Reply Quote 0
              • undefined
                stuartofmt
                last edited by stuartofmt 21 Feb 2021, 17:59

                Following from an off-line discussion with @GoremanX here is my proposal. You will get the gist of his suggestions. Appreciate your comment and ideas on what you would find useful or any alternative approaches that may apply.

                I think the best compromise approach is as follows. Trying for a simple and consistent way that does not force folks into linux / windows.
                Create logfiles with a timestamp (e.g. YY-MM-DD-HH:MM:SS.log)
                Log files are created one per instance of DuetLapse and placed in the "ip" directory as they are now.
                New option -keeplogs (default False if omitted). The default maintains the current behavior with a slight twist - deletes ALL logfiles in the "ip" directory on startup. If set to True log files will accumulate but can be cleared out by setting --keeplogs False. Users that want to can always go into the command line and self-manage log files by always having -keeplogs True.

                New option -createvideo (default True if omitted). The default maintains the current behavior. If False then no video is created on "restart" or "terminate" BUT will be created on "restart"

                New option -keeppics (default True if omitted). The default maintains the current behavior i.e. pictures are kept until the next instance runs. If False the pictures are deleted immediately after the video is created (on "terminate"). If -createvideo is false then the pictures are not deleted.
                Note that this needs a little more thought since I had a "todo" to address the possible situation (unhandled at the moment) of more than one instance of DuetLapse3 running against the same duet "ip".

                undefined 1 Reply Last reply 21 Feb 2021, 19:56 Reply Quote 1
                • undefined
                  GoremanX @stuartofmt
                  last edited by GoremanX 21 Feb 2021, 19:56

                  I think this part needs clarification because it's contradictory the way it's currently written:

                  @stuartofmt said in DuetLapse3:

                  New option -createvideo (default True if omitted). The default maintains the current behavior. If False then no video is created on "restart" or "terminate" BUT will be created on "restart"

                  Beyond that, I like the proposed changes. It's more elegant than what I came up with. However, reading this just made me realize something:
                  @stuartofmt said in DuetLapse3:

                  Note that this needs a little more thought since I had a "todo" to address the possible situation (unhandled at the moment) of more than one instance of DuetLapse3 running against the same duet "ip".

                  All my duet 3D printers have the same IP address ๐Ÿ˜ฎ They all sit behind their own respective pi 4 computers, they all run in standalone mode with the exact same ip address, and they all write their external files to the same shared directory over NFS. So that means they would all save their photos in the same 192-168-220-2 directory ๐Ÿ˜ฎI do this so that I can use the exact same Raspbian SD card image on every pi without modification. The duet boards themselves don't talk to the network, the pi computers do all the talking for them using a DHCP-assigned address.

                  However each printer does declare a unique hostname in config.g, even if the network isn't aware of it. Is there a way for the script to try to get the board's hostname if it hasn't been declared in the -host parameter for file/directory name purposes?

                  undefined 1 Reply Last reply 22 Feb 2021, 01:39 Reply Quote 0
                  • undefined
                    GoremanX
                    last edited by 21 Feb 2021, 20:04

                    For fun, my first timelapse using this script:
                    https://youtu.be/XjBwTqbEZD8

                    undefined 1 Reply Last reply 22 Feb 2021, 01:43 Reply Quote 2
                    • undefined
                      Phaedrux Moderator
                      last edited by 21 Feb 2021, 20:07

                      @GoremanX That was a pretty weird timelapse.

                      Z-Bot CoreXY Build | Thingiverse Profile

                      undefined 1 Reply Last reply 21 Feb 2021, 20:09 Reply Quote 0
                      • undefined
                        GoremanX @Phaedrux
                        last edited by 21 Feb 2021, 20:09

                        @Phaedrux said in DuetLapse3:

                        @GoremanX That was a pretty weird timelapse.

                        I got bored while waiting for another print to finish, and that acrylic door looked like a great screen to project silly things onto

                        1 Reply Last reply Reply Quote 2
                        • undefined
                          stuartofmt @GoremanX
                          last edited by stuartofmt 22 Feb 2021, 01:39

                          @GoremanX said in DuetLapse3:
                          I think this part needs clarification because it's contradictory the way it's currently written:

                          @stuartofmt said in DuetLapse3:

                          New option -createvideo (default True if omitted). The default maintains the current behavior. If False then no video is created on "restart" or "terminate" BUT will be created on "restart"

                          Yes - it was a brain fade .....-should read If False then no video is created on "restart" or "terminate" BUT will be created on "snapshot"

                          However each printer does declare a unique hostname in config.g, even if the network isn't aware of it. Is there a way for the script to try to get the board's hostname if it hasn't been declared in the -host parameter for file/directory name purposes?

                          Wow ! nice edge case ๐Ÿ˜ต I have some ideas, one or other of which may be "cunning". Maybe a combination of using the host computer's ip address, together with the duet address and maybe port number of DuetLapse3 (if used). Thinking cap is on.

                          Edit: I have a cunning plan! I will document it here tomorrow and get started on the code changes

                          1 Reply Last reply Reply Quote 1
                          • undefined
                            stuartofmt @GoremanX
                            last edited by 22 Feb 2021, 01:43

                            @GoremanX said in DuetLapse3:

                            For fun, my first timelapse using this script:
                            https://youtu.be/XjBwTqbEZD8

                            Nice! Please don't ask for embedded background images or graphics in DuetLapse3.
                            ๐Ÿ˜€

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              stuartofmt
                              last edited by stuartofmt 24 Feb 2021, 17:23

                              Edit: Deleted due to changed description.

                              undefined 1 Reply Last reply 24 Feb 2021, 19:28 Reply Quote 1
                              • undefined
                                GoremanX @stuartofmt
                                last edited by 24 Feb 2021, 19:28

                                @stuartofmt I love it, it covers all potential use cases I can think of. And most importantly, it covers my use case, and that's all that really matters in this world. Me ๐Ÿ˜‚

                                undefined 1 Reply Last reply 25 Feb 2021, 05:47 Reply Quote 0
                                • undefined
                                  stuartofmt
                                  last edited by 25 Feb 2021, 00:20

                                  Version 3.3.0 has been released.

                                  ###Version 3.3.0###
                                  [1] Made significant changes to the browser UI for both DuetLapse3 and startDuetLapse3. Both now provide buttons for easier navigation.
                                  [2] Added an option for startDuetLapse3 to accept default start (-args) for starting DuetLapse3.

                                  If you provide -args, special care needs to be made in formatting it correctly. See the documentation in github. Especially note
                                  [1] double quote characters around the entire -args options list
                                  [2] the use of

                                  &quot; and &apos;

                                  for all other double or single quotes inside the outer quotes used for the -args options list.

                                  1 Reply Last reply Reply Quote 0
                                  • undefined
                                    stuartofmt @GoremanX
                                    last edited by stuartofmt 25 Feb 2021, 05:47

                                    @GoremanX

                                    Having thought about this more - and because I noticed something on WSL (which gets a different ip address each time itโ€™s started) - the directory scheme needs a little refinement.

                                    The problem arises when the computer ip is not static. You would end up with difficult to determine top level directories. Therefore I think using the fully qualified domain name of the computer is a better approach as it will be static. This may mean that you need - for each of your piโ€™s to set a different and unique domain name for each one after cloning the sd card.

                                    Thoughts?

                                    undefined 1 Reply Last reply 25 Feb 2021, 05:51 Reply Quote 0
                                    • undefined
                                      GoremanX @stuartofmt
                                      last edited by 25 Feb 2021, 05:51

                                      @stuartofmt Oh my pis already have different hostnames, it's dynamically assigned, so that would be perfect and even preferable. I don't do well trying to memorize the ip addresses of the hundreds of systems I interact with on a daily basis ๐Ÿคฃ

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        stuartofmt
                                        last edited by stuartofmt 3 Apr 2021, 22:52 26 Feb 2021, 19:26

                                        Edit: Deleted
                                        Please see the 3.4.0 release notes below

                                        undefined 1 Reply Last reply 26 Feb 2021, 19:31 Reply Quote 0
                                        • undefined
                                          GoremanX @stuartofmt
                                          last edited by 26 Feb 2021, 19:31

                                          @stuartofmt One observation: isn't it possible to pull the file name of the current print job through the object model? If so, instead of just processid, could the directory be named "jobfilename-processid"? That way, the directory is easily identifiable as the result of a specific job, but there's still a unique number appended to it for when the same job is run more than once

                                          undefined 1 Reply Last reply 26 Feb 2021, 19:44 Reply Quote 1
                                          77 out of 296
                                          • First post
                                            77/296
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA