From 9fe70f4688865e12dfaf20a6d861b2285cc2cd3a Mon Sep 17 00:00:00 2001 From: Chris Frankland-Wright Date: Mon, 23 Jun 2025 17:25:23 +0100 Subject: [PATCH] final commit for the day --- README.md | 42 ++++++++++++++++++++++++------------------ setup.sh | 35 +++++------------------------------ 2 files changed, 29 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index f1d88e5..25c34dc 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,37 @@ ο»Ώ# πŸ•°οΈ NTP Timeturner -**NTP Timeturner** is a Raspberry Pi-based stratum 1 time server that sets its system clock based on incoming SMPTE LTC (Linear Timecode) audio. Designed for broadcast and production environments, it allows LTC-based time sync across local networks via NTP. +**An LTC-driven NTP server for Raspberry Pi, built with broadcast precision and a hint of magic.** + +Inspired by Hermione Granger’s TimeTurner, this project synchronises timecode-locked systems by decoding incoming LTC (Linear Time Code) and broadcasting it as NTP β€” with precision down to the millisecond. --- -## πŸ“¦ Features +## πŸ“¦ Hardware Requirements -- πŸ•’ Decodes LTC timecode from audio input (25fps supported) -- 🌐 Serves NTP time to local devices -- ⚑ Fast, reliable startup using a USB audio interface -- πŸ”Œ Optional OLED display for system time and sync status (coming soon) -- πŸ›œ Web interface for Wi-Fi config and status (in development) +- Raspberry Pi 3 (or better) +- Debian Bookworm (64-bit recommended) +- USB audio input (e.g. USB to 3.5mm TRS adapter) +- Ethernet connection (recommended for stable NTP) +- Optional: Blackmagic Video Assist or LTC generator for input testing --- -## πŸš€ Quick Start +## πŸ› οΈ Software Features -### βœ… Requirements +- Reads SMPTE LTC from audio input (25p/50i to start, with more frame rate support to follow) +- Converts LTC into NTP-synced time +- Broadcasts time via local NTP server +- Supports configurable time offsets (hours, minutes, seconds, milliseconds) +- Systemd service support for headless operation +- Optional splash screen branding at boot -- Raspberry Pi 3 or newer -- Debian Bookworm -- USB audio interface with 3.5mm mic/line input -- SMPTE LTC source (e.g. video playout, Blackmagic device) +--- -### βš™οΈ Setup Instructions +## πŸš€ Installation -1. Clone the repo: - ```bash - git clone https://github.com/cjfranko/NTP-Timeturner.git - cd NTP-Timeturner +Clone and run the installer: + +```bash +wget https://raw.githubusercontent.com/cjfranko/NTP-Timeturner/master/setup.sh +chmod +x setup.sh +./setup.sh diff --git a/setup.sh b/setup.sh index b376702..7ec0a9b 100644 --- a/setup.sh +++ b/setup.sh @@ -89,40 +89,14 @@ sudo make install sudo ldconfig # --------------------------------------------------------- -# Step 7: Apply Custom Splash Screen and Wayland Wallpaper +# Step 7: Apply Custom Splash Screen # --------------------------------------------------------- echo "" -echo "Step 7: Applying Timeturner visual identity..." +echo "Step 7: Applying splash screen..." -# Splash screen -echo "Downloading splash screen..." sudo curl -L -o /usr/share/plymouth/themes/pix/splash.png https://raw.githubusercontent.com/cjfranko/NTP-Timeturner/master/splash.png sudo chmod 644 /usr/share/plymouth/themes/pix/splash.png -# Wallpaper for LabWC / swaybg -echo "Installing swaybg for Wayland wallpaper management..." -sudo apt install -y swaybg - -echo "Downloading wallpaper..." -mkdir -p /home/hermione/Pictures -curl -L -o /home/hermione/Pictures/wallpaper.png https://raw.githubusercontent.com/cjfranko/NTP-Timeturner/master/wallpaper.png -chown hermione:hermione /home/hermione/Pictures/wallpaper.png - -# Update labwc init file -INIT_FILE="/home/hermione/.config/labwc/init" -mkdir -p "$(dirname "$INIT_FILE")" - -if ! grep -q "swaybg" "$INIT_FILE" 2>/dev/null; then - echo "Adding swaybg launch command to LabWC init file..." - echo "exec swaybg -i /home/hermione/Pictures/wallpaper.png --mode fill" >> "$INIT_FILE" -else - echo "LabWC wallpaper command already present β€” skipping" -fi - -chown hermione:hermione "$INIT_FILE" - -echo "Custom splash and Wayland wallpaper applied." - # --------------------------------------------------------- # Final Message & Reboot Option # --------------------------------------------------------- @@ -133,10 +107,11 @@ echo "──────────────────────── echo "" echo "The TimeTurner is ready. But remember:" echo "\"You must not be seen.\" – Hermione Granger" -echo "Visual enchantments adapted for Wayland by Luna." +echo "Visual enhancements are in place. Terminal timeline is stable." echo "" echo "The system will reboot in 30 seconds to complete setup..." echo "Press [Enter] to reboot immediately, or Ctrl+C to cancel." -read -t 30 -p "" +read -t 30 -p "" || true +sleep 1 sudo reboot