directv-cli v0.0.1
directv-cli
This tool makes use of the HTTP API, exposed by most DirecTV STBs (Set Top Boxes), to implement a working remote control on the command line.
Allowing you to simply do things like change the channel:
directv --tune 297Or see what's playing on channel 500:
directv --guide 500Setup
Install from npm:
sudo npm install -g directv-cliIf you don't have npm, install Node.js.
For full functionality make sure you enable external device access on your STB.
Menu > Settings > Whole-Home > External Device > AllowUsage
IP Address
You'll need to specify the IP address of your STB, like:
directv --ip 192.168.1.104 --watchingthe
--watchingparameter will list program information for whatever is currently being watched
Whole-Home DVR
If you have Whole-Home DVR service, you can access the extraneous boxes as well. Use the --locations switch to list the client addresses of each STB in your home, like:
$ directv --ip 192.168.1.104 --locations
Found 3 Set Top Boxes:
MB: 88F7C7DA0269
B2: 88F7C7DA1460
LR: 0Then you can see what's being watched on any of those boxes, like:
directv --ip 192.168.1.104 --client 88F7C7DA0269 --watchingCommand line arguments
These switches each come with a shorthand version as well. --ip can be shortened to -i and --locations can be shortened to -l.
To see the rest of the available arguments, run the program with a --help or -h parameter:
directv --helpConfig file
You can store the variables IP address and Client address in a config file, so that they don't have be typed every time the command's invoked.
To store these, create a plaintext file, .directvrc, in the user's home directory, with JSON contents like:
{
"ipAddr": "192.168.1.104",
"clientAddr": "88F7C7DA0269"
}Then you can issue commands without all the extra switches, like:
directv --systemthe
--systemswitch will output detailed system info
If the --ip or --client switches are still used, they will override the config file.
Keys
You're able to send any of the normal remote control keys, such as guide, exit, prev...
The full known list of available keys is:
format, power
rew, pause, play, stop, ffwd, replay, advance, record
guide, active, list, exit, menu, info
up, down, select, left, right
red, green, yellow, blue
back, chanup, chandown, prev
1, 2, 3, 4, 5, 6, 7, 8, 9, dash, 0, enter
These can be sent, like:
directv --key yellow11 years ago