[OBSOLETE] DirecThings - Control your DirecTV receiver

Hello all, second time Groovy slinger here. Recently had DirecTV installed and found out that there is an API for controlling your receiver! This SmartApp allows you to control the power of your DirecTV receiver using a virtual switch.

You only need to enter the “MAC (Use w/Genie)” field when using the application with a wireless Genie. For the “IP Address” field, it should always be your primary receiver.

5 Likes

Please keep me posted about controlling other receivers I have directv with mini wireless genies everywhere!

Just posted an update that should be able to handle the Genie. You’ll need to enter the MAC address of your Genie, without colons, when installing. The IP address field should (I’m pretty sure) be for your primary.

I haven’t tested it yet though, so let me know how it goes!

Nice :slight_smile: Can you add a channel selection?

We can actually! I just need to figure out a suitable virtual device to use for controlling it. Maybe the temperature setpoint on a thermostat.

This is very cool. I wish I can do this with my Tivo’s :slight_smile:

Good idea. I’m trying to get to a “Good Morning” routine that turns on lights, turns on tv and changes to a news channel.

Just updated the original version, should allow you to use a thermostat’s setpoint to control the channel. I’ve tested it to work on my primary receiver.

Naturally you’ll want to use a simulated thermostat.

@JoeBee

Love this setup. But I can’t seem to get it to work with my DirectTV box. I have used both a Simulated switch and a simulated thermostat but, can’t get it to channel up/down or power off.

I have verified the IP addy I’m using is the Main DVR box and not any of the Satellite boxes.

Any Insight on what im may be doing wrong?

Try this, go to “http://receiver ip:8080/info/mode” (without quotes) from a computer on the same network as your hub and see if you get a response.

Did that, got some code

{
“mode”: 0,
“status”: {
“code”: 200,
“commandResult”: 0,
“msg”: “OK.”,
“query”: “/info/mode”
}
}

Is the SmartThings hub and the receivers on the same network? Subnet and everything? Youre getting a response, which means you should be good.

hmmm… actually, my DirectTV box is on my wireless network, and my Hub is on my wired network. Both, however, are being used by the same router. the Router supports a wireless and wired network simultaneously and all my devices are on the same subnet.

You think this might be the issue?

thanks again for your help!

@JoeBee

I got it… :slight_smile: I did not go through the Smart App setting after I added to the IDE. that was a Noob mistake.

Looks like its working the way you created it!

My Bad and thanks for this. I look forward to any more update to this controller!

Glad to hear it’s working for you!

JoeBee,

I got it working the cool up and down tile changes the channel. But how do I go to a specific channel? And can the number in the setpoint show the actual channel if a use a remote to change the channel? Maybe a refresh button? Also. I tried using a routine with this. Simple one to set thermostat to 10 (as in channel 10). Doesn’t work.Maybe the simulated thermostat device won’t allow a specific number but allows scrolling up or down?

This is great, @JDRoberts might be interested also.

In the UK we have Sky TV, which has a wide uptake. Looks like they have an API for controlling the box.

However without Alexa in the UK this would be a bit stunted. Great for scheduling things though (like news in the morning).

I didn’t really anticipate people using this to control the receivers on a day to day basis. Moreso for hooking into routines to do stuff like, tune to the news in the morning.

I did find an issue the other night where some devices will send “88.0” for “channel” 88, which messed up my logic. Should be a fairly easy fix. Can you get the logs for the application when it failed to tune for you? Might be the same problem.

As for the polling to receive the current channel and update the thermostat, it can probably be done. It would have to be on a timer so there would be some lag for sure.

log from the routine:

dac43fd6-bd10-4cb8-ac29-96cae8b31705 11:48:30 AM: info HH execute(true, null, null), newMode: null

from the app
f4b10029-7771-4d8c-aebb-9c58a393b359 11:48:30 AM: debug [doReceiverRequest] Requesting '/tv/tune with query ‘[major:10.0, minor:65535]’ as ‘GET’ to '192.168.1.21:8080’
f4b10029-7771-4d8c-aebb-9c58a393b359 11:48:30 AM: debug [doReceiverRequest] Requesting '/remote/processKey with query ‘[hold:keyPress, key:poweron]’ as ‘GET’ to '192.168.1.21:8080’
f4b10029-7771-4d8c-aebb-9c58a393b359 11:48:30 AM: debug [doReceiverRequestKey] Sending key ‘poweron’

It’s 10.0 cool on the app. But doesn’t change the channel.

Yeah, that’s the bug I found. If it were “10” and not “10.0” it would work. I’ll try to get a fix out for that soon.