my timelapse implementation with pi zero



  • Hi all,
    This is my implementation for automated layerlapse using the awesome duetwifi board
    all information can be found under the link below
    https://github.com/doryosef/dts

    Basically it listen to telnet and execute commands on the pi zero



  • Neat approach. Might be worth noting that in earlier versions M118 did not send a newline, so if your service is dependent on that it may only be compatible with the relatively recent reprap firmware.



  • My waitForMessage function collect the characters coming from telnet and store them for 1 sec
    if it match the command it will add it to the queue for executing it
    🙂

    so it should be compatible with old version as well
    (I checked it only on duet version 2.02)



  • @doryo
    Thanks for writing this.
    I am running a Pi3, is it possible for the Pi to create the final timelapse video.

    Good work BTW, easier to implement than MotionEye.

    Just testing it now.

    Regards,
    Paul.


  • Moderator

    @PaulHew said in my timelapse implementation with pi zero:

    I am running a Pi3, is it possible for the Pi to create the final timelapse video.

    I'd think so, as he uses ffmpeg to make the video.

    @doryo FYI this project has been added to https://duet3d.dozuki.com/c/Community_Projects

    Ian



  • @PaulHew said in my timelapse implementation with pi zero:

    I am running a Pi3, is it possible for the Pi to create the final timelapse video.

    Duet3 with Pi configurations do not support telnet in the same way that Duet 2 and/or stand-alone-3 support telnet.

    Therefore, the code will not work as shown.


    Having said that, the Pi in a Duet3+Pi is perfectly capable of taking timelapse (assuming it has a camera) and there are several ways to interface to do that... just not telnet.



  • Hi Ian,

    Doryo's scripts to create the timelapse are to be run under a bash shell on a PC / Windows.
    (I have an old laptop and will try with that)

    My programming skills are in different area, such as IOS and Simpl and have tried to edit the timelapse.sh but I am a bit lost! Even broke it down just to get one part working but i am getting errors.

    I have installed ffmpeg on my Pi so I am ready.

    I look forward to hearing from Doryo as it would be nice to get this all working on the Pi3.
    IMHO it is simpler to implement, and if @doryo does reply and assist, i am more than happy to create a guide on what to do, beginning to end.

    Regards,

    Paul



  • @Danal If I get to the point of writing a guide, which I hope I will be able to, I will make sure to inform that it is for Duet2 boards only.
    In regards, to the Duet3, I am surprised someone has not written something that considering that in most instances it will be connected to a SBC.



  • @PaulHew said in my timelapse implementation with pi zero:

    Duet2 boards only.

    It will also work with duet 3 boards in standalone mode



  • @PaulHew said in my timelapse implementation with pi zero:

    @Danal If I get to the point of writing a guide, which I hope I will be able to, I will make sure to inform that it is for Duet2 boards only.
    In regards, to the Duet3, I am surprised someone has not written something that considering that in most instances it will be connected to a SBC.

    Duet 2 or stand-alone Duet 3... both should work, in that Telnet is the same.

    Add a Pi, and telnet now goes to the Pi. So any script that wishes to connect to the RepRap firmware telnet, that won't work.

    And... yes, a D3+Pi script for timelapse, I'm surprised someone hasn't written that yet. I may take a run at it, when I get done with some scripting for aligning tools on toolchanging printers.



  • @PaulHew
    I think pi 3 will not handle the job properly as it need more gpu power, not sure ...
    I tried with pi zero which got stuck every time I tried to execute ffmpeg

    just FYI
    every print it create tar zip with all the timelapse
    So when executing the script timelapse.sh on windows machine it will create movie for each print.

    @droftarts
    Awesome thanks



  • @doryo Thanks for replying to this and my message on Github.
    Eventually I worked out what I was doing wrong after spending hours on understanding bash shell and commands etc.

    The files are already on the Pi, so all I needed to do is run ffmpeg to create the .mov in my Samba share folder, delete the .jpgs and clear the log.

    I created a new .sh to perform those functions.
    I admittedly only had 10 images and only took about 20 secs to process.
    Also I need to tweak the ffmpeg options.

    I hope to do a proper test in the coming days and will post my results, then write a guide from blank card etc.

    Regards,
    Paul


Log in to reply