Fork me on GitHub

DirecTV Remote API

Providing consistent APIs for interacting with your DirecTV STB, because someone had to do it.


I've often found myself wanting to have a smarter remote control. Sure, I can go buy some multi-device remote and all but with my smartphone, I already have remotes for most of my media center already. All that I needed was a remote for my DirecTV STB.

As most others do, I looked in my respective smartphone app stores and saw nothing compelling. Being a hacker, like most reading this, I looked into writing my own and that is when I realized something: DirecTV doesn't have an official API nor is there any official documentation on the subject. So how is everyone else doing it?

After some port scanning and Google searching, I found out that I can indeed control my DirecTV STB programmatically but most of the code I found on the subject were one-off hacks only solving the needs of the project the code was associated with. So here I am, hoping to provide you with an API, a consistent/common API, for interacting with the DirecTV STB programmatically.


The goals for this project are to design a very simple, yet full-featured, API for using every available API provided by DirecTV for interating with your STB programmatically and to provide this API across a few languages:

NOTE The list of proposed/supported languages is not set in stone.

The main focus for this project is to provider APIs for languages with a mobile presence which is why you see the proposed langauges above.


To the right you will see information on how to download the JavaScript API, documentation on how to use the JavaScript API and example applications.


Documentation for the JavaScript API right now consists of two items:

Online Test Suite
This is a test suite that runs in your browser.
Annotated Source Code
This is the actual source code for the JavaScript API presented in annotated form.

The annotated source will help you not only see what APIs are available but also what options are available, or required, when calling the particular functions or creating the particular objects. Pretty soon we'll have a API documentation but until then, the annotated source and test suite should show you how to use the API properly.

Downloads (Right-click and use "Save as")

File name Version Size Description
dtv.remote.api.js 0.0.1 20kb Development version (Uncompressed with comments)
dtv.remote.api-min.js 0.0.1 8kb Production version (Minified)

The JavaScript API has two hard dependencies:


The example application is a work in progress that will allow you to connect to a DirecTV STB on your local network and interact with it: View information about the currently tuned channel, change channels, see what's currently on other channels and many more. You can also use the online test suite sources as a low-level, code-based example on how to use the full JavaScript API.

Below you will find links, with explanation, to some very useful resources that either helped in the creation of these APIs, are using these APIs or are tools/libraries/apis being used by this project:

Tools Used

Bootstrap is a "toolkit from Twitter designed to kickstart development of webapps and sites" and is used for the UI of this site and the JavaScript API example application.
Docco is the tool used to generated the annotated source for the JavaScript API.
jQuery is the "Write less, do more, JavaScript library" that provides the AJAX functionality for the JavaScript API.
QUnit is a JavaScript unit test library written by the jQuery guys and is used by our JavaScript API to run its in-browser test suite.
Underscore is "a utility-belt library for JavaScript" used by the JavaScript API.

Reading Materials

DirecTV SHEF Command Set Public Beta
This PDF documents the available HTTP-based API for interacting with your DirecTV STB.
DirecTV Set-Top-Box Information for the Installer
This PDF documents the available serial commands available to be invoked via the HTTP API documented above.

NOTE The DirecTV SHEF Command Set Public Beta and DirecTV Set-Top-Box Information for the Installer documents are out of date. That being said, with these documents being the closest thing to real DirecTV API documentation they were still essential in helping create these APIs.