Jump to content
littlebudha

[REQUEST] locast2plex Docker

43 posts in this topic Last Reply

Recommended Posts

Can someone create a Template for tgorg's locast2plex docker?

Also, if its possible to add built in open VPN support inside it so we can change the location of the ipAddress.  

 

I really would appreciate this!  trying to set it up through dockerhub, but I think lots of people will find this container VERY useful!

Share this post


Link to post

I tried to get locast2plex to work on my server with no luck. I too would appreciate a simple way to set it up or a youtube video with step by step instructions.

Share this post


Link to post
Posted (edited)
On 8/17/2020 at 6:35 AM, littlebudha said:

Can someone create a Template for tgorg's locast2plex docker?

Also, if its possible to add built in open VPN support inside it so we can change the location of the ipAddress.  

 

I really would appreciate this!  trying to set it up through dockerhub, but I think lots of people will find this container VERY useful!

I would say no on the OpenVPN support built-in as that's opening a whole extra can of worms that can be easily accomplished using a router such as pfSense. You can assign a docker an individual IP address, and in <insert preferred OSS routing platform>, initiate the VPN connection, and then set up rules to route all of it's traffic requests out that VPN gateway instead, getting the same effect, without the added complexities to the docker.

I have found a way to get Locast2Plex working under unRAID's docker successfully!

You'll need Community Apps plugin, and in it's settings, enable searching dockerHub for additional content.

Go to Community Apps, search for "locast2plex", it'll return no results, but there'll be a link to Search dockerHub, click it. We'll be installing tgorg's version here (should be first one to come up). You'll need to define the docker template by hand here following this guide;
Set Network Type to Custom: br0 (we need to assign this Docker it's own IP, the cross-docker port access does not work correctly), set an unused local IP address in your network, remember this IP address, we need it later. I also set my copy of this image to Privileged, though I'm not sure it's fully required in this instance.

 

These steps below no longer appear to be valid, please read 2nd page of this thread for more information!

Add Variable, Name "Locast Username", Key: "username", Value: (Your Locast.org login email)
Add Variable, Name "Locast Password", Key: "password", Value: (Your Locast.org login password)
Add Port, Name "Discovery Port", Host Port: 6077, Connection Type: TCP, Description: "TCP HomeRun Discovery Port"
Add Port, Name "Service Port", Host Port: 1900, Connection Type: UDP, Description: "MPEG Transport Service Port"

Add Variable, Name "External Address", Key: "external_addy", Value: (The custom IP address you assigned earlier)

Add Variable, Name "External Port", Key: "external_port", Value: 6077

Add Variable, Name "Enable Debug", Key: "debug", Value: "yes"

After building the container and firing up, you should be able to hit the IP on port 6077 in a browser (http://192.168.X.X:6077/) and get a quick XML file defining an emulated HDHomeRun device. This means we should be able to do a search in Plex to find it successfully, though you may need to use the IP and port to define the tuner manually if the automatic search does not discover it. Otherwise, everything's working as expected, coming through quick and easy, my guide is already filled and ready to go (about 60 channels in my area).

Good luck everyone!

Edited by Cynagen
  • Like 2
  • Thanks 3

Share this post


Link to post

I was able to build the container and get the XML page, but plex cant see it. When i look at the logs i see the error " ERROR:root:'ascii' codec can't decode byte 0xec in position 308: ordinal not in range(128) " any ideas/suggestions?

Share this post


Link to post
Posted (edited)
1 hour ago, camf1217 said:

I was able to build the container and get the XML page, but plex cant see it. When i look at the logs i see the error " ERROR:root:'ascii' codec can't decode byte 0xec in position 308: ordinal not in range(128) " any ideas/suggestions?

I don't have any suggestions, sorry. If you're saying the Auto-discovery can't find it, that happens. Use the option to provide the address manually. Same address you visited in the browser to verify the XML page showing.

Edited by Cynagen
Additional possible helpful information, not enough context?

Share this post


Link to post

I am new to unraid but I just saw this post so I thought I would give it a shot to see if I could get it to work. I am happy to report I did get it to work. I was having issues making my docker containers connect to each other (ping). I ended up setting the locast2plex docker container network type to "Host" and I got it to work. However if I end up having issues with that the thread below seems to have a solution to why my plex and locast2plex containers cannot connect to each other. 

 

 

Share this post


Link to post

You didn't read the whole post.

 

Go to docker settings, hit advanced and there's an option to allow dockers to host networks, they will be able to ping each other. 

Share this post


Link to post
Posted (edited)

I have followed the instructions outlined above however the docker wont start, do you need to donate to locast for this to work? log output below

 

UPDATE - I have since found out a free account on Locast won’t work with locast2plex

 

Locast2Plex v0.4.2
Traceback (most recent call last):
File "/app/main.py", line 320, in <module>
DEBUG MODE ACTIVE
UUID found.
UUID set to: hmwhuwux...
Logging into Locast using username abc@123.com...
Validating User Info...
User Info obtained.
User didDonate: False
if (not locast.login(CONFIG_LOCAST_USERNAME, CONFIG_LOCAST_PASSWORD)) or (not locast.validate_user()):
File "/app/LocastService.py", line 85, in validate_user
print("User donationExpire: " + str(userRes['donationExpire'] / 1000))
TypeError: unsupported operand type(s) for /: 'NoneType' and 'int'

Edited by snappertom

Share this post


Link to post

Not getting as far as @snappertom. But just wanted to test this before setting up a donation.

 


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

 

I have special characters in my password, so I tried breaks and with quotes, but still no luck.

 

Also, I can't seem to find the appdata folder. Is this stored somewhere else?

Share this post


Link to post
Posted (edited)

You must subscribe to Locast before you can set up this docker unfortunately. (Err logging in)

Additionally, there is no appdata folder that I'm aware of, all the required variables are set through docker template environment variables as outlined.

Edited by Cynagen

Share this post


Link to post

Finally got this working!

Had some personal issues I had to deal with, such as I forgot I only allow certain ip's through my FW (DOH!)

after doing some tcpdumps and some reading...I didn't know that the unraid server couldn't talk to the VM's directly...

Thanks for the setup!

Share this post


Link to post
On 8/18/2020 at 5:15 PM, Cynagen said:

I would say no on the OpenVPN support built-in as that's opening a whole extra can of worms that can be easily accomplished using a router such as pfSense. You can assign a docker an individual IP address, and in <insert preferred OSS routing platform>, initiate the VPN connection, and then set up rules to route all of it's traffic requests out that VPN gateway instead, getting the same effect, without the added complexities to the docker.

I have found a way to get Locast2Plex working under unRAID's docker successfully!

You'll need Community Apps plugin, and in it's settings, enable searching dockerHub for additional content.

Go to Community Apps, search for "locast2plex", it'll return no results, but there'll be a link to Search dockerHub, click it. We'll be installing tgorg's version here (should be first one to come up). You'll need to define the docker template by hand here following this guide;
Set Network Type to Custom: br0 (we need to assign this Docker it's own IP, the cross-docker port access does not work correctly), set an unused local IP address in your network, remember this IP address, we need it later. I also set my copy of this image to Privileged, though I'm not sure it's fully required in this instance.

Add Variable, Name "Locast Username", Key: "username", Value: (Your Locast.org login email)
Add Variable, Name "Locast Password", Key: "password", Value: (Your Locast.org login password)
Add Port, Name "Discovery Port", Host Port: 6077, Connection Type: TCP, Description: "TCP HomeRun Discovery Port"
Add Port, Name "Service Port", Host Port: 1900, Connection Type: UDP, Description: "MPEG Transport Service Port"

Add Variable, Name "External Address", Key: "external_addy", Value: (The custom IP address you assigned earlier)

Add Variable, Name "External Port", Key: "external_port", Value: 6077

Add Variable, Name "Enable Debug", Key: "debug", Value: "yes"

After building the container and firing up, you should be able to hit the IP on port 6077 in a browser (http://192.168.X.X:6077/) and get a quick XML file defining an emulated HDHomeRun device. This means we should be able to do a search in Plex to find it successfully, though you may need to use the IP and port to define the tuner manually if the automatic search does not discover it. Otherwise, everything's working as expected, coming through quick and easy, my guide is already filled and ready to go (about 60 channels in my area).

Good luck everyone!

 

 

Thank you very much for this!  I got my Locast2Plex to work with these instructions!

Share this post


Link to post

So those of you who live in an area where locast is not available you can follow these instructions to route your locast traffic through a Docker container with VPN built in already:

 

- I used the excellent instructions by @Cynagen to get my locast2Plex setup

- I then used the instructions provided by @SpaceInvaderOne to route traffic through a container already having VPN built in.  i used the binhex-delugevpn, but you can use any container you want.  Instructions for this are available as a video on https://www.youtube.com/watch?v=5AEzm5y2EvM and https://www.youtube.com/watch?v=znSu_FuKFW0&t=457s

- once the VPN container is created and working, make sure the traffic is going through the VPN, Make sure the VPN server is located in the market that locast is available.  I used PIA and Atlanta as the server.   then add following ports to this container: 

  1. Name: locast2plex , Host Port: 6077, connection type : TCP
  2. Name: Locast2Plex service Port: Host Port: 1900, connection type: TCP

- Start this VPN container

- then follow the instructions provide above by @Cynagen with the following modifications:

  1. in the locast2plex container, make sure and choose Advanced configuration
  2. under extra parameters add:  --net=container:binhex-delugevpn  ( or any name of the VPN container you chose)
  3. Network must be NONE
  4. External Address is the address of the VPN containers IP address ( In mycase its the delugeVPN container address)
  5. I had to keep Priviladged OFF, but not sure if required
  6. rest of the settings are same @Cynagen
  7. start the container and under the log it should start up normally if everything is correct.  You do need to donate to locast to make this work
  8. in plex Live TV and DVR you would add the IP address of your VPN container with port 6077
  9. choose the zipcode of the market you chose for me it was atlanta, and the EPG has an option for Locast OTA data.

 

ENJOY!

Share this post


Link to post

 

@littlebudha, good Idea about sending it through a VPN. Didn't think about that.

Share this post


Link to post
Posted (edited)
13 hours ago, littlebudha said:

So those of you who live in an area where locast is not available you can follow these instructions to route your locast traffic through a Docker container with VPN built in already:

 

- I used the excellent instructions by @Cynagen to get my locast2Plex setup

- I then used the instructions provided by @SpaceInvaderOne to route traffic through a container already having VPN built in.  i used the binhex-delugevpn, but you can use any container you want.  Instructions for this are available as a video on https://www.youtube.com/watch?v=5AEzm5y2EvM and https://www.youtube.com/watch?v=znSu_FuKFW0&t=457s

- once the VPN container is created and working, make sure the traffic is going through the VPN, Make sure the VPN server is located in the market that locast is available.  I used PIA and Atlanta as the server.   then add following ports to this container: 

  1. Name: locast2plex , Host Port: 6077, connection type : TCP
  2. Name: Locast2Plex service Port: Host Port: 1900, connection type: TCP

- Start this VPN container

- then follow the instructions provide above by @Cynagen with the following modifications:

  1. in the locast2plex container, make sure and choose Advanced configuration
  2. under extra parameters add:  --net=container:binhex-delugevpn  ( or any name of the VPN container you chose)
  3. Network must be NONE
  4. External Address is the address of the VPN containers IP address ( In mycase its the delugeVPN container address)
  5. I had to keep Priviladged OFF, but not sure if required
  6. rest of the settings are same @Cynagen
  7. start the container and under the log it should start up normally if everything is correct.  You do need to donate to locast to make this work
  8. in plex Live TV and DVR you would add the IP address of your VPN container with port 6077
  9. choose the zipcode of the market you chose for me it was atlanta, and the EPG has an option for Locast OTA data.

 

ENJOY!

ive tried this over and over and keep getting an error in the locast2plex container when i add these options. it throws a "Container cannot be connected to network endpoints: container:sabnzbdvpn, none." and deletes the container. ive tried deluge vpn as well with the same issue. any idea what could be the issue?

Edited by strid3r21
additional info

Share this post


Link to post
9 hours ago, strid3r21 said:

ive tried this over and over and keep getting an error in the locast2plex container when i add these options. it throws a "Container cannot be connected to network endpoints: container:sabnzbdvpn, none." and deletes the container. ive tried deluge vpn as well with the same issue. any idea what could be the issue?

Did you follow the instructions from Spaceinvaders youtube video to make sure you have the initial setup working (

 

 

 

 

 

 

 

)  once you get this working, follow above instructions.

 

 

Share this post


Link to post
5 hours ago, littlebudha said:

Did you follow the instructions from Spaceinvaders youtube video to make sure you have the initial setup working (

 

 

 

 

 

 

 

)  once you get this working, follow above instructions.

 

 

welp, im a moron. i was on unraid 6.8.2 and not 6.8.3. i thought i had updated to 6.8.3 already, but obviously i did not.

 

so i got it working sort of. locast2plex runs through the vpn container now, but i dont get an XML file when i connect to the 192.168.X.X:6077 

 

this is the log file that locast2plex spits out. its showing running a server on 0.0.0.0:6077? shouldnt that say 192.168.0.X:6077?

 

Quote

.............
Getting user's media market (DMA)...
DMA found as 602
Getting list of stations based on DMA...
Loading FCC Stations list...
Starting device server on 0.0.0.0:6077
Starting SSDP server...

 

Share this post


Link to post
15 minutes ago, strid3r21 said:

welp, im a moron. i was on unraid 6.8.2 and not 6.8.3. i thought i had updated to 6.8.3 already, but obviously i did not.

 

so i got it working sort of. locast2plex runs through the vpn container now, but i dont get an XML file when i connect to the 192.168.X.X:6077 

 

this is the log file that locast2plex spits out. its showing running a server on 0.0.0.0:6077? shouldnt that say 192.168.0.X:6077?

 

 

moron again. i forgot to set the network in my VPN container to Bro. once i switched that. gave it a unique ip address different from my unraid box. and then put that ip in the external ip address field in the locast2plex field. it works as intended! thanks for putting these guides together, even tho i have a difficult time following them apparently lol.

Share this post


Link to post

If you run this locast2plex docker through Ad Guard-Home docker it will prevent the docker from starting. Some part of DNS resolution in the geolocation process is being blocked via the Ad Guard-Home docker. I had to go into Ad Guard and stop it temporarily until the docker has finished booting then works fine. I have not figured out the domain it is reaching out to yet.

 

 

Locast2Plex v0.4.2
DEBUG MODE ACTIVE
UUID found.
UUID set to: hmwhuwux...
Logging into Locast using username
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1600482103
Getting user location...
Error during geo IP acquisition: [Errno -2] Name does not resolve
Exiting...

Share this post


Link to post

Following up on this. How do you get to the appdata folder for this docker? I was under the impression docker containers automatically created folders within the appdata folder.

 

 I want to be able to add 4 tuners to this container. I know I could just create a second container, but I'd like to keep configurations in parity.

Share this post


Link to post

I followed the instructions and the xml file is fine and the guide comes up... however, i cannot get any channels to play.  they just error when trying to start... this is from the logs:

 

Aug 20, 2020 10:15:22.193 [0x146a9f7fb700] DEBUG - Activity: updated activity 9102a5fe-0717-43ea-8299-bc98d4ceeb8c - completed 8.0% - Recording Aug 20, 2020 10:15:22.193 [0x146a9f7fb700] DEBUG - Activity: updated activity 10d9ddb5-d843-4536-b87e-b463c9e790da - completed 8.0% - Refreshing Sub Aug 20, 2020 10:15:23.173 [0x146a9edf6700] DEBUG - TranscodeSession: timed out waiting to find duration for live session Aug 20, 2020 10:15:23.173 [0x146a9edf6700] ERROR - Failed to start session. Aug 20, 2020 10:15:23.173 [0x146a9edf6700] DEBUG - Streaming Resource: Terminated session 0x146ae8017cd0:448b204b-89a9-4e7b-be07-a062a0cc606a with reason Recording failed. Please check your tuner or antenna.

 

anyone else having an issue getting the channels to actually play through plex?

Share this post


Link to post

Hi guys got this connected and logged in but when i try to play something i get this....

 


192.168.254.80 - - [27/Aug/2020 02:32:58] "GET /lineup_status.json HTTP/1.0" 200 -
192.168.254.80 - - [27/Aug/2020 02:33:01] "GET /lineup.json HTTP/1.0" 200 -
192.168.254.80 - - [27/Aug/2020 02:33:01] "GET /discover.json HTTP/1.0" 200 -
192.168.254.80 - - [27/Aug/2020 02:33:01] "GET /lineup_status.json HTTP/1.0" 200 -
192.168.254.80 - - [27/Aug/2020 02:33:03] "GET /lineup.json HTTP/1.0" 200 -
192.168.254.80 - - [27/Aug/2020 02:33:03] "GET /discover.json HTTP/1.0" 200 -
192.168.254.80 - - [27/Aug/2020 02:33:03] "GET /lineup_status.json HTTP/1.0" 200 -
192.168.254.80 - - [27/Aug/2020 02:33:07] "GET /lineup.json HTTP/1.0" 200 -
192.168.254.80 - - [27/Aug/2020 02:33:07] "GET /discover.json HTTP/1.0" 200 -
192.168.254.80 - - [27/Aug/2020 02:33:07] "GET /lineup_status.json HTTP/1.0" 200 -

Share this post


Link to post

I followed Cynagen's instructions and have a paid Locast subscription, but for some reason, the Docker won't start, here are the logs:

 


Locast2Plex v0.5.0
Tuner count set to 3
No UUID found. Generating one now...
Traceback (most recent call last):
File "/app/main.py", line 331, in <module>
config_handler.set('main', 'uuid', DEVICE_UUID)
File "/usr/lib/python2.7/ConfigParser.py", line 396, in set
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'main'
Locast2Plex v0.5.0
Tuner count set to 3
No UUID found. Generating one now...
Traceback (most recent call last):
File "/app/main.py", line 331, in <module>
config_handler.set('main', 'uuid', DEVICE_UUID)
File "/usr/lib/python2.7/ConfigParser.py", line 396, in set
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'main'

 

Any clue?

Share this post


Link to post

The container just updated to v5.0.

 

You will need to create a config.ini file ( an example template is on the creators github) and you will need to map /app/config.ini to your created config.ini file to get it to work now.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.