Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add virtual locast2plex hdhomerun to plex #25

Closed
begunfx opened this issue Aug 17, 2020 · 18 comments
Closed

Cannot add virtual locast2plex hdhomerun to plex #25

begunfx opened this issue Aug 17, 2020 · 18 comments

Comments

@begunfx
Copy link

begunfx commented Aug 17, 2020

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

@bitrotsucks
Copy link

I am having a similar issue on Ubuntu 18. When I run python, it gets all the way to "Starting SSDP server..." However, every time I click "Connect" in Plex, the following lines appear:
192.168.X.XXX - - [17/Aug/2020 14:52:56] "GET /discover.json HTTP/1.0" 200 -
192.168.X.XXX - - [17/Aug/2020 14:52:56] "GET /lineup_status.json HTTP/1.0" 200 -

It will not let me past the Connect page.
I am also showing 0.0.0.0:6077

@tgorgdotcom
Copy link
Owner

Hello all. At the moment, locast2plex always listens on all IP interfaces (0.0.0.0), so that's working as intended. The host address option is mainly used to report to Plex what IP it should be using to access the locast2plex service, especially when SSDP discovery is working.

@bitrotsucks , are you getting an error message after you are clicking on the connect button?
@begunfx , what are the steps you are taking to add the tuner to Plex?

@begunfx
Copy link
Author

begunfx commented Aug 18, 2020

Hi @tgorgdotcom thanks for the response. I selected Live TV & DVR>Settings then selected + Add Device.
My device doesn't automatically show up so I enter the address manually which I enter in the following format: 192.168.1.x:6077

When I select connect I get an error: "There was a problem adding the device: 192.168.1.x:6077"

I followed your instructions here as well as the following post:
https://diyfuturism.com/index.php/2020/08/16/plex-locast-recording-local-tv-without-the-antenna/

@tgorgdotcom
Copy link
Owner

tgorgdotcom commented Aug 18, 2020

Hmmm... In docker, try setting the setting the external_addy in the container variable to 127.0.0.1. Then, in Plex, use the address 127.0.0.1:6077.

@begunfx
Copy link
Author

begunfx commented Aug 18, 2020

Hi, @tgorgdotcom thanks for the suggestion. I tried setting the loopback address in Docker and in Plex as you suggested, but unfortunately, it didn't help. Any other ideas?

Additional note: Not sure if this is relevant, but my server has multiple ethernet connections and I have them set to be teamed together. In other words, I have four outputs that are merged into two per IP address. I tried both IP addresses as well..

Thanks.

@apache6131
Copy link

I'm having a similar issue but with QNAP, though I'm wondering if my problem is that I'm trying to run locast2plex on my QNAP and my plex server from my desktop.

My QNAP docker settings are set as follows, with the external addy being that of my QNAP server. I have tried both that as well as the loopback without success.

Item Value
Name locast2plex
Entrypoint python /app/main.py 2>&1
Auto start Enable
CPU Limit 100 %
Memory Limit 3847 MB
Environment debug=true
  external_addy=192.168.86.54
  external_port=6077
  LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib64
  password=*********
  PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  username=******@gmail.com
Container Hostname locast2plex
Network Mode NAT

Here's the terminal output:

Locast2Plex v0.4.2
DEBUG MODE ACTIVE
UUID found.
UUID set to: hmwhuwux...
Logging into Locast using username xxxxxx@gmail.com...
Validating User Info...
User Info obtained.
User didDonate: True
User donationExpire: 1601640622
Getting user location...
User location obtained as xyz
Getting user's media market (DMA)...
DMA found as xyz
Getting list of stations based on DMA...
Loading FCC Stations list...
Starting device server on 0.0.0.0:6077
Starting SSDP server...

@msarro
Copy link

msarro commented Aug 18, 2020

I am encountering the same issue on a Synology NAS, using docker.

My log looks essentially identical:

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: 1603042385
Getting user location...
User location obtained as *****/*****
Getting user's media market (DMA)...
DMA found as 504
Getting list of stations based on DMA...
Loading FCC Stations list...
Starting device server on 0.0.0.0:6077
Starting SSDP server...

I have tried using loopback or the IP of my media server (the same device running docker) as the external address. I have also tried with/without remapping port 6077.

I am leaving 1900 unset in my docker config because the port is in use by the synology NAS as shown in the workarounds. When I first set it up I had it populated but the container wouldn't launch due to the port conflict.

The very first time I launched the container, I was able to at least briefly see it under Plex by navigating to settings -> live tv and DVR -> add -> "Enter network address manually" and entering 192.168.1.100:36077. However after about 2 seconds, it disappeared. Despite disappearing, if I click connect and then continue, it will pull a channel list, and allow you to finish setup.

BUT if you attempt to rescan channels or actually watch something, you get an error that the device is no longer available on the network.

If I just continue on adding locast2plex into plex, I get the following under Live TV and DVR:

Screen Shot 2020-08-18 at 3 26 08 PM

I have verified using telnet that the container seems to be open and accepting traffic on that port (I have 6077 remapped to 36077 in this test, the same happens if I have it set to 6077):

msarro:~/ $ telnet 192.168.1.100 36077 
Trying 192.168.1.100...
Connected to 192.168.1.100.
Escape character is '^]'.

After restarting the container several times, I cannot get it to show back up inside of plex despite the port being open and connectable.

Also, I noticed that despite the var for DEBUG being set to false, the log output shows DEBUG MODE ACTIVE.

@begunfx
Copy link
Author

begunfx commented Aug 22, 2020

@tgorgdotcom just wondering if you had any updates or progress on this issue, or do you need more information?

Thanks!

@tgorgdotcom
Copy link
Owner

Hello all. A couple of things came to mind:

@begunfx - Are both plex and locast2plex on separate docker containers? If so you would need to set up a docker network to connect the two of them.

@apache6131 - The only thing I see is it doesn't look like the port is open in the docker configuration, not sure if you would see that in the data you posted...

@msarro - Is plex running on a docker container as well? I wonder if the web application would be able to "see" the locast2plex instance, but the server could not.

@begunfx
Copy link
Author

begunfx commented Aug 25, 2020

Hi @tgorgdotcom plex is not running in a docker container. It's running as a Synology package on my Synology Rackstation. locast2plex is the only thing that is in a container. Hope that helps.

@begunfx
Copy link
Author

begunfx commented Aug 25, 2020 via email

@tgorgdotcom
Copy link
Owner

Note for everyone: I've noticed some confusion for some with the log output and whether locast2plex was running or not. For users of 0.4.x and below, once locast2plex shows the Starting SSDP server... message, it has finished starting up and is ready. I fixed that in 0.5.2. Not sure if that solves some of the other problems though...

Also looks like there was a post that replied to @begunfx via email that is not showing here.

@begunfx You shouldn't have to run a VPN to get it working. Would you be able to list out your container info (blocking out the username/password, of course)?

@begunfx
Copy link
Author

begunfx commented Sep 3, 2020

@tgorgdotcom Here's my container settings (password and login redacted). I don't have any ports set in the container (tried with and without adding ports).
Screen Shot 2020-09-03 at 9 48 43 AM

@tgorgdotcom
Copy link
Owner

Thanks for your reply. Would we be able to see your port settings?

@begunfx
Copy link
Author

begunfx commented Sep 5, 2020

@tgorgdotcom here's my port settings page. I had tried it with these settings and with nothing at all set.
Screen Shot 2020-09-05 at 7 57 27 AM

@begunfx
Copy link
Author

begunfx commented Sep 11, 2020

@tgorgdotcom any updates?

@jgsawyers
Copy link
Contributor

Few suggestions...

  • To make sure we're troubleshooting on the same page, make sure you pull the latest version of the image from docker.
  • With the 5.x updates to the image, you'll need to create a config.ini and pass it into the container as a volume. (See the notes on the README and the config_example.ini in the repo for a sample)
  • When creating your config.ini, set the plex_accessible_ip to the IP address of your NAS. I'd suggest leaving the plex_accessible_port at the default 6077 unless it conflicts with another service.
  • Those port settings above aren't actually exposing the Container Ports listed. With the auto setting on Synology, they're mapped to a random port (32768 and up iirc) on the host.
  • Remove the port config for 1900 entirely. It conflicts with the uPnP service running on the Synology itself, unless you manually disable it. This will break SSDP, but it's a little wonky as is anyway.
  • Expose 6077 by setting both the Local Port and Container Port to 6077, TCP.
  • When adding the tuner to Plex, add it via the IP address of your NAS. (ip.of.nas:6077). It'll probably show up briefly, then disappear. Plex attempts to 'healthcheck' it via SSDP pings and various other probes. The Continue button should remain lit up and allow you to continue adding it.

@begunfx
Copy link
Author

begunfx commented Sep 12, 2020

@Fozziebear you rock! I finally got it working! Man what a pain. Okay for anyone else interested in installing this on a Synology server, here's what I did to get it working.

  1. Install the Docker app

  2. Go to the registry, search for locast2plex and select download

  3. Select "latest" as the version. (I tried selecting the 0.5.2 version at one point but the container would keep stopping when I tried to start it).

  4. Download the config.ini from this repository, and put my locast password, email and the IP address of my Server running the Docker container (mine is the same as my Plex Server).

  5. I created a folder in my Synology home directory and placed the .ini file in there: home/myLogin/locast2plex/config.ini

  6. Setting up the Docker container, I did the following:
    - Put my locast email/password, Locast IP address in the Env variables.
    - I kept the default 6077 port
    - In the Port Settings, I put 6077 as the Local and Container Port (TCP)
    - In the Volume settings, I selected "Add a file" and searched for and selected the config.ini file I created and saved in my home directory in a previous step. For mount path I put: /config.ini

  7. Started my Docker Container. I waited like 10 minutes after starting the container before trying to search for it in Plex (not sure the wait time is necessary but waiting that long..it worked).

  8. Followed the recommended steps to try to add the locast2plex tuner to my Live TV & DVR List. You do have to add it manually: in serverIP:6077 format. The tuner finally appeared and I added it.

Crossing fingers that it continues to work.

@begunfx begunfx closed this as completed Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants