Sony Devices Binding for OH3

Out of curiosity, is it possible to control an Android TV based Sony TV using the Google TV app? Im working on a binding to incorporate Google TV and im curious if the Sony TVs may be a candidate for use. Thanks!

Yes, Sony Android TVs are supported by Google TV. I have 3 Sony Android TVs all works.

1 Like

Awesome. Thanks!

This is a Sony Device binding for OH4M1 question. I tried to upgrade to OH4M1 from OH3.4 and ran into a problem. I posted the issue on the OH4M1 thread here. The only binding I have from the Marketplace is the Sony binding, so based on the few posts after mine it could be an issue. Questions: Is the Sony binding OH4.0 capable at the present time? Could it be made capable with the

If the developer compiles the jar with the following options it will work on 3.2.0 through 4.0.0

-Dohc.version=3.2.0 -Dmaven.compiler.source=11 -Dmaven.compiler.target=11 -Dkaraf.version=4.3.7

Lastly it did seem to work even with the log errors, but I reverted back to 3.4 due to another problem.

I know you picked this up reluctantly, just looking for information at this point. Also would be willing to test something if that is needed.

I built a version of the Sony binding for 4.0 and had been running it since very early 4.0 snapshots. But I no longer use it because I now use the AndroidTV binding (my Sony TV is Android-based), and because the Sony binding is pretty much unmaintained and extremely complex.

Fortunately I didn’t delete the branch. Feel free to clone it and build yourself a 4.0 version.

For anyone interested in switching…

This should work on any AndroidTV based device as long as GoogleTV is installed.

I wouldn’t say the Sony binding is pretty unmaintained :wink:
I will continue fixing reported issues and adopting it to the latest OH releases for the time being.

However, if this binding is just used for a Sony TV with Android or Google TV support, than there might be no good reason not to switch to the AndroidTV binding.

I’m still wondering if this should be applied as a different kind of protocol use case like we do with ShieldTV’s on the AndroidTV binding. GoogleTV gives us a good bit, but we are still missing some things (like ability to have more than RO awareness of apps). On the Shield, we interact with both protocol sets (with Google being primary when possible) to get the most data we can about the device. For apps, we are able to send app start requests to it via the Shield protocol. As there is extensive work here on the protocol, I’m curious if we could pull the missing bits from Sony (not the whole thing, it’s WAY to complex) in as another protocol in the stack and just garner what we need from it that we don’t get from Google.

Forgive me for asking the stupid questions, I don’t have a Sony TV. How many Sony TVs are AndroidTV based from the perspective of what this binding supports? Is it a majority or are the AndoidTVs just a small subset?

I’m sorry. That was a bad choice of words.

No problem. I just wanted to clarify that this binding is still maintained on a ‘keep the lights on’ level.

I would assume that AndroidTV based Sony TVs are the majority. The rollout of the AndroidTV platform started in 2015, and this bindings supports models that were released from ~2011 on.

However, it might be that the most recent models come without support for the used protocols (notably ScalarAPI), thus wouldn’t work with this binding.

I’ll take that as good news then.

@mhilbush You’ve been tracking both bindings for a while now. The only thing I really get from the ShiledTV protocol is the appdb and app control (minus some metadata). Is there a (small) piece of this binding we could pull in to AndroidTV that would accomplish those goals? I really don’t want to try to integrate the whole protocol stack, it’s EXTENSIVE from what I can see. I think the only “other thing” if I’m remembering our conversations was control/information about the specific input (HDMI1/HDMI2/etc).

Honestly, I know very little about the binding. I used only a tiny percentage of it (basically, power, volume, mute), and other than compiling it for 4.0, I know virtually nothing about the internals.

Yes, it would be nice if the androidtv binding had a way to select the input source. OTOH I can’t recall if the Sony binding let you select the input source.

Thanks for the code. My Sony is a later model (google/android). I think I’ll migrate to that. I really only use the binding to trigger the living room lights when the TV goes off/on. Of all my home automations, that is the only one my wife really likes :wink:

1 Like

The input source can be directly selected with the scalar thing via the channel ‘avContent#tm_source-main’.

1 Like

Is that the same protocol thats not working on newer models?

The direct selection of the input source is possible with the SimpleIP and the Scalar/REST protocol.

I actually don’t know whether the newer models still support these protocols.
I’ve looked up the web manual of a fairly recent model, and the fact that the networks settings still have an ‘enable remote control’ option might indicate that this is still the case.

My hope was that the compatibility existed using the keycodes on the GoogleTV protocol. In the 240s there are ones calling out inputs. Unfortunately they don’t seem to work from the testing done so far. If anyone wants to jam at it please let me know if you have any success.

As far as knowing what input you’re on, that’s going to be sony specific. From what I can tell from the testing @mhilbush did, all of the TV bits seem to exist inside a Sony app, not at the OS where they’re exposed.

Before I go down the development road and burn some time, is there anyone here who is picking this up to maintain it long term and/or get it merged in? If not, I’m strongly considering pulling the existing code into the AndroidTV binding similar to how the Nvidia ShieldTV exists. If no one otherwise has any issues with it, and no one is otherwise standing up to take ownership of this, I think this fits somewhat cleanly inside AndroidTV as it seems that the majority of the current Sony TVs are all AndroidTV based. Thoughts from the users of this?

I’m comitted to maintain this binding and to offer it on the marketplace as long as there is a demand from the community. Although I’ve tried to follow the OH coding practices when adopting the code, I think it would not worth the effort to merge it into the offical sources because of the somehow idiosyncratic implementation, its complexity, and the foreseeable end of life of the supported devices or protocols.

But this shouldn’t stop you from trying to pull code from this into the AndroidTV binding (possibly/likely with refactoring) to offer a ‘full service’ solution. If you decide for it and need help or support just let me know.