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

I pulled the test build and it seems to be working now. It does show all of the video groups being processed in stdout. However, it took a really long time to initialize. I did not time it but it seemed to take over 5 minutes before init completed and I was able to access the olivetin web page. Is there any way that the landing page could be accessible while it is still initializing? I've included the container's log below so you can see all of the timeouts it goes through during initialization.

One other very minor detail. When I cancel a repeating task by setting the time to 0, the icon still shows green instead of turning purple.

does this need to be on the same device as channels?

No.
It runs in a container and can be anywhere as long as it can access your DVR via its IP address (including Tailscale tailnet IP addresses).

I'm guessing this is what led you to think it has to run on your Channels DVR device

I'm glad you posted this log, as this gives me some ideas for tightening things up. In the meantime, you have some "zombie" *.running files -- as a result of some of our efforts earlier on thumbnails, and some that relate to previous issues.

We don't want those hanging around, as the commands they contain will attempt to run on every container or host restart. Look in the directory on your NAS that you have mapped to /config, and delete files with the .running extension that match these patterns (I'm assuming that only those that begin with 192.168.0.11 are valid):

  • 60*.running
  • cjynas:8089*.running
  • deletelogs*.running
  • fix_thumbnails*.running
  • ical_2_xmltv*.running

Only 6 of your current 18 *.running files are valid as far as I can tell -- the rest are leftover from various issues we've worked through. The others are attempting to start, which takes all kinds of extra time. These zombies -- if they do run, create processes you can't kill through OliveTin -- resulting in icons that can never go back to purple as you can't kill the last process.

Thanks for finding the zombies. I've zapped those files. Restarted olivetin and it starts up much faster. The icon colors now change as expected. Thanks for chasing down those issues with my system.

No problem -- you're now an official zombie killer. :slight_smile: I'm working on a function to add to the startup script, that'll find and zap those during boot. You might not be the only one that has a few of those lurking about!

I'm also planning (thanks to your suggestion), to add an argument that will bypass the whole foreground/background script communication thing during startup -- as it adds no value, and increases spin-up time.

Your contributions to this project are much appreciated!

1 Like

New OliveTin-for-Channels pushed (:latest and :test synchronized) with fixes and improvements including M3U URL and file generation using Channels DVR as a source.

"Ping" of local and remote (Tailscale) Channels DVR servers using curl to insure servers are responding over LAN and Tailnet. This includes healthchecks.io support which will send emails, text messages, or other integrations if a given check fails. Tailscale must be installed on the Docker host machine, properly configured, with your Tailnet used in the docker compose as the dns_search parameter.

Persistent logs (through container or host reboots) are supported for DVR channels lineup change notifications (if desired) through the addition of a PERSISTENT_LOGS=true environment variable (@chDVRuser please note).

OliveTin Actions that run in the background, and are setup to re-launch on container or host restarts, are now checked for consistency with the currently defined hosts. Any that don't match, will be permanently terminated.

2 Likes

Thanks. Working great!

Anybody know if there's a Channel's endpoint that would allow me to curl an M3U that would only include channels from a Channel Collection? I pinged @mike_here about this some days back, as he apparently wrote a script to do this, but haven't had a response. I'd like to add this to the OliveTin M3U Generator Action.

Is there a docker setup for this? I somewhat have it running but can't get it to connect to my server.

I had a similar situation but mostly due to my over thinking things.
So first thing: How is your server setup NAS, docker RPI, etc.? Knowing that I or someone else from the community can probably help you get it connected.
Also there are instructions for setup near the top of the thread.

what is the latest and greatest docker pull and .env?

Portainer-Stack:

version: '3.9'
services:
  olivetin:
    image: bnhf/olivetin:${TAG} # Add the tag like latest or test to the environment variables below
    container_name: olivetin
    dns_search: ${TAILNET} # For Tailscale users using Magic DNS, add your Tailnet (tailxxxxx.ts.net) to use hostnames for remote nodes
    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:
      - ${HOST_DIR}/olivetin:/config # Add the parent directory on your Docker you'd like to use
      - ${DVR_SHARE}:/mnt/media-server6-8089 # This can either be a Docker volume or a host directory that's connected via Samba or NFS to your Channels 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

Sample Environment Variables:

TAG=latest
TAILNET=tailxxxxx.ts.net
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
HOST_DIR=/data
DVR_SHARE=/mnt/dvr
2 Likes

That seems to work as I get the action was successful but i don't see anything happen.

What Action are we talking about here? Did you look for output under Logs — stdout? And, if you’re not seeing what you’re expecting to see, post whatever there is in stdout and stderr here.

I removed and reinstalled and it's working. I wasn't able to use outside host name. I had to tunnel in to get it working.

Still not sure what you're talking about here. Outside hostname for what? Tunnel in how?

You're going to need to up the word count on your posts if you want to contribute back to this community. Short and cryptic isn't going to help the next guy, who may or may not have an issue similar to yours. :slight_smile:

using putty and I have a .ddns.net that is setup for my ip address.

I do have a question though. Getting the details of all the sources from Channels DVR...
Got 9 sources.

Writing the channel information to the CSV file...
Channel information available in channels_dvr_channel_list_20231207_164131.csv

where is it saving it?

1 Like

This directory you defined as ${HOST_DIR}/olivetin

You can see this as the last line in the stderr log for the action
+ mv channels_dvr_channel_list_20231207_154818.csv /config

1 Like