# --- Main Application --- MOTION_DETECTION_RATE=10.0 # Loops per second for the motion detection TARGET_DETECTION_RATE=3.0 # Loops per second for the main AI tracking LOG_LEVEL=INFO # Logging verbosity (e.g., logging.INFO, logging.DEBUG) # --- Recording --- RECORD_ON_MOTION=False # Set to True to save .h264 video files when motion is detected RECORD_DIRECTORY=recordings # directory in which to save recordings RECORD_BITRATE=2000000 # Video bitrate for the hardware H.264 encoder # --- Camera Image Mapping --- CAM_FPS=10 # Video framerate for recordings and livestream. CAM_TILT=12.0 # angle at which the camera is tilted upwards from the horizon CAM_FOV_X=62.28 # Camera's horizontal Field of View (in degrees) CAM_FOV_Y=48.83 # Camera's vertical Field of View (in degrees) CAM_FOCAL_LENGTH=3.04 # Camera lens focal length (in mm) CAM_PIXEL_SIZE=1.12 # Camera sensor pixel size (in micrometers) CAM_FULL_RES_X=3280 # Camera's maximum native horizontal resolution in pixels CAM_FULL_RES_Y=2464 # Camera's maximum native vertical resolution in pixels CAM_RES=1280x960 # Main resolution used for target detection and recording CAM_STREAM_RES=640x480 # Resolution used for livestream CAM_MOTION_RES_FACTOR=0.5 # Scale factor applied to livestream image before running motion detection CAM_MOTION_MIN_AREA=0.4 # Minimum area in percent to trigger motion detection (lower = more sensitive) CAM_MOTION_THRESHOLD=15 # Pixel difference threshold for motion detection (0-255, lower = more sensitive) CAM_MOTION_BG_LEARNING_RATE=0.1 # Rate at which the background model updates (0.0 to 1.0) CAM_MOTION_OFF_DELAY=10.0 # Seconds to retain a 'has_motion' state after physical motion stops CAM_SCALE_FACTOR=0.39 # Scale factor used for targeting math # --- Target Detector --- DETECTOR_API_URL=http://127.0.0.1:8081/v1/ # Base URL of the AI object detection backend DETECTOR_TARGET_CLASSES=bird # Comma-separated list of target classes (e.g., bird, cat, dog). Must be supported by the detection backend DETECTOR_CROP_PADDING_FACTOR=1.2 # Padding multiplier; used to decide if the image will be cropped before detection DETECTOR_CROP_WIDTH=640 # Width of the cropped image sent to the API DETECTOR_CROP_HEIGHT=480 # Height of the cropped image sent to the API # --- Turret & Servos --- TURRET_DEACTIVATION_DELAY=5.0 # Seconds to wait after losing the target before parking TURRET_PARK_PAN=-60.0 # Resting pan angle (in degrees) TURRET_PARK_TILT=-5.0 # Resting tilt angle (in degrees) TURRET_PARK_DETACH=True # Cut power to the servos while parked to save battery TURRET_MIN_PAN=-60.0 # Minimum allowable physical pan angle TURRET_MAX_PAN=60.0 # Maximum allowable physical pan angle TURRET_MIN_TILT=-30.0 # Minimum allowable physical tilt angle TURRET_MAX_TILT=35.0 # Maximum allowable physical tilt angle SERVO_PAN_PIN=18 # BCM GPIO pin number for the pan servo SERVO_PAN_MIN_PULSEWIDTH=0.0005 # Minimum PWM pulse width in seconds for the pan servo SERVO_PAN_MAX_PULSEWIDTH=0.0025 # Maximum PWM pulse width in seconds for the pan servo SERVO_PAN_MIN_ANGLE=90.0 # Angle mapping for the pan servo (swap min and max to reverse direction) SERVO_PAN_MAX_ANGLE=-90.0 # Angle mapping for the pan servo (swap min and max to reverse direction) SERVO_PAN_MIDPOINT=0.0 # Hardware calibration offset (in degrees) SERVO_PAN_SPEED=120.0 # Maximum software-limited speed of the pan servo in degrees per second SERVO_TILT_PIN=19 # BCM GPIO pin number for the tilt servo SERVO_TILT_MIN_PULSEWIDTH=0.0005 # Minimum PWM pulse width in seconds for the tilt servo SERVO_TILT_MAX_PULSEWIDTH=0.0025 # Maximum PWM pulse width in seconds for the tilt servo SERVO_TILT_MIN_ANGLE=-90.0 # Angle mapping for the tilt servo (swap min and max to reverse direction) SERVO_TILT_MAX_ANGLE=90.0 # Angle mapping for the tilt servo (swap min and max to reverse direction) SERVO_TILT_MIDPOINT=0.0 # Hardware calibration offset (in degrees) SERVO_TILT_SPEED=60.0 # Maximum software-limited speed of the tilt servo in degrees per second # --- Watergun --- WG_RELAY_GPIO_PIN=2 # BCM GPIO pin number connected to the watergun trigger relay WG_RELAY_HIGH_ACTIVE=True # True if the relay triggers on a HIGH signal WG_FIRE_COOLDOWN=1.0 # Minimum cooldown time (in seconds) allowed between consecutive shots WG_FIRE_DURATION=0.25 # How long (in seconds) the watergun relay stays open per shot WG_FLUSH_FIRE_INTERVAL=0 # Interval in seconds to automatically fire and flush air WG_FLUSH_MOTIONLESS_THRESHOLD=300 # Required consecutive seconds with no motion before allowing an auto-flush WG_FLUSH_FIRE_TARGET_X=320 # X image coordinate to safely aim at during an auto-flush WG_FLUSH_FIRE_TARGET_Y=740 # Y image coordinate to safely aim at during an auto-flush # --- Webserver --- WEBSERVER_ENABLED=True # Set to True to enable the web interface WEBSERVER_HOST=0.0.0.0 # Interface IP to bind the webserver to (use 0.0.0.0 for all interfaces, 127.0.0.1 for local only) WEBSERVER_PORT=8080 # Port for the web interface WEBSERVER_USERNAME=admin # Username for the web interface WEBSERVER_PASSWORD=taubenturret # Password for the web interface