Locast Plex - Local TV on Plex with Raspberry Pi4

Watch local broadcast TV on Plex without an antenna.



What is it?

Locast is a free service that receives over the air (OTA) broadcast television signals and encodes and legally distributes them digitally across the internet. Using the program locast2plex you can receive this digital content and send it to a Plex Media Server. Plex will allow you to record, time-shift and save this content. It works exactly like a Cablebox / DVR.

Setup

The overall steps are:

  • Create a free locast.org account
  • Download locast2plex to a Raspberry Pi or similar Linux computer
  • Configure Plex to use the locast2plex software

Download locast2plex from this git repo:

1
2
3
4
git clone https://github.com/tgorgdotcom/locast2plex.git
# Change ownership to your user
chown -R pi:pi locast
python3 main.py

If python fails on: [SSL: DH_KEY_TOO_SMALL] edit /etc/ssl/openssl.conf and change CIPHER to @LEVEL1

If everything works as expected, you should see the following:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Initiating Locast2Plex v0.6.4
Opening and Verifying Configuration File.
/opt/locast2plex/config/config.ini
Loading Configuration File: /opt/locast2plex/config/config.ini
Tuner count set to 3
Server is set to run on localhost:6077
UUID set to: ylsrkzrv...
Getting user location...
Getting location via IP Address.
Got external IP 108.200.220.162.
Got location as Orlando - DMA 534 - Lat\Lon 28.0345\-80.5887
Logging into Locast using username locast@chrisbergeron.com...
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 2021-02-25 18:13:47
Starting First time Stations refresh...
Checking FCC facilities database for updates.
Cached facilities database is current.
Getting list of stations based on DMA...
Found 71 stations for DMA 534
Starting Stations thread...
Starting device server on localhost:6077
Now listening for requests.
Starting SSDP server...
Starting First time EPG refresh...
Registering upnp:rootdevice (http://localhost:6077/device.xml)
Fetching: https://api.locastnet.org/api/watch/epg/534?startTime=2021-01-25T00:00:00
Fetching: https://api.locastnet.org/api/watch/epg/534?startTime=2021-01-26T00:00:00
Fetching: https://api.locastnet.org/api/watch/epg/534?startTime=2021-01-27T00:00:00
Fetching: https://api.locastnet.org/api/watch/epg/534?startTime=2021-01-28T00:00:00
Fetching: https://api.locastnet.org/api/watch/epg/534?startTime=2021-01-29T00:00:00
Fetching: https://api.locastnet.org/api/watch/epg/534?startTime=2021-01-30T00:00:00
Starting EPG thread...
Locast2Plex is now online.

Your server should be listening on the following port: 6077. This is the port that Plex will use to look for your tuner.

1
2
netstat -ntpl | grep 6077
tcp 0 0 127.0.0.1:6077 0.0.0.0:* LISTEN 19620/python3

Locast Plex - Local TV on Plex with Raspberry Pi4

https://chrisbergeron.com/2021/01/30/Locast-Plex---Local-TV-on-Plex/

Author

Chris Bergeron

Posted on

01-30-2021

Updated on

07-01-2022

Licensed under

Comments