Ideas on why I can't edit DirecTV actions?

Posted on
Sat Oct 25, 2014 12:10 pm
ChopOMatic offline
Posts: 101
Joined: Sep 12, 2014

Ideas on why I can't edit DirecTV actions?

The screencast linked below is the best way to understand what I'm seeing, but in a nutshell, when I click to EDIT ACTION SETTINGS for a DirecTV plugin action, I get the WaitWheel for 15-30 seconds, and nothing more.

http://www.screencast.com/t/xbs6otKJFfl

Posted on
Sat Oct 25, 2014 2:36 pm
DaveL17 offline
User avatar
Posts: 5363
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Ideas on why I can't edit DirecTV actions?

One possibility is if the IP address of your DirecTV receiver has changed.

Have you tried to add a new action?

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sat Oct 25, 2014 2:39 pm
ChopOMatic offline
Posts: 101
Joined: Sep 12, 2014

Re: Ideas on why I can't edit DirecTV actions?

The IP addy is correct. (Permanently assigned IP via the router.)

Posted on
Sun Oct 26, 2014 7:37 pm
jay (support) offline
Site Admin
User avatar
Posts: 16108
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Ideas on why I can't edit DirecTV actions?

The spinning beachball means that the indigo server is having difficulty talking to the plugin. That usually means you have some plugin that's misbehaving. I'd start by disabling any 3rd party plugins and see if it changes anything. You can then narrow down the offending plugin.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Oct 28, 2014 7:30 pm
ChopOMatic offline
Posts: 101
Joined: Sep 12, 2014

Re: Ideas on why I can't edit DirecTV actions?

Thanks, Jay. I'll look into that.

BTW, has anyone tinkered with getting feedback from DirecTV receivers to display on control pages? I know it's possible because I have a remote control app called Roomie on my iPad that displays a ton of info from the receiver, like My Recordings, the program guide, rating and such for what's currently playing, etc.

Posted on
Tue Oct 28, 2014 8:02 pm
jay (support) offline
Site Admin
User avatar
Posts: 16108
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Ideas on why I can't edit DirecTV actions?

I vaguely recall some status commands in the API, but my goal was really just control. I do have a feature request in place to look at adding status (some day).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat Dec 20, 2014 8:18 pm
DaveL17 offline
User avatar
Posts: 5363
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Ideas on why I can't edit DirecTV actions?

Jay said: I vaguely recall some status commands in the API, but my goal was really just control. I do have a feature request in place to look at adding status (some day).

Taking a break from a plugin project and before I knew what happened, I had this hammered out. This code just logs information reported by the receiver; you'll have to convert the code to write the information to variables or what have you. The only other thing that needs to be adjusted is to enter the IP of the unit in question (DTVIP).

Code: Select all
#! /usr/bin/env python2.5
# -*- coding: utf-8 -*-

import simplejson
import urllib2

DTVIP = "10.0.1.123"
url = "http://%s:8080/tv/getTuned?" % DTVIP
f = urllib2.urlopen(url)
simplejson_string = f.read()
f.close()
parsed_simplejson = simplejson.loads(simplejson_string)

#####  Log the Response #####
indigo.server.log("Query: %s" % parsed_simplejson['status']['query'])
indigo.server.log("Response: %s" % parsed_simplejson['status']['msg'])
indigo.server.log("HTTP Status Code: %s" % parsed_simplejson['status']['code'])
indigo.server.log("Command Result: %s" % parsed_simplejson['status']['commandResult'])
indigo.server.log("Program Title: %s" % parsed_simplejson['title'])
indigo.server.log("Episode Title: %s" % parsed_simplejson['episodeTitle'])
indigo.server.log("Call Sign: %s" % parsed_simplejson['callsign'])
indigo.server.log("Major Channel: %s" % parsed_simplejson['major'])
indigo.server.log("Minor Channel: %s" % parsed_simplejson['minor'])
indigo.server.log("Program Rating: %s" % parsed_simplejson['rating'])
indigo.server.log("DirecTV Station ID: %s" % parsed_simplejson['stationId'])
indigo.server.log("DirecTV Program ID: %s" % parsed_simplejson['programId'])
indigo.server.log("Is Recording: %s" % parsed_simplejson['isRecording'])
indigo.server.log("Is VOD: %s" % parsed_simplejson['isVod'])
indigo.server.log("Start Time: %s" % parsed_simplejson['startTime'])
indigo.server.log("Offset: %s" % parsed_simplejson['offset'])
indigo.server.log("Duration: %s" % parsed_simplejson['duration'])
indigo.server.log("Is Off Air: %s" % parsed_simplejson['isOffAir'])
indigo.server.log("Is PC Locked: %s" % parsed_simplejson['isPclocked'])
Here is sample output:
Code: Select all
  Script                          Query: /tv/getTuned?
  Script                          Response: OK.
  Script                          HTTP Status Code: 200
  Script                          Command Result: 0
  Script                          Program Title: Blackhawks @ Blue Jackets
  Script                          Episode Title: Chicago Blackhawks at Columbus Blue Jackets
  Script                          Call Sign: WGN
  Script                          Major Channel: 9
  Script                          Minor Channel: 65535
  Script                          Program Rating: No Rating
  Script                          DirecTV Station ID: 3223469
  Script                          DirecTV Program ID: 13697247
  Script                          Is Recording: False
  Script                          Is VOD: False
  Script                          Start Time: 1419120000
  Script                          Offset: 7718
  Script                          Duration: 9000
  Script                          Is Off Air: False
  Script                          Is PC Locked: 3
This has been tested with an HR-34. There is other information that the query might return depending on what the receiver is doing (i.e., playing a recording, playing a music channel, etc.) This was watching live programming.

Cheers,
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Dec 21, 2014 9:06 pm
ChopOMatic offline
Posts: 101
Joined: Sep 12, 2014

Re: Ideas on why I can't edit DirecTV actions?

Thanks, Dave. Can't wait to check it out.

Posted on
Sun Dec 21, 2014 9:30 pm
DaveL17 offline
User avatar
Posts: 5363
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Ideas on why I can't edit DirecTV actions?

ChopOMatic wrote:
Thanks, Dave. Can't wait to check it out.

Sure thing. Let me know if you have any questions.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Dec 22, 2014 4:53 pm
ckeyes888 offline
Posts: 2160
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Ideas on why I can't edit DirecTV actions?

Looks very cool. Maybe post a bit of example code, for us Python challenged types, to write
a state to a variable?

Thanks,

Carl

Posted on
Mon Dec 22, 2014 6:06 pm
DaveL17 offline
User avatar
Posts: 5363
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Ideas on why I can't edit DirecTV actions?

Of course! Using the code above:

Code: Select all
#! /usr/bin/env python2.5
# -*- coding: utf-8 -*-

import simplejson
import urllib2

DTVIP = "10.0.1.123"
url = "http://%s:8080/tv/getTuned?" % DTVIP
f = urllib2.urlopen(url)
simplejson_string = f.read()
f.close()
parsed_simplejson = simplejson.loads(simplejson_string)

try:
   programTitle = parsed_simplejson['title']
   indigo.variable.updateValue(144522421, programTitle)
except:
   indigo.variable.updateValue(144522421, " ")
Change the IP address to your receiver (DTVIP) and the variable ID number to one that matches yours. Just repeat the last 5 lines for each value that you want to use.

Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Dec 22, 2014 6:24 pm
ckeyes888 offline
Posts: 2160
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Ideas on why I can't edit DirecTV actions?

Love it, works perfectly!

Thanks a bunch!

Carl

Posted on
Mon Dec 22, 2014 6:29 pm
DaveL17 offline
User avatar
Posts: 5363
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Ideas on why I can't edit DirecTV actions?

My pleasure.
Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Mon Dec 22, 2014 8:01 pm
ckeyes888 offline
Posts: 2160
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Ideas on why I can't edit DirecTV actions?

When adding a few more states I'm finding very few will work.
In particular ['major'] to get the channel number.
Have you seen that as well?

Thanks,

Carl

Posted on
Mon Dec 22, 2014 8:35 pm
DaveL17 offline
User avatar
Posts: 5363
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Ideas on why I can't edit DirecTV actions?

Hi Carl - what are you seeing? The field that seems to choke the most often for me is the episode title, which is routinely 'None'. Please share your code and the output you're getting in return.

Dave

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Who is online

Users browsing this forum: No registered users and 1 guest