Yup. I edited my previous celebratory comment regarding this concern. On the Roku Tuner we are sending a keypress "Enter" just short of every 4 hours. I don't think that we ever managed to get around this on ADBTuner.
I'll give it a try by adding this config to one of my DTV channels and scheduling some back to back recordings which exceed 4 hours total...
Just a general note: It's somewhat important to keep in mind that there is no guarantee that all the commands specified in a tuning configuration will execute. I don't even know if you can execute a script that way on the device via ADB, but if that does work, I wouldn't leave a script running with no guarantee that something will run to clean up.
I don't think you can send key commands that way from the CLI anyway and ADB usage from the local Android device is blocked for security reasons in newer Android versions.
I'm going to push the current beta build of ADBTuner to stable this weekend. Afterwards I will look into adding a configuration option to send a timed command (or set of commands) while a channel is currently being watched. I think that will be helpful with what you all are doing.
Considering this, I may not be too eager to jump into testing this configuration right now. Perhaps it is better to wait until the idea is more refined. Besides, my wife and I have some health concerns which I currently need to focus upon.
That's a clever solution. Watch out though, if ADBTuner restarts, crashes, etc. while streaming there will be nothing to stop that background process from running on the android device.
Hello everyone. As was previously announced, it's time for a new stable release.
For lack of a better name I'm going to call this ADBTuner 2.0.
A new 2.0 tag was added this morning and the stable tag was updated to point to this release.
This is now the recommended version for day-to-day usage.
There are some significant backend changes in this build however everything should be automatically updated as needed on first load. There may be some issues for users that might have jumped back and forth between stable and other builds over the past couple of years. If you run into any please let me know.
Changes since the last stable release:
Switched to a dedicated proxy server that is always running instead of bringing one up for each stream and tearing it down afterwards. This enabled the following:
- Significantly improved control over tuner locking.
- Streams are now kept active for short while after a disconnect so clients can reconnect and continue watching without having to start over. This fixes issues with dodgy network connections and with client apps that retry if the stream doesn't start immediately (Kodi).
- Tuners will now be shared if more than one client app is streaming the same thing. Shared tuners will be locked until the last client disconnects.
Added experimental support for custom tuning configurations. These configurations can be used to define a set of custom ADB commands for applications that don't work with the default standard or compatibility mode options. A web interface for this is provided at /configurations. This feature is still experimental and may change in the future.
Added health check / status page at /up.
Improved playback detection.
Improved profile screen detection clearing (who's watching).
Added more detailed logging. Specifcally around locked tuners.
Added preview window with remote control buttons for each streaming endpoint in the web UI.
Enabled admin preview windows on mobile devices and tablets.
Improved keep alive functionality. This should now work with most applications.
Apps kept awake with the keep alive feature will no longer sit in the foreground. This is preferred as some apps always stream video when they are in the foreground.
By default, all video streams will now start after 20 seconds regardless of if the requested content has started playing. This allows for slow loading content that previously failed if the client connection timed out. The old behavior can be restored by selecting "Terminate Connection" for the "Slow / Failed Tuning Behavior" setting in the admin interface.
Added support for obtaining a deeplink url from a remote endpoint. This can be used by including "dynamic_url_json_key" parameter in the URL. The value should match the key that contains the URL in the json response. This is being used by ESPN+ with Custom Channels via ADBTuner.
Admin UI cleanup, improved navigation, dark mode support, improved mobile device support.
New REST API. Docs at /api/docs.
And finally, there have been many bug fixes since the last release. This version of ADBTuner should provide a better experience overall.
Thank you everyone for testing these builds and for all of your valuable feedback.
Along with ALL the other great improvements...I am very interested in the keep tuners alive for a short time part.
I am wondering if you could make this use a variable so we can SET the amount of time to keep the channel alive. I like to be able to jump back and forth between channels and don't want to have to tell channels to record the channels to keep them alive.
I currently keep my ah4c:appletv channels alive for 15 minutes using some custom scripts. I would love for this to work on my adbtuner/onn/philo channels also.
There is an environment variable (KNOWN_STREAM_DEFAULT_TIMEOUT) if you want to play around with that. The default (measured in seconds) is 3. Edit: There may be a hardcoded max of 40 seconds.
Tested 2.0 Stable on my Onn 4K Plus and Osprey stacks. Both working as expected. Thanks again for all you do.
Looked at this some... took me a little while was not getting lastest build on repull...
Realized that I had my image set to ...image: turtletank99/adbtuner:latest
instead of image: turtletank99/adbtuner:stable
latest kept pulling an image from July...

Then I wasn't sure if KNOWN_STREAM_DEFAULT_TIMEOUT was to go in the stack env variable or inside a custom configuration...
After trying both it looks like it should be a stack/compose env var...
Using
KNOWN_STREAM_DEFAULT_TIMEOUT=30 and/or
KNOWN_STREAM_DEFAULT_TIMEOUT=40
Realized when I started to test that one of my tuners had signed out of Philo at some point in the past...
So I have tried the defaults and a custom configuration and it seems like it might work the first time or two if I jump back and forth... but then it will shutdown one and then the other when switching and have to re-tune.
Almost looks like it is not reseting/restarting the timer if we go back into that tuner...So maybe the 3rd quick time of entering then leaving it reaches the total of 40sec and shuts it down...
After it shuts down a tuner it then goes into the shutting down the tuners EVERYTIME you switch between channels...
FWIW: I have been pulling the image adbtuner:beta so that I can help in testing new developmental versions/features. I'm currently running what I think is the latest version: 2.0-Beta-20251114-2
Reference to the :beta tag is made in this earlier post: ADBTuner: A "channel tuning" application for networked Google TV / Android TV devices - #2692 by turtletank
Isn't the "play" button also "pause"?
I tested many of these button presses on the Roku version of DirecTV app. The only key presses I found which had no visible effect were "Enter" and "Backspace". As far as I know, the same may be true for Android. I just tested the Android app on my Onn 4k. On the physical remote, the Enter button works as a combo play/pause while viewing. It also brings up a shaded timeline/navigation overlay across the bottom of the screen.
I had purchased some Osprey boxes, but returned them. I change providers often enough that I don't want to invest in provider specific hardware. The Onn 4k boxes for ADBTuner, and Roku 4k Streaming Sticks for the Roku Tuner Bridge, are multi-purpose hardware which hopefully will adapt as I go through different streaming services.
You can't go wrong for the price.
i went with my entertainment with hulu and HBO Max.
I have TVE plus 2 onn boxes for using channels. I use FRNDLY for the channels missing from directv Stream.
If I continued with DTV, then I would've gotten the Osprey Boxes but it's too rich for me and honestly I'd rather use ah4c and another HDMI encoder for that instead if I got it.
I'm moving on to Sling Blue + Disney bundle...
I've tried slong and it is missing way too much.
MyEntertainment with the bundled disneyplus and Hulu is a good buy for now.
I'm not a huge fan of hese bundles becuase they have stuff missing.
I want all my locals plus sports etc if i were to add any other genre packs might just as well get entertainment and or choice but MyEntertainment is a sweet spot with Directv.
I'm starting to move in that direction. Dumped philo and left YTTV long ago.
Thanks for all the help with deep linking
I've been using Osprey boxes, with AH4C, for over two years. They have updated many times. They sell a dongle "air" version that is pretty simiar. And yes, the Osprey hardware is used for satellite customers. No one knows for sure, but I don't seem the killing off connections any time soon.
In fact yes, done by your Internet IP address to determine home network. I put the unlimited to good use 
Some other small notes. Ospreys will stream a channel all day if you want it to, no time-out prompt. Also, Ospreys allow you to input DirecTV channel numbers, which was the basis for my AH4C Scripts. If Deep Links every stopped working, you can use the powerful and reliable AH4C. Channel numbers are unlikely to every change.
Ospreys boxes have proven an excellent match for my automation, but they have limitations. I'm eager to see how @anon38303228 setup goes. Maybe then we can share a setup guide.
As you discovered, it's an environment variable and should be part of the Docker configuration, not a custom configuration within ADBTuner. It would looks something like this in a Docker Compose file:
...
environment:
- KNOWN_STREAM_DEFAULT_TIMEOUT=40
...
The docker logs should help understand what exactly what is happening on your end.
A line like this would indicate that the tuner was released because it exceeded the amount of time as configured by this setting.
Releasing tuner 3 as it has been inactive for 40 seconds.
A line like this would indicate that the hardcoded maximum time (40 seconds) is exceeded:
Releasing tuner 3 as it is no longer tracked by the proxy server.
I appreciate what you are trying to accomplish, but it wasn't something I hadn't even thought about and I'm not sure if playing with this will achieve much. But I can confirm that it will respect that setting up to the 40 second maximum.
The 2.0 release (currently adbtuner:stable or adbtuner:2.0) is the same as that release. There were no changes other than the version number. At this point, I would suggest that you switch to adbtuner:stable.
Going forward, adbtuner:stable should be the preferred version for day-to-day use. New features will be pushed to adbtuner:development. I'm going to delete the now outdated latest, beta, experimental and other tags. As always, I appreciate everyone's help in testing all of these builds.
Edit: people are still pulling adbtuner:latest. I will keep this around, but it will just mirror adbtuner:stable.
Walmart has them for $41. Free returns until Jan 31.
