Sony Bravia plugin seems to be broken with Indigo 7.0

Posted on
Sun Jan 29, 2017 10:19 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

OH, one last thing I hadn't thought to check - see if you can retrieve the IR code list by chance; this is available in the Plugin's menu structure.

Posted on
Sun Jan 29, 2017 11:20 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

RogueProeliator wrote:
I have a new release for you guys to test out -- I do not expect that this will actually resolve the issue but hopefully give us more information in order to fully diagnose the issue. If you would, please download and install this pre-release:

https://github.com/RogueProeliator/IndigoPlugins-Sony-Network-Remote/archive/v2.4.1.zip


Done.

Then, test two things for me, both with the TV already powered on:
1. See if the device is now found in the list of available options when it searches (i.e. when creating a new device)


None of the devices appear and I have 5 new (android) displays and one older display on the network in the same broadcast domain. Some are on and some are off. None show up when I attempt to create a new device.

2. Set Debug Level to HIGH and try, say, an HDMI selection or volume command and post the logged details


do you still want this done if step 1 failed?

Thanks for sticking with it!


Hey, you are doing us a favor by writing the code!

Posted on
Mon Jan 30, 2017 1:46 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

do you still want this done if step 1 failed?

Was the non-Android device on? I'll look back at the previous UPnP results that you shared and see if I spot any differences. I changed it to look for a specific service tag being advertised rather than a model string, but obviously something is still off.

do you still want this done if step 1 failed?

Yes, please. Those are separate sections of the code - I added a little more detailed logging (when debugging is set to High) to the 500 error response that you were getting.

Adam

Posted on
Mon Jan 30, 2017 1:55 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

OK. I paired again. Pairing was normal. I then attempted an action group to change to HDMI2. Here's the result:

Action Group Office TV Bench HDMI2
Sony Bravia Network Remote Plugin Threaddebug Returning default GUIConfigValue for sonyTvRemoteDevice:deviceIsChildDevice
Sony Bravia Network Remote Plugin Threaddebug Returning default GUIConfigValue for sonyTvRemoteDevice:deviceIsChildDevice
Sony Bravia Network Remote Plugin Threaddebug Returning default GUIConfigValue for sonyTvRemoteDevice:deviceIsChildDevice
Sony Bravia Network Remote Plugin Threaddebug Command queue has 1 command(s) waiting
Sony Bravia Network Remote Plugin Threaddebug Received SOAP/JSON 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">AAAAAgAAABoAAABbAw==</IRCCCode>
</m:X_SendIRCC>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sony Bravia Network Remote Plugin Debug Processing SOAP/JSON operation to http://172.16.48.32:80/sony/ircc
Sony Bravia Network Remote Plugin Threaddebug Sending SOAP/JSON 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">AAAAAgAAABoAAABbAw==</IRCCCode>
</m:X_SendIRCC>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sony Bravia Network Remote Plugin Threaddebug Using headers:
{'Content-type': 'text/xml; charset="UTF-8"', 'Host': u'172.16.48.32', 'Cookie': u'auth=B01222A3F3A4FA982FEF862505AA0655B1418C3F', 'SOAPAction': 'urn:schemas-sony-com:service:IRCC:1#X_SendIRCC', 'User-Agent': 'DuncanwareRemote (IndigoPlugin)'}
Sony Bravia Network Remote Plugin Error An error occurred processing the SOAP/JSON POST request: (Device: 1587352776): 500
Sony Bravia Network Remote Plugin Error An error occurred processing the SOAP/JSON POST request: (Device: 1587352776): global name 'responseObj' is not defined
Sony Bravia Network Remote Plugin Error Error in plugin execution:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Sony Bravia Network Remote.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkRESTfulDevice.py", line 362, in concurrentCommandProcessingThread
self.handleRESTfulError(command, e, responseObj)
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Sony Bravia Network Remote.indigoPlugin/Contents/Server Plugin/sonyTvNetworkRemoteDevice.py", line 163, in handleRESTfulError
super(SonyTvNetworkRemoteDevice, self).handleRESTfulError(rpCommand, err, response)
File "/Library/Application Support/Perceptive Automation/Indigo 7/Plugins/Sony Bravia Network Remote.indigoPlugin/Contents/Server Plugin/RPFramework/RPFrameworkRESTfulDevice.py", line 452, in handleRESTfulError
self.hostPlugin.logger.debug(RPFrameworkUtils.to_unicode(responseObj.text))
NameError: global name 'responseObj' is not defined

Sony Bravia Network Remote Plugin Debug Command thread ending processing

Posted on
Fri Feb 03, 2017 12:04 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

Okay, so that showed why we were not getting an error -- thanks. Now please give this version a try which fixes the error handling and should give us the better information; you can just run the command attempt (with full debug on) and post that...

https://github.com/RogueProeliator/IndigoPlugins-Sony-Network-Remote/archive/v2.4.2.zip

Adam

Posted on
Fri Feb 03, 2017 10:01 am
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

Action Group Office TV Bench HDMI2
Sony Bravia Network Remote Plugin Threaddebug Returning default GUIConfigValue for sonyTvRemoteDevice:deviceIsChildDevice
Sony Bravia Network Remote Plugin Threaddebug Returning default GUIConfigValue for sonyTvRemoteDevice:deviceIsChildDevice
Sony Bravia Network Remote Plugin Threaddebug Returning default GUIConfigValue for sonyTvRemoteDevice:deviceIsChildDevice
Sony Bravia Network Remote Plugin Threaddebug Command queue has 1 command(s) waiting
Sony Bravia Network Remote Plugin Threaddebug Received SOAP/JSON 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">AAAAAgAAABoAAABbAw==</IRCCCode>
</m:X_SendIRCC>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sony Bravia Network Remote Plugin Debug Processing SOAP/JSON operation to http://172.16.48.32:80/sony/ircc
Sony Bravia Network Remote Plugin Threaddebug Sending SOAP/JSON 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">AAAAAgAAABoAAABbAw==</IRCCCode>
</m:X_SendIRCC>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Sony Bravia Network Remote Plugin Threaddebug Using headers:
{'Content-type': 'text/xml; charset="UTF-8"', 'Host': u'172.16.48.32', 'Cookie': u'auth=8F6772F6655D8D36BB401085579D0B960B755756', 'SOAPAction': 'urn:schemas-sony-com:service:IRCC:1#X_SendIRCC', 'User-Agent': 'DuncanwareRemote (IndigoPlugin)'}
Sony Bravia Network Remote Plugin Error An error occurred processing the SOAP/JSON POST request: (Device: 1587352776): 500
Sony Bravia Network Remote Plugin Debug <?xml version="1.0"?>
<s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>401</errorCode>
<errorDescription>Invalid Action</errorDescription>
</UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

Posted on
Fri Feb 03, 2017 10:04 am
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

You know, if Indigo supported IPv6 I would give you direct access to one of the TVs to play with.

Posted on
Fri Feb 03, 2017 11:14 am
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

brianlloyd wrote:
You know, if Indigo supported IPv6 I would give you direct access to one of the TVs to play with.


Plugin code is in Python - so I believe if Python can deal with IPv6 then it should work, right? (I don't know for sure, just a guess)

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Feb 03, 2017 12:37 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

Plugin code is in Python - so I believe if Python can deal with IPv6 then it should work, right? (I don't know for sure, just a guess)


I asked a couple years back if Indigo was going to support IPv6. I recall trying to enter an IPv6 address and it didn't work. Perhaps it does now. Can you confirm?

Posted on
Fri Feb 03, 2017 1:27 pm
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

Again - plugin code is in Python, so whether Indigo supports IPv6 seems irrelevant. The server doesn't use IPv6, nor does the client.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Feb 03, 2017 1:50 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

Thanks Jay. The problem I ran into was in creating a device in Indigo. Where I had to enter an IP address, it would accept an IPv4 address but not an IPv6 address. Since this struck me as possibly a form editing function, it appeared that it might be an Indigo issue, not the underlying python code in the plug-in.

I'll try it again and see if anything has changed.

Posted on
Fri Feb 03, 2017 4:32 pm
jay (support) offline
Site Admin
User avatar
Posts: 18216
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

There is no such thing as an IP entry field type - plugin dialogs just have a text field that accept whatever the user types. The plugin's validation method may validate the text as a known IP address, but that's up to the plugin's implementation.

Honestly, I have no idea how to use IPv6 in Python but just wanted to point out that it's outside of what Indigo has to provide.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Feb 03, 2017 5:02 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

Thanks Jay. I appreciate the info.

Posted on
Fri Feb 03, 2017 10:02 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

I have never dealt with IPv6 in Python and have no idea if the same networking calls will work; I suspect they will and that the Requests module that we use for network access would be fine with it -- so perhaps we should experiment if this continues.

HOWEVER, based on that last detailed logging enabled, I may have found an issue -- the response from the TV is slightly different than previous models that we have seen but close enough that I think it is trying to tell the plugin to re-authenticate. Just that the plugin isn't recognizing it as a re-authentication command. Technically Sony is using an incorrect code here (they are using an HTTP error code, but the text you sent includes an HTTP re-auth request code), but I digress.

Give THIS one a try and see how it goes...
https://github.com/RogueProeliator/IndigoPlugins-Sony-Network-Remote/archive/v2.4.3.zip

Adam

Posted on
Sat Feb 04, 2017 6:07 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plugin seems to be broken with Indigo 7.0

RogueProeliator wrote:
I have never dealt with IPv6 in Python and have no idea if the same networking calls will work; I suspect they will and that the Requests module that we use for network access would be fine with it -- so perhaps we should experiment if this continues.


If you have the latest networking stack and library, IPv4 and IPv6 should be interchangeable. As far as the application interface to TCP or UDP is concerned, nothing has changed. But if you have been using something to do edit checking of IP addresses using the IPv4 model (dotted quad) then entering an IPv6 address will be a problem.

Also, I have had trouble using domain names with some of the plugins. Every device in my network has a name and I would prefer to use the device's name rather than IP address.

Loading and testing the new plugin.

Who is online

Users browsing this forum: No registered users and 2 guests