AndroidTV Binding [3.2.0;4.2.0)

Awesome!

So, amazingly good news for everyone following the googletv part. As of about 5 minutes ago I have successfully recorded the protocol stack including all buttons between my phone and the shield (this was the really hard part, google WAY over engineered the encryption and authentication pieces). I have also confirmed that I can successfully execute the PIN process between OH and the shield. So given this, there is now absolutely no reason I can’t apply the recordings to the binding and make this work. We are definitely just at time on keyboard being the only thing holding this back.

2 Likes

@Norixone I looked at the spec for your receiver.
It looks like this is just a basic telent connection which is about as easy as it can get. You may just be able to use the tcp binding in Smarthome/J to send and receive the data. You can likely just write a bunch of rules to handle the exchange. Alternatively many bindings use the same kind of exchange via telnet so it’s not unheard of to just adapt one of those. Not signing up for it, Ive got plenty to do already, just saying it shouldn’t be very hard at all to implement.

@morph166955 Thanks for the suggestions. I have tried the TCP Smarthome/J, but I must say I have no clue on how to configure it and what to do with similar bindings. Currently I do not have much time to learn programming in java. If I do get some more time on my hands I will give it a shot.

Looking for some help from the crowd to find some extra buttons. Apparently, the app activates and deactivates a few things depending on the app they are in. For example, if you go into youtube the keyboard icon shows up at the top to allow for key entry on searches. I’ve also noticed youtube seems to activate some kind of remote control widget on my phone that is separate from the remote control app (and the commands seem to take a different path as they aren’t visible in the stream when I watch it). I’m looking for some volunteers to fire up the googletv app, connect to your androidtv devices, and poke around in different apps to see if any extra buttons show up. In particular, I really would love to find play/pause/forward/reverse/skip/stop/etc. Those haven’t made themselves apparent to me yet when looking in the apps I use. I’m worried that it’s going to be something like youtube which somehow fires up a separate control channel per-app. So if anyone has a few spare minutes and can go hunting that would be appreciated. Thanks!

I’m happy to give a go with my Sony TV. But probably won’t be able to get to it until some time on Sunday.

Oh thats perfectly fine. I’ve got days of work to integrate this protocol into the binding and test. I just know how important some of the buttons are so I don’t want to miss anything as I work through.

EDIT: So far Ive got U/D/L/R, Enter/Select, Home, Back, Vol Up/Down/Mute, Power Toggle, and Keyboard entry. Plus the rest of the info from the protocol. There isn’t an appdb like shieldtv has, just the current app DN. Anything beyond that would be greatly appreciated. Basically, if I can replicate and capture the commands here I can try to implement them on the binding. I just haven’t found them yet.

@morph166955 when you refer to the keyboard do you mean the one on screen or the one that pops up on the device?

Another thing I have noticed is that everytime you post an update, my openhab controls stop working. Is this normal?

Both the shieldtv and googletv apps provide a keyboard entry mechanism so you can send ascii characters to the device instead of hunting around one on screen.

Can you elaborate about the updates? Are you saying that when I post one your binding stops until you take some kind of manual action?

In my case when using the Shield Tv app, the keyboard that pops up regardless of the app used is the default one of the tablette.

If you post an up-date of the binding, the items linked to the KEY-PRESS channel stop working. This is the second time it happens so I would not define it a coincidence. Once I update the binding everything works as intended.
This happened with OH 3.4.1 and 3.4.2. OH is installed through a docker on a Qnap NAS.
Let me know if you want to know more about my setup.

@mhilbush have you ever seen that before? I can’t imagine why an update being posted would kill a channel.

I’ve not seen it. But I’m not entirely clear of the scenario.

I’m confused by this. I don’t know what is meant by “post an up-date of the binding, the items linked to the KEY-PRESS channel stop working”.

If I’m understanding correctly, when I update the first post with a new jar it seems to make the KEYPRESS channel inoperative until update/restart.

Maybe I can help :wink: When Morph provides a new binding and I am still on the old one, the items I have setup in the gui (in my case HabPannel) stop working. As soon as I uninstall the binding and install the new one everything works.
This also happened in Main Ui when ai was using it.
Hope to have explained myself in a more understandable manner.

And before you ask, also using the items within the “model” or the “thing” do not work until the update.

That’s a new one for me. One shouldn’t have anything to do with the other. I’d suggest you open an issue on github and report there. Feel free to tag me for awareness and link this post.

This still doesn’t make any sense to me. Are you installing the binding from the Marketplace, or are you dropping it in the addons directory? I’m dropping it in the addons directory, and I’ve not seen any issues like that.

@morph166955 I don’t know why this would be the case, and I really don’t know how the Marketplace works with respect to installing new versions of a binding. But could it have something to do with each new jar you push to the forum having a different file name?

Note I’m assuming @Norixone installs the binding from the Marketplace.

Good question @mhilbush. I use them to know what commit someone is on for troubleshooting. I’ll start a separate thread asking for clarification on the marketplace later.

I confirm that the binding was installed through the marketplace

Just to be thorough, has anyone else noticed this issue?

@Norixone If you’re familiar with the console, next time there’s a new binding release, can you run this in the console? Don’t run it until the issue with the items occurs. This command will show if there are multiple versions of the binding installed in your system.

list -s | grep androidtv

The other thing you could do (again when the issue occurs) is run this command from the userdata directory.

find . -name "*androidtv*.jar" -print