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

Yes. This project is supported only via Portainer. Project One-Click, in particular, uses the Portainer API for deployments.

Did you ever get this working on Unraid without Portainer?

No other way huh? I'm just trying to ping the ChannelsDVR server and this happens. Webgui comes up.
Also can you do Channel Mappings (renaming channels like DTV?) with Olivetin

I finally got this working on my Synology using Portainer along with the Channels DVR Package. Thanks @bnhf for taking time to develop this tool.

1 Like

Definitely not for Project One-Click.

You can probably get it running on Unraid, assuming you can use Docker Compose with environment variables. However, I just don't have anyway to support or test a setup like that.

It'd probably be more work getting it going using Unraid's Container Manager with whatever Docker Compose plugin they might have, than it would be to just install Portainer -- plus, I'd be able to help if you ran into issues. :slight_smile:

BTW, there's no requirement to install OliveTin-for-Channels on the same host that you're running Channels DVR on. It can be run anywhere on your LAN (or Tailnet) with Docker and Portainer support.

Great job! :clap:

Now just get OliveTin for Channels loaded and you are golden! Future add-ons are on easy street from there on out.

2 Likes

Watched the video, made the changes to the environment variables and it just sits at deploying forever. Probably something wrong with my entries. I removed the token below, but I did have it entered. Tried it with both access control enabled and disabled. I also tried with and without the #volumes: lines

TAG=latest
DOMAIN=domain
HOST_PORT=1337
CHANNELS_DVR_HOST=10.255.51.101
CHANNELS_DVR_PORT=8089
CHANNELS_CLIENTS=10.255.51.45 10.255.51.46 10.255.51.47 10.255.51.48
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Eastern
HOST_DIR=/Users
DVR_SHARE=/Volumes/G-DRIVE/Channels
LOGS_SHARE=/Volumes/G-DRIVE/Channels/Logs/olivetin
HOST_SFS_PORT=8080
FOLDER=/web
PORTAINER_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxx
PORTAINER_HOST=10.255.51.101

No error message? I don't think I've ever seen that before. OK, a couple of things to check:

Are you sure your LAN's search domain is domain? You can check that under System Settings - Network - Ethernet (or Wi-Fi) - Search Domains:

As you can see, mine is localdomain

Are you sure your Channels DVR executables (and hence your main log file), are found in the Volumes/G-DRIVE/Channels/Logs/olivetin path? If you restart you Channels DVR, one of the first log lines tells you the path where your executables can be found. Use that path without the /data on the end.

And finally, I trust you've done no editing on the Docker Compose, and it looks like this in your Portainer stack:

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:/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/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

Mostly, your env vars look pretty good. If you see the same thing again when deploying your stack, check to see if an olivetin container exists, and use the "Quick Action" to look for any log entries. If there is anything in the olivetin container's log -- please post it here.

1 Like

Thanks for your suggestions, but NO THANKS! It seems that Channels has become an experimental hobby app for developers. I don't have time to learn Channels, then Docker, then Portainer, now Olivetin. Not sure why I am paying for a subscription any longer if I have to do all this extra work. All I wanted was a user-friendly app that already been developed, configured AND tested.

The good news is that neither Docker, Portainer nor OliveTin are required to run Channels DVR. Strictly optional items for those with the time and interest.

3 Likes

Thank you so much for trying to help me with this. I am trying to make an effort to learn, but for whatever reason it just hasn't clicked yet. I modified the environment variables and got an error this time which feels like I'm making it further than before.

No editing on the Docker Compose. My Channels DVR executables was wrong - I misunderstood what was needed. I thought it was looking for a place to put logs, so I made a directory. I have no idea what domain to use because it doesn't list any under the config. I'll add screen shots at the bottom. It looks like I can add one manually, but I thought there is something default. I couldn't find anything in system report either. I also wonder if the space in LOGS_SHARE is causing an issue - I didn't know if I needed to use &nbps or &#20 or something else. Here are my environment variables:

TAG=latest
DOMAIN=localdomain
HOST_PORT=1337
CHANNELS_DVR_HOST=10.255.51.101
CHANNELS_DVR_PORT=8089
CHANNELS_CLIENTS=10.255.51.45 10.255.51.46 10.255.51.47 10.255.51.48
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Eastern
HOST_DIR=/Users
DVR_SHARE=/Volumes/G-DRIVE/Channels
LOGS_SHARE=/Users/Media/Library/Application Support/ChannelsDVR
HOST_SFS_PORT=8080
FOLDER=/web
PORTAINER_TOKEN=ptr_NxtiDDnb4DoUZmX3JO4biGWhILYxYvL/oAPtViO4w4E=
PORTAINER_HOST=10.255.51.101

Here's the error that popped up on the side of the screen. Some are the lines I removed from variables. I don't have an email I can use, and I'd prefer not to set up a gmail account. Not sure what port 8080 is used for, but pluto-for-channels is already using that port.

Deployment error
Failed to deploy a stack: time="2024-09-28T12:32:01Z" level=warning msg="The "ALERT_SMTP_SERVER" variable is not set. Defaulting to a blank string." time="2024-09-28T12:32:01Z" level=warning msg="The "ALERT_EMAIL_FROM" variable is not set. Defaulting to a blank string." time="2024-09-28T12:32:01Z" level=warning msg="The "ALERT_EMAIL_PASS" variable is not set. Defaulting to a blank string." time="2024-09-28T12:32:01Z" level=warning msg="The "ALERT_EMAIL_TO" variable is not set. Defaulting to a blank string." time="2024-09-28T12:32:01Z" level=warning msg="/data/compose/9/docker-compose.yml: the attribute version is obsolete, it will be ignored, please remove it to avoid potential confusion" Network olivetin_default Creating Network olivetin_default Created Container static-file-server Creating Container olivetin Creating Container olivetin Created Container static-file-server Created Container static-file-server Starting Container olivetin Starting Error response from daemon: driver failed programming external connectivity on endpoint static-file-server (4ed3536e7887cb1ba430367307cd5e43c7bc1aa0308ef11764c018c0e836b7de): Bind for 0.0.0.0:8080 failed: port is already allocated

Amazingly, another milestone for OliveTin, this time passing the 5000 download mark just 18 days after the above post! Wow.

Thanks to everyone who's contributed to this project with scripts, ideas, testing and just a general positive attitude. Rock on!

2 Likes

A lot of stuff in that Deployment error, but all are warnings (and can be mostly ignored), except for the "port is already allocated error". That needs to be addressed -- which is easily done. No worries about e-mail alerts either, you can add those values later -- or not at all.

Just change this port value to something like 8081, and hopefully you'll be in business.

Don't worry too much about your search domain, that fact that it's blank probably means you don't have your a domain name set for your LAN in your router. Since you're using IP addresses above, a search domain name isn't really needed so you can leave it blank.

1 Like

The search domain in my firewall was blank, so I followed IETF RFC 8375 and added home.arpa. Might not need it, but thought I'd set it anyway.

I changed the port to 8090. I assumed I needed to change it in both docker compose and environmental variables.

I'm still failing, but I think it's the mkdir /host_mnt/Users/olivetin permission denied causing the problem. I deleted everything except the last few entries:

Deployment error
...
4c3d890028dd Pull complete olivetin Pulled Network olivetin_default Creating Network olivetin_default Created Container static-file-server Creating Container olivetin Creating Container static-file-server Created Container olivetin Created Container olivetin Starting Container static-file-server Starting Error response from daemon: error while creating mount source path '/host_mnt/Users/olivetin/data': mkdir /host_mnt/Users/olivetin: permission denied

No. The port in the Docker Compose (which represents the container-side) needs to stay as it was. Generally, with my Docker Composes, only advanced users might have occasion to edit them. The idea is for everything to done through the env vars. That way, at a glance, you know what's unique to your setup.

One specific thing about Docker on the Mac is that any directory you want to use for a binding needs to be allowed in Docker Desktop Settings-Resources-File Sharing, however the /Users and /Volumes you were using are standard (as shown in the screenshot). Not sure where the /host_mnt part of the path came from, it wasn't in the env vars you posted.

When building the stack, does Access Control need to be disabled? It seems if I leave it checked for Admins, it never finishes. It isn't because I'm running Docker under a user instead of an admin, is it?

Nothing to do with the OS. It's a Portainer thing and you should be the only user with a username and password to access Portainer.

I'm out of ideas. I re-copied the Docker Compose to make sure I didn't mess anything up, deleted and regenerated the Access Token and added the new key to the Environment Variables. I've tried it with and without Access Control enabled. I see 2 images being built in Docker (static-file-server and olivetin), but I'm back to getting nothing from Portainer - just "deployment in process". I am running Portainer from my laptop and not directly on the server, but that shouldn't make a difference.

And this is where I get frustrated. I don't know where to start troubleshooting or what steps I should try next. I appreciate your help, but there's only so much anyone trying to troubleshoot remotely can do.

I'd suggest you try to spin-up Watchtower, using the Docker Compose and env vars from this thread:

Let's see if that will deploy, which will also update your running containers. After that, if you could post a screenshot of your Portainer-Containers page, that might be helpful.

For some containers it may take a while for Portainer to finish.
If you switch away from the Stacks view while it's deploying one, it will fail.
You can check for errors in Portainer if it couldn't install the stack (Events and Notifications).
You can also view your containers in Portainer.