Files
retroLabs/README.md

44 lines
2.6 KiB
Markdown

# retroLabs
retroLabs runs a private cable-style TV lineup from your media library. Tunarr handles programming and linear HLS. The RetroTV Bridge serves the Roku app and forwards Tunarr's web UI over the same LAN port.
## Set up programming
The stack on this machine uses [Tunarr at 192.168.0.203:4242](http://192.168.0.203:4242/web/).
1. Put a few compatible test videos in `data/media/`, or set `RETROTV_MEDIA_DIR` in `.env` to an existing library and run `docker compose up -d`. The directory is mounted read-only at `/media` inside Tunarr.
2. In Tunarr's media sources, add a Local source and a library under `/media`. Start a scan. You can also connect an existing Plex, Jellyfin, or Emby source.
3. Create two channels with different numbers. Use HLS as the channel's stream mode for the initial Roku test. Add programming to each channel, save, and use Tunarr's Guide and Watch actions to verify the schedule and playback.
4. Open the [Roku channel lineup](http://192.168.0.203:4242/api/v1/channels) to check that both channels and the native weather placeholder are present.
See the [Tunarr setup walkthrough](https://tunarr.com/getting-started/setup/) and [scheduling documentation](https://tunarr.com/configure/scheduling/) for time slots, sequential programming, and filler.
## Start the stack on another checkout
Requires Linux, Docker with Compose, and an available LAN IPv4 address.
```sh
mkdir -p data/media
cp .env.example .env
# Set RETROTV_LAN_IP in .env to this machine's LAN IPv4.
docker compose up -d --build
docker compose ps
docker compose logs -f bridge tunarr
```
Use `http://<LAN-IP>:4242/web/` for the programming UI and `/api/v1/health` for the bridge health check. Tunarr's internal port 8000 is published only on host loopback port 14242. The bridge uses host networking for SSDP on UDP 1900 and binds HTTP to the configured LAN IP. Admin and device access currently share the trusted LAN with no bridge-level authentication. Compose persists Tunarr's configuration and the bridge's UUID in named volumes.
## Roku
Run `./roku/build.sh` to produce `roku/dist/retroLabs.zip`. See [Roku setup and controls](roku/README.md) for sideloading and manual server entry.
## Backend contract tests
```sh
python3 -m venv .venv
.venv/bin/pip install -r bridge/requirements.txt
.venv/bin/python -m unittest discover -s tests -v
```
The tests exercise lineup and guide normalization, server ID persistence, Tunarr admin writes, and HLS manifest/segment forwarding. Physical Roku discovery, playback, live tuning, and reboot recovery are the remaining device acceptance checks. Pairing and live weather are deferred.