From 1b946c5aba2e18f716796a8db60808596a650841 Mon Sep 17 00:00:00 2001 From: thehack904 <35552907+thehack904@users.noreply.github.com> Date: Thu, 9 Oct 2025 22:11:12 -0500 Subject: [PATCH 1/2] Update CHANGELOG.md --- CHANGELOG.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 80d56f4..c8a64c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# đź“‘ Changelog +## Changelog All notable changes to this project will be documented here. Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). @@ -12,6 +12,30 @@ This project follows [Semantic Versioning](https://semver.org/). - Planned: move logs to SQLite DB. - Planned: log filtering and pagination. +--- +## v3.1.0 - 2025-10-09 +### Added +- New **RetroIPTVGuide Raspberry Pi headless installer** (`retroiptv_rpi.sh`) + - Detects Raspberry Pi 3 / 4 / 5 models and auto-configures GPU memory + - Creates dedicated `iptv` user and installs to `/home/iptv/iptv-server` + - Logs all activity to `/var/log/retroiptvguide/install-YYYYMMDD-HHMMSS.log` + - Adds `--yes` and `--agree` flags for fully unattended installs + - Includes automatic environment checks for SD card size, RAM, and swap + +### Changed +- **Installer alignment:** + - Raspberry Pi installer now mirrors Debian / Windows structure + - Replaced all `apt` usage with `apt-get` for stable scripting + - Added verified, silenced `set_gpu_mem()` function that suppresses `rfkill` Wi-Fi warnings + - Enhanced post-install verification loop (up to 15 s) to confirm Flask web service readiness +- **bump_version.py:** now updates both `install.sh` and `retroiptv_rpi.sh` versions automatically +- Unified version tagging across all installers (`VERSION="x.y.z"` format) + +### Fixed +- Eliminated false-positive Wi-Fi “blocked by rfkill” messages during GPU configuration +- Corrected early-trigger HTTP service check timing on slower Pi 3/4 boards +- Ensured consistent permissions and ownership under `/home/iptv` + --- ## [v3.0.1] - 2025-10-07 From 19fe669b01f3c2b7a49bfc4131d1a91529565be0 Mon Sep 17 00:00:00 2001 From: thehack904 <35552907+thehack904@users.noreply.github.com> Date: Thu, 9 Oct 2025 22:25:00 -0500 Subject: [PATCH 2/2] Document Updates for 3.1.0 --- INSTALL.md | 120 ++++++++++++++++++++++++++++++----------------------- README.md | 34 +++++++++++---- ROADMAP.md | 74 +++++++++++++++++++-------------- 3 files changed, 136 insertions(+), 92 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 827c03e..27036fa 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,10 +1,13 @@ # Installation Guide +**Version:** v3.1.0 +**Last Updated:** 2025-10-09 + ## Requirements - Python 3.10+ (Linux) / Python 3.12+ (Windows) -- **Linux (Debian/Ubuntu with systemd)** or **Windows 10/11** +- **Linux (Debian/Ubuntu with systemd)**, **Windows 10/11**, or **Raspberry Pi 3 / 4 / 5 (Headless OS)** - Administrative privileges: - - **Linux/WSL:** run install/uninstall with `sudo` + - **Linux/WSL/Raspberry Pi:** run install/uninstall with `sudo` - **Windows:** run from an Administrator **PowerShell** session --- @@ -30,19 +33,19 @@ sudo ./install.sh ``` **What the installer does (Linux/WSL):** -- Detects Linux/WSL environment -- Ensures script is run with sudo -- Creates a system user `iptv` -- Installs into `/home/iptv/iptv-server` -- Ensures `python3-venv` is installed -- Creates Python virtual environment and installs dependencies -- Creates and enables the `iptv-server` systemd service -- Starts the service +- Detects Linux/WSL environment +- Ensures script is run with sudo +- Creates a system user `iptv` +- Installs into `/home/iptv/iptv-server` +- Ensures `python3-venv` is installed +- Creates Python virtual environment and installs dependencies +- Creates and enables the `iptv-server` systemd service +- Starts the service - Logs the install to `install_YYYY-MM-DD_HH-MM-SS.log` --- -### Windows 10/11 +### Windows 10 / 11 Run this one-liner from an **Administrator PowerShell** prompt: @@ -51,18 +54,55 @@ Invoke-WebRequest https://github.com/thehack904/RetroIPTVGuide/archive/refs/head ``` **What the installer does (Windows):** -- Bootstraps Chocolatey (if missing) -- Installs dependencies: `python`, `git`, `nssm` -- Registers Windows App Paths for `python` / `python3` -- Adds Python to Git Bash (`~/.bashrc`) -- Clones RetroIPTVGuide and runs `install.sh` under Git Bash to set up venv + requirements -- Creates an NSSM service to run `venv\Scripts\python.exe app.py` -- Opens Windows Firewall port 5000 -- Starts the RetroIPTVGuide service +- Bootstraps Chocolatey (if missing) +- Installs dependencies: `python`, `git`, `nssm` +- Registers Windows App Paths for `python` / `python3` +- Adds Python to Git Bash (`~/.bashrc`) +- Clones RetroIPTVGuide and runs `install.sh` under Git Bash to set up venv + requirements +- Creates an NSSM service to run `venv\Scripts\python.exe app.py` +- Opens Windows Firewall port 5000 +- Starts the RetroIPTVGuide service - Logs the install to `install_YYYY-MM-DD_HH-MM-SS.log` --- +### Raspberry Pi 3 / 4 / 5 (Headless Edition) + +#### Interactive install +```bash +curl -sSL https://raw.githubusercontent.com/thehack904/RetroIPTVGuide/refs/heads/dev/retroiptv_rpi.sh | sudo bash -s install +``` + +#### Unattended / non-interactive +```bash +curl -sSL https://raw.githubusercontent.com/thehack904/RetroIPTVGuide/refs/heads/dev/retroiptv_rpi.sh | sudo bash -s install --yes --agree +``` + +**What the installer does (Raspberry Pi):** +- Detects Pi model (3 / 4 / 5) +- Installs required packages (`python3-venv`, `ffmpeg`, `git`, etc.) using `apt-get` +- Creates user `iptv` and installs into `/home/iptv/iptv-server` +- Configures GPU memory automatically (128 MB on Pi 3 / 256 MB on Pi 4/5) +- Sets up Python virtual environment and dependencies +- Creates systemd service `retroiptvguide` +- Performs post-install HTTP check (localhost:5000) with up-to-15 s polling +- Logs all activity to `/var/log/retroiptvguide/install-TIMESTAMP.log` +- Optionally reboots to apply GPU memory changes + +**Requirements** +- Raspberry Pi OS (Bookworm or later) +- Minimum 8 GB SD card and 1 GB RAM (512 MB swap recommended) +- SSH or console access with sudo + +**Access** +``` +http://:5000 +``` +Default login: `admin / strongpassword123` +⚠️ This is a **BETA** build for internal network use only. + +--- + ## Access Once installed, open your browser: @@ -85,22 +125,7 @@ sudo -u iptv bash -H -c "cd /home/iptv/iptv-server && git fetch --all && git res ``` or -#### Step-by-step -```bash -sudo -u iptv bash -H -cd /home/iptv/iptv-server -git fetch --all -git reset --hard origin/main -exit -sudo systemctl restart iptv-server.service -``` - ---- - -### Windows 10/11 - -From an **Administrator PowerShell** prompt, go to your RetroIPTVGuide folder and run: - +### Windows 10 / 11 ```powershell git fetch --all ; git reset --hard origin/main ; Restart-Service RetroIPTVGuide ``` @@ -128,13 +153,10 @@ sudo chmod +x uninstall.sh sudo ./uninstall.sh ``` -**What the uninstaller does (Linux/WSL):** -- Stops and disables the systemd service -- Removes the systemd unit file -- Deletes the `iptv` system user and related logs -- Removes the Python virtual environment - ---- +### Raspberry Pi +```bash +sudo ./retroiptv_rpi.sh uninstall --yes +``` ### Windows From an Administrator PowerShell prompt: @@ -142,22 +164,14 @@ From an Administrator PowerShell prompt: .\uninstall_windows.ps1 ``` -**What the uninstaller does (Windows):** -- Stops and removes the NSSM service -- Removes the Python virtual environment -- Deletes the Windows Firewall rule (port 5000) -- Lists remaining Chocolatey packages -- Prompts whether to uninstall **all Chocolatey packages (including Chocolatey itself)** - +**Each uninstaller stops its service, removes environment files, and cleans logs.** ⚠️ To completely remove the project, manually delete the project folder after uninstalling. - --- ## License -Licensed under CC BY-NC-SA 4.0. See LICENSE for details. +Licensed under CC BY-NC-SA 4.0. See `LICENSE` for details. --- ⚠️ **Initial BETA Notice** -This project is currently in **BETA**. -It should **not** be exposed directly to the Internet or used in production without additional hardening. +This project is currently in **BETA** and should **not** be exposed directly to the Internet or used in production without additional hardening. diff --git a/README.md b/README.md index 1cbdb8c..64a028e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # RetroIPTVGuide -![Version](https://img.shields.io/badge/version-v3.0.1-blue) +![Version](https://img.shields.io/badge/version-v3.1.0-blue) RetroIPTVGuide is an IPTV Web Interface inspired by 90s/2000s cable TV guides. It is designed to work with [ErsatzTV](https://ersatztv.org/) [(GitRepo)](https://github.com/ErsatzTV/ErsatzTV/tree/main) but supports any `.m3u`, `.m3u8`, and `.xml` IPTV source. @@ -14,7 +14,19 @@ It is designed to work with [ErsatzTV](https://ersatztv.org/) [(GitRepo)](https: --- -## ✨ Features (v3.0.1) +## ✨ Features (v3.1.0) + +### 🆕 Raspberry Pi Headless Support +- Full **Raspberry Pi installer (`retroiptv_rpi.sh`)** added. +- Detects Pi 3 / 4 / 5 hardware and automatically sets GPU memory (128MB / 256MB). +- Installs to `/home/iptv/iptv-server` using system user `iptv`. +- Configures Python virtual environment and creates a systemd service `retroiptvguide`. +- Logs everything to `/var/log/retroiptvguide/install-TIMESTAMP.log`. +- Supports `--yes` (skip confirmations) and `--agree` (auto-accept license). +- Post-install check verifies Flask service on port 5000. +- Optional reboot prompt applies GPU memory changes. + +--- ### 🔑 User Authentication - Login/logout system with hashed passwords. @@ -62,9 +74,12 @@ It is designed to work with [ErsatzTV](https://ersatztv.org/) [(GitRepo)](https: - Automatic initialization of `users.db` and `tuners.db` on first run. - SQLite databases use WAL mode for better concurrency. - Preloads tuner/channel/guide data from DB on startup. -- **Cross-platform installers (Linux/Windows)**. -- **Uninstaller scripts (Linux/Windows)**. -- **Automated version bump tool (`bump_version.py`)**. +- **Cross-platform installers:** + - Linux / WSL (`install.sh`) + - Windows (`install_windows.ps1`) + - Raspberry Pi (`retroiptv_rpi.sh`) +- **Uninstaller scripts for all platforms** +- **Automated version bump tool (`bump_version.py`)** — now updates both `install.sh` and `retroiptv_rpi.sh`. --- @@ -72,6 +87,7 @@ It is designed to work with [ErsatzTV](https://ersatztv.org/) [(GitRepo)](https: | Version | Date | Key Features | |----------|------|---------------| +| **v3.1.0** | 2025-10-09 | Raspberry Pi installer, verified GPU setup, improved HTTP service check | | **v3.0.1** | 2025-10-07 | EPG fallback system, tuner refresh fix, login redesign | | **v3.0.0** | 2025-10-03 | Windows installer/uninstaller, cross-platform setup, unified UI | | **v2.3.x** | 2025-09 | Unified theming, About page, installer logging, tuner rename/delete | @@ -94,6 +110,7 @@ RetroIPTVGuide is compatible with all modern browsers: - **Ubuntu 24.04 (desktop/server)** - **TrueNAS SCALE (Docker/Podman)** - **Windows 10 / 11** +- **Raspberry Pi 3B+ / 4 / 5 (Raspberry Pi OS Bookworm)** - **macOS Monterey / Ventura** - **iOS (mobile/tablet)** - **Android (Samsung / Pixel)** @@ -103,7 +120,8 @@ RetroIPTVGuide is compatible with all modern browsers: ## 🛠️ Installation Platforms - Debian-based Linux (Ubuntu, Pop!\_OS, Mint) - Windows 10/11 (via PowerShell + NSSM) -- MacOS (manual install or future installer support) +- Raspberry Pi 3 / 4 / 5 (Headless OS, `retroiptv_rpi.sh`) +- macOS (manual install or future installer support) --- @@ -154,8 +172,8 @@ See [ROADMAP.md](ROADMAP.md) for full details. - **Repo:** [RetroIPTVGuide](https://github.com/thehack904/RetroIPTVGuide) - **Maintainer:** J.H. - **License:** [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/) -- **Version:** v3.0.1 -- **Release Date:** 2025-10-07 +- **Version:** v3.1.0 +- **Release Date:** 2025-10-09 --- diff --git a/ROADMAP.md b/ROADMAP.md index a659ab9..383886a 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -10,7 +10,7 @@ These are **not yet implemented**, but provide a development path for future rel ### 1. Tuner Management - [x] Add ability to **add/remove tuners** from the UI (v2.3.0). - [x] Add ability to rename tuners via the UI (v2.3.0). -- [ ] Support for **.m3u8 single-channel playlists** as tuner sources (planned v3.1.0). +- [ ] Support for **.m3u8 single-channel playlists** as tuner sources (planned v3.2.0). - Option A: Special-case `.m3u8` handling in parser. - Option B: Add explicit `hls` column to `tuners.db`. - [x] Validate tuner URLs (ping/check format before saving) (v2.0.0). @@ -22,6 +22,7 @@ These are **not yet implemented**, but provide a development path for future rel - [ ] Add system health checks (e.g., tuner reachability, XMLTV freshness) to logs. - [x] **Admin log management**: add button/route to clear logs (with confirmation) (v2.3.1). - [x] Display log file size on logs page (v2.3.1) +- [x] Post-install HTTP service verification added in Pi installer (v3.1.0) ### 3. Guide & Playback - [ ] Add **search/filter box** to guide for channels/programs. @@ -39,17 +40,22 @@ These are **not yet implemented**, but provide a development path for future rel - [ ] Unify CSS across all templates (minimize inline styles). - [ ] Make guide responsive (mobile/tablet view). - [ ] Add dark/light theme auto-detect from browser/system. -- [ ] Frozen header Timeline to prevent scrolling with channel listing +- [ ] Frozen header Timeline to prevent scrolling with channel listing - [x] About page under Settings menu (v2.3.1) ### 6. Cross-platform -- [ ] Create installable container. -- [ ] Create MacOS install/executable. -- [x] Create Microsoft Windows install/executable (full support via PowerShell + NSSM service) (v3.0.0) -- [x] Add uninstall_windows.ps1 and uninstall.bat (v3.0.0) -- [x] Windows installer now bootstraps Chocolatey, installs Python, Git, NSSM, and configures service (v3.0.0) +- [x] Create installable container. +- [ ] Create MacOS install/executable. +- [x] Create Microsoft Windows install/executable (full support via PowerShell + NSSM service) (v3.0.0) +- [x] Add uninstall_windows.ps1 and uninstall.bat (v3.0.0) +- [x] Windows installer bootstraps Chocolatey, installs Python, Git, NSSM, and configures service (v3.0.0) - [x] Windows uninstaller cleans service, firewall rule, and optionally removes Chocolatey (v3.0.0) - - [ ] Validate/test installer fully on Windows environments + - [ ] Validate/test installer fully on Windows environments +- [x] **Add Raspberry Pi headless installer (v3.1.0)** + - Detects Pi 3 / 4 / 5 models and sets GPU memory dynamically + - Installs under `/home/iptv/iptv-server` using user `iptv` + - Adds post-install HTTP verification and log summary + - Logs full install to `/var/log/retroiptvguide/install-TIMESTAMP.log` ### 7. New Features - [ ] Add the ability to have an auto play video stream upon login from a specific channel (Ersatz currently) to act similar to the 90/2000's tv guide that played "Commercials" until a channel was selected. @@ -59,28 +65,36 @@ These are **not yet implemented**, but provide a development path for future rel - [ ] Add **safety checks** in `add_tuner()`: - Prevent inserting duplicate tuner names. - Validate XML/M3U URLs are not empty before committing to DB. +- [x] Add **GPU verification** after `raspi-config` call (v3.1.0). +- [x] Suppress `rfkill` Wi-Fi message during GPU configuration (v3.1.0). +- [x] Post-install adaptive HTTP check loop (15s poll) (v3.1.0). --- ## ⚙️ Technical Improvements -- [x] Add uninstall.sh (v2.3.0) - - [ ] Validate/test uninstall script fully on Windows environments -- [ ] Add https support +- [x] Add uninstall.sh (v2.3.0). + - [ ] Validate/test uninstall script fully on Windows environments. +- [ ] Add HTTPS support. - [ ] Refactor tuner handling to rely only on DB (remove in-memory fallback). - [ ] Add migrations for DB changes (via Alembic or custom script). - [ ] Containerize app (Dockerfile + Compose for deployment). - [ ] Add test suite for tuner parsing, authentication, and logging. -- [x] **Automated version bump tool** (`bump_version.py`) that updates `APP_VERSION` in `app.py` and creates a new section in `CHANGELOG.md` (v2.3.1). +- [x] **Automated version bump tool** (`bump_version.py`) now updates: + - `APP_VERSION` in `app.py` + - `install.sh` + - `retroiptv_rpi.sh` + - Adds new section in `CHANGELOG.md` (v3.1.0). --- ## 📅 Priority Suggestions -- Short term: (none — unified UI headers already completed in v2.0.0). -- Medium term: log filtering (still pending). -- Medium term: Test and harden installer/uninstaller on mixed Windows environments (v3.0.0 complete, further refinements planned). -- Long term: .m3u8 support, DB logs, recording functionality. +- Short term: finalize Pi installer documentation and verify GPU/swap checks (v3.1.x). +- Medium term: `.m3u8` tuner support and DB-based logs (v3.2.x). +- Long term: full HTTPS and container deployment. -## 💻🥧 Installer Enhancement: Kiosk vs Headless Mode (Planned) +--- + +## 🍓 Installer Enhancement: Kiosk vs Headless Mode (Planned) **Target Version:** v3.2.0 **Status:** Planned **Effort:** Medium @@ -93,20 +107,18 @@ These are **not yet implemented**, but provide a development path for future rel --- -## ✅ Completed -- [x] Unified theming across all admin/user pages with Themes submenu and persistent setTheme logic (v2.3.2) -- [x] Tuner add/remove via UI (v2.3.0). -- [x] Tuner rename via UI (v2.3.0). -- [x] Tuner delete via UI (v2.3.0). -- [x] Tuner URL validation (v2.0.0). -- [x] Unified UI headers across templates (v2.0.0). -- [x] Installer logging (timestamped log files) (v2.3.0). -- [x] Environment detection in `install.sh` (Linux, WSL, Git Bash) (v2.3.0). -- [x] Unified cross-platform `install.sh` (v2.3.0). -- [x] Cross-platform `uninstall.sh` with sudo/admin checks and safe cleanup (v2.3.0). -- [x] Basic Windows installer support (Git Bash + PowerShell bootstrap) (v2.3.0). +## ✅ Completed (v3.1.0) +- [x] **Raspberry Pi headless installer completed** (`retroiptv_rpi.sh`). +- [x] Aligned Pi installer with Debian/Windows structure. +- [x] Added logging to `/var/log/retroiptvguide/`. +- [x] Added adaptive HTTP service verification. +- [x] Added GPU verification with silent `raspi-config` call. +- [x] Added system resource check (SD card size, RAM, swap). +- [x] Integrated `--yes` and `--agree` installer flags. +- [x] Verified functionality on Pi 3 and Pi 4. +--- ## ✅ Completed (v3.0.0) -- [x] Full Windows installer/uninstaller support with NSSM service, firewall rule, and Chocolatey integration (v3.0.0). -- [x] Documentation updates (README.md, INSTALL.md) to reflect Windows support (v3.0.0). +- [x] Full Windows installer/uninstaller support with NSSM service, firewall rule, and Chocolatey integration. +- [x] Documentation updates (README.md, INSTALL.md) to reflect Windows support.