Difference between revisions of "DirecTV IP Receiver"
Ardirtbiker (Talk | contribs) (minimal ruby coding for IP control of DirecTV set-top boxes) |
Ardirtbiker (Talk | contribs) |
||
Line 27: | Line 27: | ||
log(msg) | log(msg) | ||
log("") | log("") | ||
− | |||
log("***********************************************************") | log("***********************************************************") | ||
end | end |
Revision as of 01:12, 25 September 2013
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")