Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moonraker timelapse add-on #195

Open
Pneumanifest opened this issue Jan 28, 2025 · 7 comments
Open

Moonraker timelapse add-on #195

Pneumanifest opened this issue Jan 28, 2025 · 7 comments

Comments

@Pneumanifest
Copy link

Would it be possible to add a script for installing Moonraker timelapse? Is that even possible with a docker setup?

@mkuf
Copy link
Owner

mkuf commented Jan 28, 2025

Hi there,

This has been discussed in #46.
There is a override file in the custom directory of this repo that contains all info required to get this up and running.

-Markus

@mircsicz
Copy link

mircsicz commented Jan 29, 2025

May I?

I've been following your description in docker-compose.custom.moonraker-timelapse.override.yaml and added this to docker-compose.override.yaml:

services:
  moonraker:
    image: moonraker:ffmpeg
    build:
      dockerfile_inline: |
        FROM alpine/git as pull
        RUN git clone https://github.com/mainsail-crew/moonraker-timelapse /opt/moonraker-timelapse
        FROM mkuf/moonraker:latest
        USER root
        RUN apt update \
        && apt install -y ffmpeg wget \
        && apt clean
        USER moonraker
        COPY --chown=moonraker:moonraker --from=pull /opt/moonraker-timelapse /opt/moonraker-timelapse
        RUN ln -s /opt/moonraker-timelapse/component/timelapse.py /opt/moonraker/moonraker/components/timelapse.py
    volumes:
      - /opt/timelapse:/opt/timelapse
      - /dev/null:/opt/klipper/config/null
      - /dev/null:/opt/klipper/docs/null
      - /run/dbus:/run/dbus
      - /run/systemd:/run/systemd
      - run:/opt/printer_data/run
      - gcode:/opt/printer_data/gcodes
      - log:/opt/printer_data/logs
      - moonraker-db:/opt/printer_data/database
      - ./config:/opt/printer_data/config

and yes I've skipped ustreamer / webcam as I run a go2rtc instance on another machine...

I've also added a timelapse.cfg to my ./config dir and the line

[include timelapse.cfg]

to my printer.cfg

Also my moonraker.conf now contains:

[timelapse]
output_path: /opt/timelapse/
##
[webcam]
snapshot_url: https://subdom.mydom.net/go2rtc/api/frame.jpeg?src=kobra2neo-rstp2

But with the [timelapse] part active moonraker won't start:

2025-01-29 15:54:48,795 [server.py:try_pip_recovery()] - Module 'moonraker.components.timelapse' not found. Attempting Pip Update...

I've also already removed the klipper image and repulled it...

To me it seems that the part from override.yaml is ignored. :-(

@mkuf
Copy link
Owner

mkuf commented Jan 29, 2025

@mircsicz is that your full override file? If not, please upload the file here.

Did you see any build action when starting the stack?
If not, you may need to run docker compose build and append your profiles for it to work.

@mircsicz
Copy link

mircsicz commented Jan 29, 2025

@mkuf yeap thats all there's to it ;-)

I couldn't see any build when starting with:
docker compose --profile mainsail,mobileraker_companion up

And a 'docker compose --progress plain build' also left no output at all

I've rm'd the klipper image again and ran it:


mircsicz@piz2:/srv/docker/prind $ docker compose --progress plain build^C
mircsicz@piz2:/srv/docker/prind $ docker compose --profile mainsail,mobileraker_companion up
[+] Running 9/111
 ⠹ klipper [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿] 104.9MB / 105.3MB Pulling                                                                                                                                             73.8s    
✔ 7ce705000c39 Pull complete                                                                                                                                                                             39.7s    
✔ d02d1a1ced20 Pull complete                                                                                                                                                                             43.9s    
✔ 8c2bfb64ec8e Pull complete                                                                                                                                                                             55.3s    
✔ 1c510bbba845 Pull complete                                                                                                                                                                             55.5s    
✔ 4f4fb700ef54 Pull complete                                                                                                                                                                             55.7s    
✔ 56fe15d12145 Pull complete                                                                                                                                                                             56.2s    
✔ b0f8d40a10d4 Pull complete                                                                                                                                                                             56.4s    
✔ 9ef1b5e673d4 Pull complete                                                                                                                                                                             56.5s    
⠴ a7c68d237f6d Extracting      [=====================>                             ]  12.39MB/28.31MB                                                                                                    71.3s    
✔ 7a08896412b6 Download complete
[+] Running 4/4
 ✔ Network prind_default      Created                                                                                                                                                                        1.8s  
✔ Container prind-init-1     Created                                                                                                                                                                        7.8s  
✔ Container prind-traefik-1  Created                                                                                                                                                                        7.8s  
✔ Container prind-klipper-1  Created                                                                                                                                                                        1.1s Attaching to init-1, klipper-1, traefik-1
init-1 exited with code 0

@mkuf
Copy link
Owner

mkuf commented Jan 29, 2025

@mircsicz The way you specify profiles in your up command is invalid.
You can see that on the number of containers running, mainsail and the mobileraker_companion are missing.

Moonraker is also missing, as it is tied to a specific set of profiles, because it would not be needed if one would choose octoprint as frontend for example.
If no, or a nonexistent profile (like 'mainsail,mobileraker_companion') is specified, the service is not started.

profiles:
- fluidd
- mainsail
- klipperscreen
- moonraker-telegram-bot
- mobileraker_companion

The profile argument needs to be repeated for every profile, so the correct syntax for you would be as outlined in the readme

prind/README.md

Line 171 in 39e391e

docker compose --profile mainsail --profile mobileraker_companion up -d

@mircsicz
Copy link

mircsicz commented Jan 29, 2025

Just Found it in your docs, SORRY once again RTFM 🤨

EDIT: initial respond was from the phone while traveling, thx for sending the hint directly in your message!

It now works (neaarly) as expected <3

@mkuf
Copy link
Owner

mkuf commented Jan 29, 2025

@mircsicz No worries. :)

@Pneumanifest is the info in #195 (comment) sufficient so we can close this issue or do you need any further guidance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants