Sony Devices Binding

hmmm, then it seems i have no chance to detect the current power status.
even if AV is powered off, the getStatus call still returns 200

2017-02-22 22:08:15.070 [ItemCommandEvent          ] - Item 'IRCC_Power' received command OFF
2017-02-22 22:08:15.167 [ItemStateChangedEvent     ] - IRCC_Power changed from ON to OFF

2017-02-22 22:08:18.572 [DEBUG] [ding.sony.internal.ircc.IrccProtocol] - getContentInformation is not implemented
2017-02-22 22:08:20.577 [DEBUG] [inding.sony.internal.net.HttpRequest] - 45 * Sending client request on thread ESH-thingHandler-1
45 > GET http://192.168.205.46:50001/cers/getStatus
45 > Connection: close
45 > User-Agent: OpenHab/Sony/Binding
45 > X-CERS-DEVICE-ID: MediaRemote:00-11-22-33-44-55
45 > X-CERS-DEVICE-INFO: OpenHab/Sony/Binding

2017-02-22 22:08:21.163 [DEBUG] [inding.sony.internal.net.HttpRequest] - 46 * Client response received on thread ESH-thingHandler-1
46 < 200
46 < Connection: close
46 < CONTENT-LENGTH: 146
46 < CONTENT-TYPE: text/xml; charset="utf-8"
46 < X-AV-Physical-Unit-Info: pa="STR-DN1030"
46 < X-AV-Server-Info: av="5.0"; cn="Sony Corporation"; mn="STR-DN1030"; mv="1.00"
<statusList><status name="viewing"><statusItem field="source" value="TV" /><statusItem field="zone2Source" value="SOURCE" /></status></statusList>

also tried nmap, but in both ways the following ports are available

PORT      STATE SERVICE
80/tcp    open  http
1272/tcp  open  cspmlockmgr
1900/tcp  open  upnp
8080/tcp  open  http-proxy
50001/tcp open  unknown

So I’ve got an XBR-55X850C and I’ve been trying to get this binding to work for a bit now (I’m aware that it’s still under heavy development. :))

Two suggestions:

  1. Update the original post to include a link to the latest zip, and the PR. It took me quite a bit of digging to find the link to the latest version.
  2. Also, please include a brief snippet on what information would be useful in general for troubleshooting.

Now, on to the fun part!

Discovery seems to be failing for both IRCC and DIAL. DIAL is expected as it’s a TV, not a bluray, but IRCC was a bit surprising.

DIAL (expected):

07:45:37.789 [DEBUG] [inding.sony.internal.net.HttpRequest] - 3 * Sending client request on thread qtp31279137-71918
3 > GET http://10.254.20.191:80/DIAL/sony/applist
3 > Connection: close
3 > User-Agent: OpenHab/Sony/Binding
3 > X-CERS-DEVICE-ID: MediaRemote:00-11-22-33-44-55
3 > X-CERS-DEVICE-INFO: OpenHab/Sony/Binding

07:45:37.801 [DEBUG] [inding.sony.internal.net.HttpRequest] - 4 * Client response received on thread qtp31279137-71918
4 < 403
4 < Connection: close
4 < Content-Length: 0

IRCC (???):

07:45:37.910 [DEBUG] [y.discovery.IrccDiscoveryParticipant] - Could not find the IRCC service for device: org.jupnp.model.meta.DeviceDetails@37b55de0

So, I attempted to manually create the IRCC item. This is the RQST:

07:51:38.934 [DEBUG] [inding.sony.internal.net.HttpRequest] - 3 * Sending client request on thread qtp31279137-72008
3 > GET http://10.254.20.191:46007/DIALSCPD.xml
3 > Connection: close
3 > User-Agent: OpenHab/Sony/Binding
3 > X-CERS-DEVICE-ID: MediaRemote:00-11-22-33-44-55
3 > X-CERS-DEVICE-INFO: OpenHab/Sony/Binding

07:51:38.948 [DEBUG] [inding.sony.internal.net.HttpRequest] - 4 * Client response received on thread qtp31279137-72008
4 < 404
4 < Connection: close
4 < Date: Sat, 04 Mar 2017 14:51:39 GMT
4 < Server: FedoraCore/2 UPnP/1.0 MINT-X/1.8.1

And, as expected, when I attempted to configure the power channel and then turn the TV off:

07:59:50.688 [INFO ] [smarthome.event.ItemCommandEvent    ] - Item 'master_tv_power_ircc' received command OFF
07:59:50.690 [ERROR] [ding.sony.internal.ircc.IrccProtocol] - IRCC Service was not found
07:59:50.694 [INFO ] [marthome.event.ItemStateChangedEvent] - master_tv_power_ircc changed from ON to OFF

For what it’s worth, the initial discovery:

1 > GET http://10.254.20.191:46007/dd.xml
1 > Connection: close
1 > User-Agent: OpenHab/Sony/Binding
1 > X-CERS-DEVICE-ID: MediaRemote:00-11-22-33-44-55
1 > X-CERS-DEVICE-INFO: OpenHab/Sony/Binding

07:45:37.777 [DEBUG] [inding.sony.internal.net.HttpRequest] - 2 * Client response received on thread qtp31279137-71918
2 < 200
2 < Accept-Range: none
2 < Application-URL: http://10.254.20.191:80/DIAL/apps/
2 < Connection: close
2 < Content-Length: 1155
2 < Content-Type: text/xml; charset="utf-8"
2 < Date: Sat, 04 Mar 2017 14:45:37 GMT
2 < Server: FedoraCore/2 UPnP/1.0 MINT-X/1.8.1
<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
  <specVersion>
    <major>1</major>
    <minor>0</minor>
  </specVersion>
  <device>
    <deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType>
    <friendlyName>XBR-55X850C</friendlyName>
    <manufacturer>Sony Corporation</manufacturer>
    <manufacturerURL>http://www.sony.net/</manufacturerURL>
    <modelDescription>BRAVIA</modelDescription>
    <modelName>XBR-55X850C</modelName>
    <UDN>uuid:aa5d148d-08ec-46bd-a198-2f9b0cdaa87e</UDN>
    <serviceList>
      <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>
    </serviceList>
    <av:X_DIALEX_DeviceInfo xmlns:av="urn:schemas-sony-com:av">
      <av:X_DIALEX_AppsListURL>http://10.254.20.191:80/DIAL/sony/applist</av:X_DIALEX_AppsListURL>
      <av:X_DIALEX_DeviceType>Android_TV_DIAL_v1.0.0</av:X_DIALEX_DeviceType>
    </av:X_DIALEX_DeviceInfo>
  </device>
</root>

As an aside, thank you very much for the work on the binding. Automation of devices such as these seems to be one of openhab’s weaknesses at the moment, and having full integration of devices such as these is fantastic.

Kyle,

That is a really interesting log and very surprising. The binding is correct - your TV is advertising a DIAL service (but I haven’t got it working [yet]) and it is NOT advertising it has an IRCC service either (and really surprising it’s not advertising an XSCALAR service either). I’ve never seen that on a bravia - usually it advertises all three services.

Three things to try:

  1. Update the firmware to the latest - the rerun the discovery to see if those services are advertised again.
  2. Turn on simple ip (it’s under the network settings somewhere) - and try again.
  3. Finally - get the sony remote app (they’ve renamed it a few times now - look for Olivers posts above) - does that find it?

Let me know how it goes.

Note: I’ve paused a bit to work on the russound app. That needed some immediate attention (just started using habpanel) and wanted to create a widget for russound. Always does me good to let something lie about for a bit because when I get back to it - I get fresh ideas. In about a week or so, I’ll wrap up russound and get back to development on this.

Tim

It’s the latest firmware. Simple IP is on. And… the TV SideView app works fine.

No worries about the pause. I know perfectly well how taking a break can be beneficial, and this is likely just another curveball. :slight_smile:

When I was poking with the binding earlier it did actually manage to discover the scalar service, but it wasn’t able to find a core component of it (I unfortunately don’t have debug logs for this):

2017-03-03 21:53:10.737 [InboxAddedEvent           ] - Discovery Result with UID 'sony:scalar:4e4dc5e1-7f85-45d2-b5e0-afdd5c032613' has been added.
2017-03-03 21:56:04.801 [ThingAddedEvent           ] - Thing 'sony:scalar:4e4dc5e1-7f85-45d2-b5e0-afdd5c032613' has been added.
2017-03-03 21:56:05.322 [hingStatusInfoChangedEvent] - 'sony:scalar:4e4dc5e1-7f85-45d2-b5e0-afdd5c032613' changed from INITIALIZING to OFFLINE (COMMUNICATION_ERROR): Device doesn't implement the system web service
2017-03-03 21:59:25.950 [hingStatusInfoChangedEvent] - 'sony:scalar:4e4dc5e1-7f85-45d2-b5e0-afdd5c032613' changed from OFFLINE (COMMUNICATION_ERROR): Device doesn't implement the system web service to OFFLINE (COMMUNICATION_ERROR): Error connecting to IRCC device (may need to turn it on manually)

At this point I’m thinking that the service for some reason just isn’t running. I’ll poke more with the remote app to see if that triggers the service into running.

Ah - then I need to see more of the log (note - scalar won’t do anything at this point but dump a whole bunch of debug messages). If you could, turn debug on for the sony binding (at the karaf console: “log:set debug org.openhab.binding.sony”) and start the discovery of sony - then post all the sony debug messages to pastebin (like oliver did above) and reply with the link. I’ll be able to see what’s fully going on.

Hi Tim,
I have a Bravia KDL55W805A and I installed your last binding. The TV is recognised but it remains offline. On the console i get the following:
sony:scalar:00000000-0000-1010-8000-3c0771d47ee6 (Type=Thing, Status=OFFLINE (COMMUNICATION_ERROR): Error connecting to IRCC device (may need to turn it on manually), Label=BRAVIA KDL-55W805A, Bridge=null)

Even if the TV is turned on then I get the same. Tried rebooting, manually addinf things but no luck. Simple IP is not on this TV. I have added the log as well after i added the thing.
Any advise?

openhab> log:display org.openhab.binding.sony
11:57:45.366 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to IRCC device…
11:57:45.493 [DEBUG] [inding.sony.internal.net.HttpRequest] - 1 * Sending client request on thread safeCall-363
1 > GET http://192.168.200.107:52323/dmr.xml

11:57:45.521 [DEBUG] [inding.sony.internal.net.HttpRequest] - 2 * Client response received on thread safeCall-363
2 < 200
2 < Accept-Range: none
2 < Application-URL: http://192.168.200.107/DIAL/apps/
2 < Connection: close
2 < Content-Length: 7361
2 < Content-Type: text/xml; charset=“utf-8”
2 < Date: Fri, 10 Mar 2017 11:57:45 GMT
2 < Server: Linux/2.6 UPnP/1.0 KDL-55W805A/1.7
2 < X-AV-Physical-Unit-Info: pa=“BRAVIA KDL-55W805A”;
2 < X-AV-Server-Info: av=5.0; cn=“Sony Corporation”; mn=“BRAVIA KDL-55W805A”; mv=“1.7”;

<?xml version="1.0"?>



1
0


urn:schemas-upnp-org:device:MediaRenderer:1
BRAVIA KDL-55W805A
Sony Corporation
http://www.sony.net/
KDL-55W805A
MINT1.7.0.1
uuid:00000000-0000-1010-8000-3c0771d47ee6
<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>


image/png
32
32
24
/MediaRenderer_32x32.png


image/png
48
48
24
/MediaRenderer_48x48.png


image/png
60
60
24
/MediaRenderer_60x60.png


image/png
120
120
24
/MediaRenderer_120x120.png


image/jpeg
32
32
24
/MediaRenderer_32x32.jpg


image/jpeg
48
48
24
/MediaRenderer_48x48.jpg


image/jpeg
60
60
24
/MediaRenderer_60x60.jpg


image/jpeg
120
120
24
/MediaRenderer_120x120.jpg




urn:schemas-upnp-org:service:RenderingControl:1
urn:upnp-org:serviceId:RenderingControl
/RenderingControlSCPD.xml
/upnp/control/RenderingControl
/upnp/event/RenderingControl


urn:sche

11:57:45.654 [DEBUG] [inding.sony.internal.net.HttpRequest] - 1 * Sending client request on thread safeCall-363
1 > POST http://192.168.200.107/sony/irCommandProxy
1 > Accept: application/json
1 > Content-Type: application/json
{“id”:1,“method”:“getVersions”,“version”:“1.0”,“params”:}

11:57:45.758 [DEBUG] [inding.sony.internal.net.HttpRequest] - 2 * Client response received on thread safeCall-363
2 < 404
2 < Connection: keep-alive
2 < Content-Length: 27
2 < Content-Type: application/json
2 < Date: Fri, 10 Mar 2017 11:57:45 GMT
{“error”:[404,“Not Found”]}

11:57:45.762 [DEBUG] [scalarweb.models.ScalarWebDeviceInfo] - Service ‘irCommandProxy’ is unavailable: null
java.lang.NullPointerException
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebResult.asArray(ScalarWebResult.java:121)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebService.(ScalarWebService.java:63)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebDeviceInfo.(ScalarWebDeviceInfo.java:76)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebState.(ScalarWebState.java:54)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebProtocol.login(ScalarWebProtocol.java:150)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebHandler.initialize(ScalarWebHandler.java:269)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:713)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:179)[98:org.eclipse.smarthome.core:0.9.0.b4]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
11:57:45.770 [DEBUG] [inding.sony.internal.net.HttpRequest] - 3 * Sending client request on thread safeCall-363
3 > POST http://192.168.200.107/sony/accessControl
3 > Accept: application/json
3 > Content-Type: application/json
{“id”:1,“method”:“getVersions”,“version”:“1.0”,“params”:}

11:57:45.859 [DEBUG] [inding.sony.internal.net.HttpRequest] - 4 * Client response received on thread safeCall-363
4 < 200
4 < Connection: keep-alive
4 < Content-Length: 27
4 < Content-Type: application/json
4 < Date: Fri, 10 Mar 2017 11:57:45 GMT
{“id”:1,“result”:[[“1.0”]]}

11:57:45.863 [DEBUG] [scalarweb.models.ScalarWebDeviceInfo] - Service ‘accessControl’ is unavailable: null
java.lang.NullPointerException
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebResult.asArray(ScalarWebResult.java:121)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebService.(ScalarWebService.java:63)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebDeviceInfo.(ScalarWebDeviceInfo.java:76)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebState.(ScalarWebState.java:54)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebProtocol.login(ScalarWebProtocol.java:150)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebHandler.initialize(ScalarWebHandler.java:269)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:713)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:179)[98:org.eclipse.smarthome.core:0.9.0.b4]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
11:57:45.870 [DEBUG] [inding.sony.internal.net.HttpRequest] - 5 * Sending client request on thread safeCall-363
5 > POST http://192.168.200.107/sony/cec
5 > Accept: application/json
5 > Content-Type: application/json
{“id”:1,“method”:“getVersions”,“version”:“1.0”,“params”:}

11:57:45.958 [DEBUG] [inding.sony.internal.net.HttpRequest] - 6 * Client response received on thread safeCall-363
6 < 200
6 < Connection: keep-alive
6 < Content-Length: 27
6 < Content-Type: application/json
6 < Date: Fri, 10 Mar 2017 11:57:46 GMT
{“id”:1,“result”:[[“1.0”]]}

11:57:45.962 [DEBUG] [scalarweb.models.ScalarWebDeviceInfo] - Service ‘cec’ is unavailable: null
java.lang.NullPointerException
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebResult.asArray(ScalarWebResult.java:121)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebService.(ScalarWebService.java:63)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebDeviceInfo.(ScalarWebDeviceInfo.java:76)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebState.(ScalarWebState.java:54)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebProtocol.login(ScalarWebProtocol.java:150)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebHandler.initialize(ScalarWebHandler.java:269)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:713)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:179)[98:org.eclipse.smarthome.core:0.9.0.b4]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
11:57:45.969 [DEBUG] [inding.sony.internal.net.HttpRequest] - 7 * Sending client request on thread safeCall-363
7 > POST http://192.168.200.107/sony/notification
7 > Accept: application/json
7 > Content-Type: application/json
{“id”:1,“method”:“getVersions”,“version”:“1.0”,“params”:}

11:57:46.073 [DEBUG] [inding.sony.internal.net.HttpRequest] - 8 * Client response received on thread safeCall-363
8 < 200
8 < Connection: keep-alive
8 < Content-Length: 27
8 < Content-Type: application/json
8 < Date: Fri, 10 Mar 2017 11:57:46 GMT
{“id”:1,“result”:[[“1.0”]]}

11:57:46.077 [DEBUG] [scalarweb.models.ScalarWebDeviceInfo] - Service ‘notification’ is unavailable: null
java.lang.NullPointerException
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebResult.asArray(ScalarWebResult.java:121)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebService.(ScalarWebService.java:63)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebDeviceInfo.(ScalarWebDeviceInfo.java:76)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebState.(ScalarWebState.java:54)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebProtocol.login(ScalarWebProtocol.java:150)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebHandler.initialize(ScalarWebHandler.java:269)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:713)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:179)[98:org.eclipse.smarthome.core:0.9.0.b4]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
11:57:46.085 [DEBUG] [inding.sony.internal.net.HttpRequest] - 9 * Sending client request on thread safeCall-363
9 > POST http://192.168.200.107/sony/browser
9 > Accept: application/json
9 > Content-Type: application/json
{“id”:1,“method”:“getVersions”,“version”:“1.0”,“params”:}

11:57:46.186 [DEBUG] [inding.sony.internal.net.HttpRequest] - 10 * Client response received on thread safeCall-363
10 < 200
10 < Connection: keep-alive
10 < Content-Length: 27
10 < Content-Type: application/json
10 < Date: Fri, 10 Mar 2017 11:57:46 GMT
{“id”:1,“result”:[[“1.0”]]}

11:57:46.190 [DEBUG] [scalarweb.models.ScalarWebDeviceInfo] - Service ‘browser’ is unavailable: null
java.lang.NullPointerException
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebResult.asArray(ScalarWebResult.java:121)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebService.(ScalarWebService.java:63)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebDeviceInfo.(ScalarWebDeviceInfo.java:76)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebState.(ScalarWebState.java:54)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebProtocol.login(ScalarWebProtocol.java:150)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebHandler.initialize(ScalarWebHandler.java:269)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:713)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:179)[98:org.eclipse.smarthome.core:0.9.0.b4]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
11:57:46.198 [DEBUG] [inding.sony.internal.net.HttpRequest] - 11 * Sending client request on thread safeCall-363
11 > POST http://192.168.200.107/sony/appControl
11 > Accept: application/json
11 > Content-Type: application/json
{“id”:1,“method”:“getVersions”,“version”:“1.0”,“params”:}

11:57:46.285 [DEBUG] [inding.sony.internal.net.HttpRequest] - 12 * Client response received on thread safeCall-363
12 < 200
12 < Connection: keep-alive
12 < Content-Length: 27
12 < Content-Type: application/json
12 < Date: Fri, 10 Mar 2017 11:57:46 GMT
{“id”:1,“result”:[[“1.0”]]}

11:57:46.288 [DEBUG] [scalarweb.models.ScalarWebDeviceInfo] - Service ‘appControl’ is unavailable: null
java.lang.NullPointerException
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebResult.asArray(ScalarWebResult.java:121)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebService.(ScalarWebService.java:63)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebDeviceInfo.(ScalarWebDeviceInfo.java:76)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebState.(ScalarWebState.java:54)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebProtocol.login(ScalarWebProtocol.java:150)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebHandler.initialize(ScalarWebHandler.java:269)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:713)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:179)[98:org.eclipse.smarthome.core:0.9.0.b4]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
11:57:46.296 [DEBUG] [inding.sony.internal.net.HttpRequest] - 13 * Sending client request on thread safeCall-363
13 > POST http://192.168.200.107/sony/recording
13 > Accept: application/json
13 > Content-Type: application/json
{“id”:1,“method”:“getVersions”,“version”:“1.0”,“params”:}

11:57:46.385 [DEBUG] [inding.sony.internal.net.HttpRequest] - 14 * Client response received on thread safeCall-363
14 < 200
14 < Connection: keep-alive
14 < Content-Length: 27
14 < Content-Type: application/json
14 < Date: Fri, 10 Mar 2017 11:57:46 GMT
{“id”:1,“result”:[[“1.0”]]}

11:57:46.388 [DEBUG] [scalarweb.models.ScalarWebDeviceInfo] - Service ‘recording’ is unavailable: null
java.lang.NullPointerException
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebResult.asArray(ScalarWebResult.java:121)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebService.(ScalarWebService.java:63)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebDeviceInfo.(ScalarWebDeviceInfo.java:76)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebState.(ScalarWebState.java:54)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebProtocol.login(ScalarWebProtocol.java:150)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebHandler.initialize(ScalarWebHandler.java:269)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:713)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:179)[98:org.eclipse.smarthome.core:0.9.0.b4]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
11:57:46.397 [DEBUG] [inding.sony.internal.net.HttpRequest] - 15 * Sending client request on thread safeCall-363
15 > POST http://192.168.200.107/sony/avContent
15 > Accept: application/json
15 > Content-Type: application/json
{“id”:1,“method”:“getVersions”,“version”:“1.0”,“params”:}

11:57:46.483 [DEBUG] [inding.sony.internal.net.HttpRequest] - 16 * Client response received on thread safeCall-363
16 < 200
16 < Connection: keep-alive
16 < Content-Length: 27
16 < Content-Type: application/json
16 < Date: Fri, 10 Mar 2017 11:57:46 GMT
{“id”:1,“result”:[[“1.0”]]}

11:57:46.486 [DEBUG] [scalarweb.models.ScalarWebDeviceInfo] - Service ‘avContent’ is unavailable: null
java.lang.NullPointerException
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebResult.asArray(ScalarWebResult.java:121)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebService.(ScalarWebService.java:63)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebDeviceInfo.(ScalarWebDeviceInfo.java:76)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebState.(ScalarWebState.java:54)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebProtocol.login(ScalarWebProtocol.java:150)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.ScalarWebHandler.initialize(ScalarWebHandler.java:269)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:713)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.thing.internal.ThingManager$9$1.call(ThingManager.java:1)[105:org.eclipse.smarthome.core.thing:0.9.0.b4]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:179)[98:org.eclipse.smarthome.core:0.9.0.b4]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
11:57:46.494 [DEBUG] [inding.sony.internal.net.HttpRequest] - 17 * Sending client request on thread safeCall-363
17 > POST http://192.168.200.107/sony/audio
17 > Accept: application/json
17 > Content-Type: application/json
{“id”:1,“method”:“getVersions”,“version”:“1.0”,“params”:}

11:57:46.584 [DEBUG] [inding.sony.internal.net.HttpRequest] - 18 * Client response received on thread safeCall-363
18 < 200
18 < Connection: keep-alive
18 < Content-Length: 27
18 < Content-Type: application/json
18 < Date: Fri, 10 Mar 2017 11:57:46 GMT
{“id”:1,“result”:[[“1.0”]]}

11:57:46.588 [DEBUG] [scalarweb.models.ScalarWebDeviceInfo] - Service ‘audio’ is unavailable: null
java.lang.NullPointerException
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebResult.asArray(ScalarWebResult.java:121)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebService.(ScalarWebService.java:63)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebDeviceInfo.(ScalarWebDeviceInfo.java:76)[207:org.openhab.binding.sony:2.1.0.201702221949]
at org.openhab.binding.sony.internal.scalarweb.models.ScalarWebState.(ScalarWebState.java:54)[207:org.openhab.binding.sony:2.1.0.201702221949]

Bert

Bert - thanks for that reply. I’ll need to look into why it’s throwing a NullPointerException on those (they seem like valid responses). I’m just finishing up on some Russound binding changes and am going to get back to this shortly. I’ll let you know…

Bert - just realized you are using the Scalar service - don’t. That is very much in development at this point and won’t work (that jar I posted was to test something else and has a partial scalar implementation)

@tmrobert8

Tim, thx for the update. Can you post the URL with the latest binding so that I can try that one?

Regards,

Bert

Hey any updates on the Binding? Are you still planning to incorporate the new API?

Thanks a lot Thomas

Thanks for checking in - I just wrapped up the Russound changes monday and expect to get back to this now. Let you know when I get close on it.

Tim thank you very much for the Sony Binding. Great Work!

I am using Sony KD55XD8505, 2015 4K Android set. Just installed sony-binding-2017-02-22-1.jar file. Found the TV easily with Simple IP and Scalar Web. Got the Simple IP up and running. Couldn’t get the Scalar Web Online. IRCC thing is not around even though i think my TV supports it. Is the Scalar web yet unfinished or is something wrong with my settings?

Regards,
Erkan

Erkan,

Don’t use scalar web - that is in initial development and isn’t even close to being used yet. Simple IP should work (although very basic) if you TV supports it. I’d be surprised if your TV supports IRCC - sometime this last fall - Sony released a firmware update that removed the service (or hid it completely). Scalar Web is their new API that is a successor to IRCC…

Tim

Sorry, but i am unable to find and download the .jar file. Is there no public-download available?
Thanks!
Karl Heinz

Karl,

Latest testing zip can be found at https://github.com/openhab/openhab2-addons/pull/1249. Please note this is still an early version - SimpleIP is pretty stable - only for TVs if you turn it on in the TV settings (remote ip control), IRCC only seems to work on blurays and AVRs (if you haven’t updated the firmware in awhile - could work on a TV), DIAL works only on blurays, ScalarWeb - DO NOT USE (currently coding and not even close to being used yet).

Tim

Hi Tim,
thanks for help.

OH2 (snapshot) found my TV, but as Scalar-Device (i should not use!).

Then i added it manually, but there is a field “The Commands Map File” - what is there to do?

Karl Heinz

Karl,

Not sure what you are trying to add manually (hopefully not the scalar device - won’t work). What device are you trying to add (tv, bluray, etc)? Depending on the device - the command map file will be a file that lists the available commands that can be sent to the device (example of the setting: “sonytv-commands.map” - will create that file under your maps directory).

Again - don’t even try to use scalar as a manually added device either - there just is nothing behind it right now. If you do have a TV - turn on simple ip (on my tv: settings->network->home network->ip control->simple ip) and try to discover that service.

Tim

Hi Tim,
i added manually a SimpleIP Device - but checked NOT the settings in the TV. I try it the coming days again. I understand that the SimpleIP device is automaticly found.
Thanks for your help.
Karl Heinz

Is it possible to somehow send a command to open Netflix using this binding?

1 Like

Absolutely - you can start any app installed on the device. If you are using a bluray - you can use the existing binding to do that (DIAL service). If it’s a TV - you need to wait for the scalar service I’m testing right now - but it will start apps as well