Sony Devices Binding for OH3

Now that the OH 3.1 version has been released, I think it is time to open a new thread that is dedicated to the OH 3 version of the Sony binding.

This binding has been originally developed by @tmrobert8 for OH 2 and is extensively discussed in the thread Sony Devices Binding. Since start of the development in 2016, it has evolved to one of the most powerful openHAB addons that is characterized by its support of a large range of Sony devices in combination with a high level of auto-discovery of the device capabilities.

For various reasons, the binding hasn’t been merged into the official addons repository yet. One of the consequences is that the migration of the binding code to OH 3 hasn’t been performed by the OH maintainers when OH 3 was released. This was the motivation for me to try to migrate the available OH2 code by my own when I started my OH journey in January 2021. In course of this work, it has turned out that I also had to implement some tweaks and fixes to get the binding work nicely for my Sony TV. Also, I’ve tried to address other issues that were reported by users in the OH2 thread.

With opening a new thread, I’d like to provide a consolidated place for downloading the OH3 binding version from my personal github account and for reporting and discussing issues and further enhancements.

Please note that my contribution to the overall binding code is still rather marginal compared to what the original author @tmrobert8 provided. He gave same valuable hints when I started with the migration, but since than has been inactive. Of course, in case he becomes active again, I would be more than happy to collobarate with him in maintaining the binding. Thus for the time being, the support from the community is important to compensate my limited knowledge of the code (escpecially regarding certain non-obvious implementation solutions) and my testing capabilities.

Regarding the future of the binding, my original intention was to get the binding part of the official addons repository to ease the distribution, installation and maintenance. However, my current preference is to publish this binding on the new market place that has been announced forr the OH 3.2 version coming end 2021. I could imagine that this would be the less stressfull and faster alternative.

Binding download

The latest binding version for OH 3.1 (stable verions) and OH 3.2 can be downloaded from my fork of the addons repository:

Installation from community marketplace download

Starting with OH 3.2M3, the binding can also directly be installed from the community marketplace. In this case, no further manual installation steps are required

Changes to original OH2 binding code

The code is based on the latest released OH 2.5 binding version (see Release 2.5 12/01 #2 Β· tmrobert8/openhab-addons Β· GitHub) with following major changes:

Installation
Not required if installed via community marketplace!

The installation procedures is nearly identical to the OH2.5 version:

  • Open the karaf console
  • From the console - bundle:uninstall org.openhab.binding.sony (if a previous version has already been installed)
  • Wait about 10 seconds for the bundle to be uninstalled
  • Install feature dependencies by following commands:
    feature:install openhab-transport-upnp
    feature:install openhab-transformation-map
  • Shutdown openHAB
  • Remove all sony jars from the addons directory
  • Optionally (to fully clean up) - delete the userdata/sony directory
  • Start openHAB
  • Wait about 30 seconds for openHAB to startup properly
  • Copy the new jar into the addon directory
  • Wait about 30 seconds for the addon to initialize and your things to come back online.

Documentation

The mainly unchanged documentation in form of README files can be found here:

openhab-addons/bundles/org.openhab.binding.sony at sony-binding-oh3_2 Β· andan67/openhab-addons (github.com)

Logging

To get the binding logging into a separate file, edit the file userdata/etc/log4j2.xml as follows:

<Appenders>
...
    <!-- Sony binding appender -->
    <RollingFile fileName="${sys:openhab.logdir}/sony.log" filePattern="${sys:openhab.logdir}/sony-%d{yyyyMMdd-HHmmss}.log" name="SONY">
        <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n"/>
        <Policies>
            <OnStartupTriggeringPolicy/>
            <SizeBasedTriggeringPolicy size="16 MB"/>
        </Policies>
    </RollingFile>
</Appenders>
<Loggers>
...
    <Logger level="ERROR" name="org.apache.cxf.phase.PhaseInterceptorChain"/>
    <Logger additivity="false" level="INFO" name="org.openhab.binding.sony">
        <AppenderRef ref="SONY"/>
    </Logger>
</Loggers>

The logger entry for PhaseInterceptorChain supresses warning messages in the openhab log when Sony devices are unreachable. I haven’t yet found a way to avoid these warnings in the code.

Runtime configuration settings

It is highly recommended to disable the source feature of the binding as it tries to connect to github in short intervalls to get thing definitions from a library. I think I will delete this feature an in upcoming version as it seems to be obsolete.

Also you can define wich services (represented as things) should be auto-discovered by the binding.

The according settings are done in `services\runtime.cfg’ file as follows:

sony.sources:local=false
sony.sources:github=false
discovery.sony-simpleip:background=false
discovery.sony-dial:background=false
discovery.sony-ircc:background=false
discovery.sony-scalar:background=true
14 Likes

Hello,

Seems I am the first in this new thread :slight_smile: I have migrated from OH 2.5 to OH3.1 and I am trying to use Sony Binding for BRAVIA KDL-55W829B (with SimpleIP thing and Ethernet connection (eth0) .
1- With Parameters:
Refresh Interval = 5
Retry Polling = -1
Status Check Interval = 30

COMMUNICATION_ERROR Error connecting to SimpleIP TV.

When I switch ON the TV via remote control the Simple IP still stays in COMMUNICATION ERROR but the sony binding recognizes that TV was switched ON since the new thing appeared in the Inbox:

Discovery Result with UID 'sony:scalar:fcf1522a8cda' has been added.

Now when I click DISABLE then ENABLE the SimpleIP thing changes immediately from COMMUNICATION ERROR to ONLINE.

2 -With Parameters:
Refresh Interval = 5
Retry Polling = 20
Status Check Interval = 30

When I switch ON the TV via remote control the Simple IP still stays in ERROR and there are logs as follows:

Thing 'sony:simpleip:d17fd45418' changed from OFFLINE (COMMUNICATION_ERROR): Error reconnecting to device: no protocol: <ip address is here> to UNKNOWN: Reconnecting ...

2021-08-03 19:41:21.009 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from UNKNOWN: Reconnecting ... to OFFLINE (COMMUNICATION_ERROR): Error reconnecting to device: no protocol: <ip address is here>

But sony binding recognizes that TV was switched ON since the new thing appeared in the Inbox:

Discovery Result with UID 'sony:scalar:fcf1522a8cda' has been added.

Now when I click DISABLE then ENABLE the Simple IP thing, it changes immediatelly from COMMUNICATION ERROR to ONLINE.

Is there any recommended set up to make this working without clicking DISBALE/ENABLE on the SimpleIP thing?

Welcome to this thread :slight_smile: and thanks for your issue report.

Regarding scenario 1: What happens if you power on the Sony TV from OH via a Simple IP command (this should work by using WOL)?

Regarding scenario 2: I think I’ve found the cause of the issue in the code and will try to fix it shortly.

Yes WOL works in Scenario 1, TV is turned ON, Sonyscalar added to the Inbox, but the Simple IP thing remains in OFFLINE/COMMUNICATION ERROR

2021-08-04 23:28:11.865 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SonySimpleIPPower' received command ON
2021-08-04 23:28:11.871 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'SonySimpleIPPower' predicted to become OFF
2021-08-04 23:28:41.880 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from OFFLINE (COMMUNICATION_ERROR): Error reconnecting to device: no protocol: <ip address is here> to UNKNOWN: Reconnecting ...
2021-08-04 23:28:41.886 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from UNKNOWN: Reconnecting ... to OFFLINE (COMMUNICATION_ERROR): Error reconnecting to device: no protocol: <ip address is here>
2021-08-04 23:28:43.407 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'sony:scalar:fcf1522a8cda' has been added.

Hence no possibility to turn OFF the TV in OH.

I’ve released a fix for the β€˜no protocol’ error:

Release openhab-addons-sony-3.1.1-SNAPSHOT Β· andan67/openhab-addons (github.com)

Please let me know if this fix works for you.

Thank you for the new binding jar. There are positive changes :slight_smile:as follows:

Scenario 1
(1.1) When I turn on TV in OH, the TV is ON then ~20 sec later SimpleIP thing changes form OFFLINE to ONLINE. Log below:

2021-08-06 10:38:16.727 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SonySimpleIPPower' received command ON
2021-08-06 10:38:16.730 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'SonySimpleIPPower' predicted to become OFF
2021-08-06 10:38:46.745 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Reconnecting ...
2021-08-06 10:38:46.755 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from UNKNOWN: Reconnecting ... to ONLINE
2021-08-06 10:38:55.233 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'sony:scalar:fcf1522a8cda' has been added.
2021-08-06 10:38:56.953 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPPower' changed from OFF to ON
2021-08-06 10:38:57.269 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPChannel' changed from  to 4.0
2021-08-06 10:38:57.628 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPVolume' changed from 0 to 7
2021-08-06 10:38:58.069 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPTripletchannel' changed from  to 8808.2.3
2021-08-06 10:38:58.640 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPInputsource' changed from  to dvbt

(1.2) But when I turn on TV via remote control the TV is ON, the sony:scalar was added to the Inbox but the SimpleIP thing remains in OFFLINE/ERROR with the message in UI:

Exception occurred sending command: java.net.ConnectException: Connection refused (Connection refused)

Hence a question: OH recognizes the connection with TV since it added sony:scalar to the Inbox, would it be possible to make SimpleIP thing ONLINE as well (like 1.1)?

Scenario 2
TV is turned ON using both: remote control and OH. After sconds the SimpleIP thing is ONLINE :slight_smile:
When I turn OFF TV (via remote control or OH) the SimpleIP thing goes into OFFLINE after ~5 minutes than trying to connect again every 20 second (and I can turn on TV using both remote control and OH)

2021-08-06 10:19:48.724 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Reconnecting ...
2021-08-06 10:19:50.558 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from UNKNOWN: Reconnecting ... to OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv
2021-08-06 10:20:01.735 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'sony:scalar:fcf1522a8cda' has been added.
2021-08-06 10:20:10.558 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv to UNKNOWN: Reconnecting ...
2021-08-06 10:20:10.563 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from UNKNOWN: Reconnecting ... to ONLINE
2021-08-06 10:20:15.903 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPPower' changed from OFF to ON
2021-08-06 10:20:16.029 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPVolume' changed from 0 to 7
2021-08-06 10:20:16.167 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPChannel' changed from  to 4.0
2021-08-06 10:20:16.396 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPTripletchannel' changed from  to 8808.2.3
2021-08-06 10:20:16.541 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPInputsource' changed from  to dvbt
2021-08-06 10:22:00.912 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SonySimpleIPPower' received command OFF
2021-08-06 10:22:00.970 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'SonySimpleIPPower' predicted to become OFF
2021-08-06 10:22:00.981 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPPower' changed from ON to OFF
2021-08-06 10:22:01.457 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'sony:scalar:fcf1522a8cda' has been removed.
2021-08-06 10:22:05.294 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPVolume' changed from 7 to 0
2021-08-06 10:22:05.421 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPChannel' changed from 4.0 to 
2021-08-06 10:22:05.522 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPTripletchannel' changed from 8808.2.3 to 
2021-08-06 10:22:05.630 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPInputsource' changed from dvbt to 
2021-08-06 10:27:04.934 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Exception occurred reading from the socket: server closed connection
2021-08-06 10:27:24.935 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from OFFLINE (COMMUNICATION_ERROR): Exception occurred reading from the socket: server closed connection to UNKNOWN: Reconnecting ...
2021-08-06 10:27:26.940 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from UNKNOWN: Reconnecting ... to OFFLINE (COMMUNICATION_ERROR): Error connecting to simple IP tv

The above is OK but there are messages in the log β€œβ€¦trying to connect…” every 20 s

I think your observations reflect the expected behaviour.

If the TV is powered on outside OH using a remote control, the only way the thing status can be updated to ONLINE is via the retry polling mechanism. This is completely separated from the discovery process.

The retry mechanism is triggered when the TV becomes unreachable after it has been switched off and gone into a deep standby mode (seems to be after 5 minutes). The log just reflects the process of trying to establish a connection to the TV in order to update the thing status once it has been switched on.

The only oberservation which I think needs further analysis is why the connection to the TV is not established right after powering on via SimpleIP command (a power on command should directly induce a connect)

Could you please have a look at the log below to find out if there might be any reason visible?

2021-08-12 12:16:52.846 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'SonySimpleIPPower' received command ON
2021-08-12 12:16:52.849 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'SonySimpleIPPower' predicted to become OFF
2021-08-12 12:16:52.857 [INFO ] [ny.internal.simpleip.SimpleIpHandler] - WOL packet sent to FC:F1:52:2A:8C:DA
2021-08-12 12:16:52.859 [INFO ] [g.sony.internal.AbstractThingHandler] - Received power on command when thing is offline - trying to turn on thing via WOL
2021-08-12 12:16:52.860 [DEBUG] [g.sony.internal.AbstractThingHandler] - AutoReconnect on - scheduling reconnect and caching: sony:simpleip:d17fd45418:power ON
2021-08-12 12:16:52.861 [DEBUG] [g.sony.internal.AbstractThingHandler] - Schedule auto reconnect
2021-08-12 12:17:22.862 [DEBUG] [g.sony.internal.AbstractThingHandler] - Do reconnect for Sony Simple IP
2021-08-12 12:17:22.864 [TRACE] [g.sony.internal.AbstractThingHandler] - Ignoring thing status of UNKNOWN
2021-08-12 12:17:22.865 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from OFFLINE (COMMUNICATION_ERROR): Exception occurred reading from the socket: Connection reset to UNKNOWN: Reconnecting ...
2021-08-12 12:17:22.886 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'sony:simpleip:d17fd45418' changed from UNKNOWN: Reconnecting ... to ONLINE
2021-08-12 12:17:22.867 [DEBUG] [ny.internal.net.SocketChannelSession] - Connecting to 192.XXX.X.XXX:20060
2021-08-12 12:17:22.880 [DEBUG] [ny.internal.net.SocketChannelSession] - Disconnecting from 192.XXX.X.XXX:20060
2021-08-12 12:17:22.882 [DEBUG] [ny.internal.net.SocketChannelSession] - Dispatch thread ending
2021-08-12 12:17:22.882 [DEBUG] [ny.internal.simpleip.SimpleIpHandler] - Simple IP TV System now connected
2021-08-12 12:17:22.885 [DEBUG] [g.sony.internal.AbstractThingHandler] - Starting state polling every 5 seconds
2021-08-12 12:17:22.887 [DEBUG] [g.sony.internal.AbstractThingHandler] - Cannot check status - URL is malformed: no protocol: 192.XXX.X.XXX
2021-08-12 12:17:22.888 [DEBUG] [g.sony.internal.AbstractThingHandler] - Executing any cached commands
2021-08-12 12:17:22.890 [INFO ] [y.internal.simpleip.SimpleIpProtocol] - WOL packet sent to FC:F1:52:2A:8C:DA
2021-08-12 12:17:22.892 [DEBUG] [y.internal.simpleip.SimpleIpProtocol] - Sending '*SCPOWR0000000000000001'
2021-08-12 12:17:27.887 [DEBUG] [y.internal.simpleip.SimpleIpProtocol] - Sending '*SEPOWR################'
..

2021-08-12 12:17:30.731 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'SonySimpleIPPower' changed from OFF to ON

I can see there is 30s time diffrence between Schedule Auto reconnect and Do reconnect for Sony Simple IP

Thanks for the helpful log. I hope I will be able to provide an answer soon.

I can confirm that the reconnect logic works as designed (partly by me…). In the current implementation, a (re-) connect is triggered either after the configured retry polling (if set) or a fixed 30s period after a command has been sent to the offline TV.

I’m going to change this behaviour so that that the offline TV should become online right after sending a command (at least wihin 2-3 seconds).

1 Like

I’ve released a new binding version 3.1.1 with improved reconnect handling (see updated link in initial post).

Please note that it still might take a while that the SimpleIP service becomes available after powering on the TV due to the start-up/boot procedure (e.g. it takes ~15s on my TV that the scalar services becomes available).

After WOL the TV is ON (physically) in ~8 s but in Openhab UI it takes +30s. I can see new β€œnot reachable” messages:

2021-08-26 20:28:26.931 [INFO ] [ny.internal.simpleip.SimpleIpHandler] - WOL packet sent to FC:F1:52:2A:8C:DA
2021-08-26 20:28:26.933 [INFO ] [g.sony.internal.AbstractThingHandler] - Received power on command when thing is offline - trying to turn on thing via WOL
2021-08-26 20:28:26.935 [DEBUG] [g.sony.internal.AbstractThingHandler] - AutoReconnect on - scheduling reconnect and caching: sony:simpleip:d17fd45418:power ON
2021-08-26 20:28:26.937 [DEBUG] [g.sony.internal.AbstractThingHandler] - Schedule auto reconnect
2021-08-26 20:28:28.939 [DEBUG] [g.sony.internal.AbstractThingHandler] - Do reconnect for Sony Simple IP
2021-08-26 20:28:28.940 [TRACE] [g.sony.internal.AbstractThingHandler] - Ignoring thing status of UNKNOWN
2021-08-26 20:28:29.443 [DEBUG] [g.sony.internal.AbstractThingHandler] - Device with ip/host 192.XXX.0.XXX - not reachable. Giving-up connection attempt
2021-08-26 20:28:29.444 [DEBUG] [g.sony.internal.AbstractThingHandler] - Schedule auto reconnect counter=1
2021-08-26 20:28:33.446 [DEBUG] [g.sony.internal.AbstractThingHandler] - Do reconnect for Sony Simple IP
2021-08-26 20:28:33.450 [TRACE] [g.sony.internal.AbstractThingHandler] - Ignoring thing status of UNKNOWN
2021-08-26 20:28:33.953 [DEBUG] [g.sony.internal.AbstractThingHandler] - Device with ip/host 192.XXX.0.XXX - not reachable. Giving-up connection attempt
2021-08-26 20:28:33.955 [DEBUG] [g.sony.internal.AbstractThingHandler] - Schedule auto reconnect counter=2
2021-08-26 20:28:41.961 [DEBUG] [g.sony.internal.AbstractThingHandler] - Do reconnect for Sony Simple IP
2021-08-26 20:28:41.967 [TRACE] [g.sony.internal.AbstractThingHandler] - Ignoring thing status of UNKNOWN
2021-08-26 20:28:42.477 [DEBUG] [g.sony.internal.AbstractThingHandler] - Device with ip/host 192.XXX.0.XXX - not reachable. Giving-up connection attempt
2021-08-26 20:28:42.479 [DEBUG] [g.sony.internal.AbstractThingHandler] - Schedule auto reconnect counter=3
2021-08-26 20:28:58.482 [DEBUG] [g.sony.internal.AbstractThingHandler] - Do reconnect for Sony Simple IP
2021-08-26 20:28:58.485 [TRACE] [g.sony.internal.AbstractThingHandler] - Ignoring thing status of UNKNOWN
2021-08-26 20:28:58.491 [DEBUG] [ny.internal.net.SocketChannelSession] - Connecting to 192.XXX.0.XXX:20060
2021-08-26 20:28:58.496 [DEBUG] [ny.internal.net.SocketChannelSession] - Disconnecting from 192.XXX.0.XXX:20060
2021-08-26 20:28:58.499 [DEBUG] [ny.internal.net.SocketChannelSession] - Dispatch thread ending
2021-08-26 20:28:58.499 [DEBUG] [ny.internal.simpleip.SimpleIpHandler] - Simple IP TV System now connected
2021-08-26 20:28:58.502 [DEBUG] [g.sony.internal.AbstractThingHandler] - Starting state polling every 5 seconds
2021-08-26 20:28:58.506 [DEBUG] [g.sony.internal.AbstractThingHandler] - Cannot check status - URL is malformed: no protocol: 192.XXX.0.XXX
2021-08-26 20:28:58.509 [DEBUG] [g.sony.internal.AbstractThingHandler] - Executing any cached commands
2021-08-26 20:28:58.512 [INFO ] [y.internal.simpleip.SimpleIpProtocol] - WOL packet sent to FC:F1:52:2A:8C:DA
2021-08-26 20:28:58.515 [DEBUG] [y.internal.simpleip.SimpleIpProtocol] - Sending '*SCPOWR0000000000000001'
2021-08-26 20:29:03.451 [DEBUG] [ny.internal.net.SocketChannelSession] - Dispatching response: *SNINPT0000000000000000

the new jar file:

 ID β”‚ State  β”‚ Lvl β”‚ Version β”‚ Name
────┼────────┼─────┼─────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
323 β”‚ Active β”‚  80 β”‚ 3.1.1   β”‚ openHAB Add-ons :: Bundles :: Sony Binding

I would assume that the SimpleIP service becomes available only after a period of more than 16s after powering on. You could make an independent check by issuing a ping command and measure the time until a response is retrieved. If this is much less than 16s, I think I need to review my attempt to reduce the reconnection time. The current solution starts the first reconnect attempt 2s after a power on command is retrieved. Then this interval is doubled for each successive retry (i.e. 4s, 8s, 16s, 32s).

When TV is turned off, the time of ping result is 10,3s in my case.

Hi, thank you for the great binding!
I’m going to add my TV Sony 55X8500E, which is a smart Android TV into openHAB 3.1. The TV was detected as sony:scalar thing in openHAB, but I want to add it manually in .things and .items file.
So is there any official document of this binding somewhere, like this page SonyAudio - Bindings | openHAB
Thank you for paying attention!

You can find the docs here on my github page. Note that these are the docs for the original OH2 binding with some minor adaptions. I will check if these docs can be made accessible through the UI as for the official bindings.

If you have further questions please let me know.

1 Like

Hey @andan,
i recently updated to 3.2.0 - snapshot. The Sony binding stoped working. is there an update for this atm? or did i mess somthing up with the update?

I’ve just successfully tested the 3.1.1 Sony binding version with a freshly installed 3.2.0-SNAPSHOT OH on Windows. Note that only this binding version will work with OH versions >= 3.1.

So if you use the 3.1.1 binding version, I’d assume that your issue is related to the update procedure and not the binding. In this case, you might try to clean the cache and/or restarted OH after the update. If the issue persists, please provide log information if possible.

Otherwise please update to the 3.1.1 binding version (see first post).

clearing the cashe fixed it. :smiley: thanks for the binding

Hi,

The binding found my TV but will not connect. The XML file from the TV is below.

Any other information I can provide to troubleshoot?

Mike


<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>SONY XR-65A80CJ</friendlyName>
<manufacturer>Sony Corporation</manufacturer>
<manufacturerURL>http://www.sony.net/</manufacturerURL>
<modelName>XR-65A80CJ</modelName>
<UDN>uuid:ea5d396c-805c-43c2-acf0-3124f554f03c</UDN>
<iconList>
<icon>
<mimetype>image/png</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/sony/webapi/ssdp/icon/dlna_tv_120.png</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>32</width>
<height>32</height>
<depth>24</depth>
<url>/sony/webapi/ssdp/icon/dlna_tv_32.png</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/sony/webapi/ssdp/icon/dlna_tv_48.jpg</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>48</width>
<height>48</height>
<depth>24</depth>
<url>/sony/webapi/ssdp/icon/dlna_tv_48.png</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>32</width>
<height>32</height>
<depth>24</depth>
<url>/sony/webapi/ssdp/icon/dlna_tv_32.jpg</url>
</icon>
<icon>
<mimetype>image/png</mimetype>
<width>60</width>
<height>60</height>
<depth>24</depth>
<url>/sony/webapi/ssdp/icon/dlna_tv_60.png</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>120</width>
<height>120</height>
<depth>24</depth>
<url>/sony/webapi/ssdp/icon/dlna_tv_120.jpg</url>
</icon>
<icon>
<mimetype>image/jpeg</mimetype>
<width>60</width>
<height>60</height>
<depth>24</depth>
<url>/sony/webapi/ssdp/icon/dlna_tv_60.jpg</url>
</icon>
</iconList>
<serviceList>
<service>
<serviceType>urn:schemas-sony-com:service:ScalarWebAPI:1</serviceType>
<serviceId>urn:schemas-sony-com:serviceId:ScalarWebAPI</serviceId>
<SCPDURL>/sony/webapi/ssdp/scpd/WebApiSCPD.xml</SCPDURL>
<controlURL>http://192.168.1.39/sony</controlURL>
<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/>
</service>
<service>
<serviceType>urn:schemas-sony-com:service:IRCC:1</serviceType>
<serviceId>urn:schemas-sony-com:serviceId:IRCC</serviceId>
<SCPDURL>http://192.168.1.39/sony/ircc/IRCCSCPD.xml</SCPDURL>
<controlURL>http://192.168.1.39/sony/ircc</controlURL>
<eventSubURL/>
</service>
</serviceList>
<av:X_ScalarWebAPI_DeviceInfo xmlns:av="urn:schemas-sony-com:av">
<av:X_ScalarWebAPI_Version>1.0</av:X_ScalarWebAPI_Version>
<av:X_ScalarWebAPI_BaseURL>http://192.168.1.39/sony</av:X_ScalarWebAPI_BaseURL>
<av:X_ScalarWebAPI_ServiceList>
<av:X_ScalarWebAPI_ServiceType>guide</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>avContent</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>system</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>videoScreen</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>audio</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>encryption</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>cec</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>accessControl</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>appControl</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>dial/dd.xml</av:X_ScalarWebAPI_ServiceType>
<av:X_ScalarWebAPI_ServiceType>video</av:X_ScalarWebAPI_ServiceType>
</av:X_ScalarWebAPI_ServiceList>
</av:X_ScalarWebAPI_DeviceInfo>
<av:X_DIALEX_DeviceInfo xmlns:av="urn:schemas-sony-com:av">
<av:X_DIALEX_AppsListURL>http://192.168.1.39:80/DIAL/sony/applist</av:X_DIALEX_AppsListURL>
<av:X_DIALEX_DeviceType>Android_TV_DIAL_v2.0.0</av:X_DIALEX_DeviceType>
</av:X_DIALEX_DeviceInfo>
<av:X_IRCC_DeviceInfo xmlns:av="urn:schemas-sony-com:av">
<av:X_IRCC_Version>1.0</av:X_IRCC_Version>
<av:X_IRCC_CategoryList>
<av:X_IRCC_Category>
<av:X_CategoryInfo>AAEAAAAB</av:X_CategoryInfo>
</av:X_IRCC_Category>
<av:X_IRCC_Category>
<av:X_CategoryInfo>AAIAAACk</av:X_CategoryInfo>
</av:X_IRCC_Category>
<av:X_IRCC_Category>
<av:X_CategoryInfo>AAIAAACX</av:X_CategoryInfo>
</av:X_IRCC_Category>
<av:X_IRCC_Category>
<av:X_CategoryInfo>AAIAAAB3</av:X_CategoryInfo>
</av:X_IRCC_Category>
<av:X_IRCC_Category>
<av:X_CategoryInfo>AAIAAAAa</av:X_CategoryInfo>
</av:X_IRCC_Category>
</av:X_IRCC_CategoryList>
</av:X_IRCC_DeviceInfo>
<av:X_IRCCCodeList xmlns:av="urn:schemas-sony-com:av">
<av:X_IRCCCode command="Power">AAAAAQAAAAEAAAAVAw==</av:X_IRCCCode>
</av:X_IRCCCodeList>
</device>
</root>