Sony Devices Binding

Tags: #<Tag:0x00007f5c86ee2610>

(Erkan Balci) #241

Tim any news on the scalar web? Btw i am having those Warnings with the simple IP. TV is KD55XD8505. Only 2 channels active, power and TVinput.

13:35:57.494 [WARN ] [y.internal.simpleip.SimpleIpProtocol] - Unparsable response '
*SAVOLU0000000000000012' to command '*SEVOLU################'
13:36:00.498 [WARN ] [y.internal.simpleip.SimpleIpProtocol] - Unparsable response '
' to command '*SEVOLU################'
13:36:05.383 [INFO ] [marthome.event.ItemStateChangedEvent] - KD55XD8505_Input changed from NULL to HDMI1
13:36:17.379 [WARN ] [y.internal.simpleip.SimpleIpProtocol] - Unparsable response '
*SATCHNFFFFFFFFFFFFFFFF' to command '*SETCHN################'
13:36:20.382 [WARN ] [y.internal.simpleip.SimpleIpProtocol] - Unparsable response '
' to command '*SETCHN################'

(Erkan Balci) #242

Wow, is this binding also goes kaput since Tim has not been heard for over a month? Tim we need you :sweat:

(Tim Roberts) #243

Nope it hasn’t. Just have been distracted by something else (however, it’s eventually for the good because I solved some issues that will help on this project). As for your issue - seems fairly obvious and I’ll try to give you a fix for it later this weekend.


(Erkan Balci) #244

Great to hear from you Tim :slight_smile: My condition is not urgent, i guess It only happens when i make the TV on from the remote. So i can wait until the scalar web is ready, no problem for me. Thanks again for this great binding. Any news to put this binding in standard openhab2 bindings?

(Jack M) #245

When I was trying to set this up on my Sony BDP-BX320 BluRay player I had trouble at the point where I had to enter the 4 digit code for the ircc thing. On my TV screen, it said I had 60 seconds to enter the code, but after 5 seconds it said something like “request cancelled”. I eventually noticed in the paper UI (show more section) a setting called “retry interval” and it was set to 5 seconds. I increased this to 10 seconds and it gave me 10 seconds before it said request cancelled. I was able to successfully enter the code and get paired. I think that this Retry Interval should be set to 60 seconds during initial setup, then changed back to 5 seconds, once the device is paired to openhab.

Also, I based my sitemap off your Readme file. It didn’t have examples for controlling the a BluRay. I added a few lines to get this to show up on Basic UI. It still needs a little work, but should help get new users started.

sitemap demo label="Sony Test Menu"
    Frame label="IRCC" {
        Text item=IRCC_Version
        Switch item=IRCC_Power
		Switch item=IRCC_Command mappings=[Play ="Play", Pause = "||", Stop = "Stop"]
		Switch item=IRCC_Command mappings=[Reverse = "<-", Prev = "<<", Forward = ">", Next = "->" ]
		Switch item=IRCC_Command mappings=[Up = "^" ]
		Switch item=IRCC_Command mappings=[Left = "<", Select = "Sel", Right = ">" ]
		Switch item=IRCC_Command mappings=[TopMenu = "Menu", Down = "   v   ", Return = "Return" ]
		Switch item=IRCC_Command mappings=[Eject = "Eject" ]
        Text item=IRCC_InBrowser
        Text item=IRCC_ContentURL
        Text item=IRCC_InText
        Text item=IRCC_Text
        Text item=IRCC_IsViewing
        Text item=IRCC_ViewingId
        Text item=IRCC_ViewingSource
        Text item=IRCC_ViewingClass
        Text item=IRCC_ViewingTitle
        Text item=IRCC_ViewingDuration
        Text item=IRCC_ContentId
        Text item=IRCC_ContentTitle
        Text item=IRCC_ContentClass
        Text item=IRCC_ContentSource
        Text item=IRCC_ContentMediaType
        Text item=IRCC_ContentMediaFormat
        Text item=IRCC_ContentEdition
        Text item=IRCC_ContentDescription
        Text item=IRCC_ContentGenre
        Text item=IRCC_ContentDuration
        Text item=IRCC_ContentRating
        Text item=IRCC_ContentDateRelease
        Text item=IRCC_ContentDirector
        Text item=IRCC_ContentProducer
        Text item=IRCC_ContentScreenWriter
        ImageItem item=IRCC_ContentImage

(Mark) #246

Hi @tmrobert8

Is there a more current binding than last one attached to the PR (named

I’m getting ready to install a couple TVs and wanted to make sure I had the latest version of your binding to try out.


(Tim Roberts) #247

Mark - probably is. Tell you what - I’m going to make a push to finish off the webscalar api this week or next week. I’ll then need some people to test it and if it goes well (enough) - I’ll post it to IOT as well…


(Mark) #248

I’m happy to test it out. I’m installing an X900E and a X720E (should ship in the next week or two).

(Rick Sanchez) #249

First: I’d be happy to test it out, too. I have a Sony KDL-47W805, that shows up as Sony Scalar Web, but then it says Device doesn't implement the system web service.
Right now, I have no option at all to control it with your binding (http works though)

Second: I have a Sony receiver (bluray player…) that is controllable via ircc. Is there any way of directly controlling the input? The tvsideview app does allow it btw. I tried to connect to it via simpleip but that does not work. These ports are open on the device:
Open TCP Port: 22222 Open TCP Port: 50001 Open TCP Port: 50002 Open TCP Port: 50201 Open TCP Port: 50202 Open TCP Port: 52323 Open TCP Port: 54400 Open TCP Port: 60151 Open TCP Port: 64321

Anyways, thanks for the nice work!

(Tim Roberts) #250

SimpleIP is ONLY valid for Sony TVs (and only a limited set of them). The binding version you tried does NOT implement the scalar web service yet (although I’ll release a version next week that will).

I’m not sure what you mean by “controlling the input”

(Rick Sanchez) #251

Sure I am aware of the fact that it currently does not support the scalar web service. Thus I said I’d be happy to test it. I just wanted to point out that the TV seems to support it (or is this a wrong conclusion?)
What I was not aware of is that the receiver might not support SimpleIP.

By “controlling the input” i meant that I’d like to be able to have one command to change it to HDMI1 for instance.

(Tim Roberts) #252

So you are saying you have one of the (few) bluray players that have HDMI inputs on them? In the IRCC configuration - did you specify an IRCC map file? If so - look in the map file to see if you see any input (or hdmi) commands…

(Rick Sanchez) #253

Thats why I originally said its a receiver… it is the Sony BDV-N9100WB, which happens to have a built in bluray player.

I’ve looked into the map that the binding produces, but it only offers me to cycle through the inputs. But somewhere somehow it has to have a method to directly jump to Input x, since the App offers this functionality.

It also shows up as Sony Dial btw.

(Tim Roberts) #254

Next step really depends on how technical you are
First - could you post your map file?
Second - can you wireshark tvsideview app to see what it’s sending? Might be undocumented (if you don’t know what wireshark is - never mind!)
Third - turn debug on for the - I’d be interested in seeing the result of the descriptor request (will be a bunch of XML that describes the IRCC service - sometimes they include additional IRCC actions that the player doesn’t show). BTW - the newest binding (that I haven’t release) includes those in the ircc map file…

(Rick Sanchez) #255
  1. the map:
    Advance=ircc:AAAAAwAAAhAAAAAgAw%3D%3D Angle=ircc:AAAAAwAAAhAAAAATAw%3D%3D Audio=ircc:AAAAAwAAAhAAAAASAw%3D%3D BDV:Bluetooth=ircc:AAAAAwAABhAAAABxAw%3D%3D BDV:Echo=ircc:AAAAAgAAANAAAAAUAw%3D%3D BDV:FootBall=ircc:AAAAAwAADhAAAAAXAw%3D%3D BDV:Function=ircc:AAAAAgAAANAAAABpAw%3D%3D BDV:KeyControl+=ircc:AAAAAgAAANAAAAAWAw%3D%3D BDV:KeyControl-=ircc:AAAAAgAAANAAAAAXAw%3D%3D BDV:MicVol+=ircc:AAAAAgAAANAAAAASAw%3D%3D BDV:MicVol-=ircc:AAAAAgAAANAAAAATAw%3D%3D BDV:MusicEQ=ircc:AAAAAgAAANAAAABJAw%3D%3D BDV:Sleep=ircc:AAAAAgAAAFAAAABgAw%3D%3D BDV:SoundMode=ircc:AAAAAgAAANAAAABuAw%3D%3D BDV:SoundModeDown=ircc:AAAAAgAAANAAAABeAw%3D%3D BDV:SoundModeUp=ircc:AAAAAgAAANAAAABLAw%3D%3D BDV:SoundOutput=ircc:AAAAAwAABhAAAABFAw%3D%3D BDV:SpeakerIllumination=ircc:AAAAAwAABhAAAABgAw%3D%3D Blue=ircc:AAAAAwAABhAAAAAEAw%3D%3D BrowserBack=url:http%3A%2F%2F192.168.1.100%3A50002%2FsetBrowse%3Faction%3Dback BrowserBookmarkList=url:http%3A%2F%2F192.168.1.100%3A50002%2FgetBrowse%3Faction%3DbookmarkList BrowserForward=url:http%3A%2F%2F192.168.1.100%3A50002%2FsetBrowse%3Faction%3Dforward Confirm=ircc:AAAAAwAAAhAAAAB8Aw%3D%3D Dimmer=ircc:AAAAAgAAAFAAAABNAw%3D%3D Display=ircc:AAAAAwAAAhAAAAAYAw%3D%3D Down=ircc:AAAAAwAAAhAAAAB5Aw%3D%3D Eject=ircc:AAAAAwAAAhAAAAA8Aw%3D%3D Enter=ircc:AAAAAwAAAhAAAAAMAw%3D%3D Favorites=ircc:AAAAAwAABhAAAABLAw%3D%3D Forward=ircc:AAAAAwAAAhAAAAA0Aw%3D%3D Green=ircc:AAAAAwAABhAAAAAGAw%3D%3D Home=ircc:AAAAAgAAANAAAAAHAw%3D%3D Left=ircc:AAAAAwAAAhAAAAB6Aw%3D%3D Mode3D=ircc:AAAAAwAABhAAAABMAw%3D%3D Mute=ircc:AAAAAgAAAFAAAAAUAw%3D%3D Netflix=ircc:AAAAAwAADhAAAABRAw%3D%3D Next=ircc:AAAAAwAAAhAAAAAxAw%3D%3D Num0=ircc:AAAAAwAAAhAAAAAJAw%3D%3D Num1=ircc:AAAAAwAAAhAAAAAAAw%3D%3D Num2=ircc:AAAAAwAAAhAAAAABAw%3D%3D Num3=ircc:AAAAAwAAAhAAAAACAw%3D%3D Num4=ircc:AAAAAwAAAhAAAAADAw%3D%3D Num5=ircc:AAAAAwAAAhAAAAAEAw%3D%3D Num6=ircc:AAAAAwAAAhAAAAAFAw%3D%3D Num7=ircc:AAAAAwAAAhAAAAAGAw%3D%3D Num8=ircc:AAAAAwAAAhAAAAAHAw%3D%3D Num9=ircc:AAAAAwAAAhAAAAAIAw%3D%3D Options=ircc:AAAAAwAAAhAAAABzAw%3D%3D PartyOff=url:http%3A%2F%2F192.168.1.100%3A50002%2FsetParty%3Faction%3Dstop PartyOn=url:http%3A%2F%2F192.168.1.100%3A50002%2FsetParty%3Faction%3Dstart Pause=ircc:AAAAAgAAANAAAAABAw%3D%3D Play=ircc:AAAAAgAAANAAAAACAw%3D%3D PopUpMenu=ircc:AAAAAwAAAhAAAAAaAw%3D%3D Power=ircc:AAAAAgAAAFAAAAAVAw%3D%3D Prev=ircc:AAAAAwAAAhAAAAAwAw%3D%3D Red=ircc:AAAAAwAABhAAAAAFAw%3D%3D Replay=ircc:AAAAAwAAAhAAAAAhAw%3D%3D Return=ircc:AAAAAwAAAhAAAAB9Aw%3D%3D Rewind=ircc:AAAAAwAAAhAAAAAzAw%3D%3D Right=ircc:AAAAAwAAAhAAAAB7Aw%3D%3D SEN=ircc:AAAAAwAADhAAAABQAw%3D%3D Stop=ircc:AAAAAgAAANAAAAAAAw%3D%3D SubTitle=ircc:AAAAAwAAAhAAAAARAw%3D%3D TopMenu=ircc:AAAAAwAAAhAAAAAZAw%3D%3D Up=ircc:AAAAAwAAAhAAAAB4Aw%3D%3D VolumeDown=ircc:AAAAAgAAAFAAAAATAw%3D%3D VolumeUp=ircc:AAAAAgAAAFAAAAASAw%3D%3D Yellow=ircc:AAAAAwAABhAAAAAHAw%3D%3D ZoomIn=url:http%3A%2F%2F192.168.1.100%3A50002%2FsetBrowse%3Faction%3DzoomIn ZoomOut=url:http%3A%2F%2F192.168.1.100%3A50002%2FsetBrowse%3Faction%3DzoomOut

  2. wireshark doesn’t really anything from or to the ip, even if I turn on monitoring mode. I thought about making a proxy on my mac to see if I lose anything.

  3. and the log:

2017-07-12 21:13:13.526 [DEBUG] [] - 215 * Sending client request on thread ESH-thingHandler-1
215 > GET
215 > Connection: close
215 > User-Agent: OpenHab/Sony/Binding
215 > X-CERS-DEVICE-ID: MediaRemote:00-11-22-33-44-55
215 > X-CERS-DEVICE-INFO: OpenHab/Sony/Binding

2017-07-12 21:13:13.681 [DEBUG] [] - 216 * Client response received on thread ESH-thingHandler-1
216 < 200
216 < Cache-Control: no-cache
216 < Connection: close
216 < Content-Type: text/xml
216 < Date: Wed, 12 Jul 2017 19:13:13 GMT
216 < Pragma: no-cache
216 < Server: Linux/2.6 Sony-BDV/2.0
216 < Transfer-Encoding: chunked

<?xml version="1.0" encoding="UTF-8"?>

I hope that helps (and is everything you need)

EDIT: heres the whole log…

(Tim Roberts) #256

To wireshark it - your pc needs to be on the same switch between the phone app and whatever openhab is running on. At any rate, add the following lines to the map and try sending “Hdmi1” (or 2) to the ircc channel:


(Rick Sanchez) #257
> 2017-07-12 22:05:13.432 [DEBUG] [] - Transformed Hdmi2 with map file '' to ircc:AAAAAgAAABoAAABbAw%3D%3D
> 2017-07-12 22:05:13.481 [DEBUG] [] - 103 * Sending client request on thread safeCall-2
> 103 > POST
> 103 > Accept: text/xml;charset=utf-8
> 103 > Connection: close
> 103 > Content-Type: text/xml;charset=utf-8
> 103 > SOAPACTION: "urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"
> 103 > User-Agent: OpenHab/Sony/Binding
> 103 > X-CERS-DEVICE-ID: MediaRemote:00-11-22-33-44-55
> 103 > X-CERS-DEVICE-INFO: OpenHab/Sony/Binding
> <?xml version="1.0"?>
> <s:Envelope xmlns:s="" s:encodingStyle="">
>   <s:Body>
>     <u:X_SendIRCC xmlns:u="urn:schemas-sony-com:service:IRCC:1">
>       <IRCCCode>AAAAAgAAABoAAABbAw==</IRCCCode>
>     </u:X_SendIRCC>
>   </s:Body>
> </s:Envelope>
> 2017-07-12 22:05:13.486 [DEBUG] [] - 104 * Client response received on thread safeCall-2
> 104 < 200
> 104 < Connection: close
> 104 < Content-Length: 266
> 104 < Content-Type: text/xml; charset="utf-8"
> 104 < Date: Wed, 12 Jul 2017 20:05:12 GMT
> 104 < EXT: 
> 104 < Server: Linux/2.6 UPnP/1.0 Sony-BDV/2.0
> <?xml version="1.0"?><s:Envelope xmlns:s="" s:encodingStyle=""><s:Body><u:X_SendIRCCResponse xmlns:u="urn:schemas-sony-com:service:IRCC:1"></u:X_SendIRCCResponse></s:Body></s:Envelope>
> 2017-07-12 22:05:14.713 [DEBUG] [] - 105 * Sending client request on thread ESH-thingHandler-2
> 105 > GET
> 105 > Connection: close
> 105 > User-Agent: OpenHab/Sony/Binding
> 105 > X-CERS-DEVICE-ID: MediaRemote:00-11-22-33-44-55
> 105 > X-CERS-DEVICE-INFO: OpenHab/Sony/Binding

does not work, unfortunately.

I’ll try to wireshark it again tomorrow morning, but my PC, my Intel NUC (openhab), my receiver and my phone have been in the same network all connected to the same router (it might be that one was connected to the 2.4 and the other to the 5.0 GHz network… will check tomorrow)

(Rick Sanchez) #258

Okay, so I was able to wireshark it (had to use a mac capture filter rather than a ip capture filter)
here is the file:

I dont know if it helps, but the keys I pressed were Home, left, right, HDMI1. (only those and in this order)

(Tim Roberts) #259

Unfortunately - that doesn’t help me much. I need to see the IP communications between the two devices - specifically the XML being exchanged

(Rick Sanchez) #260

Okay, I am on vacation for the weekend, but I will try to redo it as with the up capture filter as soon as I am home again on Monday.
If that does not work, I might just send you the whole output of wire shark without any filters, but then in a personal message.