ATV Gen4 /w Docker bnhf/ah4c Setup
Hardware:
CDVR running on Rasperry Pi
LinkPi ENC5 V2
ATV Gen 4
Server (Running OpenMediaVault/Docker/Portainer
Thanks @icnerm for your information on using ATV's
@icnerm What command are using to stop stream?
Just got the ATV Gen4 working with Docker bnhf/ah4c.
Very rough right now but working
Wondering if @bnhf would consider adding atvremote to the docker or if someone could explain how to add it permantly. When troubleshooting I removed the IP variables from the scripts to figure out my problems so I will need to add those back eventually.
Mostly followed @bnhf instructions.
Here is a break down and my current settings incase it can help someone:
- Create atv/spectrum scripts and m3u (used zap2it to find channel codes)
- Setup Stack in Portainer
- Use Container Console to install python,pip, pyatv and atvremote inside docker container...These do not survive a reboot and must be reinstalled if you reboot the container!
- Add Custom Channel in CDVR
Docker Setup
Scripts and m3u in atv/spectrum
spectrum.m3u
#EXTM3U
#EXTINF:-1 channel-id="CNBC" tvc-guide-stationid="10139",CNBC
http://192.168.1.101:7654/play/tuner/CNBC
#EXTINF:-1 channel-id="ESPN" tvc-guide-stationid="10179",ESPN
http://192.168.1.101:7654/play/tuner/ESPN
premitune.sh
#!/bin/bash
#Nothing Needed
bmitune.sh
#!/bin/bash
#CNBC
if [ $1 = "CNBC" ];then
atvremote -s 192.168.1.54 launch_app=spectrumTV://watch.spectrum.net/livetv/58780
fi
#ESPN
if [ $1 = "ESPN" ];then
atvremote -s 192.168.1.54 launch_app=spectrumTV://watch.spectrum.net/livetv/32645
fi
stopbmitune.sh
#!/bin/bash
atvremote -s 192.168.1.54 home delay=1000 menu
Install Programs in Docker Container using Console and verifiy it works
apk add --update --no-cache python3
ln -sf python3 /usr/bin/python
python3 -m ensurepip
pip3 install --no-cache --upgrade pip setuptools
pip3 install pyatv
atvremote --scan-hosts 192.168.1.54 scan
atvremote -s 192.168.1.54 --protocol airplay pair
atvremote -s 192.168.1.54 --protocol companion pair
atvremote -s 192.168.1.54 --protocol raop pair
atvremote -s 192.168.1.54 launch_app=spectrumTV://watch.spectrum.net/livetv/58780
atvremote -s 192.168.1.54 home delay=1000 menu