HDMI for Channels

I’ve been able to use this with some success, but my Firestick keeps losing the ABD connection. Sometimes it will go a week or so, and then sometimes drop every few hours. If I reboot, everything a good. I’ve searched everywhere and can’t seem to figure out why this happens. Any suggestions?

You are probably using wireless .. and what generation is your FireStick ?

I am using wireless, and I tried wired, but was never able to get a wired connection using the Amazon dongle. It would only go to WiFi. I just purchased it about a month ago and it’s Android 11, latest 4k Firestick. Sorry if that not the info you requested., I’ve only used ATV’s before and not that familiar. Do you think wireless is the issue?

Make sure you have the FireTV stick never to sleep/disable screensaver ... Make sure Still watching is turned off.

@bnhf @KompilerDJ I've enjoyed AH4C so much I wanted to give back. I've tailored the tune scripts to use Osprey DirecTV streamers. How can I share them with you?

1 Like

If you PM them to me, I can post them on the sullrich/ah4c repo in the correct spot. Once I'm back in the US (a couple of weeks yet), I'll push a new container to Docker Hub that'll include them. Alternatively, if you're familiar with the PR process on GitHub, you can submit them that way.

3 Likes

Pull Request made on GitHub. The only changes are my scripts added to location scripts/osprey/directv. My AH4C fork is here if anyone wants to see the scripts before commit. These scripts are intended for AT&T Osprey models C71KW-200/C71KW-400.

Thanks for the awesome work!

2 Likes

Thanks for the contribution! It has been merged.

1 Like

OK, so for those of you using the ah4c project with DirecTV or DTVStream, an app update started rolling out several weeks ago -- though my sticks only got it yesterday. Thanks to @gfhartzell for letting me know of its existence.

I've made some preliminary changes to scripts/firetv/directv/bmitune.sh to support the new app version. I'll push a container update soon, after I've done additional testing.

However, for anyone that wants in on the fun now -- there's only one function tuneChannel() that appears to need modification, and here it is:

#Tuning is based on channel name values from $m3uName.
tuneChannel() {
  channelName=$(awk -F, '/channel-id='"$channelID"'/ {print $2}' m3u/$m3uName)
  channelName=$(echo $channelName | sed 's/^/"/;s/$/"/')
  numberOfBackspaces=25
  clearSearchBackspaces=$(for ((i=0; i<$numberOfBackspaces; i++)); do echo -n " KEYCODE_MEDIA_REWIND"; done)

  directvMenu="input keyevent KEYCODE_MENU; sleep 6"

  directvSearch="input keyevent KEYCODE_DPAD_LEFT; \
                 input keyevent KEYCODE_DPAD_UP; \
                 input keyevent KEYCODE_DPAD_CENTER; sleep 1; \
                 input keyevent KEYCODE_DPAD_CENTER; sleep 1"

  directvClearSearch="input keyevent$clearSearchBackspaces"

  directvTune="input keyevent KEYCODE_MEDIA_PLAY_PAUSE; sleep 1; \
               input keyevent KEYCODE_DPAD_DOWN; \
               input keyevent KEYCODE_DPAD_DOWN; \
               input keyevent KEYCODE_DPAD_DOWN; \
               input keyevent KEYCODE_DPAD_CENTER"

  $adbTarget shell $directvMenu
  $adbTarget shell $directvSearch
  $adbTarget shell $directvClearSearch
  $adbTarget shell input text "$channelName"
  $adbTarget shell $directvTune
}

I'm only able to test with my DTV credentials, and we have seen some slight differences for those with DTVStream credentials in the past -- so if you try this out, be sure to give me feedback here, especially if you have DTVStream.

EDIT: Small change to the tuneChannel() function to make clearing the search field more easily configurable. Hard coded moves replaced with a loop.

2 Likes

Good news! The fix is in and eary manual tuning testing looks good with DirectvStream. I will do further testing with scheduled recordings tonight.
Thank you for the fix

Recordings went ok Its looking good here!

1 Like

Same in my testing. Multiple DTV/ah4c recordings -- all good. The Aussie Open recordings I've been doing, via the Tennis Channel on my server in the US, are looking fabulous here in Portugal on a 55" TV. CDVR + ah4c + Tailscale = remote TV excellence! :slight_smile:

3 Likes

I've started a new thread specific to the dockerized version of the ah4c project, mostly because there's so much outdated information here related to the early days of this project. Hopefully, this will make it easier to differentiate between what ah4c is best for, and where ADBTuner is preferred:

3 Likes

It seems that the two major forks of this project both use Android sticks and ADB but that wasn't an option for me as a Spectrum user as there is no app for Android/Fire TV. I actually started out using the chrome tab capture but with a dedicated i5 8500t I was still getting consistent stutters every few minutes. With that machine taking around 10w idle and 25w during streaming, I didn't want to throw any more power at it.

My next try started with the original github ah4c project using a Link Pi Enc1-v3 being fed by a Spectrum 110-H set top box. I had a pretty janky script that used a switchbot mini to blast ir signals for tuning. The streaming quality was great and the tuning speed was reasonable, but annoyingly the 110-H actually has certain channels only in SD. These same channels play just fine in HD both through the website and the apps.

My next step was to add a USB HDMI capture dongle to the Link Pi with a Roku 3800x streaming stick. I already had the stick and saw that there was an api that supported starting the Spectrum app and pressing buttons. For this, I made an even jankier script that used key presses to bring up the guide and scroll through channels 4 at a time to get to the right channel. It was actually pretty reliable but tuning speed could be up to around 20s to get from the farthest channels. This solution also had the drawback of requiring that the roku app stayed on and streaming. I toyed with letting it sleep, but starting the Spectrum app from scratch and tuning was unreliable and would take on the order to 40s when it worked.

The solution that I settled on is still based on the original ah4c repo but I've replaced the STB and Roku with a couple of used Apple TVs that I picked up on ebay for ~$40. Another user, @chasut, posted about a solution with Apple TV via Home Assistant and also linked to the Apple TV python library that Home Assistant uses. It turns out that python library comes with a utility called atvremote that actually has everything needed without even getting into the python. Setting up and connecting to the Apple TV is through a guided wizard and then tuning is just a single command.

atvremote -s $1 launch_app=spectrumTV://watch.spectrum.net/livetv/$2?linkorigin=sirilivetunein&idtype=tms

$1 is the ip address of the paired Apple TV and $2 is the tmsid for the channel that you can grab off the Spectrum web player. Tuning is quick and reliable and stopping the channel returns home so I'm no longer streaming 24/7. I'm still working on a smoothness issue with my Google TV sticks but I'm sure it's something to do with those sticks and my Link Pi settings as the streams are completely smooth on all of the other platforms that I've used.

Overall I'm very satisfied with end result. This was originally motivated by getting Nick Jr and Tennis channel working again but now I've also gained access to a bunch of Spectrum sports channels and premium movie channels that I mostly ignored since I couldn't get them into Channels.

Thanks to the devs and many users that have posted their experiences and helped me get this up and running! I'm happy to share more details of my setup, but honestly the pyatv tools take most of the work out of it.

6 Likes

Excellent!

My setup is still running on the original go app on the Mac mini that hosts CDVR. I think I will follow your lead and try moving over to ah4c in docker on my NAS just to clean things up a bit.

Would you mind sharing your environment variables used for ah4c? Particularly those for the tuners and encoders. My command will be a little different but the reference will help me figure out what I need to do.

over the last couple of months my experience with this little bodged-up solution has been far better than expected. The only issue in that time has been an auto update of TVOS that presented a modal information screen that needed to be cleared. Turning auto update off is an easy solution. I also completely removed the prebmitune.sh bit from the process. With the direct tune I could see no value and saved almost a half second in tune time.

I recently prioritized this over TVE in CDVR, so far so good. Picture is just as good, and better in many cases. Plus I have access to [almost] every channel in my subscription.

I feel fully prepared for any coming apocalypse with TVE.

3 Likes

I think I got my terminology a bit mixed up but I'm not using the ah4c docker container, I'm also still just using the original go app. Like you, I've gotten rid of the prebmitune.sh. The other change that I've made is to add in a small delay to the start of the stream just to prevent the stream showing the atv home screen or spectrum splash screen.

That's a good tip on the auto updates. I just got hit with that so I've also now disabled auto update. For now I've still got TVE ahead in priority but that's because I do a lot of recordings on TVE available channels and only have 2 atv tuners and want to keep them open for Nick Jr. I'm also feeling prepared for the TVE apocalypse. The question is... whether to add another Enc1-v3 for 4 tuners total or... go for the Enc5-v2.

Where did you place the delay in the code? That is on my list if things to do as well.

I am going to tinker with going to ah4c in docker and happy to share once I get there. It is either that or wrap the go app in "forever" or something so that it will auto start and run in the background. At this point I have had zero issues with tuning reliability (other than the update thing) so don't even know where to start with hardening.

FWIW, I started with the Enc1-v3 but they were not available in December. So I added two of the Uraycoders for a total of 3 tuners. My thinking was that by having it fully modular with individual encoders, I could add/upgrade one at a time as needed. I don't know if that is smart or not, but that is what I did. I would really like to add surround sound, but as of now, not only do the encoders not support it, but the Spectrum app doesn't yet either. To me, the improved sound is more important than 4K. Either way it isn't cheap, but oh so satisfying.

For the delay, I moved the execution of the start script from the Read() function to the tune() function before the call to http.Get(). I'm not very far removed from a Hello World level with Go so it's very possible that wasn't the best thing to do, but it appears to have achieved the result I wanted. Currently I've got the go application running as a service but containerizing it to package up the different pieces would be a great move.

Do you notice any difference in quality between the Link Pi and Uraycoders? Also what device do you use on the client side for CDVR? I'm currently mostly using the Google TV with Chromecast but after playing around a bit with the Apple TVs as tuners, the dead simple ad free UI is appealing.

I am with you on Go, just reading it makes my head hurt. What I think I understand is that the result is not so much a delay in the tuning, but just tuning BEFORE the url is passed to CDVR. That would be a superior solution in this context. But then again, I could be reading it wrong!

In my experience the Uray produces a [slightly] better result. I don't think it is worth the price difference. But enough that they are in the first two slots in the tuner bank. That said, you would need pretty highly calibrated eyes to tell the difference. IMHO, the key to this whole approach is having a quality feed on the input. I think the encoding bit is more of a commodity until you get up to the high-end stuff.

I long ago sold out to apple, so all my TVs use the Apple TV box. I really like them and that silly remote. That is why I had a box full of old ones laying around just for this project.

@icnerm

I am working on getting spectrum to work also. I had also tried to use a Roku and also can't use my FireTV sticks or Onn 4k's because of the lack of a spectrum app. I was looking on ebay and was thinking about picking up a couple 3rd gen apple boxes. One of the sellers say it is reset to factory defaults but only the apps already installed are available and you can't install any additional ones including spectrum tv app. I am not at all familiar with apple tv's. I don't know if this standard for 3rd gen or not. Can you recommend which ones you are using?

Thank you

1 Like