Sony Devices Binding

Tags: #<Tag:0x00007f1829eedc50>

(James) #341

Hi All
Just rebooted my Tv and on restart it asked me to add a 4 digit pin into OpenHab - was a little surprised!
Anyone seen this?

(Simon) #342

Hi @tmrobert8 ,

i get following errors:

2017-10-23 21:24:49.314 [WARN ] [.core.transform.TransformationHelper] - Cannot get service reference for transformation service of type MAP 2017-10-23 21:24:49.319 [ERROR] [y.internal.simpleip.SimpleIpProtocol] - Failed to get MAP transformation service; is bundle installed?


2017-10-23 21:21:52.440 [ERROR] [.internal.scalarweb.ScalarWebHandler] - Exception caught: null null
        at org.glassfish.jersey.client.ClientRuntime.invoke( [160:org.glassfish.jersey.core.jersey-client:2.22.2]
        at org.glassfish.jersey.client.JerseyInvocation$ [160:org.glassfish.jersey.core.jersey-client:2.22.2]
        at org.glassfish.jersey.client.JerseyInvocation$ [160:org.glassfish.jersey.core.jersey-client:2.22.2]
        at org.glassfish.jersey.internal.Errors.process( [161:org.glassfish.jersey.core.jersey-common:2.22.2]
        at org.glassfish.jersey.internal.Errors.process( [161:org.glassfish.jersey.core.jersey-common:2.22.2]
        at org.glassfish.jersey.internal.Errors.process( [161:org.glassfish.jersey.core.jersey-common:2.22.2]
        at org.glassfish.jersey.process.internal.RequestScope.runInScope( [161:org.glassfish.jersey.core.jersey-common:2.22.2]
        at org.glassfish.jersey.client.JerseyInvocation.invoke( [160:org.glassfish.jersey.core.jersey-client:2.22.2]
        at org.glassfish.jersey.client.JerseyInvocation$Builder.method( [160:org.glassfish.jersey.core.jersey-client:2.22.2]
        at org.glassfish.jersey.client.JerseyInvocation$ [160:org.glassfish.jersey.core.jersey-client:2.22.2]
        at []
        at []
        at []
        at []
        at []
        at []
        at []
        at []
        at$2( []
        at$ []
        at java.util.concurrent.Executors$ [?:?]
        at [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201( [?:?]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:?]
        at java.util.concurrent.ThreadPoolExecutor$ [?:?]
        at [?:?]
Caused by: java.lang.NullPointerException
        at java.util.Date.getMillisOf( ~[?:?]
        at java.util.Date.after( ~[?:?]
        at ~[?:?]
        at org.glassfish.jersey.client.ClientFilteringStages$RequestFilteringStage.apply( ~[?:?]
        at org.glassfish.jersey.client.ClientFilteringStages$RequestFilteringStage.apply( ~[?:?]
        at org.glassfish.jersey.process.internal.Stages.process( ~[?:?]
        at org.glassfish.jersey.client.ClientRuntime.invoke( ~[?:?]
        ... 26 more```

(David Van Laatum) #343

As requested debug logs for Sony HT RT-5 soundbar. is the soundbar is my tv which I switched off during this

(Andi) #344

I dont know if it is a bug or intended but when the binding starts (in general when openhab is restarted for some reason) my tvchannel item

String St_Tv_Channel_Lr "TV Kanal [%s]" <list> { channel="sony:simpleip:mysonytv:channel" }

gets assigned the value 1.0, which causes to switch the channel (even from apps like Netflix) to the channel 1.0 which is disturbing in most of the cases.

Could you have a look?

(Lars Kusch ) #345

I’m new and today I saw “Hey, I can control my Sony devices!”. The TV worked properly (ca. 5 minutes after shutting off, it won’t react), but my amplifier get’s recognized and then it want’s an access code! So it show’s the message

Status: OFFLINE - COMMUNICATION_ERROR Access code request error: 406 ()

Where do I get the access code? On my TV it was shown on the screen.

(Tim Roberts) #346

FYI - have not disappeared. Been busy preparing the NEEO binding/transport to be accepted/merged. I’ll be looking at the latest comments tomorrow and will be responding then

(Tim Roberts) #347


Don’t know what AVR you have - but does it have some kind of TV output (hdmi, composite, etc) for setup? If it does, connect that up and see if a code appears. If you do all your setup through a front panel, look for it there. Another thing to check is if your setup allows you to set a preset code - if it does, use the code shown and it should work. If nothing else - try 0000 (the default code). If none of that works, I may need you to turn on debug and show me some information.


(Tim Roberts) #348

That is really weird. Just looked at the source and there is nothing that explicitly does that (although I’m wondering - at startup we request the current channel number, which we may get 1.0 back, which then updates the channel, which then may send it back to the tv - just a guess however). Would help me if you could turn debug on for the binding and restart openhab - does the log show it getting the channel and then sending the channel update? Posting the log would help as well so I can review it…


(Tim Roberts) #349

Yep - the soundbar has the same issue that my bluray has. Advertises the webscalar methods but has no way to authenticate against it. With the bluray, we still have IRCC/DIAL to fall back on - but the soundbar doesn’t. I’m still trying to figure out how to authenticate in this case. By any chance have you tried the official Sony SideView (or whatever they call it these days) app to see if it can control the soundbar? If so (and I don’t know how technical you are), I’d love to see how it goes about doing that (via Wireshark)…


(Tim Roberts) #350

You have two issue here:

  1. You need to install the MAP transformation service. If you use paperui, click on Extensions on the left side then Transformations on the right side. Then install the MAP (or mapping - forget the name) service.
  2. The exception you received was fixed in the latest binding - make sure you download the latest binding and use it.


(Tim Roberts) #351


Is this still happening or was that a one time occurrence?


(Tim Roberts) #352


I’ve confirmed this bug and will be making a fix for it shortly. I’ll post when it’s fixed.


(Tim Roberts) #353


Thanks for the logs - you’ve stumbled on some rather unique stuff with your TV that I’m going to have to adjust for. Look for the next update from me and hopefully some of this will be fixed.


(Tim Roberts) #354

Future update will address the ‘stuck’ part


(Tim Roberts) #355


Simple IP mode doesn’t have an API for IR codes - you’ll need to, additionally, install the IRCC service if available to allow that.

(Tim Roberts) #356

In the webscalar service - we have really long obtuse channel names. Needed this because that was the only way to uniquely define things. However, with openhab 2.2 - they introduced a new service that will greatly simplify all this and I can reduce the length of the channel names greatly.

The approach for a channel name could be:

{UUID} is the unique identifier of the device (although I may shorten this to the last node of it - which should be fairly unique)
{service} is the service the device advertises
{idx1} the index of the area within the service we are addressing
{idx2} the index of the api within the area

idx1/idx2 combination uniquely identifies a channel in the device definition that I receive from it

DOWNSIDES to this approach:

  1. The biggest is that it’s not backward compatible and your existing rules/etc will need to be modified
  2. I’ll be dumping into an INFO message what idx1/idx2 relates on startup - but it’s not very intuitive (however, the current scheme of using what the device says really isn’t that intuitive either)
  3. RISK - in my observations, what idx1/idx2 points to has always been consistent between restarts. However, I’m a bit concerned whether that holds true over all devices and especially firmware updates. I’d hate to have a firmware update that changes the order of things - thus invalidating everyones sitemaps/rules.

Because of the RISK issue - I’m not sure I want to mess with the channel names. However I wanted to throw this out for discussion to see if anyone has any different opinions.

(Tim Roberts) #357


Could you post what receiver you have. Here’s a good guide on how to pair the STR-DN850/DN1050:

that may help in your case. Let me know if it’s similar

(David Van Laatum) #358

Would be happy to do that (I am a software dev myself) but it doesn’t work it only detects my tv. Happy to give ssh access to firewall so you can poke around if you want, just need some way of giving you the details that’s not public.

(Lars Kusch ) #359

Oh, I forgot to start the paring mode as described in the manual! I try it again!

(Lars Kusch ) #360

Thank you realy much!
Now it works. Will be there an possibility to control the volume?