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

I implemented a script to update the build date that appears at the top of the OliveTin WebUI. Forgot to update it twice as a manual task -- which now won't happen again. :slight_smile: Automation to the rescue!

1 Like

New bnhf/olivetin:latest (aka bnhf/olivetin:2024.05.14) pushed today with a new Action for creating @kman0's excellent Channels Manage Lineup bookmarklet. More detail here:

1 Like

I tested out the new bookmarklet Action on Olivetin. It really makes creating the Bookmarklet a snap. Thank you!

2 Likes

Hello. Just a quick question or two on the geolocation feature in each container. Fubo does not like VPNs. So I assume you would just use your home IP address in the Geolocation IP address field. Thus, if you use a VPN, the geolocation IP setting in the container will have Fubo see local IP address, but still everything is going through your VPN, correct? Also, for geolocation, how do you know you are not picking a blacklisted IP address? Is there a simple method for finding suitable geolocation IP addresses that can relocate you without leading to service incompatibility, or causing other poeple issues? Sorry if this is a novice question. Any help is appreciated.

The only Channels-related container I can think of with a geolocation option is FrndlyTV-for-Channels.

1 Like

Thank you, I jumped to conclusion that since I saw one in screen cap above with FrindlyTV, it was same for all. Thank you for your work on this.

Hi, it has been awhile since I updated OliveTin but I did so tonight. The version listed on OliveTin is 2024.05.31. I'm still uneasy around docker configuration though and could use help please. Apologies if this has been covered already, I searched a bit but couldn't find the answer in a format that made much sense to me :slight_smile:

I am on an M1 Mac mini running Portainer. Docker Desktop is also installed if that's helpful.
Some of OliveTin's buttons and tools aren't working, as explained in the error messages, I need to set up a PORTAINER_HOST. But the majority is working fine. It's the newer stuff like Project One-Click I'm interested to try, that's requiring this. So I'd appreciate help on this piece of the puzzle, how do I format the entry and where do I enter it? Is there anything else I have to change or configure? I'm happy to share error logs or screenshots if that's helpful too.

My "olivetin-for-channels" folder is installed inside the "Channels DVR" directory, which is on the top level of an external drive named "Channels-DVR."

Thanks in advance for any Mac-specific guidance.

This one is pretty straightforward, it's the hostname or IP address you use to access Portainer.

You'll also need a PORTAINER_TOKEN, have you tackled that yet?

Also make sure you're using the latest OliveTin docker compose (see post #1), where all of your installation specific values are in the Environment section of your Portainer-Stack.

OK, my bookmark for that is https://10.0.1.21:9443

I just figured that part out, I think, and created one.... is this what you're referring to? Accessing the Portainer API | Portainer Documentation

I think that's the part I'm stuck on. Do I add these new ENV values manually or is there an easier way to update the docker compose without losing my current OliveTin configuration?

Thanks again!

Since you were an early OliveTin adopter, your compose is probably a bit behind. So, how about if you post that compose along with the env vars you're currently using and I'll adapt the old to the new, and post it. There might be one or two others that could benefit. :slight_smile:

@bnhf Regarding the token... In one of our conversations, I mentioned that I believe the token can be obtained automatically. I think my message kind of got buried and lost among others. :slightly_smiling_face:

If you are interested, let's discuss it again.

Does that method assume you're already logged into Portainer, or do you need pass the username and password in the token request?

I think already logged in.

Thanks so much. Here is where I'm at:

So, we'll use the new standard OliveTin Docker compose with modifications in each service's volumes section, changing olivetin to olivetin-for-channels:

version: '3.9'
services:
  olivetin: # This docker-compose requires little or no editing. Set the Environment variables section of Portainer.
    # GitHub home for this project: https://github.com/bnhf/OliveTin.
    # Docker container home for this project with setup instructions: https://hub.docker.com/repository/docker/bnhf/olivetin.
    image: bnhf/olivetin:${TAG} # Add the tag like latest or test to the environment variables below.
    container_name: olivetin
    hostname: olivetin
    dns_search: ${DOMAIN} # For Tailscale users using Magic DNS, add your Tailnet (tailxxxxx.ts.net) to use hostnames for remote nodes, otherwise use your local domain name.
    ports:
      - ${HOST_PORT}:1337
    environment:
      - CHANNELS_DVR=${CHANNELS_DVR_HOST}:${CHANNELS_DVR_PORT} # Add your Channels DVR server in the form CHANNELS_DVR_HOST=<hostname or ip> and CHANNELS_DVR_PORT=<port>.
      #- CHANNELS_DVR_ALTERNATES=${CHANNELS_DVR2_HOST}:${CHANNELS_DVR2_PORT} # Space separated list of alternate Channels DVR servers to choose from in the form hostname:port or ip:port.
      - CHANNELS_CLIENTS=${CHANNELS_CLIENTS} # Space separated list of Channels DVR clients you'd like notifications sent to in the form hostname or IP.
      - ALERT_SMTP_SERVER=${ALERT_SMTP_SERVER} # SMTP server to use for sending alert e-mails. smtp.gmail.com:587 for example.
      - ALERT_EMAIL_FROM=${ALERT_EMAIL_FROM} # Sender address for alert e-mails.
      - ALERT_EMAIL_PASS=${ALERT_EMAIL_PASS} # SMTP "app" password established through GMail or Yahoo Mail. Do not use your everyday e-mail address.
      - ALERT_EMAIL_TO=${ALERT_EMAIL_TO} # Recipient address for alert e-mails.
      - UPDATE_YAMLS=${UPDATE_YAMLS} # Set this to true to update config.yaml.
      - UPDATE_SCRIPTS=${UPDATE_SCRIPTS} # Set this to true to update all included scripts.
      - TZ=${TZ} # Add your local timezone in standard linux format. E.G. US/Eastern, US/Central, US/Mountain, US/Pacific, etc.
      - PORTAINER_TOKEN=${PORTAINER_TOKEN} # Generate via <username> dropdown (upper right of WebUI), "My account", API tokens.
      - PORTAINER_HOST=${PORTAINER_HOST} # Hostname or IP of the Docker host you're running Portainer on.
    volumes:
      - ${HOST_DIR}/olivetin-for-channels:/config # Add the parent directory on your Docker you'd like to use.
      - ${DVR_SHARE}:/mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT} # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR network share.
      - ${LOGS_SHARE}:/mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT}_logs # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR logs network share.
      #- ${DVR2_SHARE}:/mnt/${CHANNELS_DVR2_HOST}-${CHANNELS_DVR2_PORT} # Note that these volume mounts should always be to /mnt/hostname-port or /mnt/ip-port (dash rather than a colon between).
      #- ${LOGS2_SHARE}:/mnt/${CHANNELS_DVR2_HOST}-${CHANNELS_DVR2_PORT}_logs # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels DVR logs network share.
    restart: unless-stopped

  static-file-server:
    image: halverneus/static-file-server:latest
    container_name: static-file-server
    dns_search: ${DOMAIN}
    ports:
      - ${HOST_SFS_PORT}:8080
    environment:
      - FOLDER=${FOLDER}
    volumes:
      - ${HOST_DIR}/olivetin-for-channels/data:${FOLDER}
    restart: unless-stopped

#volumes: # Use this section if you've setup docker volumes named channels-dvr and channels-dvr-logs, with CIFS or NFS, to bind to /mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT} and  /mnt/${CHANNELS_DVR_HOST}-${CHANNELS_DVR_PORT}_logs inside the container. Set DVR_SHARE=channels-dvr and LOGS_SHARE=channels-dvr-logs in this example.
  #channels-dvr:
    #external: true
  #channels-dvr-logs:
    #external: true

Here's my suggested environment section:

TAG=latest
DOMAIN=local
HOST_PORT=1337
CHANNELS_DVR_HOST=10.0.1.21
CHANNELS_DVR_PORT=8089
CHANNELS_DVR2_HOST=
CHANNELS_DVR2_PORT=
CHANNELS_CLIENTS=10.0.1.81 10.0.1.151 10.0.1.112
ALERT_SMTP_SERVER=
ALERT_EMAIL_FROM=
ALERT_EMAIL_PASS=
ALERT_EMAIL_TO=
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Pacific
HOST_DIR=/Volumes/Channels-DVR/Channels DVR
DVR_SHARE=
LOGS_SHARE=
HOST_SFS_PORT=8080
FOLDER=/web
PORTAINER_TOKEN=
PORTAINER_HOST=10.0.1.21

You'll need to add your PORTAINER_TOKEN, DVR_SHARE and LOGS_SHARE values. LOGS_SHARE you can get by going to your current OliveTin and doing the following:

The path shown in the output, minus the last part that'll be data, is your LOGS_SHARE path.

The DVR_SHARE path, you probably already know, as this is the path to your Channels DVR data. On my Mac-Mini-M2 it's /Users/slayer/channels-data, but it'll be different for you.

Once you have your env vars determined, you can stop your current olivetin stack, and then either replace the data with the above, or create a new stack called olivetin2 if you prefer.

Also, be aware you may need to change the port for the new static-file-server part of the stack if 8080 is in use on your system. 8081, or whatever, is fine for HOST_SFS_PORT.

@Fofer

In addition, once you have the new stack spun-up, be sure to run the OliveTin Post-Install Healthcheck to be sure everything is working as expected.

OK will do!

Do I also change the instances under services?

services:
  olivetin: # This docker-compose requires little or no editing. Set the Environment variables section of Portainer.
    # GitHub home for this project: https://github.com/bnhf/OliveTin.
    # Docker container home for this project with setup instructions: https://hub.docker.com/repository/docker/bnhf/olivetin.
    image: bnhf/olivetin:${TAG} # Add the tag like latest or test to the environment variables below.
    container_name: olivetin
    hostname: olivetin

If you were going to run them at the same time, then yes, but since you're not they can be the same. You can name the new stack olivetin-for-channels2 or just olivetin given the current stack name.

OK, mine is /Users/fofer/Library/Application Support/ChannelsDVR/

Great. I think I've got it.
But before I deploy, my HOST_DIR and DVR_SHARE are the same, is that correct?

Well, it worked, so I think we're golden. THANKS!

However, now the Project One-Click for vlc-bridge-fubo isn't working. This is the error:

JSON response from http://10.0.1.21:9000/api/stacks?type=2&method=string&endpointId=2:
{"message":"failed to deploy a stack: vlc-bridge-fubo Pulling \n vlc-bridge-fubo Error \nError response from daemon: pull access denied for jgomez177/vlc-bridge-fubo, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\n","details":"failed to deploy a stack: vlc-bridge-fubo Pulling \n vlc-bridge-fubo Error \nError response from daemon: pull access denied for jgomez177/vlc-bridge-fubo, repository does not exist or may require 'docker login': denied: requested access to the resource is denied\n"}
false

I looked into it and see that particular repo has been moved/rescued recently (after joagomez posted he could no longer maintain it)