Sony Devices Binding

Thanks for your reply.

I also noticed that when i have the thing set up with the 4-digit auth i can also fill in the PSK and the binding works. However if the binding is not registered in the TV the thing is reported as “offline” and nothing works with the binding. I guess thats just the way how Openhab works. However the sony html-page is running fine and IMO therefore the binding should do as well.

It would really be nice if you found some convenient solution for that. :slight_smile:
I would imagine a thing definition with just the IP adress and the PSK. Your already working discovery does the magic with finding the port at thing initializiation in the background, getting the info it needs about the TV and then just keeps working with the PSK no matter if the port changes after that or not.

Best regards

That must have broken when I rewrote the authorization stuff. I’ll look into getting PSK fixed for the next version.

1 Like

I knew it wasn’t going to be that simple - there is generally a reason (that I usually have forgotten) why I did things a certain way. So your bravia varies the discovery port but uses port 80 for the rest API. My bravia doesn’t vary the discovery port but uses port 8080 for the rest api (which I find in the discovery packets). Likewise, the websocket devices (my DN1080) uses port 10000 [which is also discovered in the discovery packets].

Likewise, when you don’t use PSKs (which you really shouldn’t because it’s a bad security practice and I’m betting will eventually go away), the specific header (X-CERS-something) is specified in the discovery packets as well (a mistake MANY other sony implementations make - assuming it’s always the same header value which in fact it’s not for some devices).

While all this works for your specific device, it doesn’t work for all devices and that’s what I have to worry about.

So I’m back into that catch-22 that I need those discovery packets before going online and can’t simply have a IP address easily.

I’ll continue to think about this - but I still don’t see a clear, easy solution

I can definitely confirm I broke PSK with all the auth changes but the next version will restore that functionality

1 Like

Sounds great :slight_smile:

If i use that function on my tv, the response only shows if the internet browser is opened and if yes which website (url) is opened, like here. Not a list of my apps which all have the status stopped.

Do you know if there is a Sony forum (or similar) where we can ask the API developers if it is intended that the status of apps can not be retrieved? And if it is gone for good or if it is planned to reimplement it with a later API version? You think this forum is a good place to start? Then i could drop a question there.

Yep - but a long time ago, it also showed you which app was foreground (I always assumed that the apps were considered webapps). That assumption may be what sony ‘fixed’ and thus broke everything (including the dial side).

The only sony developer was @freke and he hasn’t responded for a very long time (plus he was on the audio side I believe). You can try the forum but I’m giving you about a 99% chance of getting a response like “APIs are for professional developers only” (in other words, you’d have to pay for access to something). Atleast that was the response I got a few times a few years ago - who knows however, maybe they are more open now…

it’s the same on both. i did some further investigation.
if i press the “sources” button on the tvs remote it shows my PS4 as “Player 1”. Is there a way to switch the source to this channel? the simple ip item for input does not change if i choose this. You could suggest that i just use the hdmi port the ps4 is plugged into but the great thing about using the “player1” menu entry is that it starts the ps4 via arc so i can directly use it with the tvs remote for watching blu rays for example.

And i figured out why my volume does not work.
I connected a 3,5 mm cable so i must control the headphone volume but i cant find the channel for this.

With simpleip - there is no way to do that. The API only allows setting of physical ports

The ONLY way to control headphone volume is through the scalar thing (which exposes both the speaker and headphone volume levels in the audio service). All other APIs do not have visibility to that

i am happy to go with scalar. i just could not find the dedicated item in the scalar thing to change to Player 1. Headphone Volume is set with scalar now, thanks! :slight_smile:

Edit:
Could you name the item i need to use for sources?
i tried playing source but it only gives back extint:hdmi for every hdmi - non specific.
i can find the input ps4 uri and status item but when i link it to items and read the status with rest api it says “no content”.

I know why i had trouble finding the headphone volume in the past.
It just simply did not show up.
i can remember on older bindings there was an option like “hide audio settings” in the thing properties and i had to turn that off after every restart. now there is not such an option but the audio section is hidden in the scalar thing.
if i press “show more” i just see:

application control
av content
video screen

maybe i can help you adress this bug.
regards

jonas

restarting my OH-system did bring them back.
tried restarting my tv but they are still here.
strange behaviour. i cannot reproduce it atm.

EDIT:
Today the Volume Section is gone again. It does not matter if the tv is on or off.
Even a restart did not bring them back.

Hey Tim, sorry for asking but do you have an ETA for the next version with the repaired auth?
Thanks in advance

Hi all,

I was happily using version 2.2 of this Mod (running Openhab on a debian stretch VM).

Now I got my Raspberry and did a fresh install of openhabian. I tried the 2.4 and 2.5 jar but I always get this in the log:

2019-09-18 21:36:04.456 [ERROR] [org.openhab.binding.sony ] - FrameworkEvent ERROR - org.openhab.binding.sony

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.sony [205]

2019-09-18 21:36:12.133 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.sony-2.4.0-SNAPSHOT.jar

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.sony [205]

Any advice?

No ETA - work has gotten really busy and I haven’t had the time. Hopefully I’ll get some time next week…

Hi @tmrobert8, I have a problem with the DIAL thing. I get the error “‘sony:dial:3d16028d61d0’ changed from ONLINE to OFFLINE (HANDLER_INITIALIZING_ERROR): Initialization was interrupted”. I can find the thing on the THINGS menu, but if I try to create an item, f.e. VLC Status, I can create it, but it doesn’t work. Have you any suggestion on how to solve it?

Hi guys,
I’m using this binding with BDW-N9200 home theater system, trying to control it via IRCC. IRCC thing is connected and online, authentication key is entered correctly (requested by RQST and then entered).

Now, the part with .map file (where I should read all the commands I can send to it) is my problem.
the filename is defined as ircc-xxxxxx.map. If I rename it, to ircc.map it reverts back to original name. but nevermind that, I dont know where the file is.
openhab2 is running on raspberry pi. I was expecting to find it in /etc/openhab2/transform/ but its not there. only some default en.map and de.map
what am I doing wrong?

Dear all

can anyone say if beamer Sony VPL-PHZ10 is supported by this binding?

Thanks & regards
John

I have a sony str-dn2010 receiver. I use the ios Sony app AV Receiver Remote version 1.1.1 to control this receiver, so I know it is controllable over the network.

What can I do to help to add this device to supported devices? I can do packet captures if required

OH 2.4 runs on a raspberry. I would like to integrate a Sony Bravia KDL-55W955B in OH. when I install the binding, it finds IRCC, dial and scalar. Why can not find simple id? In the TV I set simple ip and the remote control was recognized. All things go online. After I turn off the TV via IRCC, all things go offline and the settings in the things are gone. What am I doing wrong?
I would be very grateful for your help.

edit: if I turn on the TV again with the remote control, things go back online