tgorgdotcom / locast2plex

A very simple script to connect locast to Plex's live tv/dvr feature.
MIT License
232 stars 43 forks source link

ARM64/Raspberry Pi support #79

Open tgorgdotcom opened 3 years ago

tgorgdotcom commented 3 years ago

See issue #58 . I think I can switch to a base image that has ARM support and work from there.

sacoward commented 3 years ago

Any update on this? I get an error message when trying to install on my raspberry pi 4.

sacoward commented 3 years ago

Sorry commented too quickly. I was able to install without docker without a problem

stormarcher3 commented 3 years ago

Hi

First, great work on this. I have been able to deploy it on my Synology NAS.

My Synology is an older unit, but has been working ok with this and plex installed. Rather than buy an upgraded unit, I would like to run this on a PI OMV/Docker environment.

I have a somewhat similar issue. I have an PI 4b running OMV. The platform is not the correct type and I get the exec format error like in issue #58 . Here is my version and error for review.

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested standard_init_linux.go:219: exec user process caused: exec format error

Thanks!

thebigeb commented 3 years ago

I was determined to get this GREAT project working on my my docker swarm with my cluster of of raspberry pi's I figured out from scratch how to build a multi-arch docker image for arm processors from this github. I have this working on a raspberry pi 4b swarm cluster, should work on 3's too. Next step is to add pi zero compatibility. 1 manager, 2 workers, I can reboot the active worker and after alittle buffering in Plex the the Locast stream resumes. https://hub.docker.com/r/eblabs/locast2plex Screenshot from 2021-03-17 23-23-58

stormarcher3 commented 3 years ago

@thebigeb - Thank you! I'm intrigued. I done the the docker pull. Do you have a little more documentation on how to configure it (locast user/pass and IP address)?

thebigeb commented 3 years ago

@stormarcher3 This is my yml file to create the cluster. I'm auto mounting a share on the worker nodes to get to the config.ini file. If you're just running on a standalone pi the file sharing won't necessary. My IP is set to the manager node or if standalone it would be the IP of your Pi.

config.ini file [main] locast_username= locast_password= plex_accessible_ip=

version: "3"

services: locast2plex: container_name: locast2plex image: eblabs/locast2plex:latest ports:

stormarcher3 commented 3 years ago

@thebigeb - Thank you for the quick reply. My intention would be to run stand-alone on my Pi4b. A little background, I'm an IT professional just getting started with docker and kubernetes. Can I request just a little more info?

I'm running raspberry pi lite image and open media vault. I've installed docker and portainer.

I've run the ddocker pull eblabs/locast2plex command. After this command, I can see your image available. I've created an /app and /app/config directories and copied my config.ini file into those directories.

Being new to docker, I'm struggling trying to deploy the application and map it to my configuration files. Would help me out with my next step?

I did try running as root: docker run -v /app/config.ini -p 6077:6077 -p 1900:1900/udp eblabs/locast2plex

I get the following error: Python runtime state: core initialized PermissionError: [Errno 1] Operation not permitted

Current thread 0xb6ffe390 (most recent call first):

The permissions issue is likely the problem. My /app folders all have 777 on them. Is there another permission level or file I need to modify? Thank you
thebigeb commented 3 years ago

@stormarcher3 from what I see I believe your volume command is in error. Sounds like you have created a /app on your Pi so your it should look like this "-v /app/config.ini:/app/config.ini". "-v :". Generally you don't have to specify the filename but mine didn't work until I did, luckily only that 1 file is needed. Also did you run "sudo usermod -aG docker $USER" after you installed Docker? that should let you run docker commands without the need for root.

stormarcher3 commented 3 years ago

@thebigeb - I really appreciate all the help. I've made progress. but still having an issue getting the container to completely start. Let me share a bit of my setup with you. First, I'm setting up my PI with following this blog: https://dbtechreviews.com/2019/12/how-to-install-openmediavault-on-raspberry-pi-4/. I install docker and portainer via OMV. I've done all the updates to both debian and OMV.

I traced the error and found this https://github.com/linuxserver/docker-calibre-web/issues/119. patching to libseccomp2_2.5.1-1 allows the container to run... almost. The system start and gets to a point and halts. If I press cntrl-c, it breaks but completes and says online but the container dies. I reloaded the PI today to see if there was something broken. The container got a little further but still has the same issue. Here is what I got so far. You'll see the ^c (after 3 hours) and the final dump. Any thoughts?

docker run -v /app/config.ini:/app/config.ini -p 6077:6077 -p 1900:1900/udp eblabs/locast2plex Opening and Verifying Configuration File. /app/config/config.ini /app/config.ini Loading Configuration File: /app/config.ini Tuner count set to 3 Server is set to run on 192.168.1.27:6077 UUID set to: kuhhlzip... Getting user location... Getting location via IP Address. Got external IP 71.80.136.79. Got location as Los Angeles - DMA 803 - Lat\Lon 34.163918-117.59234 Logging into Locast using username storm.archer@gmail.com... Validating User Info... User Info obtained. User didDonate: True User donationExpire: 2022-02-26 17:18:39 Starting First time Stations refresh... Checking FCC facilities database for updates. Online facilities database is newer. Downloading the latest FCC facilities database... Unzipping FCC facilities database... Reading and formatting FCC database... Found 6314 stations. Getting list of stations based on DMA... Found 53 stations for DMA 803 Starting Stations thread... Starting device server on 192.168.1.27:6077 Now listening for requests. Starting SSDP server... Starting First time EPG refresh... Fetching: https://api.locastnet.org/api/watch/epg/803?startTime=2021-03-22T00:00:00 Fetching: https://api.locastnet.org/api/watch/epg/803?startTime=2021-03-23T00:00:00 Fetching: https://api.locastnet.org/api/watch/epg/803?startTime=2021-03-24T00:00:00 Fetching: https://api.locastnet.org/api/watch/epg/803?startTime=2021-03-25T00:00:00 Unknown request to /devices/wnztljyq Fetching: https://api.locastnet.org/api/watch/epg/803?startTime=2021-03-26T00:00:00 Unknown request to /devices/wnztljyq/scanners Unknown request to /devices/wnztljyq Unknown request to /devices/wnztljyq/scanners Fetching: https://api.locastnet.org/api/watch/epg/803?startTime=2021-03-27T00:00:00 Starting EPG thread... 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET /device.xml HTTP/1.1" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET / HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET / HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET / HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "POST /devices/discover HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET /devices/kuhhlzip HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET /devices/kuhhlzip/scanners HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET /devices/kuhhlzip HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET /devices/kuhhlzip/scanners HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET /devices/wnztljyq HTTP/1.0" 501 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/wnztljyq/scanners HTTP/1.0" 501 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "POST /devices/discover HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/kuhhlzip HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/kuhhlzip/scanners HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/kuhhlzip HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/kuhhlzip/scanners HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/wnztljyq HTTP/1.0" 501 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/wnztljyq/scanners HTTP/1.0" 501 - (halts right here.) ^CLocast2Plex is now online. ^C received, shutting down the server 192.168.3.238 - - [22/Mar/2021 23:10:46] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [22/Mar/2021 23:30:47] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [22/Mar/2021 23:50:48] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 00:10:49] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 00:30:50] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 00:50:51] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 01:10:52] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 01:30:53] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 01:50:54] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 02:10:55] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 02:30:56] "GET /device.xml HTTP/1.1" 200 -

I did try to add to plex and it sees the tuner, but says waiting for channel scan.

Thanks again!

thebigeb commented 3 years ago

Are you running 32 bit or 64 bit?

On Mon, Mar 22, 2021 at 11:08 PM stormarcher3 @.***> wrote:

@thebigeb https://github.com/thebigeb - I really appreciate all the help. I've made progress. but still having an issue getting the container to completely start. Let me share a bit of my setup with you. First, I'm setting up my PI with following this blog: https://dbtechreviews.com/2019/12/how-to-install-openmediavault-on-raspberry-pi-4/. I install docker and portainer via OMV. I've done all the updates to both debian and OMV.

I traced the error and found this linuxserver/docker-calibre-web#119 https://github.com/linuxserver/docker-calibre-web/issues/119. patching to libseccomp2_2.5.1-1 allows the container to run... almost. The system start and gets to a point and halts. If I press cntrl-c, it breaks but completes and says online but the container dies. I reloaded the PI today to see if there was something broken. The container got a little further but still has the same issue. Here is what I got so far. You'll see the ^c (after 3 hours) and the final dump. Any thoughts?

docker run -v /app/config.ini:/app/config.ini -p 6077:6077 -p 1900:1900/udp eblabs/locast2plex Opening and Verifying Configuration File. /app/config/config.ini /app/config.ini Loading Configuration File: /app/config.ini Tuner count set to 3 Server is set to run on 192.168.1.27:6077 UUID set to: kuhhlzip... Getting user location... Getting location via IP Address. Got external IP 71.80.136.79. Got location as Los Angeles - DMA 803 - Lat\Lon 34.163918-117.59234 Logging into Locast using username @.*** Validating User Info... User Info obtained. User didDonate: True User donationExpire: 2022-02-26 17:18:39 Starting First time Stations refresh... Checking FCC facilities database for updates. Online facilities database is newer. Downloading the latest FCC facilities database... Unzipping FCC facilities database... Reading and formatting FCC database... Found 6314 stations. Getting list of stations based on DMA... Found 53 stations for DMA 803 Starting Stations thread... Starting device server on 192.168.1.27:6077 Now listening for requests. Starting SSDP server... Starting First time EPG refresh... Fetching: https://api.locastnet.org/api/watch/epg/803?startTime=2021-03-22T00:00:00 Fetching: https://api.locastnet.org/api/watch/epg/803?startTime=2021-03-23T00:00:00 Fetching: https://api.locastnet.org/api/watch/epg/803?startTime=2021-03-24T00:00:00 Fetching: https://api.locastnet.org/api/watch/epg/803?startTime=2021-03-25T00:00:00 Unknown request to /devices/wnztljyq Fetching: https://api.locastnet.org/api/watch/epg/803?startTime=2021-03-26T00:00:00 Unknown request to /devices/wnztljyq/scanners Unknown request to /devices/wnztljyq Unknown request to /devices/wnztljyq/scanners Fetching: https://api.locastnet.org/api/watch/epg/803?startTime=2021-03-27T00:00:00 Starting EPG thread... 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET /device.xml HTTP/1.1" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET / HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET / HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET / HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "POST /devices/discover HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET /devices/kuhhlzip HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET /devices/kuhhlzip/scanners HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET /devices/kuhhlzip HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET /devices/kuhhlzip/scanners HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:25] "GET /devices/wnztljyq HTTP/1.0" 501 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/wnztljyq/scanners HTTP/1.0" 501 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "POST /devices/discover HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/kuhhlzip HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/kuhhlzip/scanners HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/kuhhlzip HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/kuhhlzip/scanners HTTP/1.0" 200 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/wnztljyq HTTP/1.0" 501 - 192.168.1.25 - - [22/Mar/2021 22:57:26] "GET /devices/wnztljyq/scanners HTTP/1.0" 501 - (halts right here.) ^CLocast2Plex is now online. ^C received, shutting down the server 192.168.3.238 - - [22/Mar/2021 23:10:46] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [22/Mar/2021 23:30:47] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [22/Mar/2021 23:50:48] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 00:10:49] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 00:30:50] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 00:50:51] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 01:10:52] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 01:30:53] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 01:50:54] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 02:10:55] "GET /device.xml HTTP/1.1" 200 - 192.168.3.238 - - [23/Mar/2021 02:30:56] "GET /device.xml HTTP/1.1" 200 -

I did try to add to plex and it sees the tuner, but says waiting for channel scan.

Thanks again!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tgorgdotcom/locast2plex/issues/79#issuecomment-804548442, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATI7RHRQVMTVFWDKCMET62LTFAA2BANCNFSM4Q2MYFHA .

stormarcher3 commented 3 years ago

@thebigeb - 32bit. That's the only version published on the PI/Imager. I found the 64-bit beta and have installed that and am working through the process again now.

I'll update when I get through it. Thanks!

stormarcher3 commented 3 years ago

@thebigeb - So, I installed the PI 64bit beta, did the updates, installed OMV to get the docker/portainer environment setup. I have the same issue of the the docker run command stalling in the initial launch process. On a similar note, I setup virtual machine of OMV as an x86 system. I deployed the tgorg/locast2plex image that is working my both of my synology NAS units. I'm got past the error I had before regarding the locast user/pass even though it found the config.ini file and started with the IP address I specified.

It's starting to sound like the problem is in the debian os and/or docker being utilized under OMV. This leads me to inquire what OS you're running and how you are getting docker installed and the image deployed? Thank you again!

thebigeb commented 3 years ago

@stormarcher3 I've never used OMV but my raspberry pi 4b are running ubuntu server LTS 20.04 64-bit. Docker installed from apt and I am using portainer to manage the swarm. From what I see OMV just creates a NAS, if your able to get locast2plex to read the config file, that should be enough. What is 192.168.1.27, 192.168.1.25 and 192.168.3.238? and what IP are you specifying in your config.ini

stormarcher3 commented 3 years ago

@thebigeb Thank you for the info. I had a suspicion you were running ubuntu and I suspect that my the debian os is the problem. My raspberry PI is on the 192.168.1.27. The 192.168.1.25 is my main synology nas running plex and docker with the locast2plex running. the 2.238... is another dhcp address on my lan (/22 network). That's my windows 10 computer I'm on now.

I'll try ubuntu and see if I get different results. I suspect I will.

thebigeb commented 3 years ago

@stormarcher3 what IP did you specify in your config.ini?

stormarcher3 commented 3 years ago

@thebigeb - Sorry for the delay. I've been beating on the configuration. I've gotten things to work on multiple architectures. Switching to ubuntu seemed like it had similar issues. running the docker command always stalled at "Starting EPG thread..." and never says locast2plex online. Same running ubuntu on and i5 computer and on the pi 4. But, I was able to go into portainer and start the container. Plex was able to see the tunes and use them.

I then went back to the PI and switched over to the 64bit debian release. This time I installed docker/portainer manually and not as part of OMV. I did receive the same stall at "Starting EPG thread...", but like ubuntu the container starts and is a usable tuner.

Any idea why it hangs on the "Starting EPG thread..."?

thebigeb commented 3 years ago

Usually the last thing I see in logs but I know if I start a stream it works. Screenshot from 2021-03-25 22-27-39

stormarcher3 commented 3 years ago

Well, at least it's consistent. I have determined that installing OMV breaks the config. The original problem of it finding the /app/config.ini but saying the locast credentials can't be found only occurs when OMV is installed. Even just installing 64 bit, installing docker and portainer, setting up plex and and locast2plex, then OMV breaks it. I can't imagine why. So bizarre.

At least things are working and I know what breaks the config. Thank you again for ALL the help and advice. I do appreciate it.

thebigeb commented 3 years ago

Thats very odd, I did samba shares but did find it very odd that if I didn't specify the file in the volume mount I was getting permission errors, with some testing it would find the file and say its invalid config. But glad to hear you're up and running, no idea why but Plex seems to prefer this instance of a HDhomerun over the local docker image I have running on my Plex server

On Fri, Mar 26, 2021 at 10:10 PM stormarcher3 @.***> wrote:

Well, at least it's consistent. I have determined that installing OMV breaks the config. The original problem of it finding the /app/config.ini but saying the locast credentials can't be found only occurs when OMV is installed. Even just installing 64 bit, installing docker and portainer, setting up plex and and locast2plex, then OMV breaks it. I can't imagine why. So bizarre.

At least things are working and I know what breaks the config. Thank you again for ALL the help and advice. I do appreciate it.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tgorgdotcom/locast2plex/issues/79#issuecomment-808623201, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATI7RHXZHCYMEVR6DAPBCSDTFU5CVANCNFSM4Q2MYFHA .