Plugin Discussion / Feedback

Posted on
Tue Sep 02, 2014 6:23 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Plugin Discussion / Feedback

Thank you very much for this great plugin!

I bought a new Sony Bravia KDL-65W955 with support for WOL etc.
The iPhone App, TV SideView, works perfect after the registration.
(http://helpguide.sony.net/apps_c/tvside ... ister.html)

But, the Plugin don't have a registration feature.
The TV has been recognized in the network but after a command
Power On of Off or Volume up, nothing happens.
(see log below with errors)

What did I wrong?
Will the plugin work work without any registration?

Thanks for the help and kind regards,

John


Action Group Sony Bravia Volume Up
Sony Bravia Network Remote Plugin Debug Command queue has 1 command(s) waiting
Sony Bravia Network Remote Plugin Debug Received SOAP command request:
/sony/IRCC
urn:schemas-sony-com:service:IRCC:1#X_SendIRCC
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<m:X_SendIRCC xmlns:m="urn:schemas-sony-com:service:IRCC:1">
<IRCCCode xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">AAAAAQAAAAEAAAASAw==</IRCCCode>
</m:X_SendIRCC>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sony Bravia Network Remote Plugin Debug Processing SOAP operation to /sony/IRCC
Sony Bravia Network Remote Plugin Debug Sending SOAP request:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<m:X_SendIRCC xmlns:m="urn:schemas-sony-com:service:IRCC:1">
<IRCCCode xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">AAAAAQAAAAEAAAASAw==</IRCCCode>
</m:X_SendIRCC>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sony Bravia Network Remote Plugin Debug Command Response: [500] <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>606</errorCode>
<errorDescription>Action not authorized</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
Sony Bravia Network Remote Plugin Debug SOAP_REQUEST command completed.
Attachments
Screen 2014-09-01 om 22.06.45.png
Screen 2014-09-01 om 22.06.45.png (88.08 KiB) Viewed 12356 times

Posted on
Tue Sep 02, 2014 8:51 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Plugin Discussion / Feedback

The plugin is not doing any registration -- right now it would only work on devices that do not require a registration... when I looked up most of the third-party remotes out there, they required that you register with the device using the Sony app on the same (mobile) device. Unfortunately, I understand how that would not work with the computer, at least that I know of...

There was one potential work-around, let me look that up and see if I can find it, though I don't know if it still works. In that case, you registered with any device then sent a header to the receiver with the MAC address of the registered device and it would accept commands from the "new" device. Let me see if I can dig that up...

Adam

Posted on
Wed Sep 03, 2014 2:47 am
McJohn offline
User avatar
Posts: 631
Joined: Dec 18, 2012
Location: The Netherlands

Re: Plugin Discussion / Feedback

Hello Adam,

Thanks for your fast reply and explanation.

I hope that the work-around will work.
Before I used the Cynical Cache with a JVC TV.
But a direct connection with your plugin to the TV would be perfect!
Let me know if I can help with some tests.
(I’m not a programmer but a master user of Indigo for years :-)

Greetings,

John

Posted on
Wed Sep 03, 2014 3:40 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Plugin Discussion / Feedback

John:

Please send me a Private Message with your email address if you would... we will need to run a few scripts to see if it is even possible before I code anything into a plugin. We've tried these unsuccessfully (thus far) against a Sony receiver, but they were designed for a television so I have a little more optimism for getting it to work.

Adam

Posted on
Sun Oct 05, 2014 11:23 pm
discgolfer1138 offline
User avatar
Posts: 45
Joined: Jul 28, 2011
Location: Golden, CO

Re: Plugin Discussion / Feedback

I've been working on a node.js module to manipulate my bravia tv. I too stumbled on the device registration roadblock. By picking through the code of an open source ruby lib, I've figured out the registration process that pairs the client app with the TV. You then have to use that 'approved' mac address in the headers to get it working.

I'd be happy to explain in greater detail, but at the moment, I'd suggest taking a look at the register() method in this ruby lib..

https://github.com/lmc/ruby-cers-tv/blo ... /device.rb

you can see other supporting methods in there for how the headers are constructed.

So far I can mess with volume and a few other things, but haven't got power on/off working yet. However, their "api" does offer a reflection method to tell you what commands are available and what the codes are.

Indigo 6.1.0 | Mac Mini | OS 10.10.3 (Yosemite)
Fork Me on GitHub!

Posted on
Mon Oct 06, 2014 10:38 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Plugin Discussion / Feedback

Thanks for the pointer... I have previously tried that and it doesn't seem to work with all of the Bravia TVs using that fake MAC technique -- not sure if it is firmware based (perhaps they started checking the actual MAC address) or model based.

HOWEVER, I have recently been able to work out the code to do a full pairing, just have to figure out now how to have it authorized to work as it provides an authentication cookie and sending that to the IRCC service still results in a "Not Authorized" return. I may take a look again at that Ruby code, though, now that I have it pairing okay.

Incidentally, my TV responds to a standard Wake-On-LAN request without going through their IR commands (though to go to Standby power I send the appropriate IRCC code.) You might could try that route...

Adam

Posted on
Wed Oct 08, 2014 10:26 pm
discgolfer1138 offline
User avatar
Posts: 45
Joined: Jul 28, 2011
Location: Golden, CO

Re: Plugin Discussion / Feedback

It's a matter of feeding the authorized mac address into the request header and properly formatting your SOAP xml, here's an example.

assumptions:
your tv's IP is 192.168.1.123
you have registered your fake mac as 11:38:11:38:11:38

request url:
Code: Select all
http://192.168.1.123/IRCC


request headers:
Code: Select all
User-Agent:'TVSideView/2.0.1 CFNetwork/672.0.8 Darwin/14.0.0',
Content-Type:'text/xml; charset=utf-8',
SOAPAction:'"urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"',
Content-Length': <compute xml byte length and insert it here>,
Accept:'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
X-CERS-DEVICE-INFO:'iPhone OS5.0.1/3.0.1/iPhone3,3',
X-CERS-DEVICE-ID:'MediaRemote:11:38:11:38:11:38',
Connection:'close'


SOAP request xml:
Code: Select all
<?xml version="1.0"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <s:Body>
    <u:X_SendIRCC xmlns:u="urn:schemas-sony-com:service:IRCC:1">
      <IRCCCode>AAAAAQAAAAEAAAA+Aw==</IRCCCode>
    </u:X_SendIRCC>
  </s:Body>
</s:Envelope>


paths, IR codes and other details will likely vary based on model.

I would also suggest testing the request and response outside of your code first. Point being to rule out any possible errors in logic, syntax or encoding. I use the POSTMAN extension for Chrome, works like a charm. Also gives you an easy mechanism to observe the response headers and data.

Indigo 6.1.0 | Mac Mini | OS 10.10.3 (Yosemite)
Fork Me on GitHub!

Posted on
Thu Oct 09, 2014 10:34 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Plugin Discussion / Feedback

Yeah, I never verify functionality within the plugin's code, this is a bare-bones, direct submission to the TV and at least some of the tests have been nearly identical to what you show below... except the registration system on this TV seems to be different than the Ruby example. Therein probably lies the rub, at least I am assuming so... I was able to successfully get it registered and paired to the TV using a different authentication service, but alas no luck thus far. Not giving up yet, but it is difficult as I don't have the device physically here/contactable as it isn't mine.

I want to "beat" Sony at this, though. :-) How hard is it to publish your dang API...

Adam

Posted on
Thu Oct 09, 2014 10:48 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Plugin Discussion / Feedback

You have a sample of your registration submission just to confirm? I was connecting with a GET to /cers/api/register?... but it returns 404.

The registration that I got to work was to /sony/accessControl as a JSON POST (returns an authorization cookie after successfully pairing with the TV). Adding this to the SendIRCC service still returns a "Not Authorized" response.

I wish I had it locally and could watch it with Wireshark, this could be so much easier...

Adam

Posted on
Thu Oct 16, 2014 2:37 pm
CraigM offline
Posts: 582
Joined: Oct 28, 2007

Re: Plugin Discussion / Feedback

ckeyes888 wrote:
Might the plugin work with this model? Sony 40" 1080p Smart LED HDTV KDL-40W590B

Thanks,

Carl


Carl, did you ever purchase the KDL-40W590B?
I'm looking at TV's, possibly the KDL-40W600B, which I believe is the same model, just not sold through Costco, etc...

Would you mind doing a review? Especially any commands that don't work or features that are wonky.

It would really be a plus if the developer could publish a 'Known Working Models' list.

Thanks

Posted on
Fri Dec 05, 2014 9:33 pm
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Re: Plugin Discussion / Feedback

Hello,

Today I purchased a Sony KDL-60R510A. I have been messing around with the plugin trying to get it to work. SO far I tried both wired and wireless connections.

When I added the TV the drop down box listing TV's was empty so I manually entered the IP 192.168.1.101. It found the MAC but every time I use any command I get the following

Dec 5, 2014, 10:29:00 PM
Action Group new action group
Sony Bravia Network Remote Plugin Error Error in plugin execution:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sony Bravia Network Remote.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkRESTfulDevice.py", line 163, in concurrentCommandProcessingThread
RPFrameworkNetworkingWOL.sendWakeOnLAN(command.commandPayload)
File "/Library/Application Support/Perceptive Automation/Indigo 6/Plugins/Sony Bravia Network Remote.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkNetworkingWOL.py", line 34, in sendWakeOnLAN
raise ValueError('Incorrect MAC address format')
ValueError: Incorrect MAC address format

When I try mute I get this


Dec 5, 2014, 10:35:54 PM
Action Group Mute
Sony Bravia Network Remote Plugin Error An error occurred processing the SOAP POST request: (Device: 1656065591): [Errno 61] Connection refused

Any suggestions where to go from here?

Posted on
Fri Dec 05, 2014 10:19 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Plugin Discussion / Feedback

Are you able to control the TV via an application from your mobile phone? Getting that setup and working is definitely the first step -- on some models that has to occur before any communication can happen from the computer.

Adam

Posted on
Fri Dec 05, 2014 10:51 pm
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Re: Plugin Discussion / Feedback

I tried several apps so far with no success?

Posted on
Fri Dec 05, 2014 10:58 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Plugin Discussion / Feedback

Did you enable external control of the TV from the settings menu? You'll need to do that, then you can pair up the device with the TV -- use Sony's official application for this step as nearly all third-party apps (phone or computer) rely on Sony's official application to do the initial authorization.

Also make sure both your phone and TV are on the same subnet (the first three "sections" of the IP address the same); this is generally not an issue as long as your phone is on your house WiFi.

Adam

Posted on
Fri Dec 05, 2014 11:19 pm
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Re: Plugin Discussion / Feedback

Do you know what the Sony App is called. I tried several so far. None I think were Sony.

Who is online

Users browsing this forum: No registered users and 1 guest