Sony Devices Binding

Can’t wait. Keep up the good work! :+1:

Just giving everyone an update. I’m testing through the new binding (about 75% done right now). Here’s the roadmap that I see:

  1. Finish local testing (probably next week)
  2. Ask the brave one’s to test out the new binding (guarantee there will be issues!)
  3. Make fixes and do iterative releases
  4. Once it becomes stable - I’m going to freeze development and go for a merge review
  5. The merge review will take forever (code base is huge and I’m sure there will be code issues to address as well).
  6. once the merge is complete - I want to bring the sonyaudio binding into it (either merge or duplicate)
  7. Would love to also merge in the sony projector binding - but that’s up to them
  8. Finally, rework the discovery process to be model based rather than service based (still need to think how this will occur)
7 Likes

Happy to hear :slight_smile: i am in!

count me in also… btw, my Bravia has this announcement about the Android 8 upgrade in near future… did you have any chance to test the binding with the updated Android?

Yes - I have two of my tvs already on oreo and have been testing with it

1 Like

New Release - only use if you are brave! There WILL BE ISSUES I’m sure.

You can find the release at xxx

This release is NOT compatible with your old things (please drop them before installing the new release). Many things have changed - namely the channel identifiers. The channel ids have been shortened (mainly in the scalar stuff - MUCH shorter now). Numerous fixes have occurred but I’m sure I’ve introduced a bunch of issues as well.

Please turn debug on for org.openhab.binding.sony - that will help with the debugging.

If you post an issue - please tell me what your sony device is (type [avr/tv/etc], model number) and try to capture the error in the debug listing (whether it’s doing something weird or you’re getting an exception). Note that there are some exceptions printed that are not actually issues at this time (such as scalar services being advertised that aren’t valid [I know why and it will be in a future version]).

Also note that the IRCC service has been largely gutted by sony. I don’t have any device that implements the FULL IRCC service anymore - most only implement the IRCC command channel now and you only can use it with a shared key. I’d be interested if any of your devices implement the FULL IRCC service (you’ll see an actionsUrl in the debug logs and the device will go through a pairing process). Note that if it does - I haven’t tested that code since none of my devices do it anymore.

If you see scalar - always choose it as it combines all the other services capabilities.

EDIT: you should be able to use this on 2.4+ even though the name says 2.5. 2.3 and below won’t work

EDIT2: argh - found a fatal issue - took down link. Check back when I’ve posted a new one

3 Likes

Sorry guys,

most likely I’ve missed it, but is there a list of Sony TV compatible with the Binding?

thanks
Andrea

@ariela

There is no comprehensive list as the binding covers a good majority of the TVs/AVRs/etc. Seems the determining factors is if the TV has an ethernet (or wireless) port and you can find some network control settings in the setup. The binding has 4 different ways of controlling sony devices and which way (and how much control you get) depends on the device.

I think a good rule of thumb is if you have a bravia since 2015 - you should have some confidence that this binding will work (in some form).

I was looking some time for a bindung for my Sony tv. I was very happy I found this one even its WIP. I used the Version 2.1.0.201702221949 for some days and iam loving it already even though i only got SimpleIP to work. Today suddenly a Scalar Thing poped up in my Inbox. I think I triggered it by sending Power or Power-On or Power-Off to sony:simpleip:xxxxxxxx:ir.
I was going to write a larger post about my experiences today but then i saw the new version is out. I will now test this first.

Not out yet - ran into a fatal bug that I’ve fixed. However, I haven’t released it yet (again) because I powered up an old sony bluray that still has the IRCC service enabled - so I’m testing against it right now. Expect a new version early next week

Alright - try this again. New release at https://github.com/tmrobert8/openhab2-addons/releases/tag/openhab-2.5

Look at notes a few posts above - you WILL encounter errors I’m sure - too big of a rewrite not to.

More notes:

  1. IRCC seems to work on blurays still - but the bluray player needs to be ON to discover the IRCC service.
  2. If your device changes IPs or changes ports, the config will NOT be updated. I’m still looking into a way to do this automatically via discovery.

IRCC HELP!
If you have a bluray player that has a web browser on it (my X800 doesn’t!). I need your help. If you would do the following:

  1. Turn debug on for the sony addon (“log:set DEBUG org.openhab.binding.sony” from the console)
  2. Add the IRCC thing and make sure it comes online (doing the pairing, etc) - make sure the device is ON for discovery to work
  3. On the bluray - bring up the web browser and go to “www.google.com
  4. Bring up the log and search for “www.google.com” - I need to know what the XML that is shown. Should be something like
<?xml version...?>
<something>
   <url>www.google.com</url>
    more stuff
</something>
1 Like

Hi Tim
my BDP S5500 has a browser, but on a first test, i cannot do IRCC pairing. There is no paring code showing up on the screen. In the paper UI i see
Status: UNINITIALIZED - HANDLER_REGISTERING_ERROR SonyHandlerFactory could not create a handler for the thing ‘sony:ircc:5c93a28d920e’.
not sure if I am missing something, will give it another try tomorrow

same error here

21:52:52.545 [DEBUG] [al.discovery.DialDiscoveryParticipant] - Found Sony DIAL service: uuid:00000000-0000-1010-8000-fcf152999c7e
21:52:52.575 [DEBUG] [binding.sony.internal.net.HttpRequest] - 1 * Sending client request on thread upnp-main-85
1 > GET http://192.168.1.63:52323/dmr.xml

21:52:52.617 [DEBUG] [binding.sony.internal.net.HttpRequest] - 1 * Client response received on thread upnp-main-85
1 < 200
1 < Accept-Range: none
1 < Application-URL: http://192.168.1.63/DIAL/apps/
1 < Connection: close
1 < Content-Length: 7429
1 < Content-Type: text/xml; charset="utf-8"
1 < Date: Sat, 01 Jan 2000 00:00:30 GMT
1 < Server: Linux/2.6 UPnP/1.0 XBR-55X857B/1.7
1 < X-AV-Physical-Unit-Info: pa="BRAVIA XBR-55X857B";
1 < X-AV-Server-Info: av=5.0; cn="Sony Corporation"; mn="BRAVIA XBR-55X857B"; mv="1.7";
<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0"
      xmlns:pnpx="http://schemas.microsoft.com/windows/pnpx/2005/11"
      xmlns:df="http://schemas.microsoft.com/windows/2008/09/devicefoundation">
  <specVersion>
    <major>1</major>
    <minor>0</minor>
  </specVersion>
  <device>
    <deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>
    <friendlyName>BRAVIA XBR-55X857B</friendlyName>
    <manufacturer>Sony Corporation</manufacturer>
    <manufacturerURL>http://www.sony.net/</manufacturerURL>
    <modelName>XBR-55X857B</modelName>
    <modelNumber>MINT1.7.0.1</modelNumber>
    <UDN>uuid:00000000-0000-1010-8000-fcf152999c7e</UDN>
    <dlna:X_DLNADOC xmlns:dlna="urn:schemas-dlna-org:device-1-0">DMR-1.50</dlna:X_DLNADOC>
    <microsoft:magicPacketWakeSupported xmlns:microsoft="urn:schemas-microsoft-com:WMPNSS-1-0">1</microsoft:magicPacketWakeSupported>
    <iconList>
      <icon>
        <mimetype>image/png</mimetype>
        <width>32</width>
        <height>32</height>
        <depth>24</depth>
        <url>/MediaRenderer_HA_32x32.png</url>
      </icon>
      <icon>
        <mimetype>image/png</mimetype>
        <width>48</width>
        <height>48</height>
        <depth>24</depth>
        <url>/MediaRenderer_HA_48x48.png</url>
      </icon>
      <icon>
        <mimetype>image/png</mimetype>
        <width>60</width>
        <height>60</height>
        <depth>24</depth>
        <url>/MediaRenderer_HA_60x60.png</url>
      </icon>
      <icon>
        <mimetype>image/png</mimetype>
        <width>120</width>
        <height>120</height>
        <depth>24</depth>
        <url>/MediaRenderer_HA_120x120.png</url>
      </icon>
      <icon>
        <mimetype>image/jpeg</mimetype>
        <width>32</width>
        <height>32</height>
        <depth>24</depth>
        <url>/MediaRenderer_HA_32x32.jpg</url>
      </icon>
      <icon>
        <mimetype>image/jpeg</mimetype>
        <width>48</width>
        <height>48</height>
        <depth>24</depth>
        <url>/MediaRenderer_HA_48x48.jpg</url>
      </icon>
      <icon>
        <mimetype>image/jpeg</mimetype>
        <width>60</width>
        <height>60</height>
        <depth>24</depth>
        <url>/MediaRenderer_HA_60x60.jpg</url>
      </icon>
      <icon>
        <mimetype>image/jpeg</mimetype>
        <width>120</width>
        <height>120</height>
        <depth>24</depth>
        <url>/MediaRenderer_HA_120x120.jpg</url>
      </icon>
    </iconList>
    <serviceList>
      <service>
        <serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>
        <serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>
        <SCPDURL>/RenderingControlSCPD.xml</SCPDURL>
        <controlURL>/upnp/control/RenderingControl</controlURL>
        <eventSubURL>/upnp/event/RenderingControl</eventSubURL>
      </service>
      <service>
        <serviceType>urn:schemas-upnp-org:service:ConnectionManager:1</serviceType>
        <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
        <SCPDURL>/ConnectionManagerSCPD.xml</SCPDURL>
        <controlURL>/upnp/control/ConnectionManager</controlURL>
        <eventSubURL>/upnp/event/ConnectionManager</eventSubURL>
      </service>
      <service>
        <serviceType>urn:schemas-upnp-org:service:AVTransport:1</serviceType>
        <serviceId>urn:upnp-org:serviceId:AVTransport</serviceId>
        <SCPDURL>/AVTransportSCPD.xml</SCPDURL>
        <controlURL>/upnp/control/AVTransport</controlURL>
        <eventSubURL>/upnp/event/AVTransport</eventSubURL>
      </service>
      <service>
        <serviceType>urn:dial-multiscreen-org:service:dial:1</serviceType>
        <serviceId>urn:dial-multiscreen-org:serviceId:dial</serviceId>
        <SCPDURL>/DIALSCPD.xml</SCPDURL>
        <controlURL>/upnp/control/DIAL</controlURL>
        <eventSubURL></eventSubURL>
      </service>
      <service>
        <serviceType>urn:schemas-sony-com:service:IRCC:1</serviceType>
        <serviceId>urn:schemas-sony-com:serviceId:IRCC</serviceId>
        <SCPDURL>/IRCCSCPD.xml</SCPDURL>
        <controlURL>http://192.168.1.63/sony/IRCC</controlURL>
        <eventSubURL></eventSubURL>
      </service>
      <service>
        <serviceType>urn:schemas-sony-com:service:ScalarWebAPI:1</serviceType>
        <serviceId>urn:schemas-sony-com:serviceId:ScalarWebAPI</serviceId>
        <SCPDURL>/ScalarWebApiSCPD.xml</SCPDURL>
        <controlURL>/upnp/control/ScalarAPI</controlURL>
        <eventSubURL></eventSubURL>
      </service>
    </serviceList>
    <av:X_MaxBGMCount xmlns:av="urn:schemas-sony-com:av">64</av:X_MaxBGMCount>
    <av:X_StandardDMR xmlns:av="urn:schemas-sony-com:av">1.1</av:X_StandardDMR>
    <av:X_ScreenResolution xmlns:av="urn:schemas-sony-com:av">4K</av:X_ScreenResolution>
    <av:X_IRCCCodeList xmlns:av="urn:schemas-sony-com:av">
      <av:X_IRCCCode command="Power">AAAAAQAAAAEAAAAVAw==</av:X_IRCCCode>
      <av:X_IRCCCode command="Power ON">AAAAAQAAAAEAAAAuAw==</av:X_IRCCCode>
      <av:X_IRCCCode command="Power OFF">AAAAAQAAAAEAAAAvAw==</av:X_IRCCCode>
    </av:X_IRCCCodeList>
    <pnpx:X_compatibleId>MS_DigitalMediaDeviceClass_DMR_V001</pnpx:X_compatibleId>
    <pnpx:X_deviceCategory>MediaDevices</pnpx:X_deviceCategory>
    <pnpx:X_hardwareId>VEN_0106&amp;DEV_0007&amp;REV_01</pnpx:X_hardwareId>
    <df:X_deviceCategory>Display.TV Multimedia.DMR</df:X_deviceCategory>
    <av:X_TrackID_DeviceInfo xmlns:av="urn:schemas-sony-com:av">
      <av:X_TrackID_BaseURL>http://192.168.1.63/sony/BgmSearch</av:X_TrackID_BaseURL>
    </av:X_TrackID_DeviceInfo>
    <av:X_DIALEX_DeviceInfo xmlns:av="urn:schemas-sony-com:av"> 
        <av:X_DIALEX_AppsListURL>http://192.168.1.63/DIAL/sony/applist</av:X_DIALEX_AppsListURL>
        <av:X_DIALEX_DeviceID>B0:

21:52:52.696 [DEBUG] [binding.sony.internal.net.HttpRequest] - 2 * Sending client request on thread upnp-main-85
2 > GET http://192.168.1.63/DIAL/sony/applist

21:52:52.703 [ERROR] [ry.upnp.internal.UpnpDiscoveryService] - Participant 'org.openhab.binding.sony.internal.discovery.DialDiscoveryParticipant' threw an exception

2019-03-02 22:24:33.458 [hingStatusInfoChangedEvent] - 'sony:ircc:5c93a28d920e' changed from UNINITIALIZED (DISABLED) to UNINITIALIZED (HANDLER_REGISTERING_ERROR): SonyHandlerFactory could not create a handler for the thing 'sony:ircc:5c93a28d920e'.
2019-03-02 22:24:33.453 [ERROR] [core.thing.internal.ThingManagerImpl] - Exception occurred while calling thing handler factory 'org.openhab.binding.sony.internal.SonyHandlerFactory@152dbf9': SonyHandlerFactory could not create a handler for the thing 'sony:ircc:5c93a28d920e'.
java.lang.IllegalStateException: SonyHandlerFactory could not create a handler for the thing 'sony:ircc:5c93a28d920e'.
	at org.eclipse.smarthome.core.thing.binding.BaseThingHandlerFactory.registerHandler(BaseThingHandlerFactory.java:130) ~[110:org.eclipse.smarthome.core.thing:0.10.0.oh240]
	at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.doRegisterHandler(ThingManagerImpl.java:600) [110:org.eclipse.smarthome.core.thing:0.10.0.oh240]
	at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.registerHandler(ThingManagerImpl.java:577) [110:org.eclipse.smarthome.core.thing:0.10.0.oh240]
	at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.registerAndInitializeHandler(ThingManagerImpl.java:1073) [110:org.eclipse.smarthome.core.thing:0.10.0.oh240]
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) [173:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) [173:org.glassfish.jersey.core.jersey-server:2.22.2]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535) [86:org.eclipse.jetty.servlet:9.4.11.v20180605]
	at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71) [187:org.ops4j.pax.web.pax-web-jetty:7.2.3]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146) [85:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [83:org.eclipse.jetty.security:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [85:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.clipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257) [85:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) [85:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255) [85:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317) [85:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203) [85:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) [86:org.eclipse.jetty.servlet:9.4.11.v20180605]
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) [85:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201) [85:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219) [85:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144) [85:org.eclipse.jetty.server:9.4.11.v20180605]
	at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80) [187:org.ops4j.pax.web.pax-web-jetty:7.2.3]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [85:org.eclipse.jetty.server:9.4.11.v20180605]

When I copy the jar-file to the addons-folder I get the following error:

Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.sony-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.sony [253]
  Unresolved requirement: Import-Package: org.eclipse.jdt.annotation; resolution:="optional"
  Unresolved requirement: Import-Package: org.eclipse.smarthome.config.discovery.upnp

Any suggestions which addons I need to install additionally?

Thank you for the gread binding.

I have only ip commands power, mute…, But i need right, up, left, down, ok. How can I add this? Under paperUI controls i find no of this commands

@johfeu @AV_HomeAuto
Just discovered that I accidentally made the MAP transformation service required. Prior to the debug messages you see - there should be one that says

08:22:12.348 [WARN ] [ding.sony.internal.SonyHandlerFactory] - No transformation service found for 'MAP' type - cannot create a IrccHandler

Until I make a fix to make it optional - install the map transformation service and try it again.

@KleemannT
What version of openhab are you using?

@anon92890676
Depends on what service you are using. I’m guessing it’s the scalar one? If so, look in your transforms directory for a scalar*.map file - that should show you all the commands your device supports. Then send the name to the IRCCCommand channel. (example: send “Left” to the IRCCCommand channel should do a left - note that it is case sensitive so “LEFT” wouldn’t work).

1 Like

What version of openhab are you using?
openHAB 2.4.0-1 (Release Build)

THank you. But I get allways this error for binding:
Status: UNINITIALIZED - HANDLER_REGISTERING_ERROR SonyHandlerFactory could not create a handler for the thing ‘sony:ircc:XXXXXXX’.
When I insert PIN Code he say error 500