0.0
No commit activity in last 3 years
No release in over 3 years
Allows control of DirecTV Set Top Boxes whoms Whole-Home -> External Device settings are set to Allow
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
>= 0
>= 0
 Project Readme

Description

This gem allows one to control a DirecTV Set Top Box (STB or receiver). This works with the current implication of the "External Device" control system. DirecTV could change or even disable this method at any time without notice.

Requirements

  • net/http
  • json
  • External Device set to Allow on DTV Box (Menu -> Settings -> Whole-Home -> External Device - All set to 'Allow')

Install

Use rubygems to install the dtvcontroller gem:

$ gem install dtvcontroller

Example Usage

Initialize:

irb(main):001:0> require "dtvcontroller"
=> true
irb(main):002:0> set_top_box = Dtvcontroller::SetTopBox.new("192.168.1.100")
=> #<Dtvcontroller::SetTopBox:0x000000028ab450 @ip="192.168.1.100", @base_url="http://192.168.1.100:8080">

Get details on what's on with #currently_playing:

irb(main):003:0> set_top_box.currently_playing
=> "529: SEDGHD - The Lost World: Jurassic Park"

The output follows the format:

<Channel>:<Network> - <Program>: <Program Title if Available>

A TV show looks like this (note the episode title):

irb(main):004:0> set_top_box.currently_playing
=> "298: CNHD - Family Guy: Peters Tale"

Change the channel with #tune_to_channel:

irb(main):005:0> set_top_box.tune_to_channel(7)
=> "OK."

Channel Options:

Must be between 1-9999.

Simulate the remote with #send_key:

irb(main):006:0> set_top_box.send_key(:chanup)
=> "OK."

Remote Key Options:

  • :power
  • :poweron
  • :poweroff
  • :format
  • :pause
  • :rew
  • :replay
  • :stop
  • :advance
  • :ffwd
  • :record
  • :play
  • :guide
  • :active
  • :list
  • :exit
  • :back
  • :menu
  • :info
  • :up
  • :down
  • :left
  • :right
  • :select
  • :red
  • :green
  • :yellow
  • :blue
  • :chanup
  • :chandown
  • :prev
  • :0-9
  • :dash
  • :enter

Get details about the unit with #system_info:

irb(main):007:0> set_top_box.system_info(:access_card_id)
=> "0123-4567-8901"

System Info Options:

  • :access_card_id
  • :receiver_id
  • :stb_software_version
  • :version