Skip to content

CoderLuii/ChannelWatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ChannelWatch ChannelWatch

License: MIT Docker Pulls PayPal Buy Me A Coffee Twitter Follow

πŸ“‘ Table of Contents

πŸ“ˆ Version History

  • v0.7 - Notification enhancements with improved email and Discord integration, UI documentation improvements, and bug fixes for image selection
  • v0.6 - Complete project restructuring with modern web UI, simplified configuration (no environment variables), responsive dashboard, and enhanced error recovery
  • v0.5 - Added Recording-Events alerts for monitoring the entire recording lifecycle (scheduled, started, completed, cancelled, stopped), enhanced stream count integration, improved time formatting
  • v0.4 - Expanded alert types with VOD-Watching and Disk-Space monitoring, enhanced Channel-Watching with program details and images, improved session tracking
  • v0.3 - Complete architecture overhaul with real-time event monitoring, multi-provider notifications, session tracking, and enhanced stability
  • v0.2 - Security updates addressing Python dependency vulnerabilities and adding Docker supply chain attestations
  • v0.1 - Initial release with core monitoring and notification features

↑ back to top

🌟 Overview

ChannelWatch is a comprehensive monitoring solution with a modern web interface that tracks Channels DVR activity and sends real-time notifications. The system features:

  • 🌐 Modern Web Dashboard - Responsive UI with system status monitoring and configuration
  • πŸ“± Real-time viewing alerts - Get instant notifications when channels are being watched
  • πŸ“Ί Content monitoring - See exactly what's being played on your Channels DVR
  • 🎬 VOD tracking - Know when recorded content or DVR libraries are accessed
  • πŸ”΄ Recording lifecycle alerts - Track when recordings are scheduled, start, complete, or are cancelled
  • πŸ’Ύ System monitoring - Track disk space usage and receive alerts when space runs low
  • πŸ”” Multi-device awareness - Track viewing across all your connected devices and clients
  • 🏠 Home automation integration - Use alerts as triggers for smart home routines

The system provides comprehensive information with a simple setup process:

  • Web-based configuration with no environment variables needed
  • Rich media notifications with detailed metadata
  • Device identification and stream tracking
  • Technical details with beautiful visuals
  • Fully customizable notification content

↑ back to top

πŸ› Architecture

ChannelWatch follows a modern, component-based architecture:

  • Core Backend: Monitors the Channels DVR event stream and processes alerts
  • Web UI: Provides a responsive dashboard for configuration and monitoring
  • Alert System: Processes events to determine when to send notifications
  • Notification System: Handles sending notifications through various providers
  • Configuration System: Web-based settings management with persistent storage
  • Extension Framework: Makes it easy to add new alert types and notification providers

↑ back to top

πŸ“‹ Key Features

  • 🌐 Modern Web Interface with:
    • Responsive dashboard for desktop and mobile
    • Real-time system status monitoring
    • Visual disk space and stream tracking
    • Upcoming recordings display
    • Quick access diagnostic tools
  • βš™οΈ Web-based Configuration with:
    • Intuitive settings management
    • No environment variables required
    • Persistent configuration storage
    • Real-time validation and feedback
  • πŸ” Real-time monitoring of Channels DVR event stream
  • πŸ“² Multi-provider notifications via:
    • Pushover for simple push notifications
    • Apprise for Discord, Slack, Email, Telegram, and more
  • πŸ“Ί Live TV alerts with:
    • Channel name and number (including decimal subchannels like 13.1)
    • Program title and description
    • Device name and IP address
    • Stream source and quality information
    • Total stream count across your system
  • 🎬 VOD/Recording Playback alerts with:
    • Title, episode, and duration information
    • Playback progress tracking
    • Cast, rating, and genres
    • Smart device detection
    • Single notification per viewing session (prevents alert fatigue)
    • Support for both standard and newer file patterns
  • πŸ”΄ Recording Event alerts with:
    • Lifecycle tracking (scheduled, started, completed, cancelled)
    • Detailed program information (title, description, duration, channel)
    • Status indicators (πŸ“…, πŸ”΄, βœ…, ⏹️)
  • πŸ–ΌοΈ Rich visual alerts with:
    • Configurable image source (channel logo or program image)
    • High-quality thumbnails for instant recognition
  • πŸ’Ύ System monitoring with:
    • Disk space alerts when recording space runs low
    • Configurable thresholds (percentage and absolute GB)
    • Visual dashboard representation of system status
  • 🧹 Automatic session tracking and management

↑ back to top

⚑ Performance

ChannelWatch continues to be lightweight and efficient despite the addition of a full web UI:

  • Minimal CPU usage (<2% on most systems)
  • Modest memory footprint (~50MB RAM)
  • Compact Docker image size (~150MB)
  • Quick startup time (<5 seconds)
  • Responsive web interface even on low-powered devices
  • Efficient background processing with minimal resource contention

↑ back to top

πŸ’‘ Support This Project

If you find ChannelWatch helpful, consider supporting its development:

Follow me on X:

↑ back to top

πŸ”§ Prerequisites

  • Docker and Docker Compose
  • Channels DVR server with accessible API
  • Pushover and/or Apprise account/configuration (Requires at least one provider configured for notifications)

↑ back to top

πŸ’» Platform Support

ChannelWatch is available as a multi-platform Docker image, supporting:

  • linux/amd64: Standard 64-bit x86 servers and PCs
  • linux/arm64: Modern ARM devices (Raspberry Pi 4, Apple M1/M2 Macs)

The correct image will be automatically selected for your hardware when using docker pull coderluii/channelwatch:latest.

↑ back to top

πŸš€ Quick Setup

1. Docker Compose Configuration

Create a docker-compose.yml file:

version: '3.0'
services:
  ChannelWatch:
    image: coderluii/channelwatch:latest
    container_name: channelwatch
    network_mode: host
    volumes:
      # Path to store configuration, logs, and settings
      - /your/local/path:/config
    restart: unless-stopped

Note:

  • All configuration is now done through the web UI at http://your-server-ip:8501
  • For bridge networking, replace network_mode: host with:
    network_mode: bridge
    ports:
      - "8501:8501"  # Or replace 8501 on the left with your desired port

2. Start the Container

docker-compose up -d

3. Monitor Logs

docker logs -f channelwatch

↑ back to top

πŸ”¨ Configuration Options

Configuration is managed through the web UI at http://your-server-ip:8501

Core Settings

Setting Description
Channels DVR Host Server IP or hostname
Channels DVR Port Server port (default: 8089)
Timezone Local timezone for timestamps
Log Level Standard or Verbose logging
Log Retention Auto-cleanup period in days

Alert Types

Alert Description
Channel Watching Live TV viewing notifications
VOD Watching Recorded content playback alerts
Recording Events Track recording lifecycle
Stream Counting Show total active streams

Channel Watching Options

Option Description
Image Source Channel Logo or Program Image
Show Channel Name Display channel name
Show Channel Number Display channel number
Show Program Name Display program title
Show Device Name Display device name
Show Device IP Display device IP address
Show Stream Source Display stream source

VOD Watching Options

Option Description
Show Title Display content title
Show Episode Title Display episode title for TV shows
Show Summary Display content summary/description
Show Content Image Display thumbnail image
Show Duration Display content duration
Show Progress Display playback progress
Show Rating Display content rating
Show Genres Display content genres
Show Cast Display cast members
Show Device Name Display device name
Show Device IP Display device IP address

Recording Events Options

Option Description
Scheduled Events Show alerts for scheduled recordings
Started Events Show alerts when recordings start
Completed Events Show alerts when recordings complete
Cancelled Events Show alerts when recordings are cancelled
Show Program Name Display program name
Show Description Display program description
Show Duration Display recording duration
Show Channel Name Display channel name
Show Channel Number Display channel number
Show Recording Type Display if recording is scheduled or manual

Notification Providers

Provider Description Config Needed
Pushover Mobile/Desktop notifications User Key, API Token
Discord Chat channel notifications Webhook URL
Telegram Chat messaging Bot Token/Chat ID
Email Standard email SMTP Settings
Slack Chat messaging Webhook URL (token format)
Gotify Self-hosted notifications Server URL & Token
Matrix Decentralized chat Room/User credentials
Custom Any Apprise-supported service URL

↑ back to top

πŸ“± Notification Examples

Channel Watching Alert

πŸ“Ί ABC
Channel: 7
Program: Good Morning America
Device: Living Room
IP: 192.168.1.101
Source: HDHR

VOD Watching Alert

🎬 Crank: High Voltage (2009)
Duration: 58m 46s / 1h 42m 11s
Device Name: Living Room
Device IP: 192.168.1.100

Chev Chelios (Jason Statham) seeks revenge after someone steals his nearly indestructible heart.

Rating: R Β· Genres: Action, Thriller
Cast: Jason Statham, Amy Smart, Dwight Yoakam

Disk Space Alert

⚠️ Low Disk Space Warning
Free Space: 200.59 GB / 1.82 TB (10.8%)
Used Space: 1.62 TB
DVR Path: /shares/DVR

Recording Events Examples

πŸ“Ί ACTION NETWORK
Channel: 137
Status: πŸ“… Scheduled
Program: Batman (1989)
-----------------------
Scheduled: Today at 8:54 AM EDT
Duration:  2 hours 16 minutes

Caped Crusader (Michael Keaton) saves Gotham City from the Joker (Jack Nicholson).
πŸ“Ί MOVIE CHANNEL
Channel: 129
Status: πŸ”΄ Recording (Manual)
Program: Crank: High Voltage (2009)
-----------------------
Recording: 8:49 AM EDT
Program:   8:48 AM EDT
Duration:  1 hour 42 minutes
Total Streams: 1

Chev Chelios (Jason Statham) seeks revenge after someone steals his nearly indestructible heart.
πŸ“Ί MOVIE CHANNEL 
Channel: 129
Status: βœ… Completed
Program: Pet Sematary (1989)
-----------------------
Duration: 1 hour 54 minutes
Total Streams: 1

A doctor (Dale Midkiff) and his family move to a town near an ancient Indian burial ground.
πŸ“Ί SCI-FI CHANNEL
Channel: 152
Status: ⏹️ Stopped
Program: Pandorum (2009)
-----------------------
Duration: 20 minutes
Total Streams: 1

Astronauts awake to a terrifying reality aboard a seemingly abandoned spaceship.

↑ back to top

πŸ” Troubleshooting

Diagnostics & Testing

Web UI (Recommended)

Access diagnostics tools at http://your-server-ip:8501 and navigate to the "Diagnostics" tab:

  • System Status - Overview of service health and connectivity
  • Connection Tests - Verify connectivity to Channels DVR
  • API Tests - Check endpoint functionality
  • Alert Tests - Send test notifications for each alert type

Command Line (Advanced)

For automation or headless troubleshooting:

# Test connectivity
docker exec -it channelwatch python -m channelwatch.main --test-connectivity

# Test API endpoints
docker exec -it channelwatch python -m channelwatch.main --test-api

# Test individual alert types
docker exec -it channelwatch python -m channelwatch.main --test-alert ALERT_CHANNEL_WATCHING
docker exec -it channelwatch python -m channelwatch.main --test-alert ALERT_VOD_WATCHING
docker exec -it channelwatch python -m channelwatch.main --test-alert ALERT_DISK_SPACE
docker exec -it channelwatch python -m channelwatch.main --test-alert ALERT_RECORDING_EVENTS

# Monitor event stream for 60 seconds
docker exec -it channelwatch python -m channelwatch.main --monitor-events 60

Common Issues

No Notifications

  1. Check logs: docker logs channelwatch
  2. Verify notification provider credentials are correct
  3. Ensure Channels DVR server is accessible (test connection)
  4. Check if notification service is operational (test with diagnostic panel)
  5. Confirm alerts are properly configured and enabled

↑ back to top

πŸ”„ Upgrading

To upgrade to the latest version:

docker-compose pull
docker-compose up -d

↑ back to top

πŸ“ Project Structure

ChannelWatch/
β”œβ”€β”€ core/                       # Core backend logic (Python)
β”‚   β”œβ”€β”€ docker-entrypoint.sh    #   Container startup script
β”‚   β”œβ”€β”€ alerts/                 #   Alert handling modules (one per alert type)
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ base.py
β”‚   β”‚   β”œβ”€β”€ channel_watching.py
β”‚   β”‚   β”œβ”€β”€ disk_space.py
β”‚   β”‚   β”œβ”€β”€ recording_events.py
β”‚   β”‚   β”œβ”€β”€ vod_watching.py
β”‚   β”‚   └── common/             #   Shared alert utilities (formatting, sessions)
β”‚   β”‚       β”œβ”€β”€ __init__.py
β”‚   β”‚       β”œβ”€β”€ alert_formatter.py
β”‚   β”‚       β”œβ”€β”€ cleanup_mixin.py
β”‚   β”‚       β”œβ”€β”€ session_manager.py
β”‚   β”‚       └── stream_tracker.py
β”‚   β”œβ”€β”€ engine/                 #   Event processing engine & orchestration
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ alert_manager.py
β”‚   β”‚   └── event_monitor.py
β”‚   β”œβ”€β”€ helpers/                #   Backend utilities & data providers (config, logging, API interactions)
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ activity_recorder.py
β”‚   β”‚   β”œβ”€β”€ channel_info.py
β”‚   β”‚   β”œβ”€β”€ config.py
β”‚   β”‚   β”œβ”€β”€ initialize.py
β”‚   β”‚   β”œβ”€β”€ job_info.py
β”‚   β”‚   β”œβ”€β”€ logging.py
β”‚   β”‚   β”œβ”€β”€ parsing.py
β”‚   β”‚   β”œβ”€β”€ program_info.py
β”‚   β”‚   β”œβ”€β”€ recording_info.py
β”‚   β”‚   β”œβ”€β”€ tools.py
β”‚   β”‚   β”œβ”€β”€ type_utils.py
β”‚   β”‚   └── vod_info.py
β”‚   β”œβ”€β”€ notifications/          #   Notification sending system
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ notification.py
β”‚   β”‚   └── providers/         #   Specific notification services (Pushover, Apprise)
β”‚   β”‚       β”œβ”€β”€ __init__.py
β”‚   β”‚       β”œβ”€β”€ apprise.py
β”‚   β”‚       β”œβ”€β”€ base.py
β”‚   β”‚       └── pushover.py
β”‚   β”œβ”€β”€ test/                   #   Backend test framework & simulations
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ alerts/             #   Alert simulation tests
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   β”œβ”€β”€ test_channel_watching.py
β”‚   β”‚   β”‚   β”œβ”€β”€ test_disk_space.py
β”‚   β”‚   β”‚   β”œβ”€β”€ test_recording_events.py
β”‚   β”‚   β”‚   └── test_vod_watching.py
β”‚   β”‚   β”œβ”€β”€ connectivity/       #   Server connection tests
β”‚   β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”‚   └── test_server.py
β”‚   β”‚   └── utils/              #   Test helper utilities
β”‚   β”‚       β”œβ”€β”€ __init__.py
β”‚   β”‚       └── test_utils.py
β”‚   β”œβ”€β”€ main.py                 #   Backend entry point (CLI/testing)
β”‚   └── __init__.py             #   Backend package marker & version info
β”œβ”€β”€ ui/                         # Web Interface (Next.js/React frontend, FastAPI backend)
β”‚   β”œβ”€β”€ app/                    #   Next.js frontend application root
β”‚   β”‚   β”œβ”€β”€ layout.tsx
β”‚   β”‚   β”œβ”€β”€ page.tsx
β”‚   β”‚   └── globals.css
β”‚   β”œβ”€β”€ backend/                #   FastAPI backend serving the UI API
β”‚   β”‚   β”œβ”€β”€ main.py
β”‚   β”‚   β”œβ”€β”€ config.py
β”‚   β”‚   └── schemas.py
β”‚   β”œβ”€β”€ components/             #   React UI components
β”‚   β”‚   β”œβ”€β”€ base/               #     shadcn/ui base components
β”‚   β”‚   β”‚   β”œβ”€β”€ alert.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ badge.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ button.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ card.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ checkbox.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ command.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ dialog.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ dropdown-menu.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ form.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ input.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ label.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ popover.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ progress.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ select.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ separator.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ switch.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ tabs.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ toast.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ toaster.tsx
β”‚   β”‚   β”‚   └── tooltip.tsx
β”‚   β”‚   β”œβ”€β”€ dashboard.tsx
β”‚   β”‚   β”œβ”€β”€ header.tsx
β”‚   β”‚   β”œβ”€β”€ settings-form.tsx
β”‚   β”‚   β”œβ”€β”€ sidebar.tsx
β”‚   β”‚   β”œβ”€β”€ diagnostics-panel.tsx
β”‚   β”‚   β”œβ”€β”€ about-section.tsx
β”‚   β”‚   β”œβ”€β”€ mode-toggle.tsx
β”‚   β”‚   β”œβ”€β”€ status-overview.tsx
β”‚   β”‚   └── theme-provider.tsx
β”‚   β”œβ”€β”€ hooks/                  #   Custom React hooks
β”‚   β”‚   └── use-toast.ts
β”‚   β”œβ”€β”€ lib/                    #   Frontend helper libraries & utilities
β”‚   β”‚   β”œβ”€β”€ api.ts
β”‚   β”‚   β”œβ”€β”€ types.ts
β”‚   β”‚   └── utils.ts
β”‚   β”œβ”€β”€ public/                 #   Static assets (images, favicon)
β”‚   β”‚   β”œβ”€β”€ images/             #     Image assets
β”‚   β”‚   β”‚   β”œβ”€β”€ channelwatch-logo.png
β”‚   β”‚   β”‚   β”œβ”€β”€ background-bio.webp
β”‚   β”‚   β”‚   └── coder-luii.png
β”‚   β”‚   β”œβ”€β”€ favicon.png
β”‚   β”‚   └── og-image.png
β”‚   β”œβ”€β”€ types/                  #   Custom TypeScript definitions
β”‚   β”‚   └── global.d.ts
β”‚   β”œβ”€β”€ components.json
β”‚   β”œβ”€β”€ next-env.d.ts
β”‚   β”œβ”€β”€ next.config.mjs
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ pnpm-lock.yaml
β”‚   β”œβ”€β”€ postcss.config.mjs
β”‚   β”œβ”€β”€ tailwind.config.ts
β”‚   └── tsconfig.json
β”œβ”€β”€ Dockerfile                  # Docker container build instructions
β”œβ”€β”€ docker-compose.yml          # Example Docker deployment file
β”œβ”€β”€ supervisord.conf            # Process manager (supervisor) configuration
β”œβ”€β”€ requirements.txt            # Python dependency list (backend)
└── README.md

↑ back to top

πŸ“œ License

MIT License - see the LICENSE file for details.

↑ back to top

πŸ™ Acknowledgments

↑ back to top

πŸ—Ί Future Roadmap

ChannelWatch will continue to evolve with these planned enhancements:

πŸ”” Advanced Notification System

  • Custom notification templates with variable support
  • Error alerting for system and connection issues

πŸ› οΈ Enhanced Diagnostics

  • Live container log feed in diagnostic page

↑ back to top

πŸ’¬ Get Help

Contributions, issues, and feature requests are welcome!

↑ back to top

About

ChannelWatch monitors Channels DVR events to send real-time notifications for TV viewing and recorded content playback. Features channel/program details, VOD tracking, and disk space monitoring. Supports multiple notification services with rich metadata and custom alerts.

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Contributors

No contributors