Alrighty then, here's the latest update to the Docker container for this project!
Support has been added to pass the streaming device's adb hostname:port or ip:port to the scripts, so you'll no longer need individual scripts for each tuner.
Also, the scripts are being organized under /opt/scripts/streamer/app, where streamer/app is the type of streaming device followed by the streaming app name. For example onn/yttv, chromecast/hulu or firetv/directv. The current sample scripts will be under sample/yttv.
There are some new and changed environment variables, so make sure you update your compose in Portainer - Stacks accordingly when you pull the new image:
version: '3.9'
services:
androidhdmi-for-channels:
image: bnhf/androidhdmi-for-channels:latest
container_name: androidhdmi-for-channels
dns_search: localdomain # Specify the name of your LAN's domain, usually local or localdomain
ports:
- 5037:5037 # Port used by adb-server
- 7654:7654 # Port used by Channels androidhdmi-for-channels proxy
environment:
# - ADB_DEVICES=${ADB_DEVICES} # Space separated list of adb devices to control in the form hostname:port or ip:port
- TUNERS=${TUNERS} # Number of tuners you'd like defined 1, 2, 3 or 4 supported
- STREAMER1_HOST=${STREAMER1_HOST} # Streaming device #1 with adb port in the form hostname:port or ip:port
- STREAMER2_HOST=${STREAMER2_HOST} # Streaming device #2 with adb port in the form hostname:port or ip:port
- STREAMER3_HOST=${STREAMER3_HOST} # Streaming device #3 with adb port in the form hostname:port or ip:port
- STREAMER4_HOST=${STREAMER4_HOST} # Streaming device #4 with adb port in the form hostname:port or ip:port
- TUNER1_URL=${TUNER1_URL} # Full URL for tuner #1 in the form http://hostname/stream or http://ip/stream
- TUNER2_URL=${TUNER2_URL} # Full URL for tuner #2 in the form http://hostname/stream or http://ip/stream
- TUNER3_URL=${TUNER3_URL} # Full URL for tuner #3 in the form http://hostname/stream or http://ip/stream
- TUNER4_URL=${TUNER4_URL} # Full URL for tuner #4 in the form http://hostname/stream or http://ip/stream
- STREAMER_APP=${STREAMER_APP} # Streaming device name and streaming app you're using in the form streamer/app (use lowercase with slash between as shown)
volumes:
- /data/androidhdmi-for-channels:/opt/scripts # pre/stop/bmitune.sh scripts will be stored in this bound host directory under streamer/app
- /data/adb:/root/.android # Persistent data directory for adb keys
restart: unless-stopped
Your Portainer - Stacks should look similar to this:
You'll want to update your scripts to take advantage of "$1" in the pre/stop scripts, and "$2" in the start script. These are the STREAMERx_HOST values for each virtual tuner.
It'd be nice for those that are trying to get going with this extension to be able to start with script samples for whatever combination of streamer/app that you're using. So even if your script isn't perfect yet, by getting it bundled with the container it'll be a better starting point than the current samples.
EDIT: Added a bound directory for the adb data to make adb connections persistent across container deployments.