Locast shutdown and I’ve been looking replacement where I could use Plex to watch live TV. I found USTVGO which is completely free and while it worked fine using my TV’s web browser I thought is there any to get this with Plex and USTVGO integrated.
The Solution
I found a project called Cabernet which included a USTVGO plugin and can act as a HD Homerun device on your network. Unfortunately I found the documentation at the time of this post almost non-existent other than if you’re running windows and just want to run an exe and create a simple config.ini file.
Well I would prefer to run this as a Docker container so I searched for one… Nothing. Okay so I cloned the Cabernet GitHub repository and worked on getting a multi-arch docker image so I could run this in my Docker Swarm running on Raspberry Pi 4’s. While the Cabernet GitHub did contain some Dockerfiles I ran into too many problems until I switched from an Alpine based image to an official Python based image. Here’s my Dockerfile if you want try building one for yourself or you can use my multi-architecture Docker image here.
Dockerfile
FROM python:3.9.10-slim
#RUN apk add --no-cache --update bash tzdata ffmpeg py3-cryptography py-requests && \
RUN apt-get update && apt-get install -y --no-install-recommends bash tzdata ffmpeg curl && \
apt-get install -y --no-install-recommends gcc musl-dev python3-dev libffi-dev openssl libssl-dev cargo && \
python -m pip install --upgrade pip && \
pip3 install requests && \
pip install cryptography --no-binary=cryptography && \
apt-get remove -y gcc musl-dev python3-dev libffi-dev && \
rm -rf /var/lib/apt/lists/*
RUN groupadd -g 1002 pies && \
useradd -u 1004 -g pies -s /bin/sh pi-slave
COPY *.py /app/
COPY lib/ /app/lib/
COPY plugins /app/plugins
RUN touch /app/is_container
#USER 1004:1002
ENTRYPOINT ["python3", "/app/tvh_main.py"]
You will have to create a config.ini that contains the following and setup you Docker volumes accordingly
[ustvgo_default]
label = USTVGO Instance
So now that we have our Docker image its time to get our container up and running! Here’s my Docker-compose file
version: "3"
services:
cabernet:
image: eblabs/cabernet
environment:
- PUID=1000
- PGID=1000
ports:
- "6077:6077"
- "1900:1900/udp"
- "5004:5004"
volumes:
- /etc/localtime:/etc/localtime:ro
- /mnt/swarm/cabernet:/app/data
networks:
- proxy
restart: unless-stopped
networks:
proxy:
external: true
Now we should be able to access the web interface of Cabernet at http://yourdockerhost:6077
Now let’s enable the HD Homerun functionality
To make things easier lets change the settings to advanced by default. This setting is found at Internal->Display and change the Display Level to “3-Advanced”
Now let’s enable this container as a virtual HD Homerun at Clients->HDHomeRun and uncheck disable_hdhr
Now you should change your plex_accessible_ip under Clients->Web Sites to the IP address of your Docker host
Adding Cabernet as a Plex DVR
On your Plex server go into settings and find Live TV & DVR. Click Add Device, If it Plex doesn’t find it try entering the address http://yourhost:6077 and then go thru the wizard…
Now I did have to manually match a bunch of channels and your local stations most likely won’t be local but you still will get the national programming on your “local” stations