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

This is likely the issue. What URL do you typically use to access Portainer from a browser on your LAN?

I go directly to my IP:Port for Portainer access.

I think you're right about my docker-host... what do I put there? Here's the output from trying to OneClick Samsung TV:

exit status 1

+ dvr=192.168.1.123:8089
++ basename /config/samsung-tvplus-for-channels.sh
+ extension=samsung-tvplus-for-channels.sh
+ extension=samsung-tvplus-for-channels
+ cp /config/samsung-tvplus-for-channels.env /tmp
+ envFile=/tmp/samsung-tvplus-for-channels.env
+ [[ -n docker-host ]]
+ extensionURL=docker-host:8182
+ [[ # == \# ]]
+ cdvrStartingChannel=
+ [[ -n '' ]]
+ cdvrIgnoreM3UNumbers=
+ curl -s -o /dev/null http://docker-host:8182
+ envVars=("TAG=$2" "HOST_PORT=$3" "CDVR_STARTING_CHANNEL=$4")
+ printf '%s\n' TAG=latest HOST_PORT=8182 CDVR_STARTING_CHANNEL=#
+ sed -i /=#/d /tmp/samsung-tvplus-for-channels.env
+ /config/portainerstack.sh samsung-tvplus-for-channels
+ stackName=samsung-tvplus-for-channels
+ portainerHost=docker-host
+ curl -s -o /dev/null http://docker-host:9000
+ portainerURL='https://docker-host:9443/api/stacks?type=2&method=string&endpointId=2'
+ portainerToken=ptr_rfXHJP5An+aEciUChuqB7sIZUqLDfB2OCVWOaFIK2fc
+ cp /config/samsung-tvplus-for-channels.yaml /tmp
+ stackFile=/tmp/samsung-tvplus-for-channels.yaml
+ envFile=/tmp/samsung-tvplus-for-channels.env
++ grep DVR_SHARE= /tmp/samsung-tvplus-for-channels.env
++ grep -v /
++ awk -F= '{print $2}'
+ dockerVolume=
++ grep VOL_EXTERNAL= /tmp/samsung-tvplus-for-channels.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ volumeExternal=
++ grep VOL_NAME= /tmp/samsung-tvplus-for-channels.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ volumeName=
+ [[ -n '' ]]
++ awk '{printf "%s\\n", $0}' /tmp/samsung-tvplus-for-channels.yaml
++ sed 's/"/\\"/g'
+ stackContent='version: '\''3.9'\''\nservices:\n  # GitHub home for this project: https://github.com/matthuisman/samsung-tvplus-for-channels\n  # Docker Hub home for this project: https://hub.docker.com/r/matthuisman/samsung-tvplus-for-channels\n  samsung-tvplus-for-channels:\n    image: matthuisman/samsung-tvplus-for-channels:${TAG}\n    container_name: samsung-tvplus-for-channels\n    ports:\n      - ${HOST_PORT}:80 # Use the same port number the container is using, or optionally change it if the port is already in use on your host\n    restart: unless-stopped\n\n  # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n'
+ stackEnvVars='['
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "8182"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "8182"}]'
++ cat
+ stackJSON='{
  "Name": "samsung-tvplus-for-channels",
  "SwarmID": "",
  "StackFileContent": "version: '\''3.9'\''\nservices:\n  # GitHub home for this project: https://github.com/matthuisman/samsung-tvplus-for-channels\n  # Docker Hub home for this project: https://hub.docker.com/r/matthuisman/samsung-tvplus-for-channels\n  samsung-tvplus-for-channels:\n    image: matthuisman/samsung-tvplus-for-channels:${TAG}\n    container_name: samsung-tvplus-for-channels\n    ports:\n      - ${HOST_PORT}:80 # Use the same port number the container is using, or optionally change it if the port is already in use on your host\n    restart: unless-stopped\n\n  # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n",
  "Env": [{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "8182"}]
}'
+ echo 'JSON response from https://docker-host:9443/api/stacks?type=2&method=string&endpointId=2:'
++ curl -k -X POST -H 'Content-Type: application/json' -H 'X-API-Key: ptr_rfXHJP5An+aEciUChuqB7sIZUqLDfB2OCVWOaFIK2fc' -d '{
  "Name": "samsung-tvplus-for-channels",
  "SwarmID": "",
  "StackFileContent": "version: '\''3.9'\''\nservices:\n  # GitHub home for this project: https://github.com/matthuisman/samsung-tvplus-for-channels\n  # Docker Hub home for this project: https://hub.docker.com/r/matthuisman/samsung-tvplus-for-channels\n  samsung-tvplus-for-channels:\n    image: matthuisman/samsung-tvplus-for-channels:${TAG}\n    container_name: samsung-tvplus-for-channels\n    ports:\n      - ${HOST_PORT}:80 # Use the same port number the container is using, or optionally change it if the port is already in use on your host\n    restart: unless-stopped\n\n  # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n",
  "Env": [{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "8182"}]
}' 'https://docker-host:9443/api/stacks?type=2&method=string&endpointId=2'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: docker-host
+ portainerResponse=
+ [[ -z '' ]]
+ exit 1
+ [[ 1 == 1 ]]
+ exit 1```

Use that IP value then for PORTAINER_HOST

Unrelated to Project One-Click, but your LOGS_SHARE value isn't correct yet -- and this is a result of you using CDVR in a container. Can you post your compose or the command line you use for CDVR too please?

I had a feeling the container had something to do with it. I'm running this on a brand new UGreen NAS and I had to use their docker app to set everything up... I actually wrote up the description of how I got it installed since it's a bit different than docker usually works...

You can see how I set up CDVR her: Setting Up Channels DVR on UGREEN NAS - Channels DVR Server - Channels Community (getchannels.com)

Project One-Click should be working for you now, but there are other Actions that depend on LOGS_SHARE being correct. Could you follow this link, and post the output please:

Hmm...no, Project One-Click still isn't working for me. Here's the error list again from trying the Samsung script:

exit status 1

+ dvr=192.168.1.123:8089
++ basename /config/samsung-tvplus-for-channels.sh
+ extension=samsung-tvplus-for-channels.sh
+ extension=samsung-tvplus-for-channels
+ cp /config/samsung-tvplus-for-channels.env /tmp
+ envFile=/tmp/samsung-tvplus-for-channels.env
+ [[ -n 192.168.1.123:9000 ]]
+ extensionURL=192.168.1.123:9000:8182
+ [[ # == \# ]]
+ cdvrStartingChannel=
+ [[ -n '' ]]
+ cdvrIgnoreM3UNumbers=
+ curl -s -o /dev/null http://192.168.1.123:9000:8182
+ envVars=("TAG=$2" "HOST_PORT=$3" "CDVR_STARTING_CHANNEL=$4")
+ printf '%s\n' TAG=latest HOST_PORT=8182 CDVR_STARTING_CHANNEL=#
+ sed -i /=#/d /tmp/samsung-tvplus-for-channels.env
+ /config/portainerstack.sh samsung-tvplus-for-channels
+ stackName=samsung-tvplus-for-channels
+ portainerHost=192.168.1.123:9000
+ curl -s -o /dev/null http://192.168.1.123:9000:9000
+ portainerURL='https://192.168.1.123:9000:9443/api/stacks?type=2&method=string&endpointId=2'
+ portainerToken=ptr_lLJQANBCQ08cJop6jaxCgiPcLuC7bsduEEKiv2v3Rnk=
+ cp /config/samsung-tvplus-for-channels.yaml /tmp
+ stackFile=/tmp/samsung-tvplus-for-channels.yaml
+ envFile=/tmp/samsung-tvplus-for-channels.env
++ grep DVR_SHARE= /tmp/samsung-tvplus-for-channels.env
++ grep -v /
++ awk -F= '{print $2}'
+ dockerVolume=
++ grep VOL_EXTERNAL= /tmp/samsung-tvplus-for-channels.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ volumeExternal=
++ grep VOL_NAME= /tmp/samsung-tvplus-for-channels.env
++ grep -v '#'
++ awk -F= '{print $2}'
+ volumeName=
+ [[ -n '' ]]
++ awk '{printf "%s\\n", $0}' /tmp/samsung-tvplus-for-channels.yaml
++ sed 's/"/\\"/g'
+ stackContent='version: '\''3.9'\''\nservices:\n  # GitHub home for this project: https://github.com/matthuisman/samsung-tvplus-for-channels\n  # Docker Hub home for this project: https://hub.docker.com/r/matthuisman/samsung-tvplus-for-channels\n  samsung-tvplus-for-channels:\n    image: matthuisman/samsung-tvplus-for-channels:${TAG}\n    container_name: samsung-tvplus-for-channels\n    ports:\n      - ${HOST_PORT}:80 # Use the same port number the container is using, or optionally change it if the port is already in use on your host\n    restart: unless-stopped\n\n  # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n'
+ stackEnvVars='['
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "8182"},'
+ IFS==
+ read -r key value
+ stackEnvVars='[{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "8182"}]'
++ cat
+ stackJSON='{
  "Name": "samsung-tvplus-for-channels",
  "SwarmID": "",
  "StackFileContent": "version: '\''3.9'\''\nservices:\n  # GitHub home for this project: https://github.com/matthuisman/samsung-tvplus-for-channels\n  # Docker Hub home for this project: https://hub.docker.com/r/matthuisman/samsung-tvplus-for-channels\n  samsung-tvplus-for-channels:\n    image: matthuisman/samsung-tvplus-for-channels:${TAG}\n    container_name: samsung-tvplus-for-channels\n    ports:\n      - ${HOST_PORT}:80 # Use the same port number the container is using, or optionally change it if the port is already in use on your host\n    restart: unless-stopped\n\n  # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n",
  "Env": [{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "8182"}]
}'
+ echo 'JSON response from https://192.168.1.123:9000:9443/api/stacks?type=2&method=string&endpointId=2:'
++ curl -k -X POST -H 'Content-Type: application/json' -H 'X-API-Key: ptr_lLJQANBCQ08cJop6jaxCgiPcLuC7bsduEEKiv2v3Rnk=' -d '{
  "Name": "samsung-tvplus-for-channels",
  "SwarmID": "",
  "StackFileContent": "version: '\''3.9'\''\nservices:\n  # GitHub home for this project: https://github.com/matthuisman/samsung-tvplus-for-channels\n  # Docker Hub home for this project: https://hub.docker.com/r/matthuisman/samsung-tvplus-for-channels\n  samsung-tvplus-for-channels:\n    image: matthuisman/samsung-tvplus-for-channels:${TAG}\n    container_name: samsung-tvplus-for-channels\n    ports:\n      - ${HOST_PORT}:80 # Use the same port number the container is using, or optionally change it if the port is already in use on your host\n    restart: unless-stopped\n\n  # Default Environment variables can be found below under stderr -- copy and paste into Portainer-Stacks Environment variables section in Advanced mode\n",
  "Env": [{"name": "TAG", "value": "latest"},{"name": "HOST_PORT", "value": "8182"}]
}' 'https://192.168.1.123:9000:9443/api/stacks?type=2&method=string&endpointId=2'
curl: (3) URL using bad/illegal format or missing URL
+ portainerResponse=
+ [[ -z '' ]]
+ exit 1
+ [[ 1 == 1 ]]
+ exit 1

Here's the output from running "Generate Filtered Channels DVR Log" instructions...

2024/07/10 02:19:09.595794 [SYS] Starting Channels DVR v2024.07.09.1812 (linux-x86_64 pid:7) in /channels-dvr/data
2024/07/10 02:47:48.491272 [SYS] Starting Channels DVR v2024.07.09.1812 (linux-x86_64 pid:7) in /channels-dvr/data
2024/07/09 22:49:11.933127 [SYS] Starting Channels DVR v2024.07.09.1812 (linux-x86_64 pid:7) in /channels-dvr/data
2024/07/12 11:24:05.214024 [SYS] Starting Channels DVR v2024.07.12.0633 (linux-x86_64 pid:7) in /channels-dvr/data

and the errors:

+ dvr=192.168.1.123:8089
+ numberLines=100000
++ sed 's/[][\.*^$(){}?+|/]/\\&/g'
++ echo '[SYS]' Starting Channels
+ filterResult='\[SYS\] Starting Channels'
+ scriptRun
+ case "$filterResult" in
+ grep '\[SYS\] Starting Channels'
+ curl 'http://192.168.1.123:8089/log?n=100000'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 11.5M    0 11.5M    0     0  33.4M      0 --:--:-- --:--:-- --:--:-- 33.4M
+ runResult=0
+ [[ 0 == \1 ]]
+ [[ 0 == \0 ]]
+ exit 0```

Your PORTAINER_HOST value should be just the IP without the PORT

What value are you using currently for LOGS_SHARE?

AHA!! YES! Thank you, I misunderstood earlier. Fixed that and now Project One-Click is working!! Thanks!

This is what I have... again, this is in Ugreen's weird Docker installation...

Looking at it again, your LOGS_SHARE value should be fine -- so you're good to go!

Ah! OK thank you!!

Actually... the Stirr One-Click doesn't work and freezes in OliveTin after creating the container in Portainer. It doesn't add itself to CDVR. The other One-Clicks seem to work fine. Just that one for some reason gave me grief. Tried it a couple times too. Stirr just stops at "Waiting For Result".

I thought Stirr is no longer available.

Oh... I've been using an m3u from another source and the channels have still be streaming for me, so I assumed it was still around. The One-Click still pulls and creates the container in Docker, it just doesn't add it to CDVR. I was just preferring to run it on my own server.

I saw that, but I'm using a source for it from https://i.mjh.nz/Stirr/all.m3u8 and it's got 66 channels... :man_shrugging: