HDMI for Channels

AFAIK those won't work because they don't support the App Store so you cannot load the Spectrum app. You will need at least the 4th gen. If you discover otherwise, please let me know. I have a box full of those too.

I am using 2 of the older 4Ks and 1 of the original 4th gen. All work great.

1 Like

If you're going for a multi tuner setup, one thing I found was that it is usually cheaper to get Apple TV units that don't come with a remote. As long as you have 1 remote, it's easy to pair with each unit to go through setup. Once they're set up, you shouldn't really need the remote. Also once they're set up, you can control them with atvremote if you go that route or any iphone or ipad. If you really need to, it's also really easy to just re-pair them with the remote that you do have.

1 Like

I tried to replicated moving start script with no luck. I just have no understanding of that io.reader thing.

What I did do is completely remove the dependence on the bash scripts and instead running the curl command directly in main.go. After a lot of trial and error I got it to work. Just wow. I didn't expect it to make that much difference. It tunes much faster and by the time the stream comes live the tuning is complete; little to no Spectrum navigation stuff. Really slick.

Based on these results, I am convinced that there is more room to improve. I have no idea what I am doing, but it seams to be working. I think this could be a no-compromise solution to both replacing both TVE and HDHR Primes.

Anyway, I am excited and thought I would share.

[Edit]
Tune times from a few random sampled channels using a stopwatch
HDHR OTA ~2.5s
HDMI Tuner ~ 2.6s
TVE ~3.6s

Interesting results! I'll have to play around with eliminating the script altogether as well. I only kept it around in case I wanted swap out what was being controlled but if there are gains to be had, it would probably be worth it.

With the system up and running, I've been looking at power consumption. Currently I've got an Apple TV 4k 2nd gen and an Apple TV HD 4th gen. Even though the 4k is newer, it idles at around 2.7w while the HD idles at 1.6w. While streaming, the 4k is around 3.5w and the HD is at 2.4w. This may be influenced by the fact that the 4k is running and streaming at 1080p while the HD is at 720p since it's connected to the USB HDMI input on the Link Pi. Another observation is that if the video preview is running on the home screen, the 4k goes to 2.9w idle while the HD goes to 2.2w.

TLDR: All of these thing sip power but the 4th Gen non 4k uses about 1w less than the 2nd gen 4k Apple TV and disabling the video preview saves a bit of power.

Thank you for the power data. Doesn't seem like much having 3 running 24hrs/day adds up quickly. I intend to move all this up to my server closet and don't need the additional power and heat load. They are currently tucked away in an AV cabinet, but don't want it there long term.

I am thinking that I may put the ATVs to sleep after a period of not being used. The only real downside is that the first tune coming from sleep takes ~7 seconds. Tuner 1 does most of the work, so this may be a good solution to minimize resource usage, particularly for tuners 2 and 3.

Also, the things tune lighting fast if I just have it exit to the Spectrum menu instead of going to the ATV Home Screen. Problem is that the Spectrum app is always running the last tuned channel in the background. So not only is their moving video, but the last channel stream is still active, using internet bandwidth. If the Spectrum app had a setting to go to a static screen, that would be ideal.

Can you show me the changes you made? I tried to do this but was not able to make it reliable but maybe I just need to look at it again with your changes!

I'd like to try this too, but there appears to be no application to install. Does anyone have some quick instructions on how to us this? Is it done through powershell (windows)?

1 Like

This project looks cool, but there is too much info in this Thread for me to digest. I get the hardware requirements (encoder, Google Tv, etc.), but without rolling up my sleeves and getting hands on with everything it is hard for me to visualize all the necessary pieces to get this working.

My main point of confusion is all the steps necessary to have it change channels automatically so the streaming device can tune into the correct channel for recording. I'm sure I could eventually figure it out with all the information and help from others here, but it still sounds like a hodgepodge setup.

Some questions for the group...

  • Is this something that Channels DVR can add in to the CHDVR server eventually? If so, I will likely wait until the implementation is available.

  • Is it possible to use Home Assistant to automatically change the channels based on a request from the Channels DVR server? Android TV Remote - Home Assistant

  • Is there any advantage to using a encoder/decoder (instead of just an encoder). I see some device specifically state they decode as well. 4k Video Encoder-Decoder

  • Is it possible to replace the video encoder with a small intel NUC, something like THIS using hdmi to USB device? I believe the intel n95 can do hardware encode/decode for h.264 and h.265.

What streaming application are you hoping to use?

1 Like

My concern is that TVE will eventually go away. I'm currently using Dish Network for TVE in Channels DVR. I also have Spectrum choice streaming which I only use as a backup TVE source for now. Ultimately, I would like to use the Spectrum Choice, as I think that may be easier than Dish Network.

1 Like

I just added the last, test binary I built to my Github page. Note that I no longer have Spectrum so can't test any more. The gradlew.bat file might work for you under Windows. I built under Linux.

2 Likes

Spectrum has a Xumo Android Box. It has a guide and and integrated TV experience that uses channels numbers. Numbers are the easiest way to target programming as they don't change and are easy to script. This is what I do with DirecTV Osprey Boxes. Not sure if Xumo boxes allow Dev Mode and ADB, but it's possible.

1 Like

I have Onn and URayEncoder but your pyatv post got me looking at changing. Do you have any links to assist in figuring out these launch_app values? For example, I can't figure out how to hand off to fox sports for this particular (NCAA Mens Iowa/Wisconsin). If I go to Apple News I see
https://tv.apple.com/us/sporting-event/20-wisconsin-badgers-at-iowa-hawkeyes/umc.cse.74xtwfm0qwv4449kd4ecz2k9t

And the following will simply open the app
atvremote -s 10.0.1.28 --companion-credentials ``cat app/config/slratv.cred`` launch_app=com.uie.foxsports

But I can't determine how to make this open the Fox Sports App with this "episode".

Thanks for any pointers

I don't have any first hand experience beyond the spectrum app but the pyatv documentation does have some pointers on finding deeplinks.

It looks like one way is to use the share function in the iOS version of the app.

1 Like

I have ordered a used apple tv 4th gen on ebay. Will be here next week so i can start experimenting with it. I was thinking of picking up a xumo box and sending ir codes to it but they have been sold out on the website for weeks. I have read that if you get them directly from xfinity or spectrum they might be limiting them even more. At least with apple products it's not locked into spectrums ecosystem.

....Just looked again and NOW it says they are back in stock on xumo website...Figures...lol

1 Like

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:

  1. Create atv/spectrum scripts and m3u (used zap2it to find channel codes)
  2. Setup Stack in Portainer
  3. 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!
  4. 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

2 Likes

No problem, I'll add them to the next build.

I've been messing around a bit with using an Apple TV as a streaming device myself. The main comment I'd make, for those that may be pondering the benefit of such a move, is don't do it unless you have a compelling reason to do so from an app perspective. Controlling an ATV works great for those apps that have Apple-compatible deeplinks -- but for those that don't, the toolkit available for simulating a remote is pretty limited.

Great to see you got it running! I'm also just using the home command to stop the stream. You could leave the Spectrum app running which would speed up tuning, but I think @chasut determined there isn't a way to keep the app open without it also streaming so you'd be constantly using bandwidth and ~0.8w of power on an atv gen 4. I've found that starting the app from the home screen is plenty fast enough for tuning.

Really appreciate that! :smiley:

Totally agree with the don't do it unless you have to... Just seems to be the best solution for spectrum channels especially the ones not available on tve anymore.
Second option was the locked down Xuma box and really didn't want to go that way if I didn't have to.

Can't remember if I saw someone mention it once or not...
But I thought it might be nice to leave a tuner tuned to the last channel and rotate through tuners instead. This would allow super fast previous channel tuning.

Could maybe set up environment variables for number of tuners to use for this and amount of time before you go ahead and shut off that stream.

Always fun to dream

:smiley: