DTV Code Failure

Posted on
Sun May 29, 2022 7:24 am
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: DTV Code Failure

This is the code that isn’t working:

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


Tried this using your bit of code:
Code: Select all
dvrPlugin = indigo.server.getPlugin("com.perceptiveautomation.indigoplugin.directvdvrcontrol")
if dvrPlugin.isEnabled():
   dvrPlugin.executeAction("setChannel", props={'address':"192.168.1.53", 'channelNumber':'278', 'clientAddr':"0c4de9afc226"})

Returns this error:
DIRECTV DVR Control Error {u'status': {u'msg': u'Invalid clientAddr', u'query': u'/tv/tune?major=278&minor=65535&clientAddr=0', u'code': 200, u'commandResult': 1}}


Thanks,

Carl

Posted on
Sun May 29, 2022 2:25 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: DTV Code Failure

Ok

Can you open the following URL in Safari:

http://192.168.1.53:8080/info/getLocations

then copy/paste the output into a reply for me.

If there's any private values (passwords etc) in there then obfuscate them but I don't imagine there will be.

If you happen to see a clientAddr in there, then you can try copy/pasting it (case-sensitive) into your code:

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

Posted on
Sun May 29, 2022 3:12 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: DTV Code Failure

I've just uploaded v1.1.4

It turns on plugin debugging by default plus adds four menu items.

Plugins > DirectTV DVR >
  • getVersion
  • getOptions
  • getLocations
  • getMode

Each of them outputs the respective info to the Indigo log (if debug is turned on).
(Hardcoded to your IP at the moment.)

Also the errorLog() replies I put in before now go to debugLog() instead.

Copy paste each of them back to me, either here or by PM.

Turn off debug in plugin > configure if you need to.

Posted on
Mon May 30, 2022 10:39 am
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: DTV Code Failure

Here’s the return from the link you provide:

{
"locations": [{
"clientAddr": "0",
"locationName": "G"
}],
"status": {
"code": 200,
"commandResult": 0,
"msg": "OK.",
"query": "/info/getLocations"
}
}

Thanks,

Carl

Posted on
Tue May 31, 2022 8:31 am
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: DTV Code Failure

howartp wrote:
I've just uploaded v1.1.4

It turns on plugin debugging by default plus adds four menu items.

Plugins > DirectTV DVR >
  • getVersion
    ion
    DIRECTV DVR Control Debug {u'status': {u'msg': u'OK.', u'query': u'/info/getVersion',DVR Control Debug {u'status': {u'msg': u'OK.', u'query': u'/info/getVersion', u'code': 200, u'commandResult': 0}, u'systemTime': 1654007098, u'stbSoftwareVersion': u'0x16da', u'accessCardId': u'0027-8411-3918', u'locationName': u'G', u'receiverId': u'0252 0953 7445', u'version': u'2.1', u'modelId': 38}

  • getOptions
    DIRECTV DVR Control Debug getOptions called: http://192.168.1.53:8080/info/getOptions
    DIRECTV DVR Control Debug {u'status': {u'msg': u'OK.', u'query': u'/info/getOptions', u'code': 200, u'commandResult': 0}, u'options': [{u'formControls': [], u'urlParameters': [{u'isRequired': False, u'type': u'string', u'name': u'wrapper'}, {u'isRequired': False, u'type': u'string', u'name': u'callback'}, {u'isRequired': False, u'type': u'int', u'name': u'type'}], u'command': u'/info/getLocations', u'description': u'List of available client locations. Warning: This command may change or be disabled in the future.'}, {u'formControls': [], u'urlParameters': [{u'isRequired': False, u'type': u'string', u'name': u'wrapper'}, {u'isRequired': False, u'type': u'string', u'name': u'callback'}, {u'isRequired': False, u'type': u'string', u'name': u'clientAddr'}], u'command': u'/info/getSerialNum', u'description': u'STB serial number. Warning: This command may change or be disabled in the future.'}, {u'formControls': [], u'urlParameters': [{u'isRequired': False, u'type': u'string', u'name': u'wrapper'}, {u'isRequired': False, u'type': u'string', u'name': u'callback'}], u'command': u'/info/getVersion', u'description': u'Set-top-box and SHEF information. Warning: This command may change or be disabled in the future.'}, {u'formControls': [], u'urlParameters': [{u'isRequired': False, u'type': u'string', u'name': u'wrapper'}, {u'isRequired': False, u'type': u'string', u'name': u'callback'}, {u'isRequired': False, u'type': u'string', u'name': u'clientAddr'}], u'command': u'/info/mode', u'description': u'Set-top-box mode. Warning: This command may change or be disabled in the future.'}, {u'formControls': [], u'urlParameters': [{u'isRequired': False, u'type': u'string', u'name': u'wrapper'}, {u'isRequired': False, u'type': u'string', u'name': u'callback'}, {u'isRequired': False, u'type': u'string', u'name': u'clientAddr'}, {u'isRequired': False, u'type': u'string', u'name': u'hold'}, {u'isRequired': True, u'type': u'string', u'name': u'key'}], u'command': u'/remote/processKey', u'description': u'Process a key request from the remote control. Warning: This command may change or be disabled in the future.'}, {u'formControls': [], u'urlParameters': [{u'isRequired': False, u'type': u'string', u'name': u'wrapper'}, {u'isRequired': False, u'type': u'string', u'name': u'callback'}, {u'isRequired': True, u'type': u'hex', u'name': u'cmd'}], u'command': u'/serial/processCommand', u'description': u'Process a command request from remote control. Warning: This command may change or be disabled in the future.'}, {u'formControls': [], u'urlParameters': [{u'isRequired': False, u'type': u'string', u'name': u'wrapper'}, {u'isRequired': False, u'type': u'int', u'name': u'minor'}, {u'isRequired': False, u'type': u'string', u'name': u'callback'}, {u'isRequired': True, u'type': u'int', u'name': u'major'}, {u'isRequired': False, u'type': u'string', u'name': u'clientAddr'}, {u'isRequired': False, u'type': u'long', u'name': u'time'}], u'command': u'/tv/getProgInfo', u'description': u'Program information of specified channel at current or specific time. Warning: This command may change or be disabled in the future.'}, {u'formControls': [], u'urlParameters': [{u'isRequired': False, u'type': u'string', u'name': u'wrapper'}, {u'isRequired': False, u'type': u'string', u'name': u'callback'}, {u'isRequired': False, u'type': u'string', u'name': u'videoWindow'}, {u'isRequired': False, u'type': u'string', u'name': u'clientAddr'}], u'command': u'/tv/getTuned', u'description': u'Information about the currently viewed program. Warning: This command may change or be disabled in the future.'}, {u'formControls': [], u'urlParameters': [{u'isRequired': False, u'type': u'string', u'name': u'wrapper'}, {u'isRequired': False, u'type': u'int', u'name': u'minor'}, {u'isRequired': False, u'type': u'string', u'name': u'callback'}, {u'isRequired': False, u'type': u'int', u'name': u'major'}, {u'isRequired': False, u'type': u'int', u'name': u'ccid'}, {u'isRequired': False, u'type': u'int', u'name': u'source'}, {u'isRequired': False, u'type': u'string', u'name': u'clientAddr'}], u'command': u'/tv/tune', u'description': u'Tune to a channel. Warning: This command may change or be disabled in the future.'}]}
  • getLocations
    DIRECTV DVR Control Debug getLocations called: http://192.168.1.53:8080/info/getLocations
    DIRECTV DVR Control Debug {u'status': {u'msg': u'OK.', u'query': u'/info/getLocations', u'code': 200, u'commandResult': 0}, u'locations': [{u'locationName': u'G', u'clientAddr': u'0'}]}
  • getMode
DIRECTV DVR Control Debug getMode called: http://192.168.1.53:8080/info/getMode
DIRECTV DVR Control Debug {u'status': {u'msg': u'Not Found.Resource not found.', u'query': u'/info/getMode', u'code': 404, u'commandResult': 1}}


Each of them outputs the respective info to the Indigo log (if debug is turned on).
(Hardcoded to your IP at the moment.)

Also the errorLog() replies I put in before now go to debugLog() instead.

Copy paste each of them back to me, either here or by PM.

Turn off debug in plugin > configure if you need to.


Thanks,

Carl

Posted on
Wed Jun 01, 2022 12:51 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: DTV Code Failure

Sorry, Tapatalk contracted your replies inside my quote so I didn’t spot them.

I’ll reply again later.


Sent from my iPhone using Tapatalk Pro

Posted on
Wed Jun 01, 2022 12:22 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: DTV Code Failure

Ok

Can you open the following URLs in Safari - do either result in the TV changing correctly?

http://192.168.1.53:8080/tv/tune?major=356&minor=65535
http://192.168.1.53:8080/tv/tune?major=356

ps - I presume channel 356 still exists in your subscription package?

Peter

Posted on
Wed Jun 01, 2022 1:42 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: DTV Code Failure

Yes, both change the channel to 356.

thanks,

Carl

Posted on
Wed Jun 01, 2022 2:01 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: DTV Code Failure

Great

v1.1.5 should sort you out.

Let me know and I'll work with Jay to get it uploaded properly.

Posted on
Wed Jun 01, 2022 3:20 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: DTV Code Failure

Thanks a bunch!
Works perfectly.

Carl

Posted on
Wed Jun 01, 2022 3:48 pm
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: DTV Code Failure

Excellent.

Jay, I’m watching a proper GitHub tutorial series to learn what I should be doing before I get in touch. :-)


Sent from my iPhone using Tapatalk Pro

Posted on
Wed Jun 01, 2022 4:05 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: DTV Code Failure

Create issue, fork, change, issue PR (link to issue)... :P

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Who is online

Users browsing this forum: No registered users and 3 guests

cron