Hi! Have been testing this binding for two days now. Running latest stable OpenHABian on RPi3. My tv is Bravia KDL-55W809C. IP control is turned off and only scalar is used.
From the beginning everything worked really well. Just dropped the newest .jar to addons folder and waited for few mins. Registration with tv went smoothly and all channels got recognized. Next thing was to create ON/OFF button for my sitemap. That’s when something went a little weird. The button itself worked like a charm and the tv would switch off and on but pressing it too often halted whole binding for a minute or so. Was in a hurry so didn’t have time to focus it on then but next morning I checked through the system and noticed that at the same time also another binding (regoheatpump) stopped/halted. Had to restart openhab to get that rego binding working again. And no. I did not have debug on.
/Miika
Edit 4.9.2017
Some more testing and adding channels manualy. Here’s my sony.items file.
Switch sonyPower "Virta" {channel="sony:scalar:03ef1f3a-98e3-4035-8350-a58ba4ed623e:system-powerstatus"}
Switch sonyMute "Mykistys" {channel="sony:scalar:03ef1f3a-98e3-4035-8350-a58ba4ed623e:audio-speaker-mute"}
Dimmer sonyVolume "TV Äänenvoimakkuus" {channel="sony:scalar:03ef1f3a-98e3-4035-8350-a58ba4ed623e:audio-speaker-volume"}
String sonyProgramGuide "Guide" {channel="sony:scalar:03ef1f3a-98e3-4035-8350-a58ba4ed623e:appControl-com__0sony__0dtv__0com__0sony__0dtv__0tvx__0com__0sony__0dtv__0tvx__0MainActivity-appdata"}
String sonyRecordings "Tallennusluettelo" {channel="sony:scalar:03ef1f3a-98e3-4035-8350-a58ba4ed623e:appControl-com__0sony__0dtv__0com__0sony__0dtv__0tvx__0com__0sony__0dtv__0tvx__0rec__0ui__0screen__0recorded__0TitleListLauncherActivity-appdata"}
After adding two last lines PaperUI control page doesn’t show any values on any binding. By removing those two lines everything works again.
2017-09-04 09:30:00.804 [ItemStateChangedEvent ] - sonyRecordings changed from NULL to null
2017-09-04 09:30:26.296 [ERROR] [ersey.server.ServerRuntime$Responder] - An I/O error has occurred while writing a response message entity to the container output stream.
org.glassfish.jersey.server.internal.process.MappableException: java.lang.NullPointerException
at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:92)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1130)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:711)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:444)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:434)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:329)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)[155:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)[155:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)[155:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)[155:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)[155:org.glassfish.jersey.containers.jersey-container-servlet-core:2.22.2]
at com.eclipsesource.jaxrs.publisher.internal.ServletContainerBridge.service(ServletContainerBridge.java:76)[9:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:71)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)[79:org.eclipse.jetty.security:9.2.19.v20160908]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:287)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)[81:org.eclipse.jetty.servlet:9.2.19.v20160908]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:80)[172:org.ops4j.pax.web.pax-web-jetty:4.3.0]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.Server.handle(Server.java:499)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)[80:org.eclipse.jetty.server:9.2.19.v20160908]
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)[71:org.eclipse.jetty.io:9.2.19.v20160908]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)[83:org.eclipse.jetty.util:9.2.19.v20160908]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)[83:org.eclipse.jetty.util:9.2.19.v20160908]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
Caused by: java.lang.NullPointerException
at org.eclipse.smarthome.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:48)
at org.eclipse.smarthome.io.rest.core.item.EnrichedItemDTOMapper.map(EnrichedItemDTOMapper.java:41)
at org.eclipse.smarthome.io.rest.core.item.ItemResource.lambda$0(ItemResource.java:153)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)[:1.8.0_121]
at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1353)[:1.8.0_121]
at java.util.stream.StreamSpliterators$WrappingSpliterator.lambda$initPartialTraversalState$0(StreamSpliterators.java:294)[:1.8.0_121]
at java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.fillBuffer(StreamSpliterators.java:206)[:1.8.0_121]
at java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.doAdvance(StreamSpliterators.java:169)[:1.8.0_121]
at java.util.stream.StreamSpliterators$WrappingSpliterator.tryAdvance(StreamSpliterators.java:300)[:1.8.0_121]
at java.util.Spliterators$1Adapter.hasNext(Spliterators.java:681)[:1.8.0_121]
at org.eclipse.smarthome.io.rest.Stream2JSONInputStream.fillBuffer(Stream2JSONInputStream.java:90)[114:org.eclipse.smarthome.io.rest:0.9.0.b5]
at org.eclipse.smarthome.io.rest.Stream2JSONInputStream.read(Stream2JSONInputStream.java:66)[114:org.eclipse.smarthome.io.rest:0.9.0.b5]
at java.io.InputStream.read(InputStream.java:179)[:1.8.0_121]
at java.io.InputStream.read(InputStream.java:101)[:1.8.0_121]
at org.glassfish.jersey.message.internal.ReaderWriter.writeTo(ReaderWriter.java:115)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.message.internal.AbstractMessageReaderWriterProvider.writeTo(AbstractMessageReaderWriterProvider.java:79)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.message.internal.InputStreamProvider.writeTo(InputStreamProvider.java:105)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.message.internal.InputStreamProvider.writeTo(InputStreamProvider.java:60)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:106)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
at org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162)[157:org.glassfish.jersey.core.jersey-common:2.22.2]
at org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:86)[158:org.glassfish.jersey.core.jersey-server:2.22.2]
... 41 more
Edit #2 4.9.2017
After playing around with my sitemaps power switch and tv remote here’s more notes. My refresh interval was set to 30 seconds. After turning tv off with remote controller binding stopped refreshing. You still can switch the tv off/on and mute/unmute etc. from openhab but no automatic refresh would happen. And also the refresh rate was back to 5 secs witch i think is the default value.
After this i restarted openhab.
2017-09-04 16:15:12.805 [DEBUG] [inding.sony.internal.net.HttpRequest] - 1 * Sending client request on thread Start Level: Equinox Container: 601a8ffe-7291-0017-1da3-e9bbc92e8425
1 > GET http://192.168.0.3:8008/ssdp/device-desc.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
2017-09-04 16:15:12.868 [DEBUG] [inding.sony.internal.net.HttpRequest] - 2 * Client response received on thread Start Level: Equinox Container: 601a8ffe-7291-0017-1da3-e9bbc92e8425
2 < 200
2 < Application-URL: http://192.168.0.3:8008/apps/
2 < Content-Length: 1068
2 < Content-Type: application/xml
<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://192.168.0.3:8008</URLBase>
<device>
<deviceType>urn:dial-multiscreen-org:device:dial:1</deviceType>
<friendlyName>KDL-55W809C</friendlyName>
<manufacturer>Sony</manufacturer>
<modelName>BRAVIA 2015</modelName>
<UDN>uuid:1b86ba82-232c-9fe2-c1d3-681427568bd6</UDN>
<iconList>
<icon>
<mimetype>image/png</mimetype>
<width>98</width>
<height>55</height>
<depth>32</depth>
<url>/setup/icon.png</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:dial-multiscreen-org:service:dial:1</serviceType>
<serviceId>urn:dial-multiscreen-org:serviceId:dial</serviceId>
<controlURL>/ssdp/notfound</controlURL>
<eventSubURL>/ssdp/notfound</eventSubURL>
<SCPDURL>/ssdp/notfound</SCPDURL>
</service>
</serviceList>
</device>
</root>
2017-09-04 16:15:12.890 [DEBUG] [nding.sony.internal.net.HttpResponse] - >>> contents: 1068: <?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://192.168.0.3:8008</URLBase>
<device>
<deviceType>urn:dial-multiscreen-org:device:dial:1</deviceType>
<friendlyName>KDL-55W809C</friendlyName>
<manufacturer>Sony</manufacturer>
<modelName>BRAVIA 2015</modelName>
<UDN>uuid:1b86ba82-232c-9fe2-c1d3-681427568bd6</UDN>
<iconList>
<icon>
<mimetype>image/png</mimetype>
<width>98</width>
<height>55</height>
<depth>32</depth>
<url>/setup/icon.png</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:dial-multiscreen-org:service:dial:1</serviceType>
<serviceId>urn:dial-multiscreen-org:serviceId:dial</serviceId>
<controlURL>/ssdp/notfound</controlURL>
<eventSubURL>/ssdp/notfound</eventSubURL>
<SCPDURL>/ssdp/notfound</SCPDURL>
</service>
</serviceList>
</device>
</root>
2017-09-04 16:15:12.899 [DEBUG] [y.discovery.DialDiscoveryParticipant] - DIAL device didn't implement any device infos - ignoring: (RemoteDeviceIdentity) UDN: uuid:1b86ba82-232c-9fe2-c1d3-681427568bd6, Descriptor: http://192.168.0.3:8008/ssdp/device-desc.xml
2017-09-04 16:15:12.904 [DEBUG] [y.discovery.DialDiscoveryParticipant] - Found Sony DIAL service: uuid:1b86ba82-232c-9fe2-c1d3-681427568bd6
2017-09-04 16:15:12.978 [DEBUG] [inding.sony.internal.net.HttpRequest] - 1 * Sending client request on thread Start Level: Equinox Container: 601a8ffe-7291-0017-1da3-e9bbc92e8425
1 > GET http://192.168.0.3:8008/ssdp/device-desc.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
2017-09-04 16:15:12.984 [DEBUG] [inding.sony.internal.net.HttpRequest] - 2 * Client response received on thread Start Level: Equinox Container: 601a8ffe-7291-0017-1da3-e9bbc92e8425
2 < 200
2 < Application-URL: http://192.168.0.3:8008/apps/
2 < Content-Length: 1068
2 < Content-Type: application/xml
<?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://192.168.0.3:8008</URLBase>
<device>
<deviceType>urn:dial-multiscreen-org:device:dial:1</deviceType>
<friendlyName>KDL-55W809C</friendlyName>
<manufacturer>Sony</manufacturer>
<modelName>BRAVIA 2015</modelName>
<UDN>uuid:1b86ba82-232c-9fe2-c1d3-681427568bd6</UDN>
<iconList>
<icon>
<mimetype>image/png</mimetype>
<width>98</width>
<height>55</height>
<depth>32</depth>
<url>/setup/icon.png</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:dial-multiscreen-org:service:dial:1</serviceType>
<serviceId>urn:dial-multiscreen-org:serviceId:dial</serviceId>
<controlURL>/ssdp/notfound</controlURL>
<eventSubURL>/ssdp/notfound</eventSubURL>
<SCPDURL>/ssdp/notfound</SCPDURL>
</service>
</serviceList>
</device>
</root>
2017-09-04 16:15:12.989 [DEBUG] [nding.sony.internal.net.HttpResponse] - >>> contents: 1068: <?xml version="1.0"?>
<root xmlns="urn:schemas-upnp-org:device-1-0">
<specVersion>
<major>1</major>
<minor>0</minor>
</specVersion>
<URLBase>http://192.168.0.3:8008</URLBase>
<device>
<deviceType>urn:dial-multiscreen-org:device:dial:1</deviceType>
<friendlyName>KDL-55W809C</friendlyName>
<manufacturer>Sony</manufacturer>
<modelName>BRAVIA 2015</modelName>
<UDN>uuid:1b86ba82-232c-9fe2-c1d3-681427568bd6</UDN>
<iconList>
<icon>
<mimetype>image/png</mimetype>
<width>98</width>
<height>55</height>
<depth>32</depth>
<url>/setup/icon.png</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:dial-multiscreen-org:service:dial:1</serviceType>
<serviceId>urn:dial-multiscreen-org:serviceId:dial</serviceId>
<controlURL>/ssdp/notfound</controlURL>
<eventSubURL>/ssdp/notfound</eventSubURL>
<SCPDURL>/ssdp/notfound</SCPDURL>
</service>
</serviceList>
</device>
</root>
2017-09-04 16:15:13.139 [DEBUG] [org.openhab.binding.sony ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=binding.sony, component.id=247, service.id=374, service.bundleid=229, service.scope=bundle} - org.openhab.binding.sony
2017-09-04 16:15:13.152 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2017-09-04 16:15:13.155 [DEBUG] [org.openhab.binding.sony ] - BundleEvent STARTED - org.openhab.binding.sony
2017-09-04 16:15:13.424 [DEBUG] [inding.sony.internal.net.HttpRequest] - 1 * Sending client request on thread ESH-thingHandler-2
1 > GET http://192.168.0.3:50124/sony/webapi/ssdp/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
2017-09-04 16:15:13.440 [ERROR] [.internal.scalarweb.ScalarWebHandler] - Exception caught: java.net.ConnectException: Connection refused (Connection refused)
So now scalar gets connection refused.