Difference between revisions of "DirecTV IP Receiver"

From LinuxMCE
Jump to: navigation, search
(minimal ruby coding for IP control of DirecTV set-top boxes)
 
m (Added category: GSD)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
[[Category: Hardware]]  
 
[[Category: Hardware]]  
 +
[[Category: GSD]]
  
 
== Minimal codeset for control of DirecTV IP Satellite boxes ==
 
== Minimal codeset for control of DirecTV IP Satellite boxes ==
Line 27: Line 28:
 
   log(msg)
 
   log(msg)
 
   log("")   
 
   log("")   
**********")0
 
 
   log("***********************************************************")
 
   log("***********************************************************")
 
end
 
end
Line 34: Line 34:
  
 
def RemoteKey(key)
 
def RemoteKey(key)
log("**********          Sending key=" + key + "          **********")
+
  log("**********          Sending key=" + key + "          **********")
conn_.Send("GET\x20/remote/processKey?key=" + key +  &hold=keyPress\x20HTTP/1.1\x0D\x0AContent-Length:\x200\x0D\x0A\x0D\x0A")
+
  conn_.Send("GET\x20/remote/processKey?key=" + key +  &hold=keyPress\x20HTTP/1.1\x0D\x0AContent-Length:\x200\x0D\x0A\x0D\x0A")
 
end
 
end
  
Line 51: Line 51:
  
 
''On''
 
''On''
 +
 
RemoteKey("poweron")
 
RemoteKey("poweron")
  
 
''Off''
 
''Off''
 +
 
RemoteKey("poweroff")
 
RemoteKey("poweroff")
  
Line 60: Line 62:
  
 
''Enter/Go''
 
''Enter/Go''
 +
 
RemoteKey("enter")
 
RemoteKey("enter")
  
 
''Info''
 
''Info''
 +
 
RemoteKey("info")
 
RemoteKey("info")
  
'''Numbers'''
+
'''NUMBERS'''
  
 
''0''
 
''0''
 +
 
RemoteKey("0")
 
RemoteKey("0")
  
 
''1''
 
''1''
 +
 
RemoteKey("1")
 
RemoteKey("1")
  
 
''2''
 
''2''
 +
 
RemoteKey("2")
 
RemoteKey("2")
  
 
''3''
 
''3''
 +
 
RemoteKey("3")
 
RemoteKey("3")
  
 
''4''
 
''4''
 +
 
RemoteKey("4")
 
RemoteKey("4")
  
Line 89: Line 98:
  
 
''9''
 
''9''
 +
 
RemoteKey("9")
 
RemoteKey("9")

Latest revision as of 15:52, 11 July 2016


Minimal codeset for control of DirecTV IP Satellite boxes

The template 2159 (HR24 IP) can be modified with these codes.

Verify template Comm Method is Ethernet.

Device Data needs #69 TCP Port(int) set to 8080

I am unable to determine the range for the MAC address of the devices. I set the Plug & Play 'Range of MAC' From 111121700000 To 111121742000, Vendor Model ID = DirecTV HR-xx Satellite Box, and PNP Protocol = DHCP


Ruby Codes

INTERNAL

Process Initialize

$logFile = File.new("/var/log/pluto/DirecTV.log", "w")

Process Incoming Data

buf = conn_.Recv(100, 500) if !(buf.empty?)

 msg = buf.strip
 log(msg)
 log("")   
 log("***********************************************************")

end

Private Method Listing

def RemoteKey(key)

 log("**********          Sending key=" + key + "          **********")
 conn_.Send("GET\x20/remote/processKey?key=" + key +  &hold=keyPress\x20HTTP/1.1\x0D\x0AContent-Length:\x200\x0D\x0A\x0D\x0A")

end

def log(word)

   logTime = Time.now
   timeStr = logTime.strftime("%d-%m-%Y  %H:%M:%S  ")
   $logFile.print( timeStr + word + "\n" )
   $logFile.flush()
   print(word + "\n")

end


POWER

On

RemoteKey("poweron")

Off

RemoteKey("poweroff")


GENERAL

Enter/Go

RemoteKey("enter")

Info

RemoteKey("info")

NUMBERS

0

RemoteKey("0")

1

RemoteKey("1")

2

RemoteKey("2")

3

RemoteKey("3")

4

RemoteKey("4")

.

.

.

9

RemoteKey("9")