Thank you for that. I feel like I'm getting close, with the ability to send commands manually to change channels, but I've got empty guide data, and my source doesn't give me any channels to add. I've hit a wall and I'm not sure what to tweak next. I've done the whole "go build", have a little exec app that I run, but still nothing.
Remove the space after your first #.
Thanks. That did the trick showing the channel (NBC, for example) in the client (although it gives me generic guide data). When I try launching a channel on my iPhone, I get a "connection refused" error. I see you mentioned that issue in an earlier post, and Aman said you need to change "tune.sb" to "tune.sh", but I can't see where that was in the examples you posted.
Possibly unrelated, does the androidhdmi-for-channels program need to be installed within ADB's platform-tools directory? I realized that the commands to change channels only ran when I ran them after changing to that directory. I didn't install androidhdmi-for-channels there, but in its own directory.
Now manually map it to the real NBC:
main.go is the file where each "tuner" is listed. The default included two to start off with:
tuners = []tuner{
{
url: "http://10.0.1.172:80/main",
pre: "/Volumes/Channels-DVR/androidhdmi-for-channels/prebmitune.sh",
start: "/Volumes/Channels-DVR/androidhdmi-for-channels/bmitune.sh",
stop: "/Volumes/Channels-DVR/androidhdmi-for-channels/stopbmitune.sh",
},
{
url: "http://10.0.1.171:80/main",
pre: "/Volumes/Channels-DVR/androidhdmi-for-channels/prebmituneb.sh",
start: "/Volumes/Channels-DVR/androidhdmi-for-channels/bmituneb.sh",
stop: "/Volumes/Channels-DVR/androidhdmi-for-channels/stopbmituneb.sh",
},
}
)
When I started off I had removed the first one, leaving only the ___b.sh version, which mismatched the other files in the folder. Rookie mistake, lol. So leave yours be, or remove the second one. Just make sure it's matched up with a trio of .sh filenames that actually exist.
And, if you make corrections you will have to delete the previous .exe and rebuild it, for the changes to be reflected on next launch.
My androidhdmi-for-channels directory is on the same external hard drive as Channels DVR is. You can put it anywhere as long as the path is entered properly in main.go.
Yes!! It's all working. Need to tweak the adb commands a bit - I saw HULU get royally confused that required a Amazon Fire reboot.
Thanks everyone that has contributed to this thread!
Thanks. I'm making lots of rookie mistakes 
I recall an earlier post where Aman indicated whether the urls should be for the encoder or the actual streaming stick, but I can't find it. Any idea?
The URL's in the custom channel point to the android hdmi proxy go binary. In the go binary source code you will set the URL to the encoder device.
Inside the various stop, prei and bmitune files you will set the adb commands to point to the streaming stick. HTH.
Thank you! I'm getting much closer now. Tuning a channel in the guide no longer gives me an error. I see the feed from the encoder, but it is the same feed I saw during testing that I got before the streaming stick was turned on. So for some reason, it isn't turning the stick on.
Here's the error in the androidhdmi-for-channels program: "[ERR] Failed to run pre script: fork/exec /opt/opendct/prebmitune.sh: no such file or directory"
Double check the path's in the go source code pointing to the three shell scripts. In my case I hard coded the path to the local directory that the go binary lives in with ./
var (
tunerLock sync.Mutex
tuners = []tuner{
{
url: "http://10.0.250.110/ts/1_0",
pre: "./prebmitune110.sh",
start: "./bmitune110.sh",
stop: "./stopbmitune110.sh",
},
{
url: "http://10.0.250.111/main111.ts",
pre: "./prebmituneb111.sh",
start: "./bmituneb111.sh",
stop: "./stopbmituneb111.sh",
},
}
)
Thanks! Here's what I have in my main.go (my encoder's IP address is 192.168.7.168):
var (
tunerLock sync.Mutex
tuners = []tuner{
{
url: "http://192.168.7.168/0.ts",
pre: "/opt/opendct/prebmitune.sh",
start: "/opt/opendct/bmitune.sh",
stop: "/opt/opendct/stopbmitune.sh",
},
{
url: "http://192.168.7.168/main",
pre: "/opt/opendct/prebmituneb.sh",
start: "/opt/opendct/bmituneb.sh",
stop: "/opt/opendct/stopbmituneb.sh",
},
}
)
Make sure the shell scripts have execute permissions:
chmod a+x /opt/opendct/*.sh
Then try running the bmitune.sh while tuned into the encoder to see if the adb commands are kicking off correctly:
/opt/opendct/bmitune.sh nbc
Not sure what I'm doing here . . . Where do I type "chmod a+x /opt/opendct/*.sh"?
Just FYI and this may be only my area (Daytona) - the ONN 4K TV box is unobtainium at Walmart. Can't have it shipped and can't pick it up anywhere.
Not surprising given the features and the price for this little box, they massively underestimated demand I guess.
When I got one last week, searching on the WalMart site showed none available, and the product listing on WalMart's site showed it was out of stock. But if I did a Google search, and used the "shopping" tab in the Google results, it had a link to the WalMart product page, and if I followed that link to the WalMart product page, it showed some in stock (in-store, not online), even though it looked like the exact same page that showed none in stock if visited directly. Sure enough, when I went to a store, they had a few in stock.
Mine arrived quickly from Amazon for $29:
Same place you are running the go android binary from. I am assuming you are running linux since you are using an /opt directory?
On Mac, I use Terminal.app
And if it still doesn't work for you, maybe just move the androidhdmi-for-channels folder elsewhere and change the directory listed in the "pre," "start" and "stop" lines in main.go to match. Here's mine again:
Thank you. So when I run that in Terminal (after first using cd to go to the androidhdmi-for-channels directory), I get:
zsh: no matches found: /opt/opendct/*




