4.3 KiB
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.
- Put a few compatible test videos in
data/media/, or setRETROTV_MEDIA_DIRin.envto an existing library and rundocker compose up -d. The directory is mounted read-only at/mediainside Tunarr. - 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. - 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.
- Open the Roku channel lineup to check that both channels and the native weather channel are present.
See the Tunarr setup walkthrough and scheduling documentation for time slots, sequential programming, and filler.
Start the stack on another checkout
Requires Linux, Docker with Compose, and an available LAN IPv4 address.
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. Tunarr defaults to two CPU cores of capacity to limit the impact of scans and transcoding on the host. Set TUNARR_CPUS in .env to change the limit. Tunarr also defaults to a 2800 MiB memory cap without container swap to contain memory pressure during concurrent streams. Set TUNARR_MEMORY_LIMIT to adjust it. Idle HLS connections become eligible for cleanup after 15 seconds, with Tunarr checking on its scheduled cleanup pass.
NVIDIA transcoding on this host
The current host uses the NVIDIA Compose override for Tunarr's CUDA transcode profile. The local .env selects it with COMPOSE_FILE=compose.yaml:deploy/compose.nvidia.yaml. The override maps NVIDIA device nodes and the host's x86-64 driver libraries into Tunarr. If the host driver version changes, set TUNARR_NVIDIA_DRIVER_VERSION in .env to the version shown by nvidia-smi and recreate Tunarr with docker compose up -d --no-deps tunarr.
Weather channel
Tune to channel 99 in the retroLabs Roku app. This host is configured for Dunnellon, FL (34431). The screen rotates through current conditions, six hourly periods, three extended forecast cards with daily highs and lows, and sunrise/sunset. Active NWS alerts appear across the rotation. The bridge caches data and marks delayed responses.
To set a location on another host, set RETROTV_WEATHER_POINT (latitude,longitude) and RETROTV_WEATHER_LOCATION in .env, then run docker compose up -d --no-deps bridge. The bridge serves the feed at /api/v1/weather. Weather is rendered by the Roku app.
To add background music, place a local MP3 at data/weather/forecast.mp3 on the bridge host. The file is served over the LAN and loops while the weather channel is open. The directory is mounted read-only in the bridge and ignored by Git.
Roku
Run ./roku/build.sh to produce roku/dist/retroLabs.zip. See Roku setup and controls for sideloading and manual server entry.
Backend contract tests
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 is deferred.