Giter Club home page Giter Club logo

locast2plex's People

Contributors

dcd avatar deathbybandaid avatar gogorichie avatar jgsawyers avatar precision avatar ratherdashing avatar steventwheeler avatar tgorgdotcom avatar tri-ler avatar warrenmelnick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

locast2plex's Issues

locast2plex Docker on QNAP

I create the container and it shows the right information but Plex doesn't see the "Live DVR". When I look at the console, it shows that it's up and the following;
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1600378947
Getting user location...
User location obtained as 39.9038/-104.9419
Getting user's media market (DMA)...
DMA found as 751
Getting list of stations based on DMA...
Loading FCC Stations list...
Starting device server on 0.0.0.0:6077
Starting SSDP server...
192.168.1.125 - - [18/Aug/2020 16:27:00] "GET /device.xml HTTP/1.1" 200 -
192.168.1.125 - - [18/Aug/2020 16:27:22] "GET /device.xml HTTP/1.1" 200 -

eventually times out and stops the service...

Locast Validation Error

Running on linux via command line. Was able to start up the program fine yesterday (after hardcoding the latitude and longitude due to a geo code problem). The connection to both Plex and Jellyfin was working great last night, but the program will not successfully start up today.

Error message generated is bellow:

Traceback (most recent call last): File "main.py", line 320, in <module> if (not locast.login(CONFIG_LOCAST_USERNAME, CONFIG_LOCAST_PASSWORD)) or (not locast.validate_user()): File "/root/locast2plex/LocastService.py", line 50, in login print("Error during login: " + loginErr.message) TypeError: cannot concatenate 'str' and 'getset_descriptor' objects
Will dig into this a little more, but I'm not sure what changed to cause the failure today.

Error when running main.py

Locast2Plex v0.4.0
DEBUG MODE ACTIVE
UUID found.
UUID set to: mivyttyx...
Logging into Locast using username [email protected]...
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1594161231
Getting user location...
User location obtained as 28.1355/-82.4605
Getting user's media market (DMA)...
DMA found as 539
Getting list of stations based on DMA...
Loading FCC Stations list...
Traceback (most recent call last):
File "main.py", line 324, in
station_list = locast.get_stations()
File "/home/slayer/locast2plex-master/LocastService.py", line 195, in get_stations
fcc_market = dma_mapping[str(self.current_dma)]
KeyError: '539'

ffmpeg stuttering on HLS stream from locast

Been using it for a few weeks now. Very flakey. Sometimes recordings only have 1 or 2 seconds in them. Weird.

-rw-r--r-- 1 plex plex 69922276 Aug 14 16:54 According to Jim (2001) - S05E01 - Foul Ball.ts
-rw-r--r-- 1 plex plex   100392 Aug 15 21:30 According to Jim (2001) - S05E02 - The Tale of the Tape.ts
-rw-r--r-- 1 plex plex 34206036 Aug 14 22:13 According to Jim (2001) - S05E03 - The Tale of the Tape.ts
-rw-r--r-- 1 plex plex 30174188 Aug 14 21:59 According to Jim (2001) - S05E04 - Charity Begins at Hef's.ts
-rw-r--r-- 1 plex plex    96820 Aug 15 22:30 According to Jim (2001) - S05E05 - The Race.ts
-rw-r--r-- 1 plex plex 26383732 Aug 14 23:59 According to Jim (2001) - S05E06 - Anec-Don'ts.ts
-rw-r--r-- 1 plex plex   168448 Aug 16 22:05 According to Jim (2001) - S05E08 - James and the Annoying Peach.ts
-rw-r--r-- 1 plex plex    57152 Aug 16 23:05 According to Jim (2001) - S05E10 - Lean on Me.ts

KeyError: '553'

I already knew that Locast wasn't available in my area, but I was bored and wanted to see what locast2plex would do.
Essentially, $5 found a bug, that should exit more cleanly.

root@locast2plex:/home/locast2plex# python main.py -u:REDACTED -p:REDACTED --debug --addy:0.0.0.0
Locast2Plex v0.4.2
DEBUG MODE ACTIVE
UUID found.
UUID set to: REDACTED...
Logging into Locast using username REDACTED...
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1601232517
Getting user location...
User location obtained as REDACTED
Getting user's media market (DMA)...
DMA found as 553
Getting list of stations based on DMA...
Loading FCC Stations list...
Traceback (most recent call last):
  File "main.py", line 335, in <module>
    station_list = locast.get_stations()
  File "/home/locast2plex/LocastService.py", line 195, in get_stations
    fcc_market = dma_mapping[str(self.current_dma)]
KeyError: '553'

Ubuntu 16.04 LTS Plex Error during "Live" playback

Just upgraded Plex to plexmediaserver_1.20.1.3252-a78fef9a9_amd64.deb, but something may have also changed at Locast.

image

# uname -a
Linux pluto 4.4.0-187-generic #217-Ubuntu SMP Tue Jul 21 04:18:15 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

image

# python -V
Python 2.7.12

Here is the init sequence which shows an error which may not have existed before:

craig@pluto:~/Project/locast2plex% python main.py -u:[email protected] -p:xxxxxxxx --debug --addy:127.0.0.1
Locast2Plex v0.4.1
DEBUG MODE ACTIVE
UUID found.
UUID set to: nlkmkntz...
Logging into Locast using username [email protected]...
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1603474321
Getting user location...
User location obtained as 47.8388/-122.1985
Getting user's media market (DMA)...
DMA found as 819
Getting list of stations based on DMA...
Loading FCC Stations list...
Starting device server on 0.0.0.0:6077
Starting SSDP server...
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "main.py", line 232, in ssdpServerProcess
    ssdp.run()
  File "/home/usr/craig/Project/locast2plex/SSDPServer.py", line 54, in run
    self.sock.bind(('0.0.0.0', SSDP_PORT))
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 98] Address already in use

When attempting to view a Live show from Locast using Firefox 80.0 (64-bit) Plex Web GUI (which used to work):

127.0.0.1 - - [27/Aug/2020 10:27:38] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [27/Aug/2020 10:27:38] "GET /lineup.json HTTP/1.0" 200 -
127.0.0.1 - - [27/Aug/2020 10:27:38] "GET /lineup_status.json HTTP/1.0" 200 -
Getting station info for 1572389490750...
Determining best video stream for 1572389490750...
Found 3 Playlists
1572389490750 will use 1280x720 resolution at 2700000bps
127.0.0.1 - - [27/Aug/2020 10:27:39] "GET /watch/1572389490750 HTTP/1.1" 200 -
ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
  configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv --enable-version3 --disable-doc --disable-programs --disable-avdevice --disable-avfilter --disable-avformat --disable-avresample --disable-postproc --disable-swscale --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libvo_aacenc --enable-libvo_amrwbenc
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
  libpostproc    53.  3.100 / 53.  3.100
[https @ 0x13666e0] No trailing CRLF found in HTTP header.
Input #0, hls,applehttp, from 'https://sea.locastnet.org/proxy/sea/variant/4BMQxEn1Ab3eymmWLFixx4IBKOahP25kp7LUrpkuJSjrKTZ7EpaVZpBOrunwOU5BwrOG1toUqz8fiiCReGiFjSVKIt3MVFznpAIazsrJVIy.m3u8':
  Duration: N/A, start: 90123.972622, bitrate: N/A
  Program 0 
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 30 fps, 30 tbr, 90k tbn, 60 tbc
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp, 201 kb/s
Output #0, mpegts, to 'pipe:1':
  Metadata:
    encoder         : Lavf56.40.101
    Stream #0:0: Video: h264 ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 90k tbn, 90k tbc
    Stream #0:1: Audio: aac ([15][0][0][0] / 0x000F), 48000 Hz, stereo, 201 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[https @ 0x1388fc0] No trailing CRLF found in HTTP header.
frame=  246 fps=0.0 q=-1.0 size=    1695kB time=00:00:08.19 bitrate=1694.9kbits/[https @ 0x136dee0] No trailing CRLF found in HTTP header.
frame=  360 fps=316 q=-1.0 size=    3591kB time=00:00:12.01 bitrate=2449.1kbits/127.0.0.1 - - [27/Aug/2020 10:27:41] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [27/Aug/2020 10:27:41] "GET /lineup_status.json HTTP/1.0" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 44990)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 654, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 713, in finish
    self.wfile.close()
  File "/usr/lib/python2.7/socket.py", line 283, in close
    self.flush()
  File "/usr/lib/python2.7/socket.py", line 307, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
----------------------------------------

"Address already in use" error

Locast2Plex v0.3.0
DEBUG MODE ACTIVE
UUID found.
UUID set to: nlkmantz...
Logging into Locast using username [email protected]...
Logon token is xxxxxxx
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1595525521
Getting user location...
Getting list of stations based on DMA...
Loading FCC Stations list...
Starting device server on 0.0.0.0:6077
Starting SSDP server...
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "main.py", line 232, in ssdpServerProcess
    ssdp.run()
  File "/home/usr/craig/Project/locast2plex/SSDPServer.py", line 54, in run
    self.sock.bind(('0.0.0.0', SSDP_PORT))
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 98] Address already in use
^C^C received, shutting down the server

~/Project/locast2plex% lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial

~/Project/locast2plex% python --version
Python 2.7.12

~/Project/locast2plex% ffmpeg --version
ffmpeg version 2.8.15-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers

I tried multiple addresses and ports. Also looked at "lsof -i" and "netstat -tulp" and 6077 and the other ports I tried are available.

I'm not a Python programmer. Any idea why the program isn't able to setup the "server"?

Or is someone willing to share a working Docker Container?

NYC DMA - Wrong sub-channel numbers - WJLPDT10 returned instead of WJLPDT1

When running the python script everything works great except that it returns the wrong sub-channels. The channels on Locast are:

Call sign........Virtual Channel.............RF Channel
WJLPDT1......33.1......................... ................3.1
WJLPDT2......33.2..........................................3.2
WJLPDT3......33.3..........................................3.3
WJLPDT4......33.4..........................................3.4
WJLPDT5......33.5..........................................3.5
WJLPDT8......33.8..........................................3.8
WJLPDT10...33.10.......................................3.10

However, the list returned to Plex by the script is:
Call sign........Virtual Channel........... RF Channel
WJLPDT10.....33.1.........................................3.10
WJLPDT2.......33.2.........................................3.2
WJLPDT3.......33.3.........................................3.3
WJLPDT4.......33.4.........................................3.4
WJLPDT5.......33.5.........................................3.5
WJLPDT8.......33.8.........................................3.8

As you can see, the script is returning WJLPDT10, when it should return WJLPDT1 and not returning WJLPDT1 at all.

I can forward any logs or perform any diagnostics you need.

Any advice you can offer to resolve this problem would be appreciated.

Thanks,
Diana

Unable to load my complete channel lineup

When I run I am only able to get about half of my channels that are in my lineup. I thought it might be related to too many connections so I tried to place a sleep timer in main.py in-between stream lookups, but still no luck.

For example, I know that channel 2.2 is part of my lineup, but when it loads it says no streams available.

Unable to watch or record on MacOS

It appears the the setup is correct, but I am unable to watch or record any channels. Here is latest log output.

Locast2Plex v0.4.2
DEBUG MODE ACTIVE
UUID found.
UUID set to: plpkpynx...
Logging into Locast using username XXX...
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1598734367
Getting user location...
User location obtained as 34.0389/-84.3826
Getting user's media market (DMA)...
DMA found as 524
Getting list of stations based on DMA...
Loading FCC Stations list...
Starting device server on 0.0.0.0:6077
Starting SSDP server...
192.168.7.219 - - [04/Aug/2020 12:07:12] "GET /device.xml HTTP/1.1" 200 -
127.0.0.1 - - [04/Aug/2020 12:07:27] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [04/Aug/2020 12:07:27] "GET /lineup_status.json HTTP/1.0" 200 -
192.168.7.244 - - [04/Aug/2020 16:05:45] "GET /device.xml HTTP/1.1" 200 -
192.168.7.244 - - [04/Aug/2020 17:36:40] "GET /device.xml HTTP/1.1" 200 -
192.168.7.219 - - [04/Aug/2020 18:05:04] "GET /device.xml HTTP/1.1" 200 -
192.168.7.244 - - [04/Aug/2020 18:16:06] "GET /device.xml HTTP/1.1" 200 -
192.168.7.219 - - [04/Aug/2020 18:42:25] "GET /device.xml HTTP/1.1" 200 -
192.168.7.244 - - [04/Aug/2020 22:22:26] "GET /device.xml HTTP/1.1" 200 -
192.168.7.219 - - [05/Aug/2020 07:27:26] "GET /device.xml HTTP/1.1" 200 -
127.0.0.1 - - [05/Aug/2020 07:27:33] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 07:27:33] "GET /lineup_status.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 07:27:33] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 07:27:33] "GET /lineup_status.json HTTP/1.0" 200 -
192.168.7.219 - - [05/Aug/2020 08:28:50] "GET /device.xml HTTP/1.1" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:20] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:20] "GET /lineup.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:20] "GET /lineup_status.json HTTP/1.0" 200 -
Getting station info for 1571261945557...
Determining best video stream for 1571261945557...
Found 3 Playlists
1571261945557 will use 1280x720 resolution at 2700000bps
192.168.7.219 - - [05/Aug/2020 08:39:21] "GET /watch/1571261945557 HTTP/1.1" 200 -
ffmpeg version git-2020-08-02-b48397e Copyright (c) 2000-2020 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.8)
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --enable-appkit --enable-avfoundation --enable-coreimage --enable-audiotoolbox
  libavutil      56. 57.100 / 56. 57.100
  libavcodec     58. 99.100 / 58. 99.100
  libavformat    58. 49.100 / 58. 49.100
  libavdevice    58. 11.101 / 58. 11.101
  libavfilter     7. 87.100 /  7. 87.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[hls @ 0x7fb20780a200] Skip ('#EXT-X-VERSION:4')
[hls @ 0x7fb20780a200] Opening 'https://atl.locastnet.org/proxy/atl/wsb_src266105198.ts' for reading
[hls @ 0x7fb20780a200] Opening 'https://atl.locastnet.org/proxy/atl/wsb_src266105199.ts' for reading
127.0.0.1 - - [05/Aug/2020 08:39:23] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:23] "GET /lineup_status.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:26] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:26] "GET /lineup_status.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:29] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:29] "GET /lineup_status.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:32] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:32] "GET /lineup_status.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:35] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:35] "GET /lineup_status.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:38] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:38] "GET /lineup_status.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:41] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:41] "GET /lineup_status.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:44] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:44] "GET /lineup_status.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:45] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [05/Aug/2020 08:39:45] "GET /lineup_status.json HTTP/1.0" 200 -
[tls @ 0x7fb206c3d740] Error in the push function.
[hls @ 0x7fb20780a200] Failed to open next segment 9 of playlist 0
[hls @ 0x7fb20780a200] Opening 'https://atl.locastnet.org/proxy/atl/wsb_src266105199.ts' for reading
Input #0, hls, from 'https://atl.locastnet.org/proxy/atl/variant/89f6o3nv21D0e3tyRViTT3qP94IRMMtswrqzQcroZdACjCbBBDFFrkYxlll0AToaFklbfQJIcO9G9cRy4vJsz9KknE36hImAGUz5cEBGYpn.m3u8':
  Duration: N/A, start: 18159.107200, bitrate: N/A
  Program 0 
    Metadata:
      variant_bitrate : 0
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 30 fps, 30 tbr, 90k tbn, 60 tbc
    Metadata:
      variant_bitrate : 0
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
Output #0, mpegts, to 'pipe:1':
  Metadata:
    encoder         : Lavf58.49.100
    Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=2-31, 30 fps, 30 tbr, 90k tbn, 90k tbc
    Metadata:
      variant_bitrate : 0
    Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp
    Metadata:
      variant_bitrate : 0
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[tls @ 0x7fb206f0cd00] Error in the pull function.

Running Command Line WIN10 2004

Locast2Plex v0.4.2
DEBUG MODE ACTIVE
UUID found.
UUID set to:
Logging into Locast using username
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1661038032
Getting user location...
Error during geo IP acquisition: [Errno 1] _ssl.c:499: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
Exiting...

Locast2Plex as a Windows Service is working great!

I wanted to share how to setup Locast2Plex as a windows service.
Why do it?

  1. It automatically loads on reboot.
  2. When updates are made to the py scripts I just have to restart the service.
  3. I don't have a windows command window open. (I am not using Docker because it doesn't run as well! Less pausing and much faster loading from the command-line)
    Download the totally FREE Non-Sucking Windows Service https://nssm.cc/download, Grab the prelease build 2.2.4-101 listed in the first sentence of the download page.
    Unzip and Copy the win64/nssm.exe to the root of C:\ (or other folder of your preference)

from an elevated (Run as Administrator) command line type c:\nssm.exe install locast2plex
A GUI will popup

image

Here is what I filled in to the GUI
path: C:\Python27\Python27.exe
Startup directory: C:\Python27

Arguments: C:\code\locast2plex\main.py -u:usernamexxx -p:passwordxxx --debug --addy:127.0.0.1 --port:6077
Service name is locast2plex

Click Install Service.

Go to Run, services.msc, find locast2plex, set the service to run automatically and to start it.
Let me know if you need any help.
It is running nicely for me. I rebooted to test it out and I am very pleased.

Cannot add virtual locast2plex hdhomerun to plex

Hi, I'm running Plex via a Synology Rackstation. I'm also running the locast2plex in a container via the Docker app. The problem I'm running into is that I cannot add locast2plex as a virtual hdhomerun to plex. I have all the settings set as outlined here, but I'm noticing that even though I have an external server value set in the logs it says the server is: 0.0.0.0. I'm wondering if that's the issue. I cannot see a way to manually change that value.

Attached is my Docker log.

Any help would be greatly appreciated.

Thanks!

tgorg-locast2plex2

ssl handshake failure

I am using the command line option in Windows 10, python 2.7.8, but running into the following issue:

Locast2Plex v0.4.2
DEBUG MODE ACTIVE
UUID found.
UUID set to: yxtjzjxz...
Logging into Locast using username [email protected]...
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1600450688
Getting user location...
Error during geo IP acquisition: [Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
Exiting...

ffmpeg running after all streams are closed

Hey, been running locast2plex for a couple of days. It's been running great so far. Today doing some updates to my Plex server, I usually like to check on process list and make sure nothing is going crazy. Upon doing ps aux I was surprised to see some ffmpeg process running:

root 26417 0.0 0.1 369520 19164 pts/0 S+ Aug07 0:02 ffmpeg -i https://dal.locastnet.org/proxy/dal/variant/WmnVO7nRaDrM7zYfWQpubbLNSZ8siPmxKst3lbErmELXbr8A9XyHuvfbmNYN0ZAi4r5aLd
kZZOr7LdWVdh7EXy.m3u8 -codec copy -f mpegts pipe:1
root 26638 0.0 0.1 369152 17948 pts/0 S+ Aug07 0:18 ffmpeg -i https://dal.locastnet.org/proxy/dal/variant/PtrlkUL6b0gl1y9fXl6dfycqVds6CTp8C73Zf6Fp5IWbmOoJ9DJtiiOvByoCfyPzf4yop3
zbTQpBbHIZfOCLGi.m3u8 -codec copy -f mpegts pipe:1
root 26325 0.0 0.1 369112 16652 pts/0 S+ Aug07 0:00 ffmpeg -i https://dal.locastnet.org/proxy/dal/variant/rdsIP1zris6zTKjJtK6Pn1MKt2m33JJiMQp3cTECLfAGAMWbSFsHn4aZv35ybhug6UpDaf
wvAsQw8COF3FZuro.m3u8 -codec copy -f mpegts pipe:1
root 27850 0.0 0.1 369492 16120 pts/0 S+ Aug07 0:00 ffmpeg -i https://dal.locastnet.org/proxy/dal/variant/L1ADmJ791i7xjeYXzT2tiJKKe2rpcAIyqz756usf7vJtKZjgL80KfeqV2aRaTfM1DFTV1t
kEIqnW4gjErqyo5C.m3u8 -codec copy -f mpegts pipe:1
root 6536 0.0 0.1 369316 16080 pts/0 S+ Aug08 0:37 ffmpeg -i https://dal.locastnet.org/proxy/dal/variant/AwFG5BaaEpZlQaTdccQNGtOEOcgSLQ57dtCwrXRTq7CAdyEWp39H2bD3mpc6cXE8zIhroA
02M1B3rwaQpKBxFq.m3u8 -codec copy -f mpegts pipe:1
root 3707 0.0 0.1 369524 16064 pts/0 S+ Aug07 0:03 ffmpeg -i https://dal.locastnet.org/proxy/dal/variant/jqynS11ka18Yk5wDzwk6cKpDcCAY0AX1j7tHp2d0qa2acLH8yFSa8F8Nt9pUHJAdsSb9UD
iJXLmKvfh9jFOQCB.m3u8 -codec copy -f mpegts pipe:1
root 32589 0.0 0.1 369544 16000 pts/0 S+ Aug07 0:04 ffmpeg -i https://dal.locastnet.org/proxy/dal/variant/Wh14Bxo1japZ26EgqWsUTedRrkEdkPMjS8TKD52LtjB8uIzMLNIWqWgLi1LDENHZlOcI1R
hkbngYAZETnG1rc0.m3u8 -codec copy -f mpegts pipe:1
root 32564 0.0 0.1 369472 15736 pts/0 S+ Aug07 0:00 ffmpeg -i https://dal.locastnet.org/proxy/dal/variant/DEqxz2Yzh0u8cruJ8kCx7lIJNPfbNLsnbhLuzknegKnWt4BmMs01HzRGcijjIYtp5nLqfX
ieSf3EFWfVEEGJKS.m3u8 -codec copy -f mpegts pipe:1
root 26338 0.0 0.1 369464 15600 pts/0 S+ Aug07 0:00 ffmpeg -i https://dal.locastnet.org/proxy/dal/variant/TxtkOtvhXvLQ44ghoAVpNVZn42ai7kAYM8ieNgm1K3AuyxRblhjMTDcgTKF58RLwwdqrIt
oZc9GB3oMvwOMZiF.m3u8 -codec copy -f mpegts pipe:1
root 3657 0.0 0.1 369380 15508 pts/0 S+ Aug08 0:00 ffmpeg -i https://dal.locastnet.org/proxy/dal/variant/5lnyIO8iCUPd9sDGtiF2D2oI8RiH73JJko3jzPRiBW2IXY9DQZE5ENCVryxAjVWs0xj1WK
mL1J0K2IPQdotX8anOkcjSYTuAJbRFplRjyHFW.m3u8 -codec copy -f mpegts pipe:1
root 29144 0.0 0.1 368472 15300 pts/0 S+ Aug07 0:02 ffmpeg -i https://dal.locastnet.org/proxy/dal/variant/3zjwqgfwLQSK08UYIIdQMcXSNT8JOLiQE0PK5AOvarmmd2sPMHBNcyAMSQy4eYudvoWm9m
QYzYq0Si7hP0KwM3IfGrQik0AzERv4RTbxQS5u.m3u8 -codec copy -f mpegts pipe:1

I was not watching anything over at Plex, and as you can see some of those are over 2 days old. I glimpsed over the debug log and couldn't find anything that popped my eye.

Also, for future troubleshooting, do you allow saving the log to a file? This will make debugging some issues way easier than printing over to the screen.

Thanks a lot for your tool! It's really amazing to be able to DVR the content and use locast as an alternative as currently an antenna in my home is impossible.

Keep up the amazing work!

Error during login

Hey, this looks amazing! But I'm having trouble logging into Locast. I get this error:

Locast2Plex v0.4.2 DEBUG MODE ACTIVE UUID found. UUID set to: xxxx... Logging into Locast using username [email protected]... Error during login: Not Found Exiting...

(Anonymized with xxxx)

Is this an issue on the Locast side? Seems like this might be a URL issue, peeking at the code.

Docker: Error during login Not Found (with donated account)

I'm trying to get this docker up and running and I'm running into an issue starting it. It seems like it cannot find my user account, even though I can log into the locast website just fine and I have donated. At first I thought it might be my complex password but I set it to something without crazy special characters and it still does not work. Below is the log, email address has been redacted. Any help is greatly appreciated!

Locast2Plex v0.4.2
DEBUG MODE ACTIVE
UUID found.
UUID set to: zmvhxhmx...
Logging into Locast using username [email protected]
Error during login: Not Found

Exiting...

Docker Container Stuck Restarting

I am attempting to install this on my Plex machine which currently is running Ubuntu 20.04 server.

I got Docker installed and updated.

Have the correct version of Python and FFMPEG installed.

I edited the docker-compose.yml to look like the following.

locast2plex:
image: tgorg/locast2plex
ports:
- "${external_port}:6077"
restart: unless-stopped
environment:
- username='USERNAME'
- password='PASSWORD'
- external_addy='127.0.0.1'
- external_port='1234'
- debug

Save that file. Then run docker-compose -up. It creates the image and then when I go to run the container ID. It just says restarting.

Where is my dumb ass failing? Cause this is my first time trying out Docker hahahaha

NoneType and int error

Found just while doing a test run, with a fresh locast account without donating

locast@locast2plex:/home/locast2plex# python main.py -u:REDACTED -p:REDACTED --debug --addy:0.0.0.0
Locast2Plex v0.4.2
DEBUG MODE ACTIVE
UUID found.
UUID set to: REDACTED...
Logging into Locast using username REDACTED...
Validating User Info...
User Info obtained.
User didDonate: False
Traceback (most recent call last):
  File "main.py", line 331, in <module>
    if (not locast.login(CONFIG_LOCAST_USERNAME, CONFIG_LOCAST_PASSWORD)) or (not locast.validate_user()):
  File "/home/locast2plex/LocastService.py", line 85, in validate_user
    print("User donationExpire: " + str(userRes['donationExpire'] / 1000))
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

Will not start

tried on

WINDOWS 10 : Python 2.7.17
the only thing that happened

Traceback (most recent call last):
File "main.py", line 1, in
import subprocess, os, sys, random, threading, socket, time, SocketServer
ModuleNotFoundError: No module named 'SocketServer'


then on UBUNTU 20.04 : Python 2.7.18rc1
Started out looking like it was going to work
then

Getting user's media market (DMA)...
DMA found as 678
Getting list of stations based on DMA...
Loading FCC Stations list...
Traceback (most recent call last):
File "main.py", line 324, in
station_list = locast.get_stations()
File "/home/abardt/locast2plex/LocastService.py", line 195, in get_stations
fcc_market = dma_mapping[str(self.current_dma)]
KeyError: '678'

Channels Missing?

There’s some channels in Locast that don’t show up as an option in the channel selector thingy.

This is with the Locast Guide selected

locast2plex fails to start, generates error 'KeyError: '533'

After the storms that rolled through our area (I'm in Connecticut) and our internet service has been restored, I noticed no new recordings have been captured these last couple of days. Digging in a bit and if I understand the error message, Locast is returning '533' as my DMA. When I log manually into their web site, it shows New York as my location which is normal.

Looking through some of the files provided, I see New York associated with code '501', but when I try updating all the '501' entries I can find with '533', the system never completes the start up process and simply hangs. Below are the messages with the original 0.4.2 files re-installed.

Do you have any suggestions?

c:\Python27>python main.py -u:[email protected] -p:yyy --debug --addy:127.0.0.1 --external_addy:192.168.100.100
Locast2Plex v0.4.2
DEBUG MODE ACTIVE
UUID found.
UUID set to: xxxxxxx...
Logging into Locast using username [email protected]...
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1597785373
Getting user location...
User location obtained as 41.4824/-73.2231
Getting user's media market (DMA)...
DMA found as 533
Getting list of stations based on DMA...
Loading FCC Stations list...
Traceback (most recent call last):
File "main.py", line 324, in
station_list = locast.get_stations()
File "c:\Python27\LocastService.py", line 195, in get_stations
fcc_market = dma_mapping[str(self.current_dma)]
KeyError: '533'

KeyError 613

I'm trying to run this in a docker container on a Synology NAS and I'm getting the below error. I think it's because The Minneapolis-Saint Paul area hasn't been added to your script yet?

date stream content
2020-08-18 03:40:40 stdout KeyError: '613'
2020-08-18 03:40:40 stdout fcc_market = dma_mapping[str(self.current_dma)]
2020-08-18 03:40:40 stdout File "/app/LocastService.py", line 195, in get_stations
2020-08-18 03:40:40 stdout station_list = locast.get_stations()
2020-08-18 03:40:40 stdout File "/app/main.py", line 324, in 
2020-08-18 03:40:40 stdout Traceback (most recent call last):
2020-08-18 03:40:39 stdout Loading FCC Stations list...
2020-08-18 03:40:39 stdout Getting list of stations based on DMA...
2020-08-18 03:40:39 stdout DMA found as 613
2020-08-18 03:40:38 stdout Getting user's media market (DMA)...
2020-08-18 03:40:38 stdout User location obtained as 45.9811/-94.3604
2020-08-18 03:40:38 stdout Getting user location...
2020-08-18 03:40:38 stdout User donationExpire: 1600386947
2020-08-18 03:40:38 stdout User didDonate: True
2020-08-18 03:40:38 stdout User Info obtained.
2020-08-18 03:40:38 stdout Validating User Info...
2020-08-18 03:40:38 stdout Logging into Locast using username [email protected]...
2020-08-18 03:40:38 stdout UUID set to: lrtrvhsi...
2020-08-18 03:40:38 stdout UUID found.
2020-08-18 03:40:38 stdout DEBUG MODE ACTIVE
2020-08-18 03:40:38 stdout Locast2Plex v0.4.2

Run on macOS without running in terminal?

Is there a way to get this to run on startup? via plist, perhaps? Or some other mechanism?

It works a treat, but I fear I'll forget to start it at some point and then be missing out on live TV.

Error during geo IP acquisition: [Error 99] Address not available

Hello, I just setup locast2plex and continue getting this error on startup. Any assistance would be great. I'm using a Synology NAS with Docker installed.

Locast2Plex v0.4.2
DEBUG MODE ACTIVE
UUID found.
UUID set to: lrtrvhsi...
Logging into Locast using username [email protected]...
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1599581940
Getting user location...
Error during geo IP acquisition: [Errno 99] Address not available
Exiting...

Settings are

services:
  locast2plex:
    image: tgorg/locast2plex
    container_name: locast2plex
    ports:
      - "6077:6077"
    restart: unless-stopped
    environment:
      - [email protected]
      - password=XXXXX
      - external_addy=192.168.10.XX
      - external_port=6077
      - debug=yes

I'll continue to see if I can figure it out but any help would be great. Thanks.

docker install issue

which file is the docker image file in the zip file ?
I don't know how to get it started with docker
it seems that there is no image file or is the whole zip file the image file
do I have to rename it ?
I installed it from the hub and got it setup on plex
the ecg was there but it said "source not available"
docker v18.09
plex most current version

Locast2Plex w/cli on same windows (10) server as Plex. "Device not found"

The subject says most of it. I've installed python 2.7* and L2P on the same Windows 10 box I'm running Plex. The I edited the L2P.py file to reflect the IP and port of the server (I read after that "0.0.0.0" was a default, so it showing up on the cli after trying to start L2P was ok, but I didn't change back). I changed the default listening port only because L2P wasn't working, so I wanted to make sure there wasn't a conflict. Again, didn't change it back since it didn't look like it impacted anything.

Using the CLI, L2P looks like it is starting (http://10.100.200.190:6177/device.xml returns:
<root>
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<device>
<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
<friendlyName>Locast2Plex</friendlyName>
<manufacturer>Silicondust</manufacturer>
<modelName>HDHR3-US</modelName>
<modelNumber>HDHR3-US</modelNumber>
<serialNumber/>
<UDN>uuid:<don't know if this is something that identifies me, so removed it from cut-and-paste></UDN>
</device>
<URLBase>http://10.100.200.190:6177\
</root>

Adding the virtual tuner to Plex looks like it's working (ie when I add it, it says it has found 37 channels, but once the rebuild of the guide is complete, when I exit the tuner config screen and return, it says "Device not found. Ensure your device is powered on and connected to your network". Interestingly, I don't get a "Device Settings" option under the L2P tuner to make changes. I have to delete that configuration and recreate it.

2 other things, just in case:
I am running an actual tuner as well (HDHomeRun Extend). It mostly works (with the usual signal issues from using an OTA antenna).
I did not reboot after installing Python or L2P. I bring this up because Python is not in the search path. I had to specify the full path to python.exe on the cli when I started up the L2P script.

Thoughts?

4 Tuner emulation help.

Is there a limit to the amount of streams we can record. Currently 2 channels record fine. Is it possible to record 4 by emulating HDHomerun Quatro? Does Locast limit the streams? I tried changing the code to 4 tuners but it didn't make any difference.

cannot start locast2plex on iMac

10.13.6 OS version
$ python main.py -u:XXXXXXX -p:XXXXXX --debug --addy:172.X.X.X

Locast2Plex v0.4.2
DEBUG MODE ACTIVE
UUID found.
UUID set to: XXXXXX...
Logging into Locast using username XXXXXXX...
Error during login: Not Found
Exiting...

I am sure the username and pass are correct as I can log into the locast site with them just fine.

Thanks in advance!

Could not tune channel. Please check your tuner or antenna.

I keep getting a playback error and do not see anything jumping out in the cmd output that is occurring while the show is attempting to start. I can copy the whole thing but it seems to loop the same stuff.

Exception happened during processing of request from ('192.168.1.67', 58180)
Traceback (most recent call last):
File "C:\python27\lib\SocketServer.py", line 293, in _handle_request_noblock
self.process_request(request, client_address)
File "C:\python27\lib\SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "C:\python27\lib\SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\python27\lib\SocketServer.py", line 655, in init
self.handle()
File "C:\python27\lib\BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "C:\python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
method()
File "C:\locast\locast2plex-master\main.py", line 91, in do_GET
ffmpeg_proc = subprocess.Popen(["ffmpeg", "-i", channelUri, "-codec", "copy", "-f", "mpegts", "pipe:1"], stdout=subprocess.PIPE)
File "C:\python27\lib\subprocess.py", line 394, in init
errread, errwrite)
File "C:\python27\lib\subprocess.py", line 599, in _execute_child
args = list2cmdline(args)
File "C:\python27\lib\subprocess.py", line 266, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'bool' is not iterable

192.168.1.67 - - [19/Aug/2020 11:10:35] "GET /discover.json HTTP/1.0" 200 -
192.168.1.67 - - [19/Aug/2020 11:10:35] "GET /lineup_status.json HTTP/1.0" 200 -
192.168.1.67 - - [19/Aug/2020 11:10:40] "GET /discover.json HTTP/1.0" 200 -
192.168.1.67 - - [19/Aug/2020 11:10:40] "GET /lineup_status.json HTTP/1.0" 200 -
Getting station info for 657?X-Plex-Token=(secret)...
Error when getting the video URL: Not Found
192.168.1.67 - - [19/Aug/2020 11:10:42] "GET /watch/657?X-Plex-Token=(secret) HTTP/1.1" 200 -

Exception happened during processing of request from ('192.168.1.67', 58235)
Traceback (most recent call last):
File "C:\python27\lib\SocketServer.py", line 293, in _handle_request_noblock
self.process_request(request, client_address)
File "C:\python27\lib\SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "C:\python27\lib\SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\python27\lib\SocketServer.py", line 655, in init
self.handle()
File "C:\python27\lib\BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "C:\python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
method()
File "C:\locast\locast2plex-master\main.py", line 91, in do_GET
ffmpeg_proc = subprocess.Popen(["ffmpeg", "-i", channelUri, "-codec", "copy", "-f", "mpegts", "pipe:1"], stdout=subprocess.PIPE)
File "C:\python27\lib\subprocess.py", line 394, in init
errread, errwrite)
File "C:\python27\lib\subprocess.py", line 599, in _execute_child
args = list2cmdline(args)
File "C:\python27\lib\subprocess.py", line 266, in list2cmdline
needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'bool' is not iterable

192.168.1.67 - - [19/Aug/2020 11:10:46] "GET /discover.json HTTP/1.0" 200 -
192.168.1.67 - - [19/Aug/2020 11:10:46] "GET /lineup_status.json HTTP/1.0" 200 -
192.168.1.67 - - [19/Aug/2020 11:10:51] "GET /discover.json HTTP/1.0" 200 -
192.168.1.67 - - [19/Aug/2020 11:10:51] "GET /lineup_status.json HTTP/1.0" 200 -
192.168.1.67 - - [19/Aug/2020 11:10:55] "GET /discover.json HTTP/1.0" 200 -
192.168.1.67 - - [19/Aug/2020 11:10:55] "GET /lineup_status.json HTTP/1.0" 200 -

Error in /app/main.py

Just got locast in my area (Miami/FLL) and tried to run this...i will admit i'm a novice when it comes to docker so I may be doing this wrong, but I get an error in /app/main.py

Status: Downloaded newer image for tgorg/locast2plex:latest
Locast2Plex v0.4.1
DEBUG MODE ACTIVE
UUID found.
UUID set to: vjykylin...
Logging into Locast using username xxxx
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1598989172
Getting user location...
User location obtained as 26.3165/-80.2748
Getting user's media market (DMA)...
DMA found as 528
Getting list of stations based on DMA...
Loading FCC Stations list...
Traceback (most recent call last):
File "/app/main.py", line 324, in
station_list = locast.get_stations()
File "/app/LocastService.py", line 195, in get_stations
fcc_market = dma_mapping[str(self.current_dma)]
KeyError: '528'

Geo Location Error

Getting this error when logging inL

Getting user location...
Error during geo IP acquisition: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)
Exiting...

Any ideas?

docker-compose.env needs to be renamed to .env

Running docker-compose up fails without copying the docker-compose.env file is renamed to .env, which then works.

Ref: docker/compose#4189 (comment)

Here is what happens before/after copying the file...

jason@docker:~/Documents/scripts/locast2plex$ sudo docker-compose up
WARNING: The external_port variable is not set. Defaulting to a blank string.
ERROR: The Compose file './docker-compose.yml' is invalid because:
locast2plex.ports is invalid: Port ranges don't match in length
jason@docker:~/Documents/scripts/locast2plex$ cp docker-compose.env .env
jason@docker:~/Documents/scripts/locast2plex$ sudo docker-compose up
Recreating locast2plex_locast2plex_1 ... done
Attaching to locast2plex_locast2plex_1
locast2plex_1  | Locast2Plex v0.4.1
locast2plex_1  | DEBUG MODE ACTIVE
locast2plex_1  | UUID found.
locast2plex_1  | UUID set to: mzulrorl...

etc...

live tv pauses, then resumes where it left off every 10 seconds or so

Running the latest python version (not the docker version).
ffmpeg version 2.8.11-0ubuntu0.16.04.1
I have a paid locast.org account.

If I stream the live stream through plex, the stream pauses every few seconds. If I record a show, the video stream is clean with an almost imperceptible audio dip every 10 seconds or so - which is very watchable. Output from the tool looks like:

127.0.0.1 - - [09/Aug/2020 16:05:00] "GET /discover.json HTTP/1.0" 200 -.0kbits/s
127.0.0.1 - - [09/Aug/2020 16:05:00] "GET /lineup_status.json HTTP/1.0" 200 -
[https @ 0xff35c0] No trailing CRLF found in HTTP header.
[https @ 0x13de3c0] No trailing CRLF found in HTTP header.1 bitrate= 734.1kbits/s
[https @ 0x1dbe6c0] No trailing CRLF found in HTTP header.
127.0.0.1 - - [09/Aug/2020 16:05:10] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [09/Aug/2020 16:05:10] "GET /lineup_status.json HTTP/1.0" 200 -
[https @ 0x1dbe6c0] No trailing CRLF found in HTTP header.1 bitrate=1106.8kbits/s
[https @ 0x18fbb20] No trailing CRLF found in HTTP header.
127.0.0.1 - - [09/Aug/2020 16:05:20] "GET /discover.json HTTP/1.0" 200 -.4kbits/s
127.0.0.1 - - [09/Aug/2020 16:05:20] "GET /lineup_status.json HTTP/1.0" 200 -
[https @ 0x14a9a60] No trailing CRLF found in HTTP header.0 bitrate= 764.0kbits/s
127.0.0.1 - - [09/Aug/2020 16:05:30] "GET /discover.json HTTP/1.0" 200 -.4kbits/s
127.0.0.1 - - [09/Aug/2020 16:05:30] "GET /lineup_status.json HTTP/1.0" 200 -
[https @ 0x1919d20] No trailing CRLF found in HTTP header.
[https @ 0xff35c0] No trailing CRLF found in HTTP header.00 bitrate= 766.7kbits/s
[https @ 0x14a9a60] No trailing CRLF found in HTTP header.
127.0.0.1 - - [09/Aug/2020 16:05:40] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [09/Aug/2020 16:05:40] "GET /lineup_status.json HTTP/1.0" 200 -
[https @ 0x14ae560] No trailing CRLF found in HTTP header.0 bitrate=1095.8kbits/s
[https @ 0xff35c0] No trailing CRLF found in HTTP header.

Not sure if the "no trailing CRLF found in header" message is just a warning or not.

I can try the docker version to see if it's a python library or ffmpeg or something else that's not happy.

Error during login: [Errno -3] Try again

I'm trying to run this on Synology Docker, when it attempts to run it stops with the following;

Locast2Plex v0.4.2
DEBUG MODE ACTIVE
UUID found.
UUID set to: hmwhuwux...
Logging into Locast using username [my locast username]
Error during login: [Errno -3] Try again
Exiting...

I've run this on my PC running Docker as well and no problems there, I'm just curious if I missed something.

Seems to Connect in Plex, but Can't Watch/Record

it looks like I've successfully connected Locast to Plex. I am able to connect to 20 channels and I can see what's currently playing in Plex. When I go to play a channel though, it crashes.

Plex and the Locast2Plex script are running on a Windows 10 machine via the command line. When I re-run the script and go to play a show, I get the following. Thoughts?

c:\Python27\python.exe c:\Python27\main.py -u:XXX -p:XXX --debug --addy:192.168.1.241
Locast2Plex v0.4.1
DEBUG MODE ACTIVE
UUID found.
UUID set to: yvouhhvn...
Logging into Locast using username XXXXX...
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1623001098
Getting user location...
User location obtained as #/##
Getting user's media market (DMA)...
DMA found as 506
Getting list of stations based on DMA...
Loading FCC Stations list...
Starting device server on 0.0.0.0:6077
Starting SSDP server...
192.168.1.241 - - [17/Jul/2020 15:52:56] "GET /lineup.json HTTP/1.0" 200 -
192.168.1.241 - - [17/Jul/2020 15:52:56] "GET /discover.json HTTP/1.0" 200 -
192.168.1.241 - - [17/Jul/2020 15:52:56] "GET /lineup_status.json HTTP/1.0" 200 -
Getting station info for 1571514243723...
Determining best video stream for 1571514243723...
Found 0 Playlists
No variant streams found for this station. Assuming single stream only.
192.168.1.241 - - [17/Jul/2020 15:52:57] "GET /watch/1571514243723 HTTP/1.1" 200 -

Exception happened during processing of request from ('192.168.1.241', 49626)
Traceback (most recent call last):
File "c:\Python27\lib\SocketServer.py", line 293, in _handle_request_noblock
self.process_request(request, client_address)
File "c:\Python27\lib\SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "c:\Python27\lib\SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "c:\Python27\lib\SocketServer.py", line 655, in init
self.handle()
File "c:\Python27\lib\BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "c:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
method()
File "c:\Python27\main.py", line 91, in do_GET
ffmpeg_proc = subprocess.Popen(["ffmpeg", "-i", channelUri, "-codec", "copy", "-f", "mpegts", "pipe:1"], stdout=subprocess.PIPE)
File "c:\Python27\lib\subprocess.py", line 394, in init
errread, errwrite)
File "c:\Python27\lib\subprocess.py", line 644, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

Getting station info for 1571514243723...
Determining best video stream for 1571514243723...
Found 0 Playlists
No variant streams found for this station. Assuming single stream only.
192.168.1.241 - - [17/Jul/2020 15:52:57] "GET /watch/1571514243723 HTTP/1.1" 200 -

Exception happened during processing of request from ('192.168.1.241', 49629)
Traceback (most recent call last):
File "c:\Python27\lib\SocketServer.py", line 293, in _handle_request_noblock
self.process_request(request, client_address)
File "c:\Python27\lib\SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "c:\Python27\lib\SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "c:\Python27\lib\SocketServer.py", line 655, in init
self.handle()
File "c:\Python27\lib\BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "c:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
method()
File "c:\Python27\main.py", line 91, in do_GET
ffmpeg_proc = subprocess.Popen(["ffmpeg", "-i", channelUri, "-codec", "copy", "-f", "mpegts", "pipe:1"], stdout=subprocess.PIPE)
File "c:\Python27\lib\subprocess.py", line 394, in init
errread, errwrite)
File "c:\Python27\lib\subprocess.py", line 644, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

Getting station info for 1571514243723...
Determining best video stream for 1571514243723...
Found 0 Playlists
No variant streams found for this station. Assuming single stream only.
192.168.1.241 - - [17/Jul/2020 15:52:59] "GET /watch/1571514243723 HTTP/1.1" 200 -

Exception happened during processing of request from ('192.168.1.241', 49632)
Traceback (most recent call last):
File "c:\Python27\lib\SocketServer.py", line 293, in _handle_request_noblock
self.process_request(request, client_address)
File "c:\Python27\lib\SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "c:\Python27\lib\SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "c:\Python27\lib\SocketServer.py", line 655, in init
self.handle()
File "c:\Python27\lib\BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "c:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
method()
File "c:\Python27\main.py", line 91, in do_GET
ffmpeg_proc = subprocess.Popen(["ffmpeg", "-i", channelUri, "-codec", "copy", "-f", "mpegts", "pipe:1"], stdout=subprocess.PIPE)
File "c:\Python27\lib\subprocess.py", line 394, in init
errread, errwrite)
File "c:\Python27\lib\subprocess.py", line 644, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

192.168.1.241 - - [17/Jul/2020 15:53:01] "GET /discover.json HTTP/1.0" 200 -
192.168.1.241 - - [17/Jul/2020 15:53:01] "GET /lineup_status.json HTTP/1.0" 200 -
Getting station info for 1571514243723...
Determining best video stream for 1571514243723...
Found 0 Playlists
No variant streams found for this station. Assuming single stream only.
192.168.1.241 - - [17/Jul/2020 15:53:02] "GET /watch/1571514243723 HTTP/1.1" 200 -

Exception happened during processing of request from ('192.168.1.241', 49641)
Traceback (most recent call last):
File "c:\Python27\lib\SocketServer.py", line 293, in _handle_request_noblock
self.process_request(request, client_address)
File "c:\Python27\lib\SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "c:\Python27\lib\SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "c:\Python27\lib\SocketServer.py", line 655, in init
self.handle()
File "c:\Python27\lib\BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "c:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
method()
File "c:\Python27\main.py", line 91, in do_GET
ffmpeg_proc = subprocess.Popen(["ffmpeg", "-i", channelUri, "-codec", "copy", "-f", "mpegts", "pipe:1"], stdout=subprocess.PIPE)
File "c:\Python27\lib\subprocess.py", line 394, in init
errread, errwrite)
File "c:\Python27\lib\subprocess.py", line 644, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

192.168.1.241 - - [17/Jul/2020 15:53:07] "GET /discover.json HTTP/1.0" 200 -
192.168.1.241 - - [17/Jul/2020 15:53:07] "GET /lineup_status.json HTTP/1.0" 200 -
Getting station info for 1571514243723...
Determining best video stream for 1571514243723...
Found 0 Playlists
No variant streams found for this station. Assuming single stream only.
192.168.1.241 - - [17/Jul/2020 15:53:09] "GET /watch/1571514243723 HTTP/1.1" 200 -

Exception happened during processing of request from ('192.168.1.241', 49651)
Traceback (most recent call last):
File "c:\Python27\lib\SocketServer.py", line 293, in _handle_request_noblock
self.process_request(request, client_address)
File "c:\Python27\lib\SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "c:\Python27\lib\SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "c:\Python27\lib\SocketServer.py", line 655, in init
self.handle()
File "c:\Python27\lib\BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "c:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
method()
File "c:\Python27\main.py", line 91, in do_GET
ffmpeg_proc = subprocess.Popen(["ffmpeg", "-i", channelUri, "-codec", "copy", "-f", "mpegts", "pipe:1"], stdout=subprocess.PIPE)
File "c:\Python27\lib\subprocess.py", line 394, in init
errread, errwrite)
File "c:\Python27\lib\subprocess.py", line 644, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

192.168.1.241 - - [17/Jul/2020 15:53:12] "GET /discover.json HTTP/1.0" 200 -
192.168.1.241 - - [17/Jul/2020 15:53:12] "GET /lineup_status.json HTTP/1.0" 200 -
192.168.1.241 - - [17/Jul/2020 15:53:17] "GET /discover.json HTTP/1.0" 200 -
192.168.1.241 - - [17/Jul/2020 15:53:17] "GET /lineup_status.json HTTP/1.0" 200 -
192.168.1.241 - - [17/Jul/2020 15:53:22] "GET /discover.json HTTP/1.0" 200 -
192.168.1.241 - - [17/Jul/2020 15:53:22] "GET /lineup_status.json HTTP/1.0" 200 -

ERROR:root:need more than 1 value to unpack

I think I'm doing this correctly...Should I be worried about the repeating error line?

"ERROR:root:need more than 1 value to unpack"

Subsequently, plex sees the DVR, loads the guides without issue..but streams fail to start when I hit play. Ive tried this on two different machines to try and rule out the OS/environment being an issue. I may have done something incorrectly. Looking up the error does not give me any additional insight that makes sense.

Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1593690022
Getting user location...
User location obtained as 42.2917/-71.7858
Getting user's media market (DMA)...
DMA found as 506
Getting list of stations based on DMA...
Loading FCC Stations list...
Starting device server on 0.0.0.0:6077
Starting SSDP server...
ERROR:root:need more than 1 value to unpack
ERROR:root:need more than 1 value to unpack
ERROR:root:need more than 1 value to unpack
ERROR:root:need more than 1 value to unpack
ERROR:root:need more than 1 value to unpack
ERROR:root:need more than 1 value to unpack
ERROR:root:need more than 1 value to unpack
10.0.0.101 - - [02/Jun/2020 09:45:14] "GET /device.xml HTTP/1.1" 200 -

cant decode byte at 0xec

I can build the container and browse to the XML page but unable to see it in plex on unraid. When i look the the logs i get the error ERROR:root:'ascii' codec can't decode byte 0xec in position 308: ordinal not in range(128)

PBS Channel has no audio

Hey I noticed my local PBS Channel (DFW area) does not have audio when viewing it via locast2plex. Using Locast app directly does produce sound. I have no clue how to troubleshoot so your help is appreciated.

Thanks!

Locast to Emby

Quick note to let peoples know that locaste2plex works great as a locast proxy for Emby.

Emby will not discover the locast2plex tuner but manually configure a HDHR tuner and point it to the locast2plex IPaddress:PORT and it works great.

Then just use the Emby EPG service to grab the same local OTA listings and basically all of the channels mapped to the EPG correctly for me.

Thanks for the lcoast2plex software.!

-Uisge

No streams found for this station. Skipping...

image

Locast2Plex v0.3.0
DEBUG MODE ACTIVE
UUID found.
UUID set to: nlkmknntz...
Logging into Locast using username [email protected]...
Logon token is xxxxxxx
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1595525521
Getting user location...
Getting list of stations based on DMA...
Loading FCC Stations list...
Starting device server on 0.0.0.0:6077
Starting SSDP server...


127.0.0.1 - - [26/May/2020 22:02:26] "GET /discover.json HTTP/1.0" 200 -
127.0.0.1 - - [26/May/2020 22:02:26] "GET /lineup.json HTTP/1.0" 200 -
127.0.0.1 - - [26/May/2020 22:02:26] "GET /lineup_status.json HTTP/1.0" 200 -
Getting station info for 1572389490915...
Determining best video stream for 1572389490915...
Found 0 Playlists
No streams found for this station.  Skipping...
127.0.0.1 - - [26/May/2020 22:02:26] "GET /watch/1572389490915 HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 41614)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "main.py", line 91, in do_GET
    ffmpeg_proc = subprocess.Popen(["ffmpeg", "-i", channelUri, "-codec", "copy", "-f", "mpegts", "pipe:1"], stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
TypeError: execv() arg 2 must contain only strings
----------------------------------------
Getting station info for 1572389490915...
Determining best video stream for 1572389490915...
Found 0 Playlists
No streams found for this station.  Skipping...
127.0.0.1 - - [26/May/2020 22:02:27] "GET /watch/1572389490915 HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 41620)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "main.py", line 91, in do_GET
    ffmpeg_proc = subprocess.Popen(["ffmpeg", "-i", channelUri, "-codec", "copy", "-f", "mpegts", "pipe:1"], stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
TypeError: execv() arg 2 must contain only strings
----------------------------------------
Getting station info for 1572389490915...
Determining best video stream for 1572389490915...
Found 0 Playlists
No streams found for this station.  Skipping...
127.0.0.1 - - [26/May/2020 22:02:28] "GET /watch/1572389490915 HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 41626)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 318, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
    self.handle()

Keeps repeating this error.

I was Just Testing The Project And Got This Error

Sorry for the incompetents of reading what this means better. Same On Docker too.

Validating User Info...
User Info obtained.
User didDonate: False
Traceback (most recent call last):
File "main.py", line 320, in
if (not locast.login(CONFIG_LOCAST_USERNAME, CONFIG_LOCAST_PASSWORD)) or (not locast.validate_user()):
File "/home/root2254/Locast2Plex/LocastService.py", line 85, in validate_user
print("User donationExpire: " + str(userRes['donationExpire'] / 1000))
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

Service Runs, Plex can't start a stream

This is running on a file server with nothing else running. Plex was able to see everything and it was setup without issue, but it can't start a stream.

Output:

192.168.1.149 - - [19/Aug/2020 14:55:17] "GET /discover.json HTTP/1.0" 200 -
192.168.1.149 - - [19/Aug/2020 14:55:17] "GET /lineup_status.json HTTP/1.0" 200 -
Getting station info for 752...
Determining best video stream for 752...
Found 4 Playlists
752 will use 1280x720 resolution at 2700000bps
192.168.1.149 - - [19/Aug/2020 14:55:19] "GET /watch/752 HTTP/1.1" 200 -

Exception happened during processing of request from ('192.168.1.149', 64888)
Traceback (most recent call last):
File "C:\Python27\lib\SocketServer.py", line 293, in _handle_request_noblock
self.process_request(request, client_address)
File "C:\Python27\lib\SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Python27\lib\SocketServer.py", line 655, in init
self.handle()
File "C:\Python27\lib\BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "C:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
method()
File "C:\Locast2Plex\main.py", line 95, in do_GET
ffmpeg_proc = subprocess.Popen(["ffmpeg", "-i", channelUri, "-codec", "copy", "-f", "mpegts", "pipe:1"], stdout=subprocess.PIPE)
File "C:\Python27\lib\subprocess.py", line 394, in init
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 644, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

Cannot Start Streams

I have the service up and running and I was able to add everything to the Plex server, but when I try to start a stream I get an error in Plex: "Could not tune channel. Please check your tuner or antenna." The logs on the service show the following:

XX.XX.XXX.XXX- - [19/Aug/2020 10:53:13] "GET /discover.json HTTP/1.0" 200 -
XX.XX.XXX.XXX - - [19/Aug/2020 10:53:13] "GET /lineup_status.json HTTP/1.0" 200 -
XX.XX.XXX.XXX - - [19/Aug/2020 10:53:20] "GET /lineup.json HTTP/1.0" 200 -
XX.XX.XXX.XXX - - [19/Aug/2020 10:53:20] "GET /discover.json HTTP/1.0" 200 -
XX.XX.XXX.XXX - - [19/Aug/2020 10:53:20] "GET /lineup_status.json HTTP/1.0" 200 -

Systemd Service?

Anyone have this running as service on ubuntu? Here's what I came up with so far. I used an environment file because I couldn't figure out a way to pass the arguments in the ExecStart value.

service file

[Unit]
Description=Locast2Plex Service
After=network-online.target

[Service]
EnvironmentFile=/etc/.locast2plex
WorkingDirectory=/opt/locast2plex
ExecStart=/usr/bin/python /opt/locast2plex/main.py $ARG1 $ARG2 $ARG3
GuessMainPID=no
Type=Simple
User=plex
Group=plex
Restart=always
RestartSec=5
StartLimitInterval=90
StartLimitBurst=3

[Install]
WantedBy=multi-user.target

environment file

ARG1=-u:username
ARG2=-p:password
ARG3=--addy:127.0.0.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.