Page 1 of 1

http with DirecTV Genie 2

Posted: Sun Nov 04, 2018 5:16 am
by ask4mikie
I am attempting to control my DirecTV Genie 2 over IP. Genie has its own little ecosystem. The Genie Mini's are little boxes that you attach to your AV system with an HDMI cable. In my system, the Mini's connect over RF to the Main (Head) unit. Only the Main unit has an IP address (and internet connection). To send a command to a Mini, you append the Mini's MAC address to the command. The Main unit receives the command and forwards it to the desired Mini. The appended data looks like this "&clientAddr=403DECDBE44C". 403DECDBE44C is the MAC address of the Mini in our family room. Note that the colons are removed from the MAC address, and that it is hex.

I have 2 commands working, Channel Up and Channel Down. I have attempted to use .dc1 files from the Device Command forum, but I cannot get them to work. After several hours, I was able to use the DirecTV protocol document and create my own commands. I have not been able to put GET commands in the "Generic IP Device" and get any response. The following is from page 11 In the DirecTV protocol,
2.2.1.1 Get
The SHEF server implements a very basic HTTP GET method that ignores all HTTP request
headers in the processing of SHEF requests, with the exception of the Cookie HTTP request header.
Only a subset of the SHEF commands uses this header.
From page 22, this is the Remote Key Request:
Remote Key - http://STBIP:port/remote/processKey?key=string[&hold=string][&clientAddr=string]
Note that STBIP is the IP address of the Main Unit, the port is 8080, key=string is where you put the command, hold=string becomes hold=keyPress, and clientAddr=string is the MAC address of the Mini. "hold=string" is optional, and I have left it out. My Genie's IP address is 192.168.1.120, and the Mini I'm controlling's MAC address is 403DECDBE44C. So, Channel Up becomes:

http://192.168.1.120:8080/remote/processKey?key=chanup&clientAddr=403DECDBE44C


And Channel Down becomes:

http://192.168.1.120:8080/remote/processKey?key=chandown&clientAddr=403DECDBE44C


Note that there is no terminator on the command. I think a terminator may get "added" to the MAC address and cause problems. Also, the only difference in these commands are the key=string part.

To get these commands to work, I used the Action Editor, and set the Action Type to "Send data to a website". I then put the command in the Web Data box, and clicked the Add button(green arrow). I discovered that you can drag the Action Editor wider and widen the Command column to see the entire command.

Although this works, it is not the best arrangement. The commands are not located in a file, where they are easy to maintain, they are scattered about in buttons on pages. I'm not sure how feedback from DirecTV will be handled, or if it will even work. I think Demopad should look at adding a "Generic HTTP Device", similar to the "Generic IP Device". This would make things consistent, and easier to use. Or they could add "DirecTV Genie" as a Type in the Main Device Properties box.

I have attached the DirecTV protocol document to this post. I had to make it a .txt file to upload it. Change it back to a .pdf to open it.

Re: http with DirecTV Genie 2

Posted: Tue Nov 20, 2018 2:14 am
by ask4mikie
Here is the Directv command protocol:

https://blog.solidsignal.com/docs/DTV-M ... V1.3.C.pdf

Supported keys: 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, 1, 2, 3, 4, 5, 6, 7, 8, 9, dash, enter.

Select is the Ok button in the cursor keys. Enter is used with the keypad. Apparently, you can't turn on the Genie Mini with these commands. In a brilliant design move, the receiver is turned off when the Mini is powered down. Probably saves 0.005 watts of electricity. Options are to just leave the Mini on all the time (there goes those electricity savings), or to use an ir command to turn it on.

Note that Genie 2 apparently doesn't use several of the defined buttons. Active, Yellow, Blue, and Green don't do anything. There may be more.

If you want to get clever with the commands in my first post, you can use variables for the MAC address and the set top box ip address, or STBIP.


Mike

Re: http with DirecTV Genie 2

Posted: Wed Dec 19, 2018 3:32 pm
by wsieber
[quote=ask4mikie post_id=9806 time=1541304984 user_id=10713
Although this works, it is not the best arrangement.
[/quote]

Thanks for posting this. It may not be the best arrangement, but so far so good.