Giter VIP home page Giter VIP logo

moonraker-timelapse's Introduction

moonraker-timelapse's People

Contributors

billynate avatar drewgwallace avatar favoritewky avatar fryakatkop avatar jamincollins avatar kwadfan avatar pedrolamas avatar prcutler avatar samia3d avatar zellneralex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moonraker-timelapse's Issues

Watermark Feature Request

I currently export all renders to video editor, add in watermark, then post to social media. It would be nice if there was an overlay where an already modified photo (transparency / clear background) could be uploaded as an overlay of the render process. I would even be okay with placing it blind, based off the resolution of my webcam. Thanks!

CUSTOM_POS_X ERROR

keep getting this error in my gcode console :

Error evaluating 'gcode_macro _SET_TIMELAPSE_SETUP:gcode': CommandError: CUSTOM_POS_X=0.0 must be within [6.0 - 350.0]

i have these versions
klipper
v0.10.0-225-g6e6ad7b5
moonraker
v0.7.1-285-g505c1bf
timelapse
v0.0.1-96-g90a277c
z_calibration
v0.8.0-7-gcb68379
mainsail
v2.1.0-rc1

Probleme timelapse with ideamaker or ??

Hello everyone, I am having some problems with the timelapse and ideamaker option.

At start gcode, I have purge line section. When printing with the timelapse function activated by layer change, this at the beginning is repeated at least 2 or even 3 times. can't find why?
moreover in the console, I have a lot of command error message, a text that tries to be displayed somewhere?

if anyone has any info?

I note you if below my gcode in idea:

Start Gcode G21 G90 M82 G28 G92 E0 G1 Z15.0 F60 G0 E3 F200 G92 E0 G1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position G1 X10.1 Y160.0 Z0.28 F3000.0 E15 ;Draw the first line G1 X10.4 Y160.0 Z0.28 F3000.0 ;Move to side a little G1 X10.4 Y20 Z0.28 F3000.0 E30 ;Draw the second line G92 E0

layer change gcode TIMELAPSE_TAKE_FRAME

And here is an example of what I can find in the console:
Capture d’écran 2022-08-21 162653

I don't know, do you need to provide more information?
I'm on mainsail updated

Anyway, thanks in advance if you can help me.

klippy.log
moonraker.log

Missing check for `wget` on the install script

The moonraker component is using wget to download the snapshots yet the install script is not checking if wget is installed!

I get that standard Debian/Ubuntu install will most likely have wget installed, but that is not the case with Docker images as to keep their size small (normally one will only install the bare minimums on the image)

I would thus recommend adding a check for wget, just like the exiting one for ffmpeg

still having some config issues

some fixed but still having this ones:

check the logfile and fix the issue.

Following plugin has an error:

timelapse
Invalid config option 'output_framerate: 20 # Note: this will be ignored if variable_fps is enabled' detected in section [timelapse]. To solve this issue check your moonraker config. This option is invalid and has to be deleted or fixed. In the future this will result in a startup error.

Invalid config option 'time_format_code: %Y%m%d_%H%M' detected in section [timelapse]. To solve this issue check your moonraker config. This option is invalid and has to be deleted or fixed. In the future this will result in a startup error.

Invalid config option 'snapshoturl: http://localhost:8080/?action=snapshot' detected in section [timelapse]. To solve this issue check your moonraker config. This option is invalid and has to be deleted or fixed. In the future this will result in a startup error.

Invalid config option 'pixelformat: yuv420p' detected in section [timelapse]. To solve this issue check your moonraker config. This option is invalid and has to be deleted or fixed. In the future this will result in a startup error.

Invalid config option 'previewimage: True' detected in section [timelapse]. To solve this issue check your moonraker config. This option is invalid and has to be deleted or fixed. In the future this will result in a startup error.

wont take next frame

hi

i use fluidd, and time-frame/lapse
on my command from terminal "TIMELAPSE_TAKE_FRAME" he take picture on my saved directory /tmp/timelapse/

and it names frame000001.jpg

on next command TIMELAPSE_TAKE_FRAME he doesn't take next number frame00002.jpg, he just overite 00001.jpg... what im doing wrong?

when im download pic from raspi (cyberduck) to mac.. i'm only can open in photoshop, in normal pic view program got some error...

sorry for bad eng

how to user droidcam usb virtual camera for timelapse

Hello,

I use an Android phone connected to the Raspberry pi by USB and by using Droidcam client it gives me the virtual camera (/sys/devices/virtual/video4linux/video0) how to use this for the timelapse camera?

here is the device information

v4l2-ctl -d /dev/video0 --all
Driver Info:
        Driver name      : Droidcam
        Card type        : Droidcam
        Bus info         : platform:v4l2loopback_dc-000
        Driver version   : 5.15.32
        Capabilities     : 0x85200001
                Video Capture
                Read/Write
                Streaming
                Extended Pix Format
                Device Capabilities
        Device Caps      : 0x85200001
                Video Capture
                Read/Write
                Streaming
                Extended Pix Format
                Device Capabilities
Priority: 0
Video input : 0 (loopback: ok)
Format Video Capture:
        Width/Height      : 640/480
        Pixel Format      : 'YU12' (Planar YUV 4:2:0)
        Field             : None
        Bytes per Line    : 640
        Size Image        : 460800
        Colorspace        : sRGB
        Transfer Function : Default (maps to sRGB)
        YCbCr/HSV Encoding: Default (maps to ITU-R 601)
        Quantization      : Default (maps to Limited Range)
        Flags             : 
Streaming Parameters Video Capture:
        Frames per second: 30.000 (30/1)
        Read buffers     : 16
                    keep_format 0x08000000 (bool)   : default=0 value=0
              sustain_framerate 0x08000001 (bool)   : default=0 value=0
                        timeout 0x08000002 (int)    : min=0 max=100000000 step=1 default=0 value=0
               timeout_image_io 0x08000003 (bool)   : default=0 value=0

Thanks

Where does HYPERLAPSE_CYCLE go? Not effective in moonraker.cfg...

Title is it... where do I put the HYPERLAPSE_CYCLE=5 setting if I want 5-second pictures when in hyperlapse mode? I've set it in moonraker.cfg and it doesn't cause errors, but it isn't effective. The hyperlapse cycle always starts at 30 seconds. My workaround is to put this just after the nozzle temps are reached in my Cura start gcode settings:

HYPERLAPSE ACTION=STOP
HYPERLAPSE ACTION=START CYCLE=5

I'm also wanting to switch to layermacro at the first layer... so at the end of the start gcode, I put another HYPERLAPSE ACTION=STOP and then my layer processing includes the TIMELAPSE_TAKE_FRAME. That does seem to work correctly.

One thing I've noticed is that "Before Layer 1" seems to be AFTER the adhesion is printed, but before the object layer is printed. I'm trying to find a way to leave HYPERLAPSE on through the brim or outline, then switch to layermacro. Any ideas there?

Add logo to rendered video

I've tried to add a logo to the rendered video using the extraoutputparams: ~/logo.png -filter_complex "overlay=x=10:y=10"
And obviously it's not working because I don't really know what I'm doing.

unable to set [timelapse] in moonraker.cfg file

if I insert only:
[timelapse]

all works, but if I insert into:
[timelapse]
enabled: False

error:
% fluidd avvisi trovati.
Moonraker ha problemi con dei plugin. Controlla i tuoi log, aggiorna la tua configurazione e riavvia moonraker.
timelapse
Puoi trovare la configurazione dei plug-in Moonraker qui .

Remove old Timelapses

Hello! (New to GitHub, wasn't sure where to put this...)
Just wondering if it would be hard to add an option to delete old Time lapses? (Possible filters: X days, X videos, X GB of data)

Thanks :)

Park feature not working

Hi, I just set up moonraker timelapse, and I have the park feature enabled in the config, but it's not parking when it is supposed to send the screenshot gcode or whatever. It takes a picture each layer as enabled in my slicer, but it doesn't park in the same spot. I've attatched both my printer.cfg and timelapse.cfg, if anyone knows what's up, or maybe if I'm doing something wrong, please let me know. Thanks.
printer.txt
timelapse.txt
.

_SET_TIMELAPSE_SETUP in Console at each time Moonraker restart

I am running moonraker-timelapse, following the installation instructions on the GitHub. I have gotten it to work but each time I restart Moonraker. I am getting the below command in my console each time.

""_SET_TIMELAPSE_SETUP ENABLE=True VERBOSE=False PARK_ENABLE=False PARK_POS=back_left CUSTOM_POS_X=0.0 CUSTOM_POS_Y=0.0 CUSTOM_POS_DZ=0.0 TRAVEL_SPEED=100 RETRACT_SPEED=15 EXTRUDE_SPEED=15 RETRACT_DISTANCE=1.0 EXTRUDE_DISTANCE=1.0 PARK_TIME=0.1 FW_RETRACT=False""

""HYPERLAPSE ACTION=STOP""

Console:
image

Below is my config because I do not have access to change the settings in the GUI:
image

Any ideas on how to fix this, or have my settings override them? When I go to add more settings in the moonraker.cfg it breaks the timelapse.

Multiple Camera support

Thanks for this great plugin. Is there any possibility to configure it to take timelapses with multiple cameras. I have a cam showing the bed and a nozzle cam and would like am Timelapse for each. I could not find any documentation how to do it.

FluiddPi cannot load the plugin

This is what the UI says
fluidd warnings found.
Moonraker has failed plugins, please check your logs, update your configuration and restart moonraker.
timelapse
Moonraker plugin configuration can be found here.

Here is the error from the log

2021-11-15 20:24:40,376 [moonraker.py:load_component()] - Unable to load component: (timelapse)
Traceback (most recent call last):
File "/home/pi/moonraker/moonraker/moonraker.py", line 204, in load_component
component = load_func(config)
File "/home/pi/moonraker/moonraker/components/timelapse.py", line 677, in load_component
return Timelapse(config)
File "/home/pi/moonraker/moonraker/components/timelapse.py", line 131, in init
full_access=True
TypeError: register_directory() got an unexpected keyword argument 'full_access
moonraker (3).log
'

AttributeError: 'Timelapse' object has no attribute 'webcams_db'

I'm getting this error when running the TIMELAPSE_TAKE_FRAME GCode macro:
AttributeError: 'Timelapse' object has no attribute 'webcams_db'.

I'm using Fluidd. There's no [webcam] section in my moonraker.conf but the webcam is showing just fine on the dashboard.
In configuration.md it says "Alternatively you can configure 'snapshoturl', 'flip_x' and 'flip_y' in the moonraker.conf if your frontend doesn't support the webcams namespace of moonraker DB." But setting the snapshoturl doesn't seem to fix the error.

Run alternative/custom image-capture scripts on layer change?

This is probably an edge use-case, but would it be at all possible to allow for customizing how snapshots are taken? I have this up and running and taking fantastic 1080p timelapses. But, my Raspberry Pi Cam HQ (and the DSLRs some people use for Octolapse) is capable of 4k stills. With Octolapse, you can provide custom scripts that dictate how images are captured. For example, rather than using ffmpeg, you might use Raspistill/libcamera/gphoto to take a 4k still shot with the ability to save as RAW for post-processing, if desired (e.g., 1, 2). I'm sure there's probably a way to hardcode an alternate capture method (albeit, my coding skills aren't up to the task), but it would be nice if I could point to a small shell or python script from the [timelapse] section of moonraker.cfg. So basically, (unless I supplied moonraker-timelapse with a broken script), moonraker-timelapse would work normally right up to the point of image capture in accordance with my config settings, would execute my custom script, and then would go back to business as usual until the next image capture). I think this would probably make more sense for layermacro mode, if it's possible at all.

No UI on mainsailos Following the Install/Config guide

After follow the installation and config guide, i cant enable the UI.

  • Lines added on moonraker.cfg file -
  • Soft link on moonraker/moonraker/components/timelapse.py exists
  • Python version of moonraker: Python 3.7.3

Versions:
klipper : v0.10.0-218-gf8afe49a
moonraker : v0.7.1-280-g9d7baa1
moonraker-telegram-bot : v1.3.1-1-gb55d67d
timelapse : main: v0.0.1-95-g9b41ac5
mainsail : v2.0.1

// Timelapse: disabled, take frame ignored (Help)

Hey for some odd reason my console says
// Timelapse: disabled, take frame ignored
and I went to the timelapse.conf file and changed
[gcode_macro TIMELAPSE_TAKE_FRAME]
description: Take Timelapse shoot
variable_enable: True
variable_takingframe: True
to saying true and once I save and restart it just resets it to say false.
I believe this is the issue for it ignoring the take frame command but I am new to coding and moonraker.
Config Files.zip

Update-Manager states "Invalid"

Both timelapse and z calibration show to be invalid

Screenshot 2022-07-20 202817

This is what i see in the log and don't understand how to correct it.

2022-07-20 21:59:05,473 [shell_command.py:_check_proc_success()] - Command (git -C /home/gw/moonraker-timelapse status -u no) successfully finished
2022-07-20 21:59:05,484 [shell_command.py:_check_proc_success()] - Command (git -C /home/gw/moonraker-timelapse config --get branch.main.remote) successfully finished
2022-07-20 21:59:05,494 [shell_command.py:_check_proc_success()] - Command (git -C /home/gw/moonraker-timelapse remote get-url origin) successfully finished
2022-07-20 21:59:05,510 [shell_command.py:_check_proc_success()] - Command (git -C /home/gw/moonraker-timelapse fetch origin --prune --progress) exited with return code 255
2022-07-20 21:59:06,025 [shell_command.py:_check_proc_success()] - Command (git -C /home/gw/moonraker-timelapse fetch origin --prune --progress) exited with return code 255
2022-07-20 21:59:06,193 [announcements.py:_fetch_moonlight()] - Failed to update subscription 'klipper': [Errno -3] Temporary failure in name resolution
2022-07-20 21:59:06,540 [shell_command.py:_check_proc_success()] - Command (git -C /home/gw/moonraker-timelapse fetch origin --prune --progress) exited with return code 255
2022-07-20 21:59:07,055 [shell_command.py:_check_proc_success()] - Command (git -C /home/gw/moonraker-timelapse fetch origin --prune --progress) exited with return code 255
2022-07-20 21:59:07,571 [shell_command.py:_check_proc_success()] - Command (git -C /home/gw/moonraker-timelapse fetch origin --prune --progress) exited with return code 255
2022-07-20 21:59:21,619 [git_deploy.py:initialize()] - Git Repo timelapse: Initialization failure

Traceback (most recent call last):
File "/home/gw/moonraker/moonraker/components/update_manager/git_deploy.py", line 347, in initialize
await self.fetch()
File "/home/gw/moonraker/moonraker/components/update_manager/git_deploy.py", line 648, in fetch
await self._run_git_cmd_async(
File "/home/gw/moonraker/moonraker/components/update_manager/git_deploy.py", line 940, in _run_git_cmd_async
raise self.server.error(f"Git Command '{cmd}' failed")
utils.ServerError: Git Command 'fetch origin --prune --progress' failed
2022-07-20 21:59:21,619 [git_deploy.py:refresh()] - Error Refreshing git state
Traceback (most recent call last):
File "/home/gw/moonraker/moonraker/components/update_manager/git_deploy.py", line 53, in refresh
await self._update_repo_state()
File "/home/gw/moonraker/moonraker/components/update_manager/git_deploy.py", line 59, in _update_repo_state
await self.repo.initialize(need_fetch=need_fetch)
File "/home/gw/moonraker/moonraker/components/update_manager/git_deploy.py", line 347, in initialize
await self.fetch()
File "/home/gw/moonraker/moonraker/components/update_manager/git_deploy.py", line 648, in fetch
await self._run_git_cmd_async(
File "/home/gw/moonraker/moonraker/components/update_manager/git_deploy.py", line 940, in _run_git_cmd_async
raise self.server.error(f"Git Command '{cmd}' failed")
utils.ServerError: Git Command 'fetch origin --prune --progress' failed

I also did a git status with these results

gw@raspberrypi:~ $ cd klipper_z_calibration
cd klipper_z_calibration
gw@raspberrypi:~/klipper_z_calibration $ git status
git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean

Not sure where to go any help would be appreciated.
Thank you

[feature request] Add last frame after moves in PRINT_END

I've got duplicate last frames set, but I'd really prefer that last frame to be after the print head moves up and away from the print and I've got those moves in the PRINT_END macro.

Since I'm using the TIMELAPSE_TAKE_FRAME macro in Before Layer Change I thought the slicer is controlling the frames, so what I tried to do is add an additional TIMELAPSE_TAKE_FRAME after the call to print_end in the End G-code section of the slicer - my thought was that this keeps all of the timelapse control in the code generated by the slicer. I thought this would allow the print_end to move the print head and then it would take that additional frame after the move that would get stretched out by the render, but it didn't work. It appears that the render gets triggered by the print end state and not the end of the gcode.

So I'd be interested in some clean way to do this which may or may not involve a code change.

Use HW encoding capabilities

All recent Raspberry PIs (including the prior ones using 5.10 kernel) do support hardware acceleration of:

  • decoding/encoding of the H264 stream (up-to 1920x1080x30p)
  • decoding of the JPEG (up-to 1920x1920)

The RPI's with the 5.15 which is current LTS kernel shipped by default https://www.ubuntufree.com/raspberry-pi-os-is-now-powered-by-linux-5-15-lts-gets-experimental-wayland-backend-9to5linux/ as well do support hardware JPEG encoding.

The usage of hardware acceleration especially helps when using this plugin with RPI0.2W. It is possible to greatly increase the performance of encoding with the usage of h264_v4l2m2m instead of libx264 as a vcodec.

Unfortunately, hardware decoding of JPEG is not possible with ffmpeg as of today, even though there were patches https://patchwork.ffmpeg.org/project/ffmpeg/patch/[email protected]/#30572.

Proposal

Allow to choose encoder between libx264 and h264_v4l2m2m

Apper warning message after moonraker-timelapse update.

After recently updating moonraker-timelapse, the following warning message appears on the top screen of Mainsail.

An error was detected while loading the moonraker components. Please check the logfile and fix the issue.

Following plugin has an error:

timelapse
Unparsed config option 'output_path: ~/timelapse/printer1' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'frame_path: /tmp/timelapse/printer1' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'enabled: True' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'gcode_verbose: True' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'parkhead: true' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'parkpos: center' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'park_custom_pos_x: 0.0' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'park_custom_pos_y: 0.0' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'park_custom_pos_dz: 0.0' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'park_travel_speed: 90' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'park_retract_speed: 25' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'park_extrude_speed: 15' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'park_retract_distance: 1.0' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'park_extrude_distance: 0.0' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'autorender: True' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Unparsed config option 'fw_retract: false' detected in section [timelapse]. This may be an option no longer available or could be the result of a module that failed to load. In the future this will result in a startup error.

Is this problem caused by moonraker-timelapse or moonraker?
My settings in the [timelapse] section of my moonraker.conf are as follows

[timelapse]
##   Following basic configuration is default to most images and don't need
##   to be changed in most scenarios. Only uncomment and change it if your
##   Image differ from standart installations. In most common scenarios
##   a User only need [timelapse] in there configuration.
output_path: ~/timelapse/printer2
##   Directory where the generated video will be saved
frame_path: /tmp/timelapse/printer2
##   Directory where the temporary frames are saved
#ffmpeg_binary_path: /usr/bin/ffmpeg
##   Directory where ffmpeg is installed
#enabled: True
#mode: layermacro
snapshoturl: http://192.168.1.5:8081/?action=snapshot
#gcode_verbose: True
parkhead: true
parkpos: center
#park_custom_pos_x: 0.0
#park_custom_pos_y: 0.0
#park_custom_pos_dz: 0.0
park_travel_speed: 90
park_retract_speed: 25
#park_extrude_speed: 15
park_retract_distance: 1.5
#park_extrude_distance: 1.0
#hyperlapse_cycle: 30
autorender: True
#constant_rate_factor: 23
#output_framerate: 30
#pixelformat: yuv420p
#time_format_code: %Y%m%d_%H%M
#extraoutputparams:
#variable_fps: False
#targetlength: 10
#variable_fps_min: 5
#variable_fps_max: 60
#flip_x: False
#flip_y: False
#duplicatelastframe: 0
#previewimage: True
#saveframes: False

klipper: v0.10.0-291-g4ce2d379
moonraker: v0.7.1-452-ga700725
timelapse: v0.0.1-113-ga4d31b7-dirty
mainsail: v2.1.2

Adapt "new" update service manager feature of moonraker

remove timelapse service from installer and docs

new conf snippet from DC

[update_manager timelapse]
type: git_repo
primary_branch: main
path: ~/moonraker-timelapse
origin: https://github.com/mainsail-crew/moonraker-timelapse.git
managed_services: klipper moonraker

SD busy

I get an error that says "SD busy" when my printer tries to take the first picture in the timelapse.
Screenshot 2022-05-20 150140
I have Mainsail installed on a Raspberry Pi 4 8GB.
Screenshot 2022-05-20 150558

klippy log.log
moonraker log.log

Unknown command: "PAUSE_BASE"

Just started testing out the plugin and it's working well so far. Cheers for all your work on this. I have run into one error about an undefined "PAUSE_BASE" in my console. You use it twice in the macros - it assumes that people have renamed stock PAUSE to PAUSE_BASE rather than something else (I use BASE_PAUSE, for example).

// Unknown command:"_SET_TIMELAPSE_SETUP" after install on Klipper restart

I can't find anything in the logs to predict an error. It looks like the Timelapse macros are not recognized by Klipper. I've searched Klippy.log and Moonraker.log for issues but find none.

Only customization I did was add this to moonraker.cfg:

[timelapse]
  enabled: True
  autorender: True
  constant_rate_factor: 20
  output_framerate: 15
  output_path: /home/pi/gcode_files/Timelapses/
  frame_path: /tmp/timelapse/
  ffmpeg_binary_path: /usr/bin/ffmpeg
  snapshoturl: http://fluiddpi.local/webcam/?action=snapshot
  extraoutputparams: -filter_complex "[0]trim=0:3[hold]"

I see this in my fluiddpi console on reboot:

17:18:49 
// Klipper state: Ready
17:18:50 
$ _SET_TIMELAPSE_SETUP ENABLE=True VERBOSE=True PARK_ENABLE=False PARK_POS=back_left CUSTOM_POS_X=0.0 CUSTOM_POS_Y=0.0 CUSTOM_POS_DZ=0.0 TRAVEL_SPEED=100 RETRACT_SPEED=15 EXTRUDE_SPEED=15 RETRACT_DISTANCE=1.0 EXTRUDE_DISTANCE=1.0 PARK_TIME=0.1 FW_RETRACT=False
17:18:50 
$ HYPERLAPSE ACTION=STOP
17:18:50 
// Unknown command:"_SET_TIMELAPSE_SETUP"
17:18:50 
// Unknown command:"HYPERLAPSE"

Any ideas?

"Error taking timelapse frame" in custom docker-based installation

I'm using https://github.com/mkuf/prind to run klipper, moonraker, and fluidd in docker containers.

I modified the ./docker/moonraker/ Dockerfile by manually placing timelapse.py inside the directory and adding COPY timelapse.py ./moonraker/moonraker/components to the Dockerfile, along with adding wget and ffmpeg to the apt get commands. That part all seems to work out fine -- if you shell into the moonraker container and check the components directory, the timelapse.py file is there, and manually invoking the wget and ffmpeg commands also works. I also manually added the timelapse.cfg file to my klipper printer.cfg.

Then in moonraker.conf I have the following webcam section:

[webcam Cam]
location: printer
service: mjpegstreamer
stream_url: http://192.168.0.5:81/webcam?action=stream
snapshot_url: http://192.168.0.5:81/webcam?action=snapshot

The above works perfectly fine in fluidd.

However I am getting a Error taking timelapse frame error in fluidd on what I assume is every layer change.

Is there a way to have timelapse.py print out logs to a file or something so I can exactly where it is getting tripped up?

Problems with the Park Toolhead function

Hello, I just installed the timelapse function and it is working. But I have problems with the Park Toolhead option, although I have it activated it does not work. What can I do in this case?

FR: Add Filament specific profiles for retraction etc.

user request on mainsail discord:

GotHealz:
Is there a way to create different profiles for Timelapse? My retraction is a little different for PLA and PETG same for TPU. Would > be nice being able to go to my timelapse setting and select PLA and it will bring up my PLA settings.

my Answer and temporary solution until added:

didn't think of that yet, i will write it on my list. Then see how it could be added without breaking existing config layout. A thing you could do right now is to add a "settings macro" for your filaments and then add them into your startcode in your slicer.
Rough explanation: On klipper or Moonraker restart (and when changing a setting in the timelapse settings in the Gui) the plugin rights parameters to the Klipper macro

_SET_TIMELAPSE_SETUP

which then handles all the retraction etc. You could simply write your settings to a new macro with filament specific settings, which then overwrite the settings inside the macro. (which have to be rewritten after the plugin wrote the parameters to the macro, but normally it's not happening after starting your print so calling that macro in your start gcode should be working without a problem)
Untested Example:

[gcode_macro TIMELAPSE_SETTINGS_PLA]
description: Set Timelapse parameters for PLA
gcode: 
  _SET_TIMELAPSE_SETUP RETRACT_SPEED=15 EXTRUDE_SPEED=15 RETRACT_DISTANCE=1.0 EXTRUDE_DISTANCE=1.0

best is to disable Mainsails timelapse console filter while setting it up (edited)

some random notes to myself:

  • a remote method which command the plugin which profile to select via slicer start code

Hyperlapse still running after "Done printing file"

module name: component/timelapse.py

Conditions :

  • mode : layermacro
  • hyperlapse started with gcode HYPERLAPSE ACTION=START

When "Done printing file" occurs the hyperlapse continue as the condition to stop it is (line 503)

            # stop hyperlapse if mode is set
            if self.config['mode'] == "hyperlapse":

Could it be replaced by

            # stop hyperlapse if running
            if self.hyperlapserunning:

Sorry if it's not clear, I'm quite uncomfortable with in english. I found it trying HYPERLAPSE command to set CYCLE from gcode file.

Signed-off-by: [email protected]

Update-Manager states "Invalid"

When trying to install the timelapse-component, the update-manager sets the status of the timelapse to "invalid".

mainsail v2.1.2
moonraker v0.7.1-424-g501af62

its a fresh/clean installation of mainsail.

moonraker.log shows:

2022-02-24 10:37:42,557 [update_manager.py:initialize()] -
Initializing Client Updater: 'mainsail',
Channel: stable
path: /home/pi/mainsail
2022-02-24 10:37:42,578 [shell_command.py:_check_proc_success()] - Command (git -C /home/pi/moonraker-timelapse status -u no) successfully finished
2022-02-24 10:37:42,595 [shell_command.py:_check_proc_success()] - Command (git -C /home/pi/moonraker-timelapse config --get branch.main.remote) successfully finished
2022-02-24 10:37:42,614 [shell_command.py:_check_proc_success()] - Command (git -C /home/pi/moonraker-timelapse remote get-url origin) successfully finished
2022-02-24 10:37:42,640 [shell_command.py:_check_proc_success()] - Command (git -C /home/pi/moonraker-timelapse fetch origin --prune --progress) exited with return code 255
2022-02-24 10:37:43,172 [shell_command.py:_check_proc_success()] - Command (git -C /home/pi/moonraker-timelapse fetch origin --prune --progress) exited with return code 255
2022-02-24 10:37:43,719 [shell_command.py:_check_proc_success()] - Command (git -C /home/pi/moonraker-timelapse fetch origin --prune --progress) exited with return code 255
2022-02-24 10:37:44,265 [shell_command.py:_check_proc_success()] - Command (git -C /home/pi/moonraker-timelapse fetch origin --prune --progress) exited with return code 255
2022-02-24 10:37:44,810 [shell_command.py:_check_proc_success()] - Command (git -C /home/pi/moonraker-timelapse fetch origin --prune --progress) exited with return code 255
2022-02-24 10:37:45,313 [git_deploy.py:initialize()] - Git Repo timelapse: Initialization failure
Traceback (most recent call last):
File "/home/pi/moonraker/moonraker/components/update_manager/git_deploy.py", line 325, in initialize
await self.fetch()
File "/home/pi/moonraker/moonraker/components/update_manager/git_deploy.py", line 534, in fetch
f"fetch {self.git_remote} --prune --progress")
File "/home/pi/moonraker/moonraker/components/update_manager/git_deploy.py", line 778, in _run_git_cmd_async
raise self.server.error(f"Git Command '{cmd}' failed")
utils.ServerError: Git Command 'fetch origin --prune --progress' failed
2022-02-24 10:37:45,313 [git_deploy.py:refresh()] - Error Refreshing git state
Traceback (most recent call last):
File "/home/pi/moonraker/moonraker/components/update_manager/git_deploy.py", line 55, in refresh
await self._update_repo_state()
File "/home/pi/moonraker/moonraker/components/update_manager/git_deploy.py", line 61, in _update_repo_state
await self.repo.initialize(need_fetch=need_fetch)
File "/home/pi/moonraker/moonraker/components/update_manager/git_deploy.py", line 325, in initialize
await self.fetch()
File "/home/pi/moonraker/moonraker/components/update_manager/git_deploy.py", line 534, in fetch
f"fetch {self.git_remote} --prune --progress")
File "/home/pi/moonraker/moonraker/components/update_manager/git_deploy.py", line 778, in _run_git_cmd_async
raise self.server.error(f"Git Command '{cmd}' failed")
utils.ServerError: Git Command 'fetch origin --prune --progress' failed

as i could clone the repo with no problem, i guess the GIT-URL in moonraker.conf should still be valid as

[update_manager timelapse]
type: git_repo
primary_branch: main
path: ~/moonraker-timelapse
origin: https://github.com/mainsail-crew/moonraker-timelapse.git

utils.ServerError: Key '3e61d605-e206-4f6c-8a30-bbccecc5a9b5' in namespace 'webcams' not found

I had this error on my klipper/mainsail/timelapse installation today.

Traceback (most recent call last):
  File "/home/pi/moonraker/moonraker/components/database.py", line 221, in get_item
    ns = self._get_record(namespace, key_list[0])
  File "/home/pi/moonraker/moonraker/components/database.py", line 322, in _get_record
    f"Key '{key}' in namespace '{namespace}' not found", 404)
utils.ServerError: Key '3e61d605-e206-4f6c-8a30-bbccecc5a9b5' in namespace 'webcams' not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/moonraker/moonraker/moonraker.py", line 239, in load_component
    component = load_func(config)
  File "/home/pi/moonraker/moonraker/components/timelapse.py", line 793, in load_component
    return Timelapse(config)
  File "/home/pi/moonraker/moonraker/components/timelapse.py", line 123, in __init__
    webcamconfig = self.webcams_db[self.config['camera']]
  File "/home/pi/moonraker/moonraker/components/database.py", line 478, in __getitem__
    return self.get(key, default=SENTINEL)
  File "/home/pi/moonraker/moonraker/components/database.py", line 467, in get
    return self.db.get_item(self.namespace, key, default)
  File "/home/pi/moonraker/moonraker/components/database.py", line 227, in get_item
    f"Key '{key}' in namespace '{namespace}' not found", 404)
utils.ServerError: Key '3e61d605-e206-4f6c-8a30-bbccecc5a9b5' in namespace 'webcams' not found

I worked around it with the following change in timelapse.py

diff --git a/component/timelapse.py b/component/timelapse.py
index 91724cc..97840f1 100644
--- a/component/timelapse.py
+++ b/component/timelapse.py
@@ -119,7 +119,7 @@ class Timelapse:
         self.overwriteDbconfigWithConfighelper()

         # Read Webcam config from Database
-        if not self.config['camera'] == '':
+        if self.config['camera'] and self.config['camera'] in self.webcams_db.keys():
             webcamconfig = self.webcams_db[self.config['camera']]
             if isinstance(webcamconfig, asyncio.Future):
                 self.getwebcamconfig(webcamconfig.result())

This was really just quick & dirty and I have no Idea if it's the right way to fix this.
I would guess that a "dissapearing" camera probably shouldn't happen.

There have been no changes to my cams, only klipper/mainsail/mooraker/timelapse updates yesterday (iirc).

updating timelapse reports a error but does the update

when updating timelapse the dummy service try to restart moonraker which returns a error, even though it's working properly.

image

The problem is issuing a restart of the dummy service within a child process of moonraker (shell command to restart the service) fails because the process it self will be reset. There is no solution to this at the moment. Moonraker does just ignore the error when restarting moonraker service within the frontend, i can't do this without modifing moonraker code to include timelapse dummy service.

Unparsed config section [timelapse] detected

I am getting this error with a fresh install of fluiddpi, klipper, moonraker.

image

fluidd warnings found.
Moonraker has failed plugins, please check your logs, update your configuration and restart moonraker.
timelapse
Moonraker plugin configuration can be found here.

Unparsed config section [timelapse] detected.

2021-11-27 14:30:04,118 [moonraker.py:load_component()] - Unable to load component: (timelapse)
Traceback (most recent call last):
File "/home/pi/moonraker/moonraker/moonraker.py", line 235, in load_component
module = importlib.import_module("components." + component_name)
File "/home/pi/moonraker-env/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'components.timelapse'
2021-11-27 14:30:04,119 [moonraker.py:add_warning()] - Unparsed config section [timelapse] detected. This may be the result of a component that failed to load. In the future this will result in a startup error.
2021-11-27 14:30:04,141 [moonraker.py:_initialize_component()] - Performing Component Post Init: [machine]
2021-11-27 14:30:04,198 [shell_command.py:_check_proc_success()] - Command (systemd-detect-virt) exited with return code 1

moonraker (5).log

Cannot install timelapse with 2 instances of klipper & mainsail

~$ cd ~/
git clone https://github.com/mainsail-crew/moonraker-timelapse.git
bash ~/moonraker-timelapse/install.sh

~ $ Cloning into 'moonraker-timelapse'...
remote: Enumerating objects: 258, done.
remote: Counting objects: 100% (258/258), done.
remote: Compressing objects: 100% (181/181), done.
remote: Total 258 (delta 127), reused 128 (delta 50), pack-reused 0
Receiving objects: 100% (258/258), 132.17 KiB | 1.41 MiB/s, done.
Resolving deltas: 100% (127/127), done.
Klipper service not found, please install Klipper first

image

Add a delayed last frame

Is it possible to modify the timelapse macro to get the last frame after the execution of the end g-code (to not have the hot-end in the last frame)? Or I missed some settings?

Btw I'm not using (and prefer to not use) the park function to avoid stringing and prolonged times.

Wrong camera in Timelapse Status

I have two cameras defines, "Upper" and "Lower". In the Settings page for Timelapse I have the Lower camera selected, but on the Timelapse Status page it is showing the view of the Upper camera. I've checked and the saved frames are also not the selected camera. I tried changing the selected camera and then selecting the desired one back, but that didn't fix the issue.

Camera options like brightness and contrast

I would like some additional camera options like the above in the camera settings.
Because my webcam is always much too bright and changing these settings in the pi-console is way too complicated for some, i think.
@FrYakaTKoP

[FR] Take_Frame_By_LayerChange

Hello
Is it possible to implement a Take_Frame_By_LayerChange without creating the gcode in the slicer every time. RepetierServer also recognizes a layer change. The GCode layer is also displayed in Mainsail, so it should be possible.
lg Chris

Thumbnail not loading: 401 unauthorized

It might be a config issue but thumbnails and frames won't load. Any idea why?
Error:

error: {
code: 401,
message: "Unauthorized",
traceback: "Traceback (most recent call last):

File "/home/pi/moonraker-env/lib/python3.9/site-packages/tornado/web.py", line 1681, in _execute
result = self.prepare()

File "/home/pi/moonraker/moonraker/app.py", line 494, in prepare
self.current_user = auth.check_authorized(self.request)

File "/home/pi/moonraker/moonraker/components/authorization.py", line 675, in check_authorized
raise HTTPError(401, "Unauthorized")

tornado.web.HTTPError: HTTP 401: Unauthorized (Unauthorized)
"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.