Sony Bravia plug in just stopped working with my TV

Posted on
Sun Jun 07, 2015 12:45 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Sony Bravia plug in just stopped working with my TV

It is very strange. It just stopped working for anything except turn-on. IPv4 address is fixed for my TV. (I have my DHCP server always assigning the TV the same IP address.. I can ping the TV just fine. Turning the TV on works (means that the MAC address is correct). But any other function, i.e. turn off the TV, switch to HDMI1, or switch to HDMI 2, results in the following error message in the log:

"Sony Bravia Network Remote Plugin Error Error executing command: Page Not Found on Device"

Given that all this was working yesterday but not today has me completely mystified.

I have stopped and restarted the plug-in. I have stopped and restarted the Indigo server. I have verified the TV's network configuration.I have tried deleting the device and recreating it in Indigo. The TV is still found by the plug-in. I have increased the debugging level in the event log to high and the end result is always the same error message, albeit with more verbiage.

Suggestions?

Posted on
Sun Jun 07, 2015 8:31 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Bravia plug in just stopped working with my TV

I can't imagine what could change to make it all of a sudden stop working unless it was paired and somehow became unpaired (perhaps was paired to another phone or mobile device and now the TV does not think it is paired at all).

What version are you using?

Posted on
Sun Jun 07, 2015 9:35 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plug in just stopped working with my TV

Well, version is 1.7.14.

I did get it working again. Must have been the two Manhattans I had. I had to reconnect to the TV and then pair again. Very strange. I had tried it before but it didn't work. Now it did.

I think Sony pushed out a firmware update to the TV. That could have caused it to lose part of its configuration. That's all I can imagine.

BTW, great plug-in. Thank you.

Posted on
Fri Oct 23, 2015 11:26 am
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plug in just stopped working with my TV

I have now determined that the TV becomes un-paired periodically. I haven't been able to figure out when it does but it seems that it is no longer paired with Indigo sometime between 3 and 10 days. Perhaps a fix could be that, if the plug-in issues a command to the TV and then gets ah error, try pairing with the TV again and then reissue the last command that failed.

Posted on
Fri Oct 23, 2015 11:44 am
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Bravia plug in just stopped working with my TV

Perhaps a fix could be that, if the plug-in issues a command to the TV and then gets ah error, try pairing with the TV again and then reissue the last command that failed.

The plugin actually does attempt to authenticate if the television sends back the proper codes indicating that it is not paired / needs to do so. It can't do the full re-pairing that requires user interaction on the television, of course. However, it only does this is it thinks the authentication is required, perhaps the TV is sending back a different code than expected. When you have to re-pair, is it requiring that you enter a acknowledge it on the TV?

I can't imagine what could cause it to lose the pairing if your server is not changing. I believe that it uses the MAC address internally, so going from a wired to a wireless connection on the server could also potentially trigger that.

Posted on
Fri Oct 23, 2015 12:37 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plug in just stopped working with my TV

The plugin actually does attempt to authenticate if the television sends back the proper codes indicating that it is not paired / needs to do so. It can't do the full re-pairing that requires user interaction on the television, of course. However, it only does this is it thinks the authentication is required, perhaps the TV is sending back a different code than expected. When you have to re-pair, is it requiring that you enter a acknowledge it on the TV?


No. I just need to go to the UI on Indigo and execute the pairing operation again. Neither the TV nor Indigo require any additional information.

I do know that, if I try to pair when it is already paired I get an error. If I try to pair and it is successful, it needed to pair again.

Do you have a way to capture the conversation between the plug-in and the TV? If so, I can snarf the exchange and ship it off to you for examination. I am planning to add 6 more Sony Bravia 4K displays to my house so I really want this to work reliably. (I want to standardize on displays so that Indigo can control them all.)

(Has anyone hacked the firmware in Sony Bravia displays so we can use the in-built processor for something useful? Without that the TV is useless for anything but just being a raw display for another processor.)

I can't imagine what could cause it to lose the pairing if your server is not changing. I believe that it uses the MAC address internally, so going from a wired to a wireless connection on the server could also potentially trigger that.


Everything in my house is hard wired Gig-E. Neither the TV nor the server are running WiFi. In my experience, wire is just more reliable. I'd hard-wire the control to my lights and switches if I could. I can't so I use Z-Wave. (Z-Wave seems to be the most open home-control protocol.)

Posted on
Fri Oct 23, 2015 2:12 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Bravia plug in just stopped working with my TV

No. I just need to go to the UI on Indigo and execute the pairing operation again. Neither the TV nor Indigo require any additional information.

In that case, it is possible that your TV is returning something other than what the plugin was developed against; currently the plugin will attempt to re-authenticate if it receives a 401 status (Authentication Required) response. Maybe they changed some version to put that in text rather than use the proper status code. Just a guess, though, but if that is indeed the issue we can likely account for it. (The below instructions will help in that regard)

Do you have a way to capture the conversation between the plug-in and the TV? If so, I can snarf the exchange and ship it off to you for examination. I am planning to add 6 more Sony Bravia 4K displays to my house so I really want this to work reliably. (I want to standardize on displays so that Indigo can control them all.)

Depending on the actual return that you are getting, may be able to... if it happens, go to the Plugin Configuration dialog and turn on Debug to High. This level will log all communications that the plugin sends/receives from the TV. Definitely will get more information when that is on, but it dumps a TON of info to the log, so when it fails just turn it on, try a few commands and turn off debugging.

Thanks,
Adam

Posted on
Fri Oct 23, 2015 2:48 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plug in just stopped working with my TV

Depending on the actual return that you are getting, may be able to... if it happens, go to the Plugin Configuration dialog and turn on Debug to High. This level will log all communications that the plugin sends/receives from the TV. Definitely will get more information when that is on, but it dumps a TON of info to the log, so when it fails just turn it on, try a few commands and turn off debugging.


Wilco. Next time it "times out" and I have to re-pair, I'll turn on debugging, send a couple of commands, and then re-pair.

Thanks!

Posted on
Tue Oct 27, 2015 7:37 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plug in just stopped working with my TV

OK, it has been about a week since I had to pair it again. It just stopped responding to commands again. I turned on debugging, sent it a couple of commands, re-paired it, and all is good again. Here is the debugging output (lots of output):

Oct 27, 2015, 8:29:43 PM
Sony Bravia Network Remote Plugin Debug set to True by user
Action Group TV Select AppleTV
Sony Bravia Network Remote Plugin Debug Command queue has 2 command(s) waiting
Sony Bravia Network Remote Plugin Debug Command queue has 1 command(s) waiting
Sony Bravia Network Remote Plugin Debug 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">AAAAAgAAABoAAABaAw==</IRCCCode>
</m:X_SendIRCC>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sony Bravia Network Remote Plugin Debug Processing SOAP/JSON operation to /sony/IRCC
Sony Bravia Network Remote Plugin Debug 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">AAAAAgAAABoAAABaAw==</IRCCCode>
</m:X_SendIRCC>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Z-Wave sent "Stereo Wall Socket" on
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.
Action Group TV off
Sony Bravia Network Remote Plugin Debug Command queue has 1 command(s) waiting
Sony Bravia Network Remote Plugin Debug 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">AAAAAQAAAAEAAAAvAw==</IRCCCode>
</m:X_SendIRCC>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Sony Bravia Network Remote Plugin Debug Processing SOAP/JSON operation to /sony/IRCC
Sony Bravia Network Remote Plugin Debug 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">AAAAAQAAAAEAAAAvAw==</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.
Action Group TV Select Mac
Sony Bravia Network Remote Plugin Debug Command queue has 2 command(s) waiting
Sony Bravia Network Remote Plugin Debug Command queue has 1 command(s) waiting
Sony Bravia Network Remote Plugin Debug 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 /sony/IRCC
Sony Bravia Network Remote Plugin Debug 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 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.
Sony Bravia Network Remote Plugin Debug Received an authentication command, attempting connection
Sony Bravia Network Remote Plugin Debug Sending Auth Request: {"id":13, "method":"actRegister", "version":"1.0", "params": [{"clientid":"DuncanwareRemote:34c43339-af3d-40e7-b1b2-743331375368c", "nickname":"DuncanwareRemote (IndigoPlugin)"}, [{"clientid":"DuncanwareRemote:34c43339-af3d-40e7-b1b2-743331375368c", "value":"yes", "nickname":"DuncanwareRemote (IndigoPlugin)", "function":"WOL"}]]}
Sony Bravia Network Remote Plugin Debug Response to Auth Request: [200] [('date', 'Wed, 28 Oct 2015 01:30:11 GMT'), ('set-cookie', 'auth=228eec6e1f81d98ac6291fd9aff5ec8fa7278d108f1f0280335cb475de270882; path=/sony/; max-age=1209600; expires=Wed, 11-Nov-2015 01:30:11 GMT;'), ('content-length', '21'), ('content-type', 'application/json'), ('connection', 'close')]

{"id":13,"result":[]}
Sony Bravia Network Remote Plugin Debug Obtained Auth Cookie: auth=228eec6e1f81d98ac6291fd9aff5ec8fa7278d108f1f0280335cb475de270882
Sony Bravia Network Remote Plugin Debug Entering deviceStopComm for TV1; ID=1793081090
Sony Bravia Network Remote Plugin Debug Returning default GUIConfigValue for sonyTvRemoteDevice:deviceIsChildDevice
Sony Bravia Network Remote Plugin Debug Initiating shutdown of communications with TV1
Sony Bravia Network Remote Plugin Debug Command thread ending processing
Sony Bravia Network Remote Plugin Debug Shutdown of communications with TV1 complete
Sony Bravia Network Remote Plugin Debug Exiting deviceStopComm for TV1
Sony Bravia Network Remote Plugin Debug Entering deviceStartComm for TV1; ID=1793081090
Sony Bravia Network Remote Plugin Debug Concurrent Processing Thread started for device 1793081090
Sony Bravia Network Remote Plugin Debug Returning default GUIConfigValue for sonyTvRemoteDevice:updateStatusPollerIntervalProperty
Sony Bravia Network Remote Plugin Debug Returning default GUIConfigValue for sonyTvRemoteDevice:updateStatusPollerActionId
Sony Bravia Network Remote Plugin Debug Returning default GUIConfigValue for sonyTvRemoteDevice:emptyQueueReducedWaitCycles
Sony Bravia Network Remote Plugin Debug Returning default GUIConfigValue for sonyTvRemoteDevice:databaseConnectionEnabled
Sony Bravia Network Remote Plugin Debug Database access enabled:
Sony Bravia Network Remote Plugin Debug Database access has been disabled, skipping connection
Sony Bravia Network Remote Plugin Debug Command queue has 1 command(s) waiting
Sony Bravia Network Remote Plugin Debug Create connection command de-queued
Sony Bravia Network Remote Plugin Debug Returning default GUIConfigValue for sonyTvRemoteDevice:updateStatusPollerStartupDelay
Sony Bravia Network Remote Plugin Debug Returning default GUIConfigValue for sonyTvRemoteDevice:deviceIsChildDevice
Sony Bravia Network Remote Plugin Debug Returning default GUIConfigValue for sonyTvRemoteDevice:deviceIsChildDevice
Sony Bravia Network Remote Plugin Debug Exiting deviceStartComm for TV1
Sony Bravia Network Remote Plugin Debug Command queue has 2 command(s) waiting
Sony Bravia Network Remote Plugin Debug Initiating sleep of 3.0 seconds from command.
Sony Bravia Network Remote Plugin Debug Command queue has 1 command(s) waiting
Sony Bravia Network Remote Plugin Debug Ignoring status update request, no action specified to update device status

Posted on
Sat Oct 31, 2015 10:35 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Bravia plug in just stopped working with my TV

Awesome, that debug report shows exactly what is going on... here is what happens - once paired the plugin needs only retrieve an authorization code from the television (kind of like logging in.) This code will eventually timeout and must be re-requested. Normally when that happens the TV sends back a code "Authentication Required"... but in your case the TV is sending back an actual ERROR code, with the reason for the error being that authentication is required. Arguably the wrong code to be sending back as it isn't an error, but hey...

I need to do some QA on other changes for the plugin and then will post you a beta with this situation handled properly (it will treat it like others received as authentication required). Re-pairing like you are doing also re-requests the authorization code so that is why that works for you.

Adam

Posted on
Sat Oct 31, 2015 10:45 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plug in just stopped working with my TV

Great! Thank you. Looking forward to the update. I have to put several more TVs in so this leads me I be direction of more Bravia TVs.

Posted on
Wed Nov 04, 2015 10:10 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Bravia plug in just stopped working with my TV

Give this version a try... Release Candidate v2.1.17. Warning - you will be the first to start using it full time, but I think it should be fine. I added the code to (hopefully) address your TV's return, but obviously am unable to test it since my TV is working differently. Please let me know how it goes!

Adam

Posted on
Wed Nov 04, 2015 10:32 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plug in just stopped working with my TV

Thank you Adam. I'll try it out and let you know how it works out with my TV. I am planning to get a couple more Bravia TVs for other parts of my house and am hoping to have them under control of your plug-in also.

Posted on
Mon Nov 16, 2015 1:23 pm
RogueProeliator offline
User avatar
Posts: 2501
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Sony Bravia plug in just stopped working with my TV

Thank you Adam. I'll try it out and let you know how it works out with my TV.

Is that version working better / automatically re-connecting and re-authenticating when necessary? I haven't released it to everyone but will go ahead and do so if you think it has been stable for you.

Thanks!

Posted on
Mon Nov 16, 2015 3:46 pm
brianlloyd offline
User avatar
Posts: 226
Joined: May 26, 2013
Location: San Antonio, TX, USA

Re: Sony Bravia plug in just stopped working with my TV

It appears to be working better. It did not disconnect at all in the time that I had it running. I am in the middle of a renovation and had to take that TV down. Even so, I think it is a winner ... but it has a new bug.

I just got two new Bravia TVs. These are the new "Android" TV. The plug-in works with the new TV for everything except turning the TV on. Yes, I have enabled Remote Start (supposedly allows a remote system to "wake up" the TV) and I have played with "Simple IP Control" both on and off. Nothing seems to change the behavior. Once the TV is on everything works just fine. Any suggestions?

BTW, if you click "Read MAC address" and one of the octets is "0a", it is reported back as "a". That causes the software to reject the MAC address as not being in the correct format. FYI.

Who is online

Users browsing this forum: No registered users and 1 guest