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

OK, with your help I've got portainer installed and running, I can access it via my browser using //localhost:9443/#!/home. I was able to find and edit the healthcheck script so that my CDVR server ip is hard coded into the script and I was able to pass (and understand for the most part) the extended healthcheck. THANKS!!

Is there a way (without editing every olive tin script) to set local-server globally so that all of my olive tin scripts know the ip of my localhost CDVR server? If nothing else I suppose I could run a sed on all of the scripts but I can learn more about the environment by asking this question.

There is absolutely no need to edit OliveTin scripts -- they are all setup to use global environment variables established in your OliveTin stack. Also, assuming you want to stay current with updates to OliveTin, your changes will get overwritten.

Did you use the OliveTin Docker Compose from post #1 in this thread in Portainer-Stacks? Did you set your installation-specific values in the Environment variables section of the stack?

Good point about updates overwriting my changes.

I used the script but I've also been through a couple of installs trying to get things working so it is probably better for me to look at the current environment and learn how to change things. Looking at the olivetin environment in docker shows "CHANNELS_DVR=local-server:8089" so I'm guessing I need to edit that to replace "local-server" with my server ip, but I don't know how to make the edit inside the docker olive tin screen. The JSON file looks editable and switching out of JSON view I can select text for each variable but cannot edit it. How/can I edit envt variables for olive tin inside of docker?

All you need to do is stop the stack:

Go into the stack editor:

Modify the environment variables to match your installation:

And, click "Update the stack":

That all went well, thanks!

Right now my Channels DVR folder is on my Windows C: drive at C:\CHANNELS_DVR . I'm guessing my Olive Tin DVR_SHARE and LOGS_SHARE envt variables need to point to C:\CHANNELS_DVR. Right now those are pointing to /mnt/dvr and /mnt/channelsdvr . How do I get DVR_SHARE and LOGS_SHARE to point to Windows C:\CHANNELS_DVR ?

Also, where should my PORTAINER_HOST envt variable point to?

Go through the same process to update your stack, and you can set:

DVR_SHARE=C:\CHANNELS_DVR

To get your LOGS_SHARE value (which is where the CDVR executable resides), you can use the OliveTin Action for generating a filtered log, and search for:

screenshot-htpc6-2024.07.21-15_59_39

This will tell you what path Channels used to startup, and you want that path -- minus the last data part. In other words LOGS_SHARE should be set to this value:

PORTAINER_HOST is the IP address or hostname (if it resolves correctly) of the system where Portainer is running. Sounds like for you, localhost would work, though you could also use the LAN IP address of that system.

You'll also want to generate your PORTAINER_TOKEN, so that you can use Project One-Click. This is done by using the dropdown in the upper right corner of Portainer, next to your username, followed by selecting "My account". Create an Access Token named OliveTin, and use it for your PORTAINER_TOKEN value. Be aware you'll only be able view it once, so store it somewhere secure, for potential future use.

Couldn't update the stack, error is:

failed to deploy a stack: time="2024-07-21T22:47:56Z" level=warning msg="The "DOMAIN" variable is not set. Defaulting to a blank string." time="2024-07-21T22:47:56Z" level=warning msg="The "DOMAIN" variable is not set. Defaulting to a blank string." Network olive_tin_default Creating Network olive_tin_default Created Container olivetin Creating Container static-file-server Creating Error response from daemon: invalid volume specification: 'C:\CHANNELS_DVR:/mnt/192.168.1.135-8089:rw'

You probably need to use a forward slash instead of a backslash, try:

DVR_SHARE=C:/CHANNELS_DVR

I wondered about that and tried both, it didn't matter.

I found that I can get to the correct directory in the terminal via /mnt/c/CHANNELS_DVR. I put this in for the the DVR_SHARE and the LOGS_SHARE variables in portainer. The stack deployed and is running. Healthcheck good. Now for some more testing, can you say which of the olive tin scripts use LOGS_SHARE for my testing?

Are you sure this is correct for LOGS_SHARE? Did you run the "Filtered Log" Action referenced above to get the path for the LOGS_SHARE directory?

As you've discovered, /mnt/c is the the equivilant of C:\, and is actually preferable imo to using C:\ -- but many Windows users prefer the standard WIndows style path approach.

The "E-Mail Log Alerts" Action is a good one to test the LOGS_SHARE path, but this also depends on you having properly established these values:

This requires setting up an "app" password using Gmail or Yahoo mail. It's worth it though, as you can get alerted to anything in your logs you'd like. I have mine set to [DVR] Error, and I just got notified this morning about a failure to tune for a recording -- in plenty of time to set up an alternate recording source. For testing, something like [DVR] would give you a hit pretty quickly.

BTW, I assume you've noticed that the requirements for each one of these values is described in comments in the Docker Compose itself? Also, searching this thread for specific keywords can be quite useful. Don't get me wrong, I'm happy to answer questions, but I'm not always available, and most all of what we're discussing has been covered here before.

These are my Windows env variables ....
image


Hi. I have a question about the Email Log Alerts action. I just set up an alert for [DVR] as you recommended for @skipt . I used the default frequency of 2m. I received an initial email with a collection of recent log activity.

So far, the action has been running for over 30 minutes and I have only received the initial email. In checking the DVR log, I see that there has been more [DVR] activity, which spans greater than the selected 2m frequency for the action.

Should I expect to see emails every 2 minutes, if there are more frequent log entries? Or, does the action check at the selected frequency, and send a summary less often?

1 Like

The idea is that the frequency is the maximum rate that e-mails will be sent. It's a simple tail command of the CDVR logfile, and as matches are found they're output to file -- with e-mails sent at the requested interval with the contents of the file.

In my case I'm using [DVR] Error, and it appears I'm getting notified of those errors, but the number of occurrences may not be right.

For example, searching using the Filtered Log Action I see the following from this morning:

2024/07/21 08:30:14.126686 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:30:27.949336 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:30:41.655945 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:30:55.345948 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:31:09.746143 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:31:23.403155 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:31:37.012636 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:31:50.971575 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:32:04.620381 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:32:18.236827 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:32:31.954599 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:32:45.626754 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:32:59.737798 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:33:13.727419 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:33:27.804574 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:33:41.753548 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:33:55.738674 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:34:09.749981 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:34:23.730991 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:34:37.668088 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:34:52.676994 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:35:06.380956 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:35:20.146719 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:35:33.798078 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:35:47.548303 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.
2024/07/21 08:36:01.415609 [DVR] Error running job 1721572200-37 Face the Nation: could not start stream on channels=[6003]: TVE: DirecTV is having an issue with their service. Please try again in a few hours. Channels cannot fix this.

But I only received one e-mail containing the first eight of those errors. Not a huge deal, as the errors are the same, just with different timestamps -- but I would like to understand why they're getting dropped.

I've had this action running for nearly 3 hours now, frequency of 2m, filter [DVR].
In that time period, there are nearly 50 log entries indicated in a filtered search for [DVR].
So far, only one single email, concurrent with the time I initiated the Email log action and including about two dozen [DVR] entries leading up to the time when the action was started.

Thanks for finding this. I'll have a look at where things are going off the tracks tomorrow.

EDIT: Found the problem. I'll push an update tomorrow AM.

1 Like

New bnhf/olivetin:latest (aka bnhf/olivetin:2024.07.22) pushed with fix for an issue in the "E-Mail Log Alerts" Action that was preventing subsequent e-mails from being generated after the first one.

@jsfullam This is working for me, but if you wouldn't mind confirming it's fixed for you too after updating -- I'd appreciate it.

Updated and restarted. The first email came up on launching the action and included the last [DVR] entries leading up to the start time. A second email came after the next set of log entries hit. Third email now. So far, the emails show no gaps in filtered entries.
Looks good from here! :slightly_smiling_face:

1 Like

I'm getting the following error from the E-mail Log Alerts script:

tail: cannot open '/mnt/ip_redacted-8089_logs/data/channels-dvr.log' for reading: No such file or directory

I can see the logs on the CDVR browser UI at http://ip_redacted:8089/admin/log

What are you using for your LOGS_SHARE value?

/mnt/c/CHANNELS_DVR/Logs

I'm curious: in my CDVR installation I have ~Logs/comskip, ~Logs/recording, and I see a big log file at http://ip_redacted:8089/admin/log. What are the differences between these logs, and which one(s) do the Email Log Alerts draw from?