Sony Devices Binding

ah ok, so i can delete this dial thing ?

Yes if you donā€™t plan on starting apps with itā€¦

1 Like

@tmrobert8 - thanks for that. Just set it up now. Also thereā€™s a typo in the log instructions. The sequence is one word off - log**:**set debug org.openhab.binding.sony

Using org.openhab.binding.sony-2.5.2-SNAPSHOT.jar
Steps

  1. Logging & Debug Enabled.
  2. Turned off dial, simpleip and ircc again in runtime.cfg
  3. Deleted any existing things in OH.
  4. Deleted Registered remote TV - previous successful registration using dial protocol yesterday.
  5. Shutdown OH, removed sony.log, started OH back up.

  1. KDL-65W850A detected in inbox, added as thing using PaperUI.
  2. TV Flashed up registration code 8-10 times or so. Left while writing this up, and request subsequently cancelled, and further code requests flashed up and cancelled. Left again before timeout reached - auto cancelled and repeated code request+cancel sequence again.
  3. Noted there were some linked items from previous testing still showing. Unlinked items.
  4. Tried to enter code - auto cancelled and prompted for another.
  5. tried to enter new code after countdown got to 30s left. no reaction, countdown timed out.
  6. Changed back to RQST code request - flashed up another 8-10 times with code requests appearing, cancelling, and new code request. Left ~15 seconds, auto cancelled, and repeated again.
  7. Thing deleted timestamp 23-Jan-2020 20:27:19.066

  1. BDV-N9200W detected in inbox. Added as thing using PaperUI. Device appears as online.
  2. Thing Channels only list ā€˜Power Statusā€™ and ā€˜IRCC Commandsā€™ - nothing else.
  3. Update Code to 1111 - device still shows as online.
  4. Update Code to RQST (timestamp 23-Jan-2020 20:32) - device still shows as online, no additional channels.
  5. Deleted thing and shutdown OH.

The capabilities & types files for both had already been created from earlier testing and werenā€™t deleted in advance for this round of testing. I have previously cleared the userdata/sony folder without success.

Log file at: sony.log

Thx.
Jp.

@jpwise still analyzing your log but I can tell you about the BDV-N9200W.

Very interesting device - quite unlike anything Iā€™ve seen.

First

What do you mean by ā€œthereā€™s no outputā€. If you mean that nothing changes on the device - I actually need you to perform those actions so I can seem them in the log. As far as I can tell from the log, you let it go online and didnā€™t perform any actions.

Second
Doesnā€™t appear this device needs authentication (for scalar) - so you can ignore that part

Third
Interestingly - it has a very limited scalar implementation. You probably should be getting a third channel (sound settings) but Iā€™m ignoring it because you device returns something interesting for that. Iā€™ll be making a change to hopefully enable it.

Forth
Your device has a completely new service Iā€™ve never seen before - illumination settings. I may implement that one as well since it follows the same protocol as sound settings. I may need your help on that one however (Iā€™ll send you a private PM)

Fifth
Did you try IRCC on it? Looks like this has the expanded IRCC protocol that will allow you to view your disc information. Surprisingly - scalar doesnā€™t support that info but it looks like your IRCC does (same with using DIAL for apps - for some reason they didnā€™t implement the scalar part).

Iā€™ll be looking into the TV issues laterā€¦

The issue with your TV is that the getPowerStatus doesnā€™t seem to be protected (like it is with every other device!). Because of that - it doesnā€™t detect that it needs authentication and tries to go online - which then various calls fail because of authentication is needed (and it will try to autoauthenticate - causing the flashing on your screen).

Iā€™ll need to change the authentication logic a bit to adjust for yoursā€¦

Hey

I just upgraded to the new binding org.openhab.binding.sony-2.5.2-SNAPSHOT.jar

My TV is the KD-49XD8088.
Before the update i was controlling the volume via the Scalar API, but the headphones-volume option seems to have disapeared?

I tried controlling the volume via the simpleIP instead but it doesnā€™t work at all :(.
Whenever i change the volume of the item linked to the channel the volume indicator appears on the tv but doesnt change it.

Changing the tv volume manually doesnt update the item either.

Whenever i turn the TV off via the item State goes to 0, when i turn it back on it changes it to whatever value i had previously as the item State and not the tv volume.

I had this issue with previous versions of the binding, but using the scalar volume option worked fine.

Everything else works great though, keep up the good work :slight_smile:
Thnx
Jake

Known issue that custom thing types will eventually fix permanently (not at that point yet). The workaround, right now, is to make sure the TV is on when you start openHAB (or otherwise bring the thing online). The audio service tends to not respond when the TV is off - so having it ON will properly set the thing up correctly. Again - in the future Iā€™ll release custom thing types that get around this but thatā€™s the work around for now.

SimpleIP volume is a pain (my TV does the same thing). The addon is doing it correctly, the TV simply ignores it. I forget right now but it has something to do with either the mode the TV is in or some setting. If I remember, Iā€™ll post it.

@tmrobert8 - going through the list in order.

Valid - i hadnā€™t actually tried switching it.
Linking both visible channels - power links as switch and power off does trigger a power off. IRCC command presumably is an input only, no output string is shown.
Power back on doesnā€™t respond - log shows no ip/mac for WOL packet. Manually copying the mac from the thing properties in : separated format and re-testing does trigger a WOL packet to be sent, but as itā€™s Wifi interfaced (unsurprisingly) it doesnā€™t wake. The two wakes logged are from CEC wakeup via TV remote.

Results Logged - sony-bdv-n9200-scalar.log

Noted - for oddball devices like this is there any way to trigger IRCC to be enabled automatically if itā€™s detected to be a better protocol - possibly from the github profile stuff i saw mentioned?
Interestingly enough it does still have registered remotes in the network settings. The very early work you did on the binding did have it as registered and i deleted it when i started re-tsting.

Agreed - that was the first thing i noted. As itā€™s a surround sound unit the lack of anything other than power and a command string made me think it wasnā€™t talking to it properly.

No worries - provided iā€™m not tied up with anything, happy to test and log as required.

Shutting down, clearing sony.log, and starting back up using IRCC.
After adding as IRCC - device has come online automatically - without prompting for authentication.
Primary channels are IRCC Power, and IRCC Command. With some additional channels for Viewing Channels, and Contents Channels. Although notably still missing Sound/Volume - which being a surround sound unit - is one of its main features. Reported mac address in properties is also different - which is unusual.
Linking IRCC Power, and some of the title channels - no response to power switch attempt, and no displayed title.

Results Logged - sony-bdv-n9200-ircc.log

Also tried some testing using dial, added as online, displayed apps, but when i tried linking the test one didnā€™t seem to link properly - no visible switch in PaperUI control to do anything. Probably not relevant, but logged for completeness.
Results Logged - sony-bdv-n9200-dial.log

Also like many others have said, thank you for your work on this. Iā€™ve been watching the thread with interest over the past ?year? as the plans in progress were announced and subsequently released. :slight_smile:

Unfortunately no - Iā€™m VERY limited with discovery here.

Maybe - Iā€™ve noted that some devices will turn off the audio service when the device is off. Make sure the device is ON when you bring the thing online (or start openHAB) so we can hopefully discover the audio service. If that happens - this is another device that is a good candidate for the custom thing type (ie github stuff) as I can specify audio channels for the device regardless of itā€™s power state.

Hello,
I use the scalar Bindung and everything works fine.
For the most commands (Button up, down, etc) i use the ircc commands.
Unfortunately there is a delay between pushing the button an the reaction of the TV from 1-5 seconds.
this can be really annoying.
any ideas to improve this behaviour?

Edit:
I use the ircc-Thing instead of webscalar for ircc commands. That is significant fasterā€¦!

All TV testing was done with the home screen for the TV up. Same for the BDV-N9200 testing - home of the blu-ray menu So fully awake, and the TV using Audio Device (surround) for output via the audio return channel. So should have been fully online. Once Iā€™ve had a chance to test the new copy Iā€™ll let you know what the outcome is. Thx again.

If you see IRCC as faster, itā€™s likely that your are issuing commands around when scalar is polling. Are you running on a PI by any chance?

Hi,
how much the first post is actual, when Iā€™m on the latest OH2.5.1-2 testing version?
The following items give me errors:

com.google.gson requirement: bundle:install http://central.maven.org/maven2/com/google/code/gson/gson/2.8.5/gson-2.8.5.jar
xstream requirement: bundle:install http://central.maven.org/maven2/org/apache/servicemix/bundles/org.apache.servicemix.bundles.xstream/1.4.7_1/org.apache.servicemix.bundles.xstream-1.4.7_1.jar
joda-time requirement: bundle:install http://central.maven.org/maven2/joda-time/joda-time/2.10.3/joda-time-2.10.3.jar

First post still is relevant (as far as I know) - however check out Sony Devices Binding as he had issues with the URLsā€¦

Yesterday i updated my tv (KD55AF9) with new firmware (android 9) and since then things are not working anymore.
The log shows the following and keeps repeating:

2020-02-04 17:05:46.861 [hingStatusInfoChangedEvent] - ā€˜sony:scalar:faf1bf5f48f7ā€™ changed from OFFLINE (COMMUNICATION_ERROR): Unhandled exception connecting to Scalar Web device (may need to turn it on manually): Cannot convert ScalarWebResult for class org.openhab.binding.sony.internal.scalarweb.models.api.SupportedApi with results: [[]] to UNKNOWN: Initializing ā€¦

2020-02-04 17:05:47.242 [hingStatusInfoChangedEvent] - ā€˜sony:scalar:faf1bf5f48f7ā€™ changed from UNKNOWN: Initializing ā€¦ to OFFLINE (COMMUNICATION_ERROR): Unhandled exception connecting to Scalar Web device (may need to turn it on manually): Cannot convert ScalarWebResult for class org.openhab.binding.sony.internal.scalarweb.models.api.SupportedApi with results: [[]]

==> /var/log/openhab2/openhab.log <==

2020-02-04 17:05:57.248 [INFO ] [.internal.scalarweb.ScalarWebHandler] - Attempting connection to Scalar Web deviceā€¦

Any advice? Already restarted OH, removed the binding, deleted the userdata/sony directory but nothing seems to work.

Using the 2.5.2 jar

Need more of a log sent to me (so I can see the calls and their results). You can use send.firefox.com to send me the logā€¦

Done

Yep - going to have to make a change for you - your TV is giving me a really weird response (as I pmā€™d you)

Thanks for the quick response. Iā€™ll wait for a new version then. If you need more logs or any other help to make a fixā€¦ Just let me know.

New release - https://github.com/tmrobert8/openhab-addons/releases/tag/2.5-02-04-1

I need everyone to test this if you can. This release mainly has review fixes and I want to make sure it still works for everyoneā€¦

Changes

  1. Many review changes (too many to say)
  2. Fix to simpleip (may fix the issue where issue a command does nothing)
  3. A few new setting type channels in scalar (should have implemented them all now)
  4. For soundbars/AVRS that support notifications - removed status polling for those items that we are being notified on (optimization)
  5. New storage channels on system service. If your device supports storage (which bravias may not support this api even though they have storage), new channels allow you to get information for the storage. Most importantly - allows you to create rules when something is mounted or unmounted. See readme for details
  6. Fixes for above issues (@Nils_Rietveld weird tv!, @jpwise BDV issues, etc)

Probably some more that Iā€™m forgetting - but please test it out and let me know if you have any issues. We are getting closer to the end of the reviews and Iā€™d rather not have a bug (from a review change) making itā€™s way into the merged versionā€¦

Tim

2 Likes