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

I haven't forgotten. :slight_smile: There's just a bit more to it than I first thought. I have two DVRs myself, so I'm with you on the need.

I'm headed to Portugal next week for the first half of the Winter, so I'll start working on it there.

1 Like

Don’t know anything about stacks so could someone please set me straight on my errors trying to deploy

Either put your environment variables in the section below the editor (recommended), or get rid of the dollar sign and curly braces if you want to hardcode the values

In the env vars section, just put the var name on the left and value on the right:

You'll want the two true/false vars set to true though.

Success thanks!

@chDVRuser Based on this list of current OliveTin features, could you give me your top few that you'd like to see support multiple DVRs?:

  • Comskip on/off by channel
  • List channels with Comskip off
  • Manually add recordings
  • Find Gracenote station IDs
  • Fix YouTube thumbnails
  • Download TwiT.tv guide data
  • Generate channels list in CSV format
  • Generate movie list in CSV format
  • Scan/Prune local content
  • Mark an episode for re-recording
  • Channel lineup change notifications
  • Generate filtered Channels DVR log
  • List sources for a single channel
  • Delete Channels DVR recording log files
  • Send message to defined Channels clients

Since any script that lends itself to use with multiple DVRs will have to be modified, I'm going to roll them out a few at a time. And, I don't want to start with scripts that neither of us use. Anybody else with multiple Channels DVR servers, please feel free to respond on this.

Thanks, based on how often I do these w/my scripts, I listed them in order from most to least often used.

Manually add recordings
Mark an episode for re-recording
Generate channels list in CSV format
Channel lineup change notifications
List channels with Comskip off
Comskip on/off by channel

I do use Find Gracenote station IDs, but it doesn't matter which DVR is used for that.

Today, I'm adding a Docker-Compose generator of sorts. The idea is to have one place you can go to get the yaml needed to spin-up a container for any Channels DVR related extensions, including some "must have" utilities.

Too many Channels users are using docker one-liners in my opinion, which are harder to maintain, update and visualize. Not to mention you need to be at the console, or ssh'd into the machine Docker is running on to interact with it.

Portainer, as a webUI, makes a better companion to the Channels DVR webUI -- as they both can be run from anywhere on your LAN. Not to mention, anywhere in the world if you add Tailscale to the mix. Add Organizr to the equation, and everything related to a Channels DVR ecosystem can be found in a single browser tab.

Here are some screenshots of this new "Docker-Compose Examples for Channels & Related Extensions" OliveTin Action Button:

An easy one, like FrndlyTV:

And a more complicated one, EPlusTV, note that all of the environment variables are included in the Stack, and a ready to paste set of environment variables is output to "stderr". Those env var values can be put right into the Portainer-Stacks Environment variables Advanced mode, and then you can switch back to Simple mode to change from the defaults to whatever is appropriate for your situation:

Thanks for the ranking -- that helps focus the mind. I've been trying to think up an approach that won't require people that have a single DVR to do or select anything. At the same time, I want to provide a list of servers to choose from, for those of us with multiples. On top of these two things, OliveTin has various limitations to consider including lack of support for a default when using drop downs.

So, here's what I've come up with -- that's relatively easy to implement, has a list of alternate servers, and won't require any input from those with a single server:

There's an new environment variable CHANNELS_DVR_ALTERNATES that'll contain a space separated list of servers beyond the "primary", which will continue using the same env var as before.

The designated primary DVR will become the default for all scripts supporting multiple DVRs.

The alternates will be listed in the description for the field, and if you clear the dvr field first you can easily drag and drop any of the alternates into the box. The name can be edited manually as well, which allows for use with ad-hoc DVR servers not defined in the environment variable.

I've implemented this under the :test2 flag if you want to try it out. Manually Add Recordings and Mark an Episode for Re-Recording are supported at this point:

version: '3.9'
services:
  olivetin:
    image: bnhf/olivetin:test2
    container_name: olivetin
    ports:
      - 1337:1337
    environment:
      - CHANNELS_DVR=${CHANNELS_DVR} # Add your Channels DVR server in the form hostname:port or ip:port
      - CHANNELS_DVR_ALTERNATES=${CHANNELS_DVR_ALTERNATES} # 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
      - 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
    volumes:
      - /data/olivetin:/config # replace host path or volume as needed
      - /mnt/dvr:/mnt/dvr # replace /mnt/dvr to the left of the colon with your Channels DVR Server /dvr network share
    restart: unless-stopped
#volumes: # use this section if you've setup a docker volume named channels-dvr, with CIFS or NFS, to bind to /mnt/dvr inside the container
  #channels-dvr:
    #external: true

Example env vars:

CHANNELS_DVR=media-server6:8089
CHANNELS_DVR_ALTERNATES=utheater-pc:8089
CHANNELS_CLIENTS=appletv4k firestick-master
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Mountain
1 Like

I obviously am not understanding how this work or have my head in the wrong location because I've not been able to get this to bind and work with my SMB share from my NAS.
Created volume multiple times/ways and still get message that it needs to be bound when attempting to run the delete logs function. I know this is lite on details just hoping you could give me a swift kick to get my head right.

Looking good.
Tried both actions on my DVR's and verified they worked.

I wish I had some good first-hand information for you on this, but I use Proxmox, with Docker running in an LXC container. In my case I need to pass the mount through from the Proxmox host to the LXC container -- and then it binds like any other directory.

What's your Docker host OS? And the NAS with the SMB share -- what's the base OS there? I assume you're creating the Docker Volume first and then attach it as an external volume? Do you have cifs-utils or equivalent installed on your Docker host?

There's not much to that Portainer-Volumes setup as I recall, so if you're confident of the share name and credentials the only other potential issue would be the version of SMB.

Portainer is pretty active on Slack, so you could potentially post there. Worst case though, you should be able to mount the share on your Docker host and then bind it as a directory to the container, like I need to do with Proxmox.

Docker running on Win 11 and SMB share from TrueNAS Core. unless I'm just using varibales in the wrong order I'm stumped.

As a test, I just setup a generic Debian container on a Windows 11 system running Docker Desktop (WSL2 backend). The sleep 6000 is just to keep it running.:

version: '3.9'
services:
  debian:
    image: debian:latest
    command:
      - sh
      - -c
      - sleep 6000
    volumes:
      - media-server6:/mnt/dvr
volumes:
  media-server6:
    external: true

I already had the volume set up, with these parameters (not including my username and password):

I then exec'd into the container and was able to see the files from my server share under /mnt/dvr. Can you try the same?

@TerryD

Figured I better check the actual stack for good measure, and it worked as expected. I even did the Delete Log Files Action.

Here's the stack I used on my Windows 11 machine:

version: '3.9'
services:
  olivetin:
    image: bnhf/olivetin:test2
    container_name: olivetin
    ports:
      - 1337:1337
    environment:
      - CHANNELS_DVR=${CHANNELS_DVR} # Add your Channels DVR server in the form hostname:port or ip:port
      - CHANNELS_DVR_ALTERNATES=${CHANNELS_DVR_ALTERNATES} # 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
      - 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
    volumes:
      - /data/olivetin:/config # replace host path or volume as needed
      - media-server6:/mnt/dvr # replace /mnt/dvr to the left of the colon with your Channels DVR Server /dvr network share
    restart: unless-stopped
volumes: # use this section if you've setup a docker volume named channels-dvr, with CIFS or NFS, to bind to /mnt/dvr inside the container
  media-server6:
    external: true

Here are the env vars I used:

CHANNELS_DVR=media-server6:8089
CHANNELS_DVR_ALTERNATES=utheater-pc:8089
CHANNELS_CLIENTS=appletv4k firestick-master
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Mountain

How does this compare with what you're doing? I used the same volume, by the way, that I used previously with that test Debian stack.

you mean like this?

Notice when it's a volume, it's in blue and you can click on it. You're binding a /DVR directory, not the DVR: volume.

So close! Where you have your volumes defined you have a slash in front of the volume name (/DVR:). Docker Volumes just have a name -- no path. So it should be - DVR:/mnt/dvr

changed it then got this on update.

I'd guess you don't have your volume set up correctly either. What shares do show when you navigate to your NAS using Windows File Explorer? Screenshots please.