Sony Devices Binding

Hi Guys!

Anybody can help me on how to assigned the correct items, i have managed to create custome items by doing it manually but appart from the power switch nothing else works. please help

I seem to have two very minor problems with version [2.5 07/23 1]
Every 10 seconds i see this in the log:

2019-07-28 14:46:19.823 [INFO ] [nding.sony.internal.dial.DialHandler] - Attempting connection to DIAL device...
2019-07-28 14:46:29.839 [INFO ] [nding.sony.internal.dial.DialHandler] - Attempting connection to DIAL device...
2019-07-28 14:46:39.856 [INFO ] [nding.sony.internal.dial.DialHandler] - Attempting connection to DIAL device...
2019-07-28 14:46:49.872 [INFO ] [nding.sony.internal.dial.DialHandler] - Attempting connection to DIAL device...
2019-07-28 14:46:59.888 [INFO ] [nding.sony.internal.dial.DialHandler] - Attempting connection to DIAL device...
2019-07-28 14:47:09.903 [INFO ] [nding.sony.internal.dial.DialHandler] - Attempting connection to DIAL device...

The other thing is, i can turn the TV on and off from openHAB. Instant as expected.
If i turn it on from the remote, it takes about 10 seconds to get the new state into openhab. When turned off, i think it takes another 10 seconds maybe a bit longer.
I used the scalar web device.

Not a real big issue, but just wondering is the scaler web event driven? Or is it polling every x seconds?

Does the binding now support status updates from apps/channels?
I just tried but it seemed the binding didn’t notice me starting and stopping apps on the tv…

It’s polling. If you go to the settings in the thing it gives you polling options to have it more/less often or not at all.

Sounds like you don’t have simple linking on.
In paper ui ->menu->configuration->system
Under item linking turn on simple mode.

Delete your thing
Re add your thing
Should auto populate with items

If it’s the issue I think your having.

Unfortunately I don’t have any experience with having simple mode off.

Hi I have manged to make it work trough ip simple. so i guess im getting very close.

so now ONLY TWO PROBLEM that i hope you guys can guide me through the right direction:

  1. I CAN’T TAG the items Ex. [ Switchable ] so that they could be discovered by ALEXA, i had nothing on my items folder and on the jasondb it does not appear. i had a editor i found but when im trying to tag the items and get2019-07-30%2011_16_03-Media the message item not editable

using res/itmes it sais that is read only. :frowning: where is that file and how can i make writable so i can add tags??

{ā€œlinkā€:ā€œhttps://myopenhab.org/rest/items/sony_simpleip_c5ed1bd6_input",ā€œstateā€:ā€œHDMI4ā€,ā€œ*stateDescriptionā€:{ā€œpatternā€:ā€œ%sā€,ā€œreadOnlyā€:false,ā€œoptionsā€*:[]},ā€œeditableā€:false,ā€œtypeā€:ā€œStringā€,ā€œnameā€:ā€œsony_simpleip_c5ed1bd6_inputā€,ā€œlabelā€:ā€œInputā€,ā€œtagsā€:[],"groupNamesā€:}

Question number 2.

if insert in text hdm2 and and ticket the TV responds and switched to HDMI2 and if HDMI4 switches to HDMI4. So what kind of tag can i use so that i can expose this to ALEXA. according to tag control the type is a String

Thanks again everybody, im sure this could help some other people as well on this forum

2019-07-30%2011_20_03-Window

Trying to get around to everything that people have mentioned:

  1. Updated the first post to include the 2.4 build from @markus7017 and added the bundle:install for the xstream/joda
  2. Updated the release page to show the url as ā€œ{openhaburl}/sonyā€
  3. @Isiepel - as @nick_woodforth mentioned, there is a polling that happens. The APIs the TVs use do not implement instant notifications (websocket) like the AVRs and soundbars - hopefully Sony will do that eventually.
  4. @andirs - are you talking dial or scalar? If dial, they use to support an API that allowed me to get status updates but have been taking that away in later firmwares. I may need to revisit it to see if I can figure out a workaround
  5. @yortiz1979 - I’ve never tried tagging so hopefully someone else can help. Unless someone else can help, you probably need to get back to whomever wrote that tagcontrol (never seen that before) and ask them what makes an item not editable. If it’s something on my end I can fix, I will - just need to know the condition..
  6. @nick_woodforth - simple ip didn’t change at all so I don’t know why that would be slow. I’d love to see some logs from you about the things that didn’t work (with debug on). I’d need to see from discovery on..

I think that covers everyone?

Tim

2 Likes

hi tmrobert,

thank you for your answer, after lots of trying i got to the bottom of tagging and this is the aswer. if you ad item automatically they are in read mode hece you wont be able to tag them using the tool, i deleted al the automatic items and added manually and this did the trick after that i was able to tag the items. the only pending task now is what kind of tag and/or label can i use so that i can expose a string to ALEXA. according to tag control the type is a String

Hey Tim,
Nope, you missed me and @markus7017 ! :grinning:
Did you get a chance to respond re the log errors that appear with the 2.4 build from Markus?
Cheers!

Those errors have something to do with the 2.4 conversion and I’m working with @markus7017 on them a bit.

FYI - played with the DIAL protocol a bit and Sony definitely broke the protocol awhile back to prevent the ability to determine what is running and what isn’t (all apps always return ā€œstoppedā€ regardless if they are started or not). Can’t seem to find a way around it so we may be out of luck. Don’t know if @freke can file a report on this or not (PM if you need more info)

Just an FYI - found some issues in scalar tv channel switching that I’ll be addressing in the next drop

EDIT: also fixed an issue in DIAL application launching that @markus7017 found as well

Hi tmrobert8,

I am getting an error when trying to add the jar you provided:

2019-07-31 17:02:54.758 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/Users/PATH/openhab2/addons/org.openhab.binding.sony-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.sony [267]
  Unresolved requirement: Import-Package: com.google.gson; version="[2.8.0,3.0.0)"

	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]

@Jonas88
Look at the first post - I’ve started posting fixes for stuff like that..

1 Like

I am sorry. I must have missed that. Did as you said and rebooted.
TV got recognized and i’ll report back once i configured it.
Thank you very much for your great work!

Please note that I’ll likely be releasing a new version today with some critical fixes - so stay tuned

2 Likes

will do :slight_smile: i am just glad the tv shows up now in this version.

New release: Release 2.5-0731-01: [avmfritz] Added unit tests for templates (#5602) Ā· tmrobert8/openhab-addons Ā· GitHub

You’ll see the notes on the release page

Maybe usefull for developing, but before making a PR, you might want to adres the logging or rate of logging:

2019-08-01 10:27:19.344 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:27:19.536 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:27:29.381 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:27:29.551 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:27:39.416 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:27:39.572 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:27:49.451 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:27:49.590 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:27:59.487 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:27:59.609 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:28:09.524 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:28:09.627 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:28:19.561 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:28:19.646 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:28:29.600 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:28:29.664 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:28:39.635 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:28:39.684 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:28:49.674 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:28:49.700 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:28:59.711 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:28:59.715 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:29:09.733 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:29:09.744 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:29:19.755 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:29:19.773 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:29:29.775 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:29:29.802 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:29:39.797 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:29:39.831 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:29:49.816 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:29:49.861 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:29:59.838 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:29:59.892 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:30:09.860 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:30:09.922 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:30:19.880 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:30:19.953 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:30:29.900 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:30:29.982 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:30:39.919 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:30:40.014 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:30:49.940 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:30:50.045 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:30:59.961 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:31:00.076 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:31:09.984 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:31:10.106 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:31:20.003 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:31:20.138 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:31:30.024 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:31:30.168 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:31:40.063 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:31:40.200 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:31:50.084 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:31:50.234 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:32:00.104 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:32:00.266 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:32:10.123 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:32:10.295 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:32:20.144 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:32:20.325 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:32:30.159 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:32:30.355 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:32:40.181 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:32:40.388 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:32:50.199 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:32:50.421 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...
2019-08-01 10:33:00.220 [INFO ] [nding.sony.internal.ircc.IrccHandler] - Attempting connection to IRCC device...
2019-08-01 10:33:00.452 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web device...

And what does this mean?

2019-08-01 11:14:14.831 [INFO ] [rotocols.ScalarWebAppControlProtocol] - Can't get text form - no public key