OliveTin for Channels: An Interface for Misc Channels DVR Scripts & Tricks

I'm pretty sure it's no big deal to install Portainer on Synology -- I think @chDVRuser said it took him about a minute. I'm pretty confident it would make your life easier.

But, as to your question:

The environment section is wrong in your screenshot. Here's my recommended docker-compose that I posted yesterday:

version: '3.9'
services:
  # GitHub home for this project with setup instructions: https://github.com/jgomez177/pluto-for-channels
  # Docker container home for this project: https://ghcr.io/jgomez177/pluto-for-channels
  pluto-for-channels:
    image: ghcr.io/jgomez177/pluto-for-channels:${TAG}
    container_name: pluto-for-channels
    ports:
      - ${HOST_PORT}:${PLUTO_PORT} # Use the same port number the container is using, or optionally change it if the port is already in use on your host
    environment:
      - PLUTO_PORT=${PLUTO_PORT}
      - PLUTO_CODE=${PLUTO_CODE} # ALLOWED_COUNTRY_CODES: us_east - United States East Coast, us_west - United States West Coast, local - Local IP address Geolocation, ca - Canada, uk - United Kingdom,
    restart: unless-stopped

  # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode

With these environment variable examples:

TAG=latest
HOST_PORT=7779
PLUTO_PORT=7777
PLUTO_CODE=local,us_west,us_east,ca,uk

You can, of course hard code the env var values into the compose, which would look like this in my example:

version: '3.9'
services:
  pluto-for-channels:
    image: ghcr.io/jgomez177/pluto-for-channels:latest
    container_name: pluto-for-channels
    ports:
      - 7779:7777 # Use the same port number the container is using, or optionally change it if the port is already in use on your host
    environment:
      - PLUTO_PORT=7777
      - PLUTO_CODE=local,us_west,us_east,ca,uk
    restart: unless-stopped

Much more elegant, and easier to manage, using Portainer with env vars though! :slight_smile:

1 Like

I copied and pasted, which I am still getting "inccorect type" unexpected service.

Check the hardcoded yaml above I just edited -- you were missing the service name, and I didn't catch it. Try it again with the edit.

1 Like

YOU ROCK!! I am in AZ so is it suggested to use Pluto West Coast?

I would think so. Are you seeing "all" URLs on http://<docker-host>:7779?

That was my mistake by-the-way, the service name was missing in my docker-compose post. Fixed now -- thanks for the assist in catching it.

I am getting this on the 7778 port, INVALID COUNTRY CODE in "ALL". I copied and pasted what you edited and ran it.

version: '3.9'
services:
  pluto-for-channels:
    image: ghcr.io/jgomez177/pluto-for-channels:latest
    container_name: pluto-for-channels
    ports:
      - 7778:7777
    environment:
      - PLUTO_PORT=7777
      - PLUTO_CODE=all
    restart: unless-stopped

Good advice on the always-on, thank you. I'll do the install on my CDVR server. I don't have cygwin on the CDVR server and I prefer bash, looks like WSL2 can do that. If not I'll add ubuntu to docker to get started with any personal scripts. Will Docker Desktop be adequate or do I need some other form of Docker installation?

"all" is supposed to be the default, but maybe isn't accepted in the env var -- just comment that line out (as shown), and you should see all of the options when you go to the URL.

Docker Desktop with the Portainer extension should be fine -- although some purists might argue for installing docker from the command line in the WSL distro. Both work -- just be sure to add Portainer either way.

Worked!!!

I got the correct scoop on the PLUTO_CODE variable now. To get all regions, it's set like this, and obviously you can pare it down as appropriate:

PLUTO_CODE=local,us_west,us_east,ca,uk

Apparently "network reflection" has been something of an ongoing issue with WSL. I found this post, and creating a .wslconfig file in %USERPROFILE% did in fact resolve the issue. So you have several options to choose from:

%USERPROFILE%\.wslconfig:

[wsl2]
networkingMode=mirrored # add this line if file already exists

Stop WSL in PowerShell with:

wsl --shutdown

Which Docker Desktop won't like, but offers a "restart" dialog -- which is handy:

After that, curl works as expected for localhost and 127.0.0.1:

slayer@NUC12-PC:~$ curl --fail --output /dev/null --max-time 5 -w "HTTP Status: %{http_code}\nEffective URL: %{url_effective}\n" http://localhost
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20291    0 20291    0     0   535k      0 --:--:-- --:--:-- --:--:--  535k
HTTP Status: 200
Effective URL: http://localhost/
slayer@NUC12-PC:~$ curl --fail --output /dev/null --max-time 5 -w "HTTP Status: %{http_code}\nEffective URL: %{url_effective}\n" http://127.0.0.1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 20291    0 20291    0     0   566k      0 --:--:-- --:--:-- --:--:--  566k
HTTP Status: 200
Effective URL: http://127.0.0.1/
slayer@NUC12-PC:~$
2 Likes

the latest version puts all available as default (without using the variable)
PLUTO_CODE variable can be used if only wanting a subset of the lists (especially as most of the us is duplicated)

1 Like

Thanks a lot, @bnhf !

That's what got it to work for me. :grinning:

I created the file .wslconfig in my user profile: C:\Users\mjtk\.wslconfig
I copied the two lines that you mentioned and pasted them in the file:

[wsl2]
networkingMode=mirrored

I stopped WSL per your instruction and restarted Docker Desktop.

For me, 127.0.0.1 still doesn't work but by using the actual IP address of my PC, it works fine now.
I ended up changing the DVR address in my environment variables:

CHANNELS_DVR=192.168.18.120:8089

Now I have Channel Lineup Change Notifications running in OliveTin. :partying_face:

It's a SWAG, but since Docker Desktop doesn't support host mode networking, that may be why the
lo, loopback, 127.0.0.1 interface doesn't work.

I didn't get very far, couldn't get a terminal to load. Do I need a Docker account first? I just charged ahead without setting up an account. Portainer is installed and running. I set no ENVT variables either.
2024-02-25_19-16

No Docker account required. Where is this message coming from? At what point in the OliveTin-for-Channels installation?

1 Like

You definitely need to set your environment variables -- I doubt the container would even start without them, and OliveTin certainly won't run properly.

The other weird thing I've seen today is an issue with Docker Desktop, where the WSL Integration tick-box suddenly wasn't checked -- so confirm that too:

@bnhf your post earlier about creating a channel collection for logos got me thinking...

Any chance you would want to tackle actually creating the collection from a set of criteria? The channels interface isn't great for this purpose, especially for large collections, and doesn't give you hints when channels disappear (either for a down source or removal from TVE, for example).

My use case: I keep a "useful channel list" that serves as my main collection. It's basically an alphabetized (which BTW could be it's own smaller addition to olivetin too) multi-source collection that serves as the main gateway to content. It is basically a list of networks with some OTA suplicates sprinkled in, to allow for switching sources when needed, quickly.

I don't even know is this is possible, but throwing out there...