Oh snap. I had no idea since I don’t own any android TV boxes.
You’re using the Spectrum app on Apple TV with the HDMI box and recording on Channels DVR? If so how are you changing channels?
That could get costly with four Apple TVs though.
For at the moment. I have for instance I record Monday Night RAW. I made a custom channel with attached USA network to it with the ip address of my encoder. So it automatically starts recording with my pass. The kick is that I have to make sure USA network is tuned in already so that it's not just recording whatever is on the screen. Unfortunately, at the moment that part is all manual but I just set a reminder on my iPhone 15 mins before hand and tune into it. I can also do it remotely using the Switchbot Hub Mini. If I'm not mistaken the USA network app or NBC app should be on android and you then could setup the script to open said app. I just haven't wrapped my brain around doing all of that at the moment. Just wanted to get the proof of concept. Before this was using OBS and now I like this option better where it automatically starts recording. And with that it saves and extra step so I just have to tune to it. I also have other ideas for instance using the Peacock app to record PPV's from WWE or other streaming services the possibilities are endless. Which are going to be great for time shifting and not having to watch up to live.
I’m planning to do the same for the Xfinity Stream app on Apple TV. You can launch Siri Shortcuts from macOS to tune channel on Apple TV.
I don't know if this would work or not. I'm still waiting for my encoder to test out with Cable Box using IR Blaster method.
bmitune.sh
#!/bin/bash
#ESPN
if [ $1 = "90001" ];then
shortcuts://run-shortcut?name=PlayESPN
fi#FS1
if [ $1 = "90002" ];then
shortcuts://run-shortcut?name=PlayFS1
fi
#EXTM3U
#EXTINF:-1 channel-id="ESPN" channel-number="90001"
http://IP:7654/play/tuner/90001#EXTINF:-1 channel-id="FS1" channel-number="90002"
http://IP:7654/play/tuner/90002
That’s a great idea! I guess Spectrum App doesn’t support Siri Shortcuts only Xfinity app does,
As far as TV devices, I believe Apple TV, Roku, Xbox, and Samsung TV. It also is available for iPhones/iPads and Android phones/tablets.
This might come in handy for anyone who wants to use a Roku as the device they plug into the encoder. It could be a good option for Spectrum. I’ve never used it, so YMMV GitHub - jcarbaugh/python-roku: Screw remotes. Control your Roku with Python.
I spent some time on this today and feel that I'm pretty close! I've got all the hardware in place, I am able to tune into and record from the HDMI. The output displays fine using this custom channel:
#EXTINF:-1 channel-id="HDMI" channel-number="100.1" tvc-guide-placeholders="86400",HDMI
http://10.0.1.171:80/main
Now I'm trying with the androidhdmi-for-channels program to get it to change channels on the AndroidTV dongle automatically. I followed the instructions to install on my Mac mini server, the same one with Channels DVR installed. I'm using this Custom Channel format which I gleaned from above:
#EXTINF:-1 channel-id="msnbc" channel-number="100.1" tvc-guide-placeholders="86400", MSNBC
http://10.0.1.171:7654/play/tuner/msnbc
...but I'm getting this error when I try to tune in:
I do have Developer Options and USB debugging enabled on the Android TV dongle too. I also installed add on the Mac with the brew command. Is there anything else I need to do in order to get adb working and connected from this Mac?
I thought it might be a macOS Ventura / permissions thing but I made sure this was allowed.
Any feedback or suggestions to try are appreciated!
Use the IP of the Mac in your M3U not the encoder
After you make changes to the go code, you need to run go build
again.
If you only have one encoder, you can comment out the second entry in the code.
You will also need to fix the paths to the shell scripts, they are set to /opt/opendct
which should be replaced. Try using ./
maybe that will let the program run them out of the source directory
Great, thanks, that's very helpful. I changed the IP in my M3U, quickly realized that after I posted:
#EXTINF:-1 channel-id="msnbc" channel-number="100.1" tvc-guide-placeholders="86400", MSNBC
http://10.0.1.21:7654/play/tuner/msnbc
I also edited the IP address in prebmitune.sh to that of the Android TV device:
I edited the main.go file, to just one tuner. I tried it with the ./ prefix, and ran "go build" again:
That didn't work so I tried it with the full /Volumes/Channels-DVR/androidhdmi-for-channels/ prefix, and ran "go build" yet again:
Still getting this error though. Feels like I'm getting closer and closer.
I note it is still referencing the "/opt/opendct/" prefix even though I edited it in main.go and ran the "go build" command again after those changes were made.
When you do:
adb devices
from your terminal do you see your android device listed?
Restart the program after build.
Also make sure adb is installed (once it starts invoking ./ scripts)
Thanks so much for the help, I appreciate it...
Yes, and I did have to authorize on the Android TV, at first:
and now I see:
Yes, with each change I quit and delete the old program, run the go build command, then launch the newly built program. adb seems to be installed as I get the proper response when I type "adb devices."
I added this to bmitune.sh, per a very helpful DM from @boukmandutty, thanks!
#MSNBC
if [ $1 = "136" ];then
adb shell $HOME
adb shell $PRIME1
adb shell $PRIME2
#adb shell $PRIME3
adb shell input text "stream\ msnbc\ on\ YouTube\ TV"
adb shell $SEARCH1
adb shell $SEARCH2
fi
Unfortunately this is the error I still get when trying to tune in:
I'm not sure what else to try, but am open to any and all ideas.
It is being directed to /opt/opendct/ for the files but that folder does not exist.
Did you rebuild after you edited the main.go?
More specifically did you do
go build
from the androidhdmi-for-channels folder?
Yes, that's correct. And I don't know how to get it to direct to the proper folder. I did edit main.go:
Yes, I quit and deleted the old program. After editing the main.go, I ran the "go build" command again, then launched the newly built program. And yet I'm still getting the same error when attempting to tune in, which invokes the script:
[ERR] Failed to run stop script: fork/exec /opt/opendct/stopbmituneb.sh: no such file or directory
Try this from that folder:
sudo mv androidhdmi-for-channels androidhdmi-for-channels.backup
Then do the go build again.
Then do:
ls
It should have replaced it.
It replaces it, but still have the same end result as when was deleting the old app and creating a new one after an edit. Unfortunately I'm still getting the same error. I even tried copying the .sh files into /opt/opendct (after creating that directory) but I still get the same error. I'm stumped.
So I'm gonna hit the hay, and will try again with a clearer head tomorrow.
Thanks for the assistance, all!
Cool.
I wonder if you have a permissions problem. When you get up, check to see if the changes to made to the main.go file is still there or if it has reverted to the original status.
Any chance you ran go install
at one point? When running go install
the executable is installed to to your $GOPATH/bin
directory which might be why you keep getting an "older" build of androidhdmi-for-channels
to be launched.
You can check which executable is used by using the which command in your terminal.
which androidhdmi-for-channels