DTV Code Failure

Posted on
Thu May 26, 2022 7:13 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

DTV Code Failure

Anyone else seeing this code for direct channel access failing?

Code: Select all
 dvrPlugin = indigo.server.getPlugin("com.perceptiveautomation.indigoplugin.directvdvrcontrol")
if dvrPlugin.isEnabled():
   dvrPlugin.executeAction("setChannel", props={'address':"192.168.1.53", 'channelNumber':'356'})


All other functions seem to be working.

Carl

Posted on
Fri May 27, 2022 7:15 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: DTV Code Failure

Are you getting an error message in the Indigo log, or is the script "just not working"?

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

[My Plugins] - [My Forums]

Posted on
Fri May 27, 2022 9:33 am
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: DTV Code Failure

No errors. Just not working.

Edit: I did try rebooting the DTV.

Thanks,

Carl

Posted on
Fri May 27, 2022 10:00 am
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: DTV Code Failure

Your script looks right. Are you certain that the IP address of the target DVR is "192.168.1.53"?

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

[My Plugins] - [My Forums]

Posted on
Fri May 27, 2022 3:10 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: DTV Code Failure

Yes, all other commands work fine.

Thanks,

Carl

Posted on
Fri May 27, 2022 3:18 pm
DaveL17 offline
User avatar
Posts: 6753
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: DTV Code Failure

Okay, this is a long shot, but I notice that your code in the first message has a space at the front of the first line. If that space is in your actual script, delete it.

For kicks, put one more space in the front of the third line (so it's four spaces)

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

[My Plugins] - [My Forums]

Posted on
Fri May 27, 2022 6:53 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: DTV Code Failure

Thanks but no joy.
No actual space before first line and any spaces I add anywhere else triggers an error.

Any command using this code does work:
Code: Select all
 dvrPlugin = indigo.server.getPlugin("com.perceptiveautomation.indigoplugin.directvdvrcontrol")
if dvrPlugin.isEnabled():
   dvrPlugin.executeAction("sendKeyPress", props={'address':"192.168.1.53", 'keyToPress':"9"})


Carl

Posted on
Fri May 27, 2022 11:30 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: DTV Code Failure

Does the action itself work via the plugin UI?

ie taking the script out of the equation?


Sent from my iPhone using Tapatalk Pro

Posted on
Sat May 28, 2022 8:30 am
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: DTV Code Failure

No, the “go to channel” isn’t working using the UI or the code.
The “send key press” works in the UI and using code.

Weird. I haven’t changed anything with the plugin in years.
Maybe DTV ran an update that broke it?

Thanks,

Carl

Posted on
Sat May 28, 2022 1:17 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: DTV Code Failure

I've just added one line, to output the reply from the DirectTV to the Indigo log.

Won't be pretty, but might tell you the problem.

https://www.dropbox.com/s/5bh9eui5isltq ... n.zip?dl=1

Posted on
Sat May 28, 2022 1:32 pm
jay (support) offline
Site Admin
User avatar
Posts: 18219
Joined: Mar 19, 2008
Location: Austin, Texas

Re: DTV Code Failure

Given that nothing has changed in the plugin and other commands continue to work, my guess is that a DTV update has broken that functionality. Maybe @howartp's version can help confirm that.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sat May 28, 2022 4:12 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: DTV Code Failure

Here’s the error using your revised plugin:
May 28, 2022 at 4:10:42 PM
Action Group Fav Ch 23 KTMF
DIRECTV DVR Control Error {u'status': {u'msg': u'Invalid clientAddr', u'query': u'/tv/tune?major=23&minor=65535&clientAddr=0', u'code': 200, u'commandResult': 1}}

Thanks,

Carl

Posted on
Sat May 28, 2022 5:45 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: DTV Code Failure

clientAddr can either be 0 (for 'the server') or a MAC Address string (no colons or dashes) for 'a client', but the specs don't say who is which.

Try adding clientAddr to your script props with your Mac's MAC address as a string?

Using your sendKeyPress code above, it would be equivalent to this:
Code: Select all
dvrPlugin.executeAction("sendKeyPress", props={'address':"192.168.1.53", 'keyToPress':"9", 'clientAddr':"AABBCCDDEEFF"})

Posted on
Sat May 28, 2022 6:30 pm
ckeyes888 offline
Posts: 2425
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: DTV Code Failure

Guess I’m confused. The “send key press” code, and in the UI, is the one that is working.
How should I incorporate your code?

Thanks,

Carl

Posted on
Sat May 28, 2022 6:49 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: DTV Code Failure

Sorry, where you got your actual code for changing channel (which you’ve not provided yet), add the clientAddr on like I have in sendKeyPress.

Or paste me your channel code and I’ll add it for you.


Sent from my iPhone using Tapatalk Pro

Who is online

Users browsing this forum: No registered users and 1 guest

cron