Sony Devices Binding

Tags: #<Tag:0x00007f1824a07ce0>

(Tim Roberts) #381

Because it’s such a large binding that it’s going to take forever to bring it up to standards (which I’m in the process of doing right now).

Now that I’ve gotten done with the NEEO binding - I’ve gone back the Sony one to do four things:

  1. Bring it up to standards (rewrite portions of the code, document it, etc)
  2. Fix some of the issues people have been posting about
  3. Try to solve some long standing authentication issues (why certain sony things [like the HT-NT/RT soundbars] won’t work).
  4. Take care of some life cycle issues

Where I stand:

  1. I’ve rewritten/documented the DIAL service and am testing the new code now.
  2. Next will be SimpleIP (will be fast since it’s sooo small)
  3. After that IRCC (should take a few weeks)
  4. ScalarWeb - this is by far the largest and most complicated piece and may take awhile (especially because I have outstanding issues you all have documented).

Note: the next version will NOT be backwards compatible - I’m shortening thing UIDs (replaced UUID with MAC address), shortened channel IDs, etc.

(Vini) #382

Done a port scan and looks like my bottom end TV can’t even be bothered to open simple ports :frowning:

(Tim Roberts) #383


Some sony tvs need their services turned on in settings. Go through settings->network and see if there is ‘stuff’ you can turn on (‘stuff’ is relative to the tv - for some it’s remote device settings, home network settings, turn on remotely [which is WOL], etc). I’d try to turn as much on as possible and see if it’s discovered. If it’s not, your TV probably doesn’t support remote control.


(Udo) #384

Hi there,
I’ve installed and tested the binding today.
It works fine - from the very beginning.
Thanks to @tmrobert8! :+1::smiley:

Two things to share - i watched together with my Sony TV.
It’s already a few years old - So I’m using IRCC commands.

  1. The TV doesn’t wake up over LAN. I’ll use a switchable plug (plug) to control the TV from now - saving wattage as side effect.

  2. I struggled a bit selecting the input source. But no problem any longer. I found a hotkey for switching to TV input at the beginning. After that i can control everything with the up and down keys.

(Vini) #385

I think, given my TV is the entry level in the series, the tight folks at Sony have simply left it out :frowning:

Disappointing, given I only ended up with this Sony because my last TV was written off under warranty.

Never mind, other than having OpenHAB kill the power to the TV at a specific time, I didn’t really use the remote functionality.

(Ibvhefe) #386

Hi there.
I am using OpenHab for about a day now. So I probably made a noobie mistake. But could you help me out, nonetheless? :slight_smile:

Here are the steps I took so far:

  1. I cloned the PR (#1249)
  2. Built it (mvn -DskipTests=true clean install) on my notebook
  3. Copied the jar-file over to openhab2-addons folder of my rasp
  4. on my rasp: ssh openhab@localhost -p 8101
  5. inside ssh session: bundle:start

Following error appears:

Executing command on bundles: Error starting bundle 215: Could not resolve module: [215] Unresolved requirement: Import-Package: org.apache.http

openhab version: 2.2.0

(Jonas) #387

Hey tmrobert8 :slight_smile: hope you had some nice days! i read that you posted an update that works with 2.2 stable. Did you maybe include the bugfix i mentioned on Nov 3:

I have some updates.

My TV restarted itself (i guess because of a bug) these days and after that the binding did not work anymore (although the server was running again on the TV). I restarted my raspberry and everything worked again. Maybe there is some kind of timeout or so?

Thank you!

(Marcel) #388


I think it’s great that you programmed a binding for Sony TV. Thanks to all.

I try to control my Sony TV with Openhab 2. But with Simple IP, my TV is always offline.
I can’t connect my tv to openhab 2.

Is my TV Sony BRAVIA KDL-40NX800 compatible to this binding?

I have try to connect my tv with the this entry in the File Smarthome.things.

sony:simpleip:home [ ipAddress="", commandsMapFile="", netInterface="wlan0", ping=30, retryPolling=10 ]

If its possible to connect my tv to openhab, has someone a tip to solve this problem?


(Andi) #389

You should check if there is an option to enable the SimpleIP protocol in your TV settings. On my TV it is quite hard to find and disabled by default. After TV firmware updates it is even often disabled again.

(Andi) #390

Sorry for asking, but is there a way to force the TV to generate a new scalar accessCode? Obviously the thing option is set to “RQST” but it does not generate a new one. Even tried to set a fake code and then go back to “RQST” without success.

There was one at the very first try, but i missed it because it closed after like 60s.

Now i have the problem, that the port of the scalarWebUri changes regularly. It works with “RQST” until the TV changes the port :frowning:


(Bill Welliver) #391


I had the same problem when I tried to use this binding. It seems that it relies on the apache http client, which isn’t part of the openhab distribution.

You can try installing the missing dependencies by running the following commands in your client session:



and then restart your binding module.

Ideally, the permanent solution is probably that the binding should be changed to use the jetty HTTP client that’s included in openhab, or if there’s a technical reason that’s not possible (I’ve run into these myself), include the jars directly in the binding.

Hope this helps!

(Tim Roberts) #392


Take a look at the .map file it creates (which shows all the commands supported by your TV) - you should find a command “Hdmi1”, “Hdmi2” or something to that effect - you just need to send “Hdmi1” (or whatever the map file says) to the ircc command channel to switch to that input.

(Tim Roberts) #393

@ibvhefe @hww3

You are using an old version of the binding if you get http client errors like that (the newest builds switched over to jetty awhile back *** I think ***). You can find the latest build at

BTW - if I’m wrong on that, the version that I have not released yet definitely uses jetty

(Tim Roberts) #394


Not publicly fixed yet but definitely fixed in my latest version (which I’m still updating for the merge). I addressed the whole lifecycle issue I had in the prior versions (basically will retry attempts if going offline) and will let everyone know when I post it.


(Tim Roberts) #395


As @andirs said, you need to enable simpleip (it’s never default on) and what it’s called in the settings is different from tv to tv. Basically go into your settings->network and enable anything sounding like a remote things (enable remote devices, enable pro devices, enable home network, etc)

(Tim Roberts) #396

Ran out of time answering questions but will get back to you on this (need to think on it a bit anyway) since there are two weird things you mention (not being able to rerequest and the changing port - which is a first I’ve head of that!)

(Tim Roberts) #397


What is the status of the binding when you want to do a new “RQST”? I believe the binding will ignore the code/RQST if it’s the TV already has been authenticated. You may want to check the network settings -> remote devices (or something to that effect) and see if you see a “openHAB” entry. If you do, delete it (or them if more than one) and restart the binding - the RQST should go into effect then.

As for the port # changing, I’m looking into having it discover that and change accordingly (same with IP addresses). I’m not sure if it’s possible yet - but I do have a pretty good idea.


(Andi) #398

Thanks, i was able to find and delete “openhab” in my network remotes. So i was able register again and get a code :slight_smile:

However the port changed again, so i’ll check if it still changes now with a proper accesscode.

(Ibvhefe) #399

Hi Bill,
Thank you. Worked like a charme. @tmrobert8: I am looking forward to a jetty-version :slight_smile: Thanks for caring everyone!

(Udo) #400

Thanks for your reply!
There is no “hdmi” or similar command string in my *.map file.
If the map file is created for my model as a suppose, than it’s the age of my model. :frowning:

But I’m able to change the input and other things with rules by simulating keypresses and wait in between.