# Install PautatoTV on a Raspberry Pi Release 0.5.22 targets Raspberry Pi 4/5 with **64-bit Raspberry Pi OS Bookworm (Debian 12) or Trixie (Debian 13)**, systemd, at least 1 GiB free on the installation filesystems, power and internet. This is early access: physical Pi/Tesla validation remains pending. Test on a spare Pi before purchasing. Media subscriptions are not included. ## Download, verify, install Download the official ARM64 archive, its `.sig` and `seller-public.pem`. Verify with OpenSSL 3 before executing anything: ```sh openssl pkeyutl -verify -pubin -inkey seller-public.pem -rawin -in pautatotv-0.5.22-linux-arm64.tar.gz -sigfile pautatotv-0.5.22-linux-arm64.tar.gz.sig mkdir pautatotv-0.5.22 tar -xzf pautatotv-0.5.22-linux-arm64.tar.gz -C pautatotv-0.5.22 cd pautatotv-0.5.22 sudo bash install.sh ``` Obtain the publisher key through a trusted official channel. A key substituted alongside a tampered download does not authenticate its publisher. The installer checks the pinned public key, signed manifest and **all** shipped installer/runtime files before package/account/service changes. Do not mix files from different releases. The installer prepares a versioned native release and private media tools, checks FFmpeg H.264/AAC, yt-dlp and Deno as the service user, then starts PautatoTV and verifies its HTTP readiness. It does not stop other application services. Required shared OS packages may be installed through apt; these package-manager changes are not rolled back automatically. Save the printed **Pi installation ID** and private **Pi owner code**. The owner code starts the trial and authorizes active-trial and paid-license browser transfers; do not share it. ## Guided Tailscale setup The installer offers to set up your Tesla HTTPS URL. It reuses an existing Tailscale installation, login and network preferences. If missing, it installs Tailscale through its official signed apt repository. Follow the sign-in URL printed by Tailscale, and authorize Funnel if your tailnet requires it. PautatoTV never asks for your Tailscale password or auth key. If Tailscale is stopped or has settings that require manual attention, the installer leaves those settings intact and tells you what to run. Use `sudo tailscale up` with your existing settings, finish sign-in, then resume: ```sh sudo bash /opt/parkplay/enable-funnel.sh ``` Setup reuses an existing exact PautatoTV Funnel mapping when available. Otherwise it selects a free supported HTTPS port in order **8443 → 10000 → 443**, forwarding to PautatoTV on loopback **9139**. Existing different mappings are preserved. If every supported port is occupied, setup stops without replacing them. Repeating setup with PautatoTV's exact mapping is safe. Unreadable/malformed status is an error, never permission to replace a route. The helper checks the resulting public HTTPS readiness before printing a verified URL. Tailscale login, Funnel policy, DNS, certificates, network restrictions or external service failure may prevent remote setup. The healthy local app stays installed; exit code **2** means remote setup is incomplete. Complete the indicated Tailscale steps and rerun the helper. No license state is reset. Internet and Tailscale remain required for remote access. Open the full verified URL, including the printed port (such as `:10000`; port 443 needs no suffix), in your **parked Tesla's intended browser**. Enter the owner code and select **Start my free trial**. Your 72 hours start then. Add media in Settings: YouTube links/search, your provider's Xtream credentials or playlists, or your own Plex/Jellyfin server. Optional Google sign-in requires your own OAuth client configuration. ## Faster updates Use the same official terminal download command for first install and later updates. The helper selects a state-preserving upgrade automatically; `--upgrade` remains supported for manual installation. When OS dependencies are already installed, updates skip apt. When the pinned yt-dlp version is unchanged and the existing environment passes version and dependency checks, the new release reuses it without downloading/reinstalling Python packages. Repairs, changed requirements or failed checks prepare a fresh environment before switching the app. FFmpeg/Deno/media readiness, signature checks, backups and rollback remain required. Keep retained releases: a newer release may use the working media tools stored in an earlier one. Do not manually delete release folders. Generated `.cache` contents are not part of the configuration/data backup; they are rebuilt when needed. License state, owner codes, media credentials and keys remain backed up. An ordinary update leaves Tailscale running with its existing login and mappings, prints the existing URL if found, and finishes without another remote-setup prompt. To change or repair remote access, run the existing enable-funnel helper explicitly. ## Safe retries, upgrades and repairs Run commands from the newly downloaded, verified release folder: ```sh sudo bash install.sh --dry-run sudo bash install.sh --upgrade sudo bash install.sh --repair ``` - Rerunning the same healthy release preserves its identity/data and checks readiness without reinstalling packages. - Failed preparation can be retried with the same command. Owned partial staging is rebuilt; the installation ID, owner code, trial, paid license and media keys are retained. - An interrupted service switch is recovered from a root-owned transaction journal on the next run. A failed startup/health check restores the previous release, service file, receipt and enabled state; previously running PautatoTV is restarted. - `--upgrade` explicitly upgrades an existing installation, including the earlier flat 0.4.1 layout. `--repair` reinstalls application files while preserving configuration and data. Neither accepts an identity replacement. Downgrades are refused. - Unrecognized files/accounts/services, missing original configuration, partial license state, lost media keys, unsafe symlinks or conflicting ports are refused. Inspect or restore a private backup; do not delete license files to force a retry. - Private pre-switch backups are retained under `/var/backups/parkplay/`. Live configuration remains `/etc/parkplay/config.json`, data `/var/lib/parkplay/`, and installer recovery records `/var/lib/parkplay-installer/`. Keep the **entire** configuration/data backup, including authentication and encryption keys. - The installer serializes its own operations with a lock, waits up to 120 seconds for dpkg package locks, and uses bounded command/network timeouts. Never delete apt/dpkg locks. If `dpkg --audit` reports interrupted OS package work, resolve it with your system administrator before retrying. For remote setup without a prompt use `--enable-funnel` (Tailscale may still need interactive authentication). Use `--skip-tailscale` to install locally only. `--yes` accepts guided remote setup but cannot bypass sign-in, Funnel authorization or mapping conflicts. Unattended first installs require prior Tailscale authentication or a later interactive remote setup. Advanced `--config=/absolute/path/config.json` is allowed only for a new installation; the file must contain a unique software installation ID and private owner code. Never reuse configuration between customers. ## Choose the browser you activate Opening the installer link does not activate a browser or start the trial. Open it in the browser you intend to use, ideally your parked Tesla. Enter the private Pi owner code, check the browser confirmation box and select **Start my free trial** to confirm that browser and begin the 72 hours. No purchased license key is needed for the trial. If you start on a computer, the computer becomes active. Your Tesla will need an explicit trial transfer using the owner code; it does not activate automatically. One browser is active at a time, and switching keeps the original expiry. The owner code goes in the owner-code field, not the license-key field. ## License activation and browser recovery Give the seller the installation ID, not the owner code. Paste your entire signed `EVTV1.…` license into the activation screen. A paid license never expires and verifies offline. One browser key is active per software installation. No physical Pi fingerprint is used. To move an active trial or paid license, open `/_license/` in the new browser, expand **Changed browser or cleared your browser data?**, enter the private owner code and select **Move trial to this browser** or **Move license to this browser**, as shown. The old browser's streams are closed on that installation. Moving an active trial keeps its original start and expiry, so only the remaining time transfers. An expired trial cannot be moved or restarted. Browser keys are origin-scoped; changing the public URL or clearing all browser storage can require this reset. Restoring the complete software installation to a replacement Pi preserves its license; losing the installation identity may require a replacement key. Keep signed runtime files intact. Editing/replacing release files will fail integrity checks. ## Diagnostics ```sh sudo systemctl status parkplay sudo journalctl -u parkplay -n 60 sudo tailscale status sudo tailscale funnel status ``` The native backend requires no customer Go/Node/Bun installation. The installer uses system Python; FFmpeg and a private yt-dlp environment provide media support. Bundled Deno is only an external yt-dlp YouTube solver. Website, payment and license-issuing infrastructure are not part of this installer. ## Optional YouTube account connection Create a Google OAuth client of type **TVs and Limited Input devices** and enable **YouTube Data API v3** in the same project. Configure it on the installed Pi: ```sh sudo python3 /opt/parkplay/current/setup-youtube.py ``` Paste the client ID and then the client secret when prompted. The helper stores them in root-only `/etc/parkplay/youtube.env`, adds a service override and restarts only `parkplay.service`. Configuration survives application upgrades. If restart fails, it restores the previous settings. Then select **Settings → Connect YouTube** and follow the device code. Testing-mode Google projects require approved test users; public access requires the appropriate Google publishing/verification steps. Account Home exposes liked videos, uploads, playlists and subscribed channels, with paginated collections. Google's personalized recommendation feed is unavailable through the Data API. Account OAuth does not authorize the separate YouTube media extractor. ## Playback preferences Automatic quality starts at 1080p and steps down through 720p to 480p after sustained buffering. Encoding preserves native film/TV cadence up to 30 fps, uses CRF 19 with 1.5/6/8 Mbps caps, and avoids upscaling small sources. Use a lower quality if your Pi or connection cannot sustain it. Canvas playback defaults to direct Web Audio output; **Settings → Sound output → Compatibility audio** selects the alternate route. Tap empty video to show or hide controls. Movies/episodes load missing runtimes from provider details or a bounded media probe so seeking is available when the provider supplies a seekable source with a known runtime. IPTV channel switches wait for the previous stream to close before opening a replacement. IPTV live playback adds a short compressed-media reserve to smooth delivery bursts; allow a small live/startup delay. Recorded sources can build up to 30 seconds of compressed reserve, while live playback keeps up to 12 seconds; both are bounded to 32 MiB. ## Subscription videos and playback speed With Google connected, the YouTube tab opens recent uploads from your subscribed channels, newest first. Further channel pages are available from **From your subscriptions**; liked videos, playlists and other account sections remain accessible. Home is cached for ten minutes; use Refresh to reload it. This is not the personalized recommendation feed from youtube.com. For YouTube videos, movies and episodes, use the speed selector beside Quality to choose 0.5×–2×. It preserves audio pitch and restarts at the current source position. Saved positions and seeking continue to use original-media time. Paused changes take effect when Play is pressed. Live channels remain at normal speed. Faster speeds depend on Pi and provider throughput. ## Add an IPTV server Choose **Add IPTV server** from Live TV, Movies, TV Series or Settings. Select **M3U playlist link** or **Xtream Codes** in **Connection type**. M3U accepts a provider URL, optional XMLTV guide URL, or pasted playlist text. Xtream asks for server URL, username and password. All source methods use this one dialog. PautatoTV keeps the earlier `parkplay` service and filesystem names so existing configurations, trials and licenses continue through upgrades. These internal names are expected. ## Browser-transfer limits (0.5.5) Trials allow two transfers in total, retaining the original 72-hour expiry. Paid licenses allow one transfer every 30 days; the first is available immediately, and each subsequent transfer waits 30 days after the previous one. Repeating a transfer to the already-active browser does not consume allowance or restart the paid waiting period. The owner code cannot bypass limits. The activation page shows the remaining trial count or next paid transfer date. Existing releases did not count transfers, so the upgrade begins counting future moves while preserving the original trial start/expiry and paid entitlement. An expired trial cannot be revived. Counts/cooldowns persist through restart; restoring older state or modifying the installation as root remains an offline limitation. ## Completely uninstall PautatoTV (0.5.5 and newer) To preview removal without changing anything: ```sh sudo bash /opt/parkplay/uninstall.sh --dry-run ``` To remove the installation: ```sh sudo bash /opt/parkplay/uninstall.sh ``` Review the removal plan and type **UNINSTALL** to confirm. This permanently removes the PautatoTV service/account, all app releases and media environments, configuration, owner code, trial/paid-license state, encrypted media credentials, Google tokens, installer recovery records and private installer/cache backups. Export a complete configuration/data backup somewhere outside these managed folders first if you need to restore this installation or use its existing license again. There is no automatic undo. Tailscale stays installed and logged in. Only an exact PautatoTV Funnel mapping is removed; other ports, routes, settings and services are kept. Unknown/shared PautatoTV mappings, unreadable Tailscale status, aliased paths or changed service ownership stop removal for inspection. Shared OS packages such as FFmpeg and Python are kept because other apps may use them. If you want to revoke your Google account grant, disconnect Google in PautatoTV before uninstalling. Local uninstall deletes stored tokens but does not contact Google to revoke account access. Clear PautatoTV site data in each browser separately. Downloaded archives, extracted installer folders, exported backups and shared system logs are outside automatic cleanup; delete your downloads manually when no longer needed. On an older release, update using the normal download command first to get the uninstaller. From a verified 0.5.5-or-newer extracted package, `sudo bash install.sh --uninstall` also works. ## Enter a paid license using your phone (0.5.7) 1. Open PautatoTV’s License & trial status page in the Tesla browser you want to activate. 2. Under Activate your license, select Use my phone and scan the QR with your phone camera. Both devices must be able to reach the Pi’s printed HTTPS URL. No Tailscale app is needed on the phone when using the public Funnel URL. 3. Check that the short code matches both screens. Use Copy installation ID on your phone when buying your license. Then paste the issued license key into the phone page and select Send key to that browser. 4. Return to the Tesla and select Activate this browser. The phone stays unlicensed. Scanning alone and sending the key do not start a trial or activate a browser. The session expires after five minutes and is invalidated when replaced or cancelled. License verification remains on your Pi, with no seller licensing server. This flow enters a paid key; it does not move an existing paid license or bypass owner-code transfer limits. For a trial, use the separate trial-start form or its phone QR option. Manual key entry remains available. The installation ID is safe to provide with a license purchase; the private Pi owner code is different and must not be shared. If purchase or delivery takes longer than the five-minute QR session, generate a fresh QR when your key arrives. ## Start your trial using your phone (0.5.18) 1. On your parked Tesla, open the installer’s full HTTPS link and select **Use my phone to start the trial**. 2. Scan the QR with your phone camera. Check that the short code matches both screens. 3. Paste or type the **private Pi owner code** printed by the installer, confirm the matching screen and select **Confirm owner code**. Do not send this private code to the seller. 4. Return to the Tesla, tick the browser confirmation box and select **Start my free trial**. Your phone stays inactive. Scanning the QR and confirming the code on the phone do not start the trial; the 72 hours begin only after the Tesla confirms. Sessions expire after five minutes. This starts a new trial only; it cannot move or restart an active/expired trial. Use the existing owner-code transfer controls if changing browsers. Direct manual trial entry remains available. ## Trial eligibility after uninstall (0.5.18) Free trials are limited to one software installation per Pi serial. An existing trial keeps its original start time, browser and transfer allowance during upgrade. A different installation ID on a Pi with a retained used-trial record requires a paid license. The installation ID and paid license remain software-based and portable with a complete backup. Uninstall intentionally keeps a small private trial-eligibility record outside the normal app folders. It contains a hashed device identifier, the trial's installation ID, original start time, active trial-browser fingerprint, transfer count and last verified time, authenticated with a local key. It contains no owner code, paid license key, media credentials or viewing history and is never uploaded. The Pi serial itself is not stored. Removing the app does not renew the free trial. This is a deterrent against ordinary reinstall resets; an administrator or SD-card wipe can remove it. A missing serial, incomplete record, authentication error or unwritable eligibility storage blocks free-trial access. A valid paid license can still activate independently of trial eligibility. Keep complete app backups for hardware replacement. Retained trial metadata is not copied into ordinary app backups and is separate from the paid-license identity. ### Picture and automatic quality Settings → Picture adjusts brightness (default 110%; Original picture resets to 100%). Automatic quality preserves compatible original video and selects a lighter conversion profile for older Pis. Initial YouTube preparation can take around a minute on a Pi3. If a source needs conversion and playback struggles, select a lower quality. ### Startup and connection resilience (0.5.18) Recorded video can read ahead at network speed into a bounded browser buffer (up to 30 seconds or 32 MiB), without downloading the whole video first. Live playback keeps a smaller reserve. Compatible video is preserved when seeking at normal speed; the browser discards frames before the requested position. Speed changes or unsupported formats can still need conversion. YouTube's installed extractor stays warm for subsequent requests, then releases its process after ten minutes without extraction work. No new account, cloud service or installation step is required. A short local technical playback history is kept privately on the Pi in `playback-diagnostics.json` for diagnosing stalls. It contains at most 30 reports and excludes provider URLs, credentials and license/browser binding. It is never sent to the seller. Provider availability, mobile reception and Tailscale Funnel bandwidth still affect playback; instant startup or uninterrupted playback cannot be guaranteed. ### Lightweight player (0.5.20) The player stops its drawing loop while paused, hidden or finished, and incoming video fragments avoid repeated whole-buffer copies. Switching YouTube topics, leaving discovery or starting playback cancels obsolete discovery work on the Pi. Older Pis use a lighter AAC encoder for audio that needs normalization, retaining 48 kHz stereo AAC-LC at 128 kbps; already compatible copied audio stays copied. The same browser player, HTTPS route, bounded buffering and offline activation are retained. First-time YouTube extraction and provider/mobile-network delays can still take time. ### Faster YouTube preparation (0.5.21) The playback resolver skips unused subtitle URL generation and reuses a bounded in-memory cache of YouTube player preprocessing. This preserves the selected video quality and original audio track. The cache stays on your Pi, contains no video download or account credentials, and is released with the idle media worker. A first video or changed YouTube player can still take longer than subsequent selections. The canvas player and its buffering, audio normalization, picture brightness and quality controls are unchanged. ### Faster preparation across sessions (0.5.22) The Pi retains up to four prepared public YouTube player scripts in a private, version-checked cache (up to 32 MiB retained in the warm worker and 16 MiB on disk; atomic replacement briefly needs up to 32 MiB on disk). This avoids repeating part of the JavaScript preparation after the media worker or app restarts. It stores no videos, Google tokens or provider credentials. Corrupt, incompatible or unsafe cache files are ignored; a cached extraction failure clears the cache and retries without it. Expired media access also clears this prepared cache before retrying. Playback preparation skips unused YouTube page metadata when duration/live information is available from the player response, with the full extraction retained as a fallback. When switching YouTube videos, preparation overlaps with stopping the previous stream; media still waits for the old stream to close. IPTV connections remain sequential. Video quality, audio handling and compressed buffering are unchanged. First-time preparation and network delays can still take several seconds.