ADBTuner: Create Channels, Custom Config and CDVR Custom Channels for DirecTV

ADBTuner is a fantastic project, but in all candor, adding/editing large numbers of virtual channels is not fun.

In the interest of making your life a bit easier (and my own), I've automated the process of adding all of the channels in your DirecTV package to ADBTuner. This also includes deleting any existing channels with a provider name of DirecTV, plus adding whatever ADBTuner Custom Configuration you'd like to use, plus adding a CDVR Custom Channels Source named ADBTuner - DirecTV.

There are two specialized bits you'll need. The first is your personal, custom curl command for the DTV package(s) you subscribe to. Here are the steps to get that:

Navigate to https://stream.directv.com/guide in Chrome and login (if needed):

Next using the three stacked dots menu in the upper right of Chrome, select More tools - Developer tools:

With the Developer tools window open and Network selected, search for allchannels. You may need to refresh the guide window to get it to popup. Right-click on that (most recent one on the bottom of the list with the orange icon) and select Copy, followed by Copy as cURL (Bash): :

With that curl command in your clipboard, use the following OliveTin/Project One-Click Action:

screenshot-htpc6-2025_12_07-10_56_50

In that Action, you'll be copy-and-pasting your custom curl command, and also the ADBTuner Custom Configuration you'd like to use. Here's the one I'm currently recommending:

Complete the fields in the OliveTin Action, including the curl command and the custom config JSON:

The custom config you pasted in will be added to ADBTuner, and each channel created will be set to use that as it's tuning configuration.

Leaving DIRECTV_REMOVE set to true is generally a good idea, as that will delete any existing ADBTuner channels with a provider name of DirecTV.

Leaving the DTV_START_CHAN value set to # is also recommnded as then your DTV channels will use the same standard DTV channel numbers. Change it if those conflict with channel numbers already in use.

If everything goes according to plan, you should see OliveTin standard output like this:

This Action should go live tomorrow (08 Dec 25), and I'll edit this post once it's available for download. In the meantime, I wanted to let you all know this is coming, and invite any comments on the process.

EDIT: This Action requires the most recent development tagged version of ADBTuner.

4 Likes

The automation is designed to use whatever ADBTuner Custom Config you like, pasted in to the Action. In addition, you can re-run the Action at any point to use a new Custom Config (with a different UUID) and all of the previous channels will be deleted when the new ones (with the new config) are added.

The idea is to make it much easier to setup DTV initially, and to make change to configs and packages in the future.

Thanks for contributing the config. I went with one of your previous versions that didn't include the keep alive, since it sounds like @turtletank is going to add this to standard ADBTuner.

3 Likes

No support for that alternate deeplink construct atm, but it could easily be added. Is there more to it than just changing the scheme?

Thank you for putting this together. I included the ability to import and export channel lists at the very beginning of the ADBTuner project with the hope that people would share channel lists and/or find ways to automatically generate them. I agree that it's tedious to manage large lists of channels and that will be improved, but a better UX still won't be as good as something automated!

4 Likes

The quirks with Osprey and ABDT are really two differences to the DTV app setup.

  1. URL deep link format is different, noted by @anon38303228 above.

  2. ADBT channel programming does not recognize the system app com.att.tv.openvideo as a package name as it is not an installed app. I have to install a “dummy” app to be recognized as installed, have it selected and then ignore the target variable in my custom config. My tune command looks like this.


"am start -W -a android.intent.action.VIEW -d '||TARGET_URL_OR_IDENTIFIER||' com.att.tv.openvideo"

This works fine, although the dummy app is a work around. At some point I thought of asking TurtleTank if the Package Name could recognize System Apps. But as I’m the only person likely running Osprey+ADBT, don’t want to be selfish with development time.

If anyone wants my Osprey + ADBT write up, I’ll post it in this thread.

I shared the following with @anon38303228 yesterday, prep for an Osprey setup like I have. As there seems to be some interest, at least for a reference document, sharing publicly.


ADBT+DODL - Using ADBT with DirecTV Osprey Devices and Deep Links

DirecTV offers a branded Android/Google TV Hardware. The original was released as the Osprey in late 2018/early 2019. They are out of production, but are relatively cheap and still supported. I have six of them total, some for production, some for testing.

If you are dedicated to DirecTV, the Osprey boxes could have value. For about $40 (used eBay), you get streaming box with Ethernet and no four-hour time limit on streaming. I have been testing deep links for a few months and the results are good in ADBTuner.


Differences Between ADBT+DTV App and ADBT+DODL

The Osprey setup is pretty close to the standard setup for DirecTV app, with some key differences:

  • Deep Link URL has a slight different format
  • The Package Name is not used as part of the config as the DTV App is a system app (the launcher actually), not listed as installed Android package. You will need an installed "dummy" app.
  • The use of a custom Configuration is mandatory.

Setting Up Osprey for ADBTuner

The following assumes a basic understanding of ABTuner config, so I will short hand the setup. To make things easy, I put my Osprey setup in a second, dedicated ADBT DODL docker.

  1. Unbox your Osprey(s), update firmware to newest version. Current Android version is 11 on Ospreys. There is always the slight chance you get a really old AT&T Now version (2018) that won't take an update, but that listing you showed should be okay.
  2. On the Osprey, set your Preferences to not pick profile on reboot, and go to last channel when starting up.
  3. Set your power settings to your preference. I let my devices sleep.
  4. Enable USB Debugging.
  5. Remove any unwanted apps or bloat, either manually or via adb shell (adb shell cmd package list packages)
  6. Install any basic app from the App Store, make note of it's package name. We need this app as a dummy app to put into ADBTuner as package name. This app won't be used, can be anything installed. ADBT can't target system apps.
  7. Connect all your Osprey boxes as tuners in ADBT.

Create a Custom Configuration to do the Osprey Tuning

ADBT requires an installed package (from app store) to target in the channel configs. We won't be installing the DTV App as the Osprey uses com.att.tv.openvideo, default installed as a system app.

The actual tuning is done in the following configuration:

{
    "name": "DTV: Osprey Deep Link (DODL)",
    "author": "",
    "version": "0",
    "description": "Fast launch of Osprey Hardware.  Wake, Tune, Sleep.",
    "uuid": "871d0a68-6b1f-3358-b2c3-0c97fd0cf316",
    "global_options": {
        "wait_for_video_playback_detection": true,
        "use_fixed_delay": false,
        "fixed_delay_seconds": 0,
        "check_for_and_clear_whos_watching_prompts": false
    },
    "pre_tune_commands": [
        "input keyevent 224"
    ],
    "tune_commands": [
        "am start -W -a android.intent.action.VIEW -d '||TARGET_URL_OR_IDENTIFIER||' com.att.tv.openvideo"
    ],
    "post_tune_commands": [
        "input keyevent 26"
    ]
}

You will see in the Tune Commands I completely skip Target Package Name and just manually point to the DTV System App for viewing channels.

Also, I make my Osprey Boxes sleep (keyevent 26). Making them wake does take a little extra time and would be faster if you left them running, but I cover why I don't at the end of this document.


Configure ADBT Channels for Osprey

Input your channels with your preference for Channel Numbers and Names. Three main differences:

Osprey URL: Format is https://deeplink.directvnow.com/tune/live/channel/NAME/RESOURCE

Note: The DTV Apps is very close dtvnow://deeplink.directvnow.com/play/channel/NAME/RESOURCE

Package Name: Select the Dummy App you installed. This will not be used, but an installed package needs to be installed for ADBTuner to start automation. The actual targeting of the DTV System App is done in the config. At some point maybe we can request a bypass for this, but was never urgent for me.

Custom Config: Select the one you built for DODL.


Channel Export for DirecTV

Here is a channel export for most channels. They are currently matched to DirecTV channel numbers. I am West coast. Note the package name is "DUMMY-APP", which I changed before posting here to prevent any import confusion.

[{"provider_name": "DirecTV", "number": 202, "name": "CNNHD", "url": "https://deeplink.directvnow.com/tune/live/channel/CNNHD/d3603aea-f5d8-e789-786c-43c5e8799428", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "58646", "guide_offset_hours": "", "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 206, "name": "ESPN HD", "url": "https://deeplink.directvnow.com/tune/live/channel/dede9246-d012-a0b5-3a0d-47e1dab9aad8", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "32645", "guide_offset_hours": "", "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 209, "name": "ESPN2 HD", "url": "https://deeplink.directvnow.com/tune/live/channel/ESPN2HD/86803936-4000-2af7-19e9-81ba8fa148d8", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "45507", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 214, "name": "RACERNetwork", "url": "https://deeplink.directvnow.com/tune/live/channel/RACER/351b0623-e45c-790e-a36f-afb5a842cd04", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "61036", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 219, "name": "FS1", "url": "https://deeplink.directvnow.com/tune/live/channel/FS1HD/5c55c82f-c5cb-2aa5-6376-cc868d5cdc32", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 229, "name": "HGTV", "url": "https://deeplink.directvnow.com/tune/live/channel/HGTVHD/deaa46a3-836f-58f3-f897-73a42289a940", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "14902", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 231, "name": "Food Network", "url": "https://deeplink.directvnow.com/tune/live/channel/foodHD/7822f08f-c09d-d890-2b46-948766f9f571", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "12574", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 235, "name": "Tastemade", "url": "https://deeplink.directvnow.com/tune/live/channel/TASTE/6a0016fd-74ec-7d3e-973f-da042697284d", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "107076", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 236, "name": "E HD", "url": "https://deeplink.directvnow.com/tune/live/channel/E!HD/b4bd8603-8a28-c738-450b-b43807610760", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "61812", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 237, "name": "Bravo", "url": "https://deeplink.directvnow.com/tune/live/channel/BRVOHD/aad256ef-1e09-f926-a05e-2591a809ffff", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "58625", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 238, "name": "ReelzChannel HD", "url": "https://deeplink.directvnow.com/tune/live/channel/REELZHD/c3fbdc9f-44b7-76e3-23e9-cde81c5b3117", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "68385", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 239, "name": "Sundance", "url": "https://deeplink.directvnow.com/tune/live/channel/SUNDHD/d94cb013-806e-43f9-c316-31ed9073b3d3", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "71280", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 241, "name": "Paramount TV", "url": "https://deeplink.directvnow.com/tune/live/channel/PARHD/6924fc10-8306-4009-6495-714764f0dbf6", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "59186", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 242, "name": "USA Network", "url": "https://deeplink.directvnow.com/tune/live/channel/USAHD/28bbbe87-9c3b-5da7-4ad4-9868916b173d", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "58452", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 244, "name": "Syfy HD", "url": "https://deeplink.directvnow.com/tune/live/channel/SyfyHD/148e9301-574b-e202-9f1d-5eaac40731ac", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "58623", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 245, "name": "TNT HD", "url": "https://deeplink.directvnow.com/tune/live/channel/TNTHD/acf51074-6940-81d8-2355-c2eb610e0afc", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "42642", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 246, "name": "truTV HD", "url": "https://deeplink.directvnow.com/tune/live/channel/truTVHD/e7971467-59df-3be6-5711-8b9f72b70787", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "64490", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 247, "name": "TBS HD", "url": "https://deeplink.directvnow.com/tune/live/channel/TBSHD/ded1f9a7-a3e2-503d-7129-3e31e5257fae", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "58515", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 248, "name": "FX HD", "url": "https://deeplink.directvnow.com/tune/live/channel/FXHD/f1281894-b977-5b3a-596d-5cf3b1b176ca", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "58574", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 249, "name": "Comedy Central", "url": "https://deeplink.directvnow.com/tune/live/channel/COMHD/853e2bbe-abda-d6b7-26c9-69fbe2d007ef", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "62420", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 252, "name": "Lifetime", "url": "https://deeplink.directvnow.com/tune/live/channel/LIFEHD/bab3ef03-eeac-b5b1-a157-1a98bf4fbbde", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "60150", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 254, "name": "AMC HD", "url": "https://deeplink.directvnow.com/tune/live/channel/AMCHD/91f974cf-5346-2c4a-47c6-ad3326597a6b", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "59337", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 256, "name": "TCM HD", "url": "https://deeplink.directvnow.com/tune/live/channel/TCMHD/cca34ba0-ffc4-bcdd-16d1-20469ae2f1c9", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "64312", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 259, "name": "FXX HD", "url": "https://deeplink.directvnow.com/tune/live/channel/FXXHD/79dfae40-37b1-adf0-d95b-97c72f792a02", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "66379", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 260, "name": "WE TV", "url": "https://deeplink.directvnow.com/tune/live/channel/WEHD/af87404f-791a-a30f-c3f9-484abfce0452", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "59296", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 264, "name": "BBC America", "url": "https://deeplink.directvnow.com/tune/live/channel/BBCAHD/aade5336-7457-df09-bcfe-7485240a2f8d", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "64492", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 267, "name": "EarthxTV", "url": "https://deeplink.directvnow.com/tune/live/channel/EARTHX/76c132b0-fa3f-ac34-bc39-b0fecdc68e49", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "126128", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 269, "name": "HISTORY", "url": "https://deeplink.directvnow.com/tune/live/channel/HISTHD/3d2a7de5-af2e-b845-da1c-17d51e5f156a", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "57708", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 271, "name": "VICE", "url": "https://deeplink.directvnow.com/tune/live/channel/VICEHD/5d43cf2a-99f7-f804-499b-4409953e578d", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "65732", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 274, "name": "Ovation HD", "url": "https://deeplink.directvnow.com/tune/live/channel/OVTVHD/334adfc3-a627-41bd-7724-f313e9101697", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "69061", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 276, "name": "National Geographic Channel", "url": "https://deeplink.directvnow.com/tune/live/channel/NGCHD/2b76c29e-325d-a699-9a6c-99bbe6a7c765", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "49438", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 278, "name": "DSC HD", "url": "https://deeplink.directvnow.com/tune/live/channel/DSCHD/1755a18d-4cf4-8440-8f4a-bd73849cd9d6", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "56905", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 280, "name": "TLC HD", "url": "https://deeplink.directvnow.com/tune/live/channel/TLCHD/88bbbc54-9107-45ec-26b0-a79707a87bb2", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "57391", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 281, "name": "MotorTrend", "url": "https://deeplink.directvnow.com/tune/live/channel/MTHD/649c0044-750a-d41a-9d3d-55229567a62f", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "31046", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 282, "name": "Animal Planet", "url": "https://deeplink.directvnow.com/tune/live/channel/APLHD/6b8b578e-eaa0-8086-4803-340763f93d36", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "57394", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 285, "name": "Investigation Discovery", "url": "https://deeplink.directvnow.com/tune/live/channel/IDHD/29ef0716-ed45-4e47-5185-d4384199b291", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "65342", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 288, "name": "PBS Kids HD", "url": "https://deeplink.directvnow.com/tune/live/channel/PBSK/71932d04-1596-5e58-992b-300394cedca9", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "101364", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 289, "name": "Disney Junior HD", "url": "https://deeplink.directvnow.com/tune/live/channel/DSJRHD/74b13512-5e2c-8c70-15d0-d1c8b9fda9b2", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "74885", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 290, "name": "Disney Channel HD", "url": "https://deeplink.directvnow.com/tune/live/channel/DISeHD/22f13b87-4c9d-9674-f01d-328925c190e9", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "59684", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 292, "name": "Disney XD HD", "url": "https://deeplink.directvnow.com/tune/live/channel/DXDHD/d5b8d53c-1409-d612-3436-d7bccebc4e04", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "60006", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 293, "name": "Baby First HD", "url": "https://deeplink.directvnow.com/tune/live/channel/BABY/dc98eaf2-8e61-8222-e2a3-54dcb9e3d08a", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "50338", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 296, "name": "Cartoon Network", "url": "https://deeplink.directvnow.com/tune/live/channel/CNeHD/2336facb-8e11-c83b-b49f-4e54682104e3", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "60048", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 298, "name": "BOOM", "url": "https://deeplink.directvnow.com/tune/live/channel/Boom/e331455c-dfa0-7d05-2b47-2d22768394b9", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "21883", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 299, "name": "Nickelodeon", "url": "https://deeplink.directvnow.com/tune/live/channel/NIKeHD/ed9654e0-a239-473b-2654-f45e655b183c", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "59432", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 303, "name": "TeenNick", "url": "https://deeplink.directvnow.com/tune/live/channel/TNCK/dacae6da-950d-bc52-9e77-a120799ca097", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "59036", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 304, "name": "TV Land", "url": "https://deeplink.directvnow.com/tune/live/channel/TVLDHD/b24b7b6f-c840-e216-e73c-7d32d9eecbda", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "73541", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 305, "name": "ION", "url": "https://deeplink.directvnow.com/tune/live/channel/IONEHD/a6740f2c-81c8-f263-90ea-ac83df064f10", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "76894", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 307, "name": "NewsNation", "url": "https://deeplink.directvnow.com/tune/live/channel/NwsNnHD/870c91a5-e875-37f0-3c4f-d1b41ec6b831", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "91096", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 311, "name": "Freeform HD", "url": "https://deeplink.directvnow.com/tune/live/channel/FRFMHD/d3046aab-71b5-2d44-1b53-fcab4c9d7cad", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "59615", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 312, "name": "Hallmark Channel", "url": "https://deeplink.directvnow.com/tune/live/channel/HALLHD/a2236f35-6af2-3c7f-bf9d-979acaec1251", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "66268", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 314, "name": "Family Movie Classics", "url": "https://deeplink.directvnow.com/tune/live/channel/FMC/57b6cb4b-1a42-2381-901c-16a2813c6492", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "122068", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 323, "name": "FETV", "url": "https://deeplink.directvnow.com/tune/live/channel/FETV/3ef9f466-918c-40c8-a141-280f8d15f623", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "73413", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 327, "name": "CMT", "url": "https://deeplink.directvnow.com/tune/live/channel/CMTHD/61086ae5-48ce-8085-6d40-1da956771eba", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "10138", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 328, "name": "TV One", "url": "https://deeplink.directvnow.com/tune/live/channel/TV1/95d012f3-9276-a155-be33-96d29a3bf2e5", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "61960", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 329, "name": "BET HD", "url": "https://deeplink.directvnow.com/tune/live/channel/BETHD/1c362f35-5526-952d-b892-b1b8492d3d54", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "63236", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 331, "name": "MTV HD", "url": "https://deeplink.directvnow.com/tune/live/channel/MTVHD/9ec54b53-8d07-7efc-99a7-349057b95eed", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "60964", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 332, "name": "MTV2 HD", "url": "https://deeplink.directvnow.com/tune/live/channel/MTV2HD/721ab65b-5333-8c23-4a03-3fff869176c9", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "75077", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 333, "name": "IFC HD", "url": "https://deeplink.directvnow.com/tune/live/channel/IFCHD/156dda5e-4d82-707a-ee92-cd9fd017f425", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "59444", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 334, "name": "REVOLT", "url": "https://deeplink.directvnow.com/tune/live/channel/RVLTHD/541dd341-6a6d-19e4-58cf-b1d6469c4c05", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "83098", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 335, "name": "VH1 HD", "url": "https://deeplink.directvnow.com/tune/live/channel/VH1HD/f4d9239f-9378-1beb-9ab3-23c07a0b1473", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "60046", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 340, "name": "AXSTV", "url": "https://deeplink.directvnow.com/tune/live/channel/AXSTV/d0c3c9df-90af-6f4a-5ad0-ab0e0d646dd5", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "28506", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 341, "name": "Cleo TV", "url": "https://deeplink.directvnow.com/tune/live/channel/CLEOTV/abb3ce13-34f9-a681-7a07-ccee20166ee1", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "110289", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 342, "name": "theGrio", "url": "https://deeplink.directvnow.com/tune/live/channel/GRIOTV/bdc5570f-ff4d-776f-157d-cf398c4d0853", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "132272", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 345, "name": "RFD-TV", "url": "https://deeplink.directvnow.com/tune/live/channel/RFDTV/8653742c-ddfd-32d3-e9c9-8c3489892ff6", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "63717", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 347, "name": "The First", "url": "https://deeplink.directvnow.com/tune/live/channel/TheFirst/4bdf80f2-d09d-45d5-b98a-86da258f373e", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "114934", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 349, "name": "Newsmax TV", "url": "https://deeplink.directvnow.com/tune/live/channel/NEWSMXH/533f3fad-e91d-5cbf-6f80-82db799e4953", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "97163", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 350, "name": "C-SPAN", "url": "https://deeplink.directvnow.com/tune/live/channel/CSP1/c167f6c4-9128-4043-d798-50a8df3f29de", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "10161", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 351, "name": "C-SPAN2", "url": "https://deeplink.directvnow.com/tune/live/channel/CSP2/49943603-c8bb-1a02-9621-15c8e95ecf7c", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "10162", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 353, "name": "Bloomberg TV", "url": "https://deeplink.directvnow.com/tune/live/channel/BTVHD/862d91ba-d234-e4bc-1caa-79726755fd67", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "71799", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 354, "name": "Cheddar News", "url": "https://deeplink.directvnow.com/tune/live/channel/CHDR/3180919e-9228-678f-baa7-88a09c369a95", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "109333", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 355, "name": "CNBC HD", "url": "https://deeplink.directvnow.com/tune/live/channel/CNBCHD/a2ce2e53-bc11-775d-b070-e3c2d4a62d99", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "58780", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 356, "name": "MSNBC", "url": "https://deeplink.directvnow.com/tune/live/channel/MSNBC/6ea83d29-e16f-7ab5-397e-6efb32bbcba9", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "64241", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 358, "name": "CNNi HD", "url": "https://deeplink.directvnow.com/tune/live/channel/CNNiHD/ad9a7dfd-d780-1be2-adf2-a449399254f1", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "10146", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 359, "name": "Fox Business Network", "url": "https://deeplink.directvnow.com/tune/live/channel/FBNHD/b0129946-46f3-f80f-42ea-315f64eeaac0", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "58718", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 360, "name": "Fox News Channel", "url": "https://deeplink.directvnow.com/tune/live/channel/FNCHD/5f3323ab-7390-8fcc-177f-bf9cc8000bcf", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "60179", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 363, "name": "FOXWX", "url": "https://deeplink.directvnow.com/tune/live/channel/FOXWX/ecd16979-bf5c-6f24-2575-11788b27f387", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "93141", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 369, "name": "Daystar HD", "url": "https://deeplink.directvnow.com/tune/live/channel/DSTRHD/6ee7980c-e134-7e7a-7bd0-ddc88fb558cb", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "87001", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 381, "name": "Aspire HD", "url": "https://deeplink.directvnow.com/tune/live/channel/ASPHD/63976b4a-449a-c192-ff84-10c5d0c18fd2", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "97409", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 383, "name": "Justice Central HD", "url": "https://deeplink.directvnow.com/tune/live/channel/JCHD/cf7d17e0-f70e-9775-73a4-bd109035b169", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "78850", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 386, "name": "FM HD", "url": "https://deeplink.directvnow.com/tune/live/channel/FM HD/953bc9f7-4dc5-93b4-8052-2a3ba1cfe4af", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "72094", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 565, "name": "HallmarkMystery", "url": "https://deeplink.directvnow.com/tune/live/channel/HMYSHD/d120a585-8155-4df6-b294-2808d6e3f640", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "46710", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 566, "name": "HDNETMOVIES", "url": "https://deeplink.directvnow.com/tune/live/channel/HDNM/427146c7-ba72-f092-5c39-a973864c1429", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "33668", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 604, "name": "PursuitChannel", "url": "https://deeplink.directvnow.com/tune/live/channel/PRST/aefee661-f332-a0e1-9232-17775d8eb624", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "84542", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 3204, "name": "HLN", "url": "https://deeplink.directvnow.com/tune/live/channel/HLN/6d1f5d8a-9616-b2aa-fd67-190f5f108591", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "10145", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}, {"provider_name": "DirecTV", "number": 3361, "name": "AccuWeather", "url": "https://deeplink.directvnow.com/tune/live/channel/ACCUHD/dc033f1c-cc4a-adb2-fc2e-9188dc2d36ec", "package_name": "DUMMY-APP", "alternate_package_name": "", "tvc_guide_stationid": "91994", "guide_offset_hours": 0, "configuration_uuid": "870d0f68-6c1f-4358-b3c3-0c97fd0cb316"}]

Some Troubleshooting and Thoughts

Just a few random things to consider, based on my experiences with Osprey boxes.

  • Keep in mind my Osprey use in ADBT has only been a few months. So far, no major issues, but it's still new enough setup to mention.
  • I've used Osprey Boxes for over two years with Channels, have not run into major issues.
  • Ospreys allow tuning by channel number, where the app does not. This allowed me to use AH4C to tune reliably. If Deep Links every stop working well, you can always switch to AH4C.
  • Long term Android updates is a concern, but mine have been updated as least five times since I've used them.
  • If you are tempted to use the Ospreys to open apps to tune, you can, but it is not pleasant. Performance is great for DTV, but slow for apps.
  • I had to play around with device sleep and time-out settings, both in settings and via ADB, so the deep sleep was turned off. I posted something about Deep Sleep in the ADBT thread if you want go reference.
  • If you prefer to keep your devices always on, you can. I don't as it is a waste of power and CPU stress on the encoder. But you are welcome to. I will warn you the the Osprey boxes can get VERY, VERY WARM, so keep an eye on them. If you are running a stack, make sure they have space between them and decent air flow around (don't tuck in a cabinet).

If anyone is interested in more details, feel free to ping me. Happy to help with any setup.

Happy Streaming!

EDIT: As this post was orginally formated as a direct message, I will unlikley find and change grammar to match public audience.

2 Likes

bnhf/olivetin:latest (aka bnhf/olivetin:2025.12.08) pushed this morning with support for creating everything needed for DTV streaming via ADBTuner (as described in post #1 here):

Be sure you're using at least version 20251207-1 of ADBTuner for keep alive support (turtletank99/adbtuner:development), with this recommended ADBTuner Custom Config:

2 Likes

If you go to the Project One-Click Actions Debug Log Viewer, you can review the process step-by-step for the last run. Since you have the Ultimate package it'll be a pretty big log, so you might want to put it into a code editor and do some searches on it:

screenshot-htpc6-2025_12_08-07_01_31

This is the script that's run:

#!/bin/bash
# adbtuner_directv_grabber.sh
# 2025.12.08

script=$(basename "$0" | sed 's/\.sh$//')
exec 3> /config/$script.debug.log
BASH_XTRACEFD=3
set -x

dvr="$1"
adbtunerSource="$2:$3"
customConfig="$(cat $4)"
customConfigUUID=$(printf '%s' "$customConfig" | jq -r '.uuid')
[[ "$5" == "false" ]] && directvRemove="" || directvRemove="$5"
[[ "$6" == "#" ]] && adbtStartingChannel="" || adbtStartingChannel="$6"
alternateGracenoteIDs="/config/adbtuner_directv_ultimate_nyc.json"

allchannelsGuideJSON=$(cat)

deleteExistingDirecTV() {
  curl -fsS "http://$adbtunerSource/api/v1/channels" -H 'accept: application/json' \
  | jq -r --arg p "DirecTV" '.[] | select(.provider_name == $p) | .id' \
  | while read -r adbtunerChannel; do
      [[ -z "$adbtunerChannel" ]] && continue
      directvChannel="http://$adbtunerSource/api/v1/channels/$adbtunerChannel"
      echo -e "\nDELETE $directvChannel"
      curl -sS -X DELETE "$directvChannel"
    done
}

createDirecTVJSON() {
  getGracenoteIDs=$(
    printf '%s\n' "$allchannelsGuideJSON" \
    | jq -r '.channelInfoList[].callSign' \
    | sort -u \
    | while read -r callSign; do
        stationId=$(
          curl -s "http://${dvr}/tms/stations/${callSign}" \
          | jq -r '.[0].stationId // empty'
        )
        [[ -n "$stationId" ]] && printf '%s %s\n' "$callSign" "$stationId"
      done \
    | jq -Rn '
        [inputs
          | select(length>0)
          | (split(" ") | { (.[0]): .[1] })
        ] | add // {}
      '
  )
  adbtunerDirecTVJSON=$(
    printf '%s\n' "$allchannelsGuideJSON" \
    | jq --arg uuid "$customConfigUUID" --argjson stations "$getGracenoteIDs" '
      [
        .channelInfoList[]
        | {
            m3u_id: "",
            provider_name: "DirecTV",
            number: (.channelNumber | tonumber),
            name: .channelName,
            package_name: "com.att.tv",
            alternate_package_name: "com.att.tv",
            url_or_identifier: ("dtvnow://deeplink.directvnow.com/play/channel/" + .callSign + "/" + .resourceId),
            configuration_uuid: ($uuid // ""),
            tvc_guide_stationid: ($stations[.callSign] // ""),
            guide_offset_hours: "",
            data: null,
            id: 0
          }
      ]
    '
  )
  adbtunerDirecTVJSONComplete=$(
  printf '%s\n' "$adbtunerDirecTVJSON" \
  | jq --argfile ref "$alternateGracenoteIDs" '
    map(
      if (.tvc_guide_stationid // "" | tostring) == "" then
        . as $c
        | ($ref[] | select(.number == $c.number) | .tvc_guide_stationid) as $sid
        | if $sid then .tvc_guide_stationid = $sid else . end
      else
        .
      end
    )
  '
  )
}

createDirecTVConfig() {
  local getURL="http://${adbtunerSource}/api/v1/configurations"
  local postURL="http://${adbtunerSource}/api/v1/configuration"

  echo "[INFO] Checking for configuration ${customConfigUUID} at ${getURL}"

  local allConfigs
  if ! allConfigs=$(curl -sS -X GET "${getURL}" -H 'accept: application/json'); then
    echo "[ERROR] Failed to fetch configurations from ${getURL}"
    return 1
  fi

  if echo "${allConfigs}" | jq -e --arg uuid "${customConfigUUID}" '
      (map(select(
        (.uuid == $uuid) or
        (.json_data.uuid == $uuid)
      )) | length) > 0
    ' >/dev/null 2>&1; then
    echo "[INFO] Configuration ${customConfigUUID} already exists. Nothing to do."
    return 0
  fi

  echo "[INFO] Configuration ${customConfigUUID} not found. Creating it via POST ${postURL} ..."

  local httpReturnCode
  httpReturnCode=$(curl -sS -o /tmp/directv_config_post_response.json -w '%{http_code}' \
    -X POST "${postURL}" \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -d "{\"json_data\": ${customConfig}}")

  if [[ "${httpReturnCode}" =~ ^2 ]]; then
    echo "[INFO] Configuration created successfully (HTTP ${httpReturnCode})."
  else
    echo "[ERROR] Failed to create configuration (HTTP ${httpReturnCode}). Response:"
    cat /tmp/directv_config_post_response.json
    echo
    return 1
  fi
}

createDirecTVChannels() {
  jq -c '.[]' \
  | while IFS= read -r channelJSON; do
      curl -fsS \
        -X POST "http://${adbtunerSource}/api/v1/channels" \
        -H 'accept: application/json' \
        -H 'Content-Type: application/json' \
        -d "$channelJSON" \
      || {
        echo "POST FAILED for channel: $channelJSON" >&2
        return 1
      }
    done

  echo "Created ADBTuner - DirecTV channels"
}

customChannels() {
cat <<EOF
{
  "name": "ADBTuner - DirecTV",
  "type": "MPEG-TS",
  "source": "URL",
  "url": "http://$adbtunerSource/channels.m3u8?provider=DirecTV",
  "text": "",
  "refresh": "24",
  "limit": "",
  "satip": "",
  "numbering": "$adbtIgnoreM3UNumbers",
  "start_number": "$adbtStartingChannel",
  "logos": "",
  "xmltv_url": "",
  "xmltv_refresh": "3600"
}
EOF
}

cdvrCustomSource() {
  customChannelsJSON=$(echo -n "$(customChannels)" | tr -d '\n')

  echo -e "\nJSON response from $dvr:" \
  && curl -s -X PUT -H "Content-Type: application/json" -d "$customChannelsJSON" http://$dvr/providers/m3u/sources/ADBTuner-DirecTV
}

main() {
  [[ $directvRemove ]] && deleteExistingDirecTV && echo
  createDirecTVJSON
  [[ $customConfigUUID ]] && createDirecTVConfig
  echo "$adbtunerDirecTVJSONComplete" | createDirecTVChannels
  cdvrCustomSource
}

main

If you look in the main function, you'll see the basic steps:

  • Delete any existing ADBTuner Channels with a Provider name of DirecTV
  • Create the initial JSON for import from the custom curl command
  • Determine the the UUID of the desired Custom Config and add it to ADBTuner
  • Do two passes on the initial JSON, the first pulling Gracenote IDs from CDVR, and the second uses the JSON you posted previously to fill in any that are missing and then add them to ADBTuner
  • Create a CDVR Custom Source named ADBTuner - DirecTV

I'm not sure how duplicates could creep in, unless the source DTV JSON contains them. If that's the case, I could add some sort of de-duplication. Anyway, if you could scan the debug, or post it so I can do it -- we can likely figure out where the dups are coming from.

What are the Call Signs for the duplicated stations so I can do a search on them? The debug is 25K+ lines...

I assume you meant WCBS, plus the other two. Looking at the POST creating the channels in ADBTuner, each one is only posted once:

+ curl -fsS -X POST http://192.168.200.40:5592/api/v1/channels -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"m3u_id":"","provider_name":"DirecTV","number":2,"name":"CBS-WCBS","package_name":"com.att.tv","alternate_package_name":"com.att.tv","url_or_identifier":"dtvnow://deeplink.directvnow.com/play/channel/WCBS/215692d2-9580-f630-3975-1e8caa1ae6f9","configuration_uuid":"3c7d5a19-6f2e-4b8a-9d3f-8e1c4b7a5f92","tvc_guide_stationid":"11331","guide_offset_hours":"","data":null,"id":0}'
+ IFS=
+ read -r channelJSON
+ curl -fsS -X POST http://192.168.200.40:5592/api/v1/channels -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"m3u_id":"","provider_name":"DirecTV","number":4,"name":"NBC-WNBC","package_name":"com.att.tv","alternate_package_name":"com.att.tv","url_or_identifier":"dtvnow://deeplink.directvnow.com/play/channel/WNBC/6beef71a-4049-7cae-8048-91a8214f854a","configuration_uuid":"3c7d5a19-6f2e-4b8a-9d3f-8e1c4b7a5f92","tvc_guide_stationid":"11705","guide_offset_hours":"","data":null,"id":0}'
+ IFS=
+ read -r channelJSON
+ curl -fsS -X POST http://192.168.200.40:5592/api/v1/channels -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"m3u_id":"","provider_name":"DirecTV","number":5,"name":"FOX-WNYW","package_name":"com.att.tv","alternate_package_name":"com.att.tv","url_or_identifier":"dtvnow://deeplink.directvnow.com/play/channel/WNYW/71ef2762-858e-dca7-c17e-23619662e177","configuration_uuid":"3c7d5a19-6f2e-4b8a-9d3f-8e1c4b7a5f92","tvc_guide_stationid":"11746","guide_offset_hours":"","data":null,"id":0}'

Is it possible the Provider name for those three isn't DirecTV so those existing channels didn't get deleted before the new ones were added?

I'm not seeing any problems with the script so far. Where are you getting the channel count from -- the ADBTuner - DirecTV Custom Source?

Could you post the M3U from http://192.168.200.40:5592/channels.m3u8?provider=DirecTV if at some point you see the incorrect channel count again -- in the hopes we can see where this is coming from?

The higher number of channels you saw initially is probably due to the constantly changing nature of FAST channels (4xxx) on DTV -- which is part of the reason I think this Action is going to be great long term, as you can just rerun it whenever you want to sync CDVR to DTV.

The duplicates were likely because the CDVR clients often need to be killed and relaunched when there are changes to collections. I typically just reboot my ATV when I make significant channel changes and I want to see them reflected immediately.

EDIT: Oh, and the M3U you posted contained 345 channels, so that's your current number -- which could change at any time of course, based on the whims of DTV.

Indeed. I appreciate you sticking with diagnosing this problem.

Duplicate channel numbers have been a challenge with DTV in the past, and since I've moved to YTTV myself, I haven't thought about it much. However, we do want to deal with this, as the Olympics are coming up again -- and that's when people really noticed it last time, especially on Ospreys.

In the past, for my personal purposes when I was using DTV, I added A, B, C, D, E to the alternates -- and that worked well. So, my initial proposal would be try that, as I can add another function that will search for duplicates and add a letter to them.

As a test could you manually edit the offending channels in ADBTuner, to see if it's OK with adding a letter to the channel number -- and to see if it addresses the issue? If so, I'll get to work on a fix.

That's probably just as good, and will allow people to use the baked-in DTV channel numbers if desired. Many long time DTV users can recite the numbers of their favorite channels anytime anywhere. :slight_smile:

EDIT: So, that's what I'll do then. Duplicate channels will be preserved using .1, .2, .3 with the first occurrence of that channel keeping the whole number.

There are a couple of things that don't work in the WebUI, that do work via the API -- so let's see if this is one. I'll upload a tester shortly...

1 Like

Can you give bnhf/olivetin:test a try and see if it does what we have in mind. It runs without error for me, but I don't have any duplicate channel numbers in my package to test it properly.

OK, it was worth a shot, but it looks like I'll need to gin up a test dataset to do this properly. It'll probably be tomorrow before I have something new for you to try.

Doing this would be helpful. Nothing like working with real data.

Here's an updated ADBTuner Custom Config for use with DirecTV Deeplinks. This includes the new keep alive function, and should work on all streaming sticks (previous versions using awk don't work properly on FireSticks and possibly other platforms):

{
    "name": "DirecTV Deep Links",
    "author": "bnhf",
    "version": "1.0",
    "description": "Load content via DirecTV deep link URLs with keep active command.",
    "uuid": "3f94f6c2-5516-45bb-81b0-37b0a4fce041",
    "global_options": {
        "wait_for_video_playback_detection": true,
        "use_fixed_delay": false,
        "fixed_delay_seconds": 0,
        "check_for_and_clear_whos_watching_prompts": false,
        "wait_after_post_playback_start_commands_seconds": 0
    },
    "pre_tune_commands": [
        "input keyevent KEYCODE_MEDIA_STOP"
    ],
    "tune_commands": [
        "am start -W -n '||TARGET_PACKAGE_NAME||'/com.clientapp.MainActivity -a android.intent.action.VIEW -d '||TARGET_URL_OR_IDENTIFIER||'"
    ],
    "post_playback_start_commands": [],
    "post_tune_commands": [
        "input keyevent KEYCODE_MEDIA_STOP",
        "input keyevent KEYCODE_HOME"
    ],
    "timed_keep_active_commands": [
        {
            "run_every_minutes": 60,
            "commands": [
                "input keyevent KEYCODE_MEDIA_PLAY"
            ]
        }
    ]
}
2 Likes