HDMI for Channels

I meant to share that article here yesterday. There’s also a big difference between well-known actual Android TV dongles like the CCwGTv dongle and Onn.TV puck, and those super cheapo boxes running some older version of basic Android, identified as a Nexus tablet or whatever, with various apps and repositories pre-installed on them to facilitate piracy.

And yes, malware too.

1 Like

I have an Onn TV 4K and started experimenting with it last night. After installing and setting up adb and enabling developer mode, I got it to tune MSNBC in YTTV by sending the adb command (copied from the bmitune.sh file in this thread) from the Windows PC hosting Channels DVR. (I don't have an HDMI encoder yet, still investigating).

1 Like

Let's mix this up a bit and take a look at Roku.

For whatever reason, Roku devices have an actual, but somewhat limited, REST API. In addition, Roku provides a "Deep Linking Tester" tool that can be used to figure out how to link to specific content items.

Looking at YouTube TV, the following configuration will get you ESPN.
Note: assumes cURL is available.

prebmitune.sh

#!/bin/bash
# Loads home screen to set the device to a known state. Probably not required.
ROKU_TARGET=ip.address.of.roku
curl -d '' "http://$ROKU_TARGET:8060/keypress/home"

bmitune.sh

#!/bin/bash
# 195316 is Roku's application id for YouTube TV
# YouTube TV content ids can be pulled from the address bar when viewing a channel on a PC.

if [ $1 = "espn" ];then
    TARGET_CONTENT_ID=k-KlMzmHTAo
    curl -d '' "http://$ROKU_TARGET:8060/launch/195316?contentId=$TARGET_CONTENT_ID&mediaType=live"
fi

stopbmitune.sh

#Loads home screen and stops video playback.
curl -d '' "http://$ROKU_TARGET:8060/keypress/home"

That's it.

For many reasons I dislike Roku, but for this application a cheap Roku device might actually be a good choice.

3 Likes

This is fascinating stuff.
Thinking about trying some of this, but I am a Windows user, and pretty far from what would be called a programmer. I am a tech head though, and program industrial equipment, just a little different...LOL
I'm hoping some version of this gets incorporated into channels..

1 Like

Just for reference for people who are interested in Spectrum on Roku - the channel ID for the Spectrum app is 23048. I'm able to get the app itself to launch with this curl command

curl -d '' "http://$ROKU_TARGET:8060/launch/23048"

but I have not yet figured out what the launch parameters are to open a specific channel or even if those exist on this app to begin with.

I've been trying a number of things with the Spectrum app on a Roku for several days to no avail. I suppose you could brute force a channel with a script by assuming the channel that pops up is the last one played, which always seems to be the case, but the script would be flying blind.

1 Like

The Roku's API is indeed easy, and thanks for the example script snips. Wouldn't that be an interesting turn of the worm if these become the defacto easy option as a front-end for the HDMI input into Channels!

2 Likes

Yep, that would be an interesting twist indeed... now I'm thinking, which device has more exclusive apps, channels or other content otherwise unavailable to AppleTV, that could be leveraged somehow as yet another Custom Channel...?

https://www.fiercevideo.com/video/roku-channel-bulks-up-exclusive-content

For my "dual tuner HDMI" setup currently in motion, I may end up being happiest with one of each deployed... one Android TV dongle and one Roku, helping aggregate even more content on-demand to an AppleTV by way of Channels DVR served on a Mac... for the best of all worlds! Muuahahahaaaaa....

3 Likes

What is the likelihood that Roku's API is a permanent "feature"?

I am not well versed in their ecosystem, but what else uses this API and would likely continue to be supported forever?

1 Like

I think the APIs to launch apps via native IP control on both Google TV and Roku devices will stick around for a long time, lots of high-end AV systems like Crestron, Control4 and Savant rely on that sort of remote control.

What's I'm not so sure of is, which specific 3rd party apps will allow deep-linking directly to specific live TV channels, like YTTV does? As well as whether or not their links are static long enough to rely on, for stuff like this. I feel like stringing together long macro commands of keypresses or searching channel names wouldn't be nearly as quick or reliable.

1 Like

I believe the roku remote app on ios and android uses these apis

1 Like

Xfinity provides a web remote to control the cable box. Has anyone try to automate this from scripting tool?

LOL. Yeah I did see the humor in using a Roku device with Channels when I was testing it.

I do also like how easy it is to disable all of the ads on the Roku and remove every app except for YouTube TV. Though I presume one could remove apps from Google TV via adb and install an alternate "launcher."

On a side note, and I don't want to get too far off topic, but I did immediately notice, and confirmed by video frame comparison (view full screen, look at the grass/pitcher's mound/batter's disappearing nose), that at least for YouTube TV the Roku video is noticeably less detailed compared to the Google TV (Walmart "onn") device. Something to consider when choosing a device I guess.

It will definitely be less reliable because apps are updated on the regular and key sequences could change. Anything with an API will be way more reliable.

Interesting observation. Which Roku device are you using?

The video's labelling says Roku Express?

1 Like

Roku Express 4K+

Potentially millions of Android TVs and phones come with malware preinstalled | Ars Technica)

Google Support: Ensuring your Android TV OS device is secure

Google kills me sometimes. From the " Ensuring your Android TV OS device is secure" link:

What to do if your device isn’t Play Protect certified

If your device isn't Play Protect certified, we recommend you contact your device manufacturer. Ask for a fully tested, Play Protect certified device.

:rofl: