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

Keep in mind that the text message will be short by design and won't contain the details of the lineup changes.

In order to get the details of the changes, you can also select the option for email notification, and/or check the stdout console and/or the log file. :wink:

@bnhf as a manual user, do you have write permissions on the files in /config?

I just noticed that my default settings are not remembered once I go back in and make a change to channel lineup change notifications. The other utilities do this @bnhf.

Big news for a small project -- OliveTin-for-Channels reaches the 1000 download mark!

:partying_face: :tada: :piƱata: :mirror_ball::

2 Likes

Congratulations! :partying_face:

As soon as I can get focused on it, I will add one more download. :slight_smile:

OliveTin scout here :slight_smile: Iā€™m not sure if itā€™s been mentioned before but perhaps this lesser-known tip warrants inclusion in OliveTin, either as an informational snippet, or the basis for a plugin that helps us customize our channel logos? Unless thereā€™s a better wayā€¦

Regardless, kudos to @kennyb3653 for sharing it!

1 Like

That would be awesome. For what it is worth, I did use OliveTin, using the "Generate a Channels DVR
M3U Playlist" button. I took the generated playlist from the logs, pulling out and using only the six channels I needed. I did only minor tweaks then to each one, before putting them as a "Logos" source. For example, one channel came in the OliveTin log like this:

#EXTINF:-1 channel-id="abc-wmar" tvg-id="5985" tvg-chno="5985" tvg-logo="https://tmsimg.fancybits.co/assets/s28708_h3_aa.png?w=360&h=270" tvc-guide-stationid="21230" tvg-name="WMARDT" group-title="HD",ABC
http://192.168.7.180:8089/devices/ANY/channels/5985/hls/master.m3u8?

All I did was replace the part after "tvg-logo" with a link to my logo, and deleted the m3u8 address at the end. So the end result was something like this:

#EXTINF:-1 channel-id="abc-wmar" tvg-id="5985" tvg-chno="5985" tvg-logo="http://www.mywebsite.com/images/tvlogos/wmar.png?w=360&h=270" tvc-guide-stationid="21230" tvg-name="WMARDT" group-title="HD",ABC
1 Like

I've been noodling this around for the last couple of days, and here's an approach that I think could be good:

  • Create a "Channel Collection" that contains the channels for which you'd like to use custom logos

  • Collect the custom logos you'd like to use and name them with their Channels DVR "tvg-id"

  • Upload those logos using the existing DVR - Manage - Images feature of Channels DVR

  • Use the "Generate a Channels DVR M3U Playlist" OliveTin Action, with the collection name you chose and a filter of "logos".

  • This will generate an M3U that will contain just the channels who's logos you want to override, and will have those logos set to the matching logo name from those uploaded images.

  • This M3U can be used via copy-and-paste, or can also be made available on a URL via the OliveTin companion static-file-server container

How does that process flow sound @Fofer and @cyberskier?

2 Likes

I would have to test it. I just output all my channels from OliveTin, pulled out the ones I wanted and put those into their own custom channel (so copy and paste), and deleted the last line, which was the m3u8 link, if I recall. I then uploaded the logos to my web server, and pasted the link to the logo after ā€œ tvg-logoā€ for each channel.

2 Likes

Sounds like a great approach to me!

@Fofer @cyberskier I've added this Custom Channel Logos "trick" to the latest build of OliveTin, bnhf/olivetin:latest and bnhf/olivetin:2024.02.21.

The process is as described a couple of posts back, with much more detail and screenshots to be found here:

1 Like

New OliveTin-for-Channels pushed today with tags :latest and :2024.02.23. Total update for all sample docker-composes for every extension somebody might want to use with Channels (that I could think of). All examples are for use with Portainer-Stacks! I also posted them all here:

1 Like

So dumb/newbie question: How do I get the client names to input as variables for the ā€œsend messageā€ feature? My guess would be from the client section of the DVR, but I have some client names with spaces in them.

(I believe Iā€™ve otherwise figured out how to add the CHANNELS_CLIENTS variable, but just donā€™t know where to find the client names)

Thanks!

2 Likes

The way I set this up, any message is sent to ALL defined clients. My thinking was, if the message is intended for just one person, put their name(s) in the title. Overall, I've been trying to keep the data required for individual actions as streamlined as possible.

Thanks. But donā€™t I first have to define those clients in Portainer in an environment variable? Or can I just not do that, and it goes to all clients by default?

For sure. It's a space separated list of either hostnames or IP addresses:

     - CHANNELS_CLIENTS=${CHANNELS_CLIENTS} # Space separated list of Channels DVR clients you'd like notifications sent to in the form hostname or IP

OK, thanks. I'm on an eero network, so I can find the hostnames in the eero app, I believe.

I finally installed OliveTin for Channels and I can see the interface. :grinning:
However, it doesn't see my DVR. :frowning_face:

Everything is running on a single computer with Windows 11.

This is my customized Portainer-Stack (I removed things that I didn't think were relevant to my configuration):

version: '3.9'
services:
  olivetin:
    image: bnhf/olivetin:${TAG} # Add the tag like latest or test to the environment variables below
    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_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
    restart: unless-stopped

  static-file-server:
    image: halverneus/static-file-server:latest
    container_name: static-file-server
    ports:
      - 8080:8080
    environment:
      - FOLDER=${FOLDER}
    volumes:
      - ${HOST_DIR}/olivetin/data:${FOLDER}
    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. Set ${HOST_DIR} to channels-dvr (HOST_DIR=channels_dvr) in that example
  #channels-dvr:
    #external: true

Environment variables:

TAG=latest
CHANNELS_DVR=127.0.0.1:8089
CHANNELS_CLIENTS=
UPDATE_YAMLS=true
UPDATE_SCRIPTS=true
TZ=US/Eastern
HOST_DIR=D:\
FOLDER=/web

Obviously, I messed up somewhere.

Result of the Ping action:

Sat Feb 24 12:16:27 EST 2024
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (7) Failed to connect to 127.0.0.1 port 8089: Connection refused
HTTP Status: 000
Effective URL: http://127.0.0.1:8089/
One time run mode used...
foreground.sh is exiting for pingcdvr with exit code 0

Try exec'ing into the container (use the "Quick Action" button for that purpose in Portainer-Containers), and see if you can ping 127.0.0.1 and localhost. Also, try the hostname and IP of this PC -- that should give us a baseline of what's working.

EDIT: I don't have Channels installed on my Windows 11 PC, but I do have OliveTin there for testing, and I was able to reach the PC on all 4 addresses.

EDIT2: OK, so I tried the curl command I use with another open port on my Windows 11 PC. 127.0.0.1 and localhost both failed, but nuc12-pc and 192.168.110.237 both succeeded. Not sure why this is the case, but there are some idiosyncrasies with the whole Docker/WSL/Windows thing. So, I'd suggest trying either your system's LAN hostname or IP address to see if you have better results.

Is there a post/location where I can get/install Olive Tin For Channels, with installation instructions?