Metadata-Version: 2.4
Name: abertpy
Version: 0.4.1
Author-email: Valentin Kivachuk Burda <vk18496@gmail.com>
License: GPL3
License-File: LICENSE
Requires-Python: <4.0,>=3.12
Requires-Dist: aiohttp<4.0.0,>=3.13.1
Requires-Dist: asyncstdlib<4.0.0,>=3.13.1
Requires-Dist: backoff<3.0.0,>=2.2.1
Requires-Dist: loguru<0.8.0,>=0.7.3
Requires-Dist: pydantic-typer<0.0.14,>=0.0.13
Requires-Dist: pydantic<3,>=2
Requires-Dist: requests<3.0.0,>=2.32.5
Requires-Dist: typer<0.21.0,>=0.20.0
Description-Content-Type: text/markdown

# abertpy

## Overview

**abertpy** is a utility designed to enable Spanish TDT (Digital Terrestrial Television) reception via the Hispasat 30.0W satellite using TVHeadend. Unlike other tools that depend on proprietary hardware or closed setups, abertpy offers a more flexible and automated integration with TVHeadend.

### Key Features

- 🔄 Automatically recreates MUXes based on live reception (no static lists)
- 📅 EPG (Electronic Program Guide) support
- 🌐 Supports both local and remote TVHeadend setups (local is recommended)
- 🧩 Fully integrated. No external scripts required

---

## Prerequisites

Before installing abertpy, ensure the following components are properly set up:

- ✅ A working TVHeadend instance already receiving Abertis channels via Hispasat 30.0W
- 🧪 [TSDuck](https://tsduck.io/) installed (specifically the `tsanalyze` binary)
- 🔐 [Oscam-emu](https://hub.docker.com/r/chris230291/oscam-emu) running and configured in TVHeadend  
  - ⚠️ Use **DVB-API (caPMT)** protocol instead of **CCcam** or **New and**
- 📦 [pipx](https://github.com/pypa/pipx) installed (uvx or any other are fine too)

---

## Installation

1. **Install abertpy globally via pipx:**
   ```bash
   sudo pipx install --global abertpy
   ```

2. **Verify TVHeadend can access abertpy:**
   ```bash
   sudo su hts -s /bin/bash -c "abertpy ping"
   ```

3. **Discover your Hispasat network UUID (this will fail intentionally to list available networks):**
   ```bash
   abertpy -t http://tvheadend.lan:9981/
   ```

4. **Run the setup with the correct network UUID:**
   ```bash
   abertpy -t http://tvheadend.lan:9981/ -n <your_network_uuid>
   ```

5. **(Optional) Add or update your SoftCam.key file:**
   [SoftCam.key gist](https://gist.github.com/vk496/c524292b974837b4a17fe7264f412284)
