-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
127 lines (103 loc) · 4.71 KB
/
.env.example
File metadata and controls
127 lines (103 loc) · 4.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# ============================================
# PrusaLink Local API Configuration
# ============================================
# Your printer's local IP address or hostname (required)
# Find this in: Printer LCD -> Settings -> Network
# Or use mDNS hostname like: prusa-mk3.local
PRUSA_PRINTER_HOST=192.168.1.100
# Your PrusaLink API key (required)
# Get this from: Printer LCD -> Settings -> Network -> PrusaLink
# Or from the printer's web interface Settings page
PRUSA_API_KEY=your_api_key_here
# ============================================
# Camera & Timelapse Configuration
# ============================================
# How often to capture images during printing (in seconds)
# 15 seconds = 240 images per hour
CAPTURE_INTERVAL_SECONDS=15
# Image resolution
# Common values: 1920x1080 (Full HD), 1280x720 (HD),
# 4608x2592 (Arducam Module 3, 12MP IMX708 75° max)
# If you have performance issues, try lowering resolution or decrease
# CAPTURE_INTERVAL_SECONDS to capture fewer images.
IMAGE_WIDTH=1920
IMAGE_HEIGHT=1080
# Camera rotation in degrees (0, 90, 180, or 270)
# Use if your camera is mounted at an angle
# Images uploaded to Prusa Connect and final video will be rotated
CAMERA_ROTATION=0
# Focus distance in centimeters (10-100)
# Distance from camera lens to the center of the field of view
# Used to calculate --lens-position for rpicam-still (100 / FOCUS_DISTANCE)
# Example: 22cm focus = lens position 4.54
# Lower values (closer focus) = higher lens position numbers
FOCUS_DISTANCE=22
# Video settings
# Frames per second for output video (higher = smoother but larger file)
VIDEO_FPS=30
# Video quality (CRF value: 0-51, lower = better quality but larger file)
# Recommended: 24-35 (28 is a good default)
VIDEO_QUALITY=28
# Video batch size (frames per batch for memory-efficient processing)
# Lower values use less memory but take longer (important for Raspberry Pi Zero 2)
# Default: 30 frames/batch (1 minute at 30 FPS)
# Reduce to 20 or 15 if experiencing memory issues, increase if you are using a more
# powerful Raspberry Pi model
VIDEO_BATCH_SIZE=30
# ============================================
# Email Configuration
# ============================================
# SMTP server details for sending emails
# Gmail example: smtp.gmail.com (port 587)
# For servers without authentication, leave SMTP_USERNAME and SMTP_PASSWORD empty
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
# Email credentials (leave both empty if your SMTP server doesn't require authentication)
# For Gmail, you need to use an "App Password": https://myaccount.google.com/apppasswords
SMTP_USERNAME=your_email@gmail.com
SMTP_PASSWORD=your_email_app_password
# Email addresses
EMAIL_FROM=your_email@gmail.com
EMAIL_TO=recipient@example.com
# ============================================
# Monitoring Configuration
# ============================================
# How often to check printer status (in seconds)
# Lower = more responsive but more API calls
POLL_INTERVAL_SECONDS=10
# ============================================
# Storage Configuration
# ============================================
# Output directory name (created in home folder)
# Default: prints (creates ~/prints/)
PRINTS_DIR_NAME=prints
# ============================================
# Camera Extra Parameters (Optional)
# ============================================
# Additional command-line parameters for rpicam-still
# Leave empty for defaults. Do not include --output, --width, --height, or --lens-position
# Example: --shutter 100000 --awb auto
# Security: Parameters containing && or ; will be rejected
# Note: --lens-position is now controlled by FOCUS_DISTANCE parameter above
RPICAM_EXTRA_PARAMS=
# ============================================
# Prusa Connect Camera (Optional)
# ============================================
# Enable live camera feed on Prusa Connect website while capturing timelapse
# Leave empty to disable. Both values required to enable.
# Get these from: https://connect.prusa3d.com -> Add Camera
# Token: Provided by Prusa Connect when adding camera
# Fingerprint: Generate with 'uuidgen' command (16-40 alphanumeric chars)
PRUSA_CONNECT_CAMERA_TOKEN=
PRUSA_CONNECT_CAMERA_FINGERPRINT=
# ============================================
# Notes
# ============================================
# - Timelapse files are stored in ~/prints/
# - Filenames format: YYYY-MM-DD-HH-MM_PrintName.mp4
# - Images are automatically deleted after video creation
# - The script must run continuously to monitor the printer
# - For Gmail: Enable "Less secure app access" or use App Passwords
# https://support.google.com/accounts/answer/185833
# - Prusa Connect uploads are optional - timelapse works without them
# - If enabled, each captured frame is also uploaded to Prusa Connect for live monitoring