AndroidTV Binding [3.2.0;4.2.0)

@morph166955 only in the userdata folder. In add-ons I have nothing other than bindings I drop into it. For the Android TV binding I am always using the marketplace.

That’s just the keystores. We load those at the time the binding starts/restarts and then keep it in memory. Those don’t change either as you go version to version (it’s what the PIN ties to so we keep it so you don’t have to redo the PIN process). The only one you need now is androidtv. shieldtv is an artifact from the original binding before it was renamed.

Something has gone wrong. I am not able to get the Shield online again:

2023-03-01 18:08:27.236 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘SHIELD_763c047c_Pin_Code’ received command REQUEST
2023-03-01 18:08:27.237 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item ‘SHIELD_763c047c_Pin_Code’ predicted to become NULL
2023-03-01 18:08:57.176 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘androidtv:shieldtv:763c047c’ changed from OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: Initializing to OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: reconnecting
2023-03-01 18:08:57.209 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘androidtv:shieldtv:763c047c’ changed from OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: reconnecting to OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: Initializing
2023-03-01 18:09:17.737 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘SHIELD_763c047c_Pin_Code’ received command 009348
2023-03-01 18:09:17.738 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item ‘SHIELD_763c047c_Pin_Code’ predicted to become NULL
2023-03-01 18:10:37.216 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘androidtv:shieldtv:763c047c’ changed from OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: Initializing to OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: reconnecting
2023-03-01 18:10:37.245 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘androidtv:shieldtv:763c047c’ changed from OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: reconnecting to OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: Initializing

The code on the tv goes away as soon as I pass on the PIN, but then OH no longer connects.

Can you please put the binding into trace log, capture the interaction, and send it to me so I can see what’s happening. Also, I’ve noticed that on occasion I need to power cycle my shield to clear up issues (happened to me yesterday).

EDIT: Apparently I lied. For those who still want to build hybrid builds, this seems to work on snapshots above 3336

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

https://github.com/morph166955/openhab-addons/releases/download/androidtv-beta/org.openhab.binding.androidtv-3.2.0-4.0.0-SNAPSHOT-c6f7682.jar has been pushed to the main thread. This should work with the recent karaf updates and (hopefully) fixes the issue where users on devices that don’t send certificate_unknown (e.g. the phillips tv mentioned above) would have to send REQUEST twice.

2023-03-02 19:46:37.471 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - ShieldTv - Opening ShieldTV SSL connection to 192.168.2.238:8987
2023-03-02 19:46:37.691 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - Assuming server certificate is valid
2023-03-02 19:46:37.699 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - ShieldTv - Starting ShieldTV keepalive job with interval 5
2023-03-02 19:46:37.699 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - ShieldTv - Message reader thread started
2023-03-02 19:46:37.699 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - ShieldTv - Command sender thread started
2023-03-02 19:47:33.898 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - PIN Process Started
2023-03-02 19:48:17.708 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - ShieldTv - Attempting to reconnect to the ShieldTV
2023-03-02 19:48:17.708 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - ShieldTv - Disconnecting ShieldTV
2023-03-02 19:48:17.709 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - ShieldTv - Command sender thread exiting
2023-03-02 19:48:17.710 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - ShieldTv - Opening ShieldTV SSL connection to 192.168.2.238:8987
2023-03-02 19:48:17.739 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - Assuming server certificate is valid
2023-03-02 19:48:17.745 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - ShieldTv - Starting ShieldTV keepalive job with interval 5
2023-03-02 19:48:17.745 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - ShieldTv - Message reader thread started
2023-03-02 19:48:17.746 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - ShieldTv - Message reader thread exiting
2023-03-02 19:48:17.746 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - ShieldTv - Command sender thread started

Tried with the latest binding

This is from the event log

ShieldTV: Initializing to OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: reconnecting
2023-03-02 19:48:17.745 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘androidtv:shieldtv:ShieldTv’ changed from OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: reconnecting to OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: Initializing
2023-03-02 19:48:30.595 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘SHIELD_TV_Pin_Code’ received command 652420
2023-03-02 19:48:30.596 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item ‘SHIELD_TV_Pin_Code’ predicted to become NULL
2023-03-02 19:49:57.759 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘androidtv:shieldtv:ShieldTv’ changed from OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: Initializing to OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: reconnecting
2023-03-02 19:49:57.803 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘androidtv:shieldtv:ShieldTv’ changed from OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: reconnecting to OFFLINE: GoogleTV: PIN Process Incomplete | ShieldTV: Initializing

Hey @Norixone I really need to see the trace level messages. It’s a bit more verbose than debug so I can see where this is crashing.

@morph166955 here you go

2023-03-02 20:24:17.945 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:24:17.945 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:24:17.946 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:24:17.947 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:24:17.949 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07
2023-03-02 20:24:17.950 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.
2023-03-02 20:24:22.948 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:24:22.948 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:24:22.949 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:24:22.959 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:24:22.959 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.
2023-03-02 20:24:22.960 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07
2023-03-02 20:24:27.950 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:24:27.950 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:24:27.951 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:24:27.952 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:24:27.952 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.
2023-03-02 20:24:27.954 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07
2023-03-02 20:24:32.950 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:24:32.951 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:24:32.952 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:24:32.953 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:24:32.953 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.
2023-03-02 20:24:32.956 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07
2023-03-02 20:24:37.951 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:24:37.952 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:24:37.953 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:24:37.954 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:24:37.954 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.
2023-03-02 20:24:37.956 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07
2023-03-02 20:24:42.952 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:24:42.953 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:24:42.954 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:24:42.954 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:24:42.955 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.

@morph166955 second part

2023-03-02 20:24:42.956 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07
2023-03-02 20:24:47.953 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:24:47.954 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:24:47.955 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:24:47.955 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:24:47.956 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.
2023-03-02 20:24:47.957 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07
2023-03-02 20:24:52.954 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:24:52.955 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:24:52.955 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:24:52.957 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:24:52.957 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.
2023-03-02 20:24:52.960 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07
2023-03-02 20:24:53.970 [TRACE] [.androidtv.internal.AndroidTVHandler] - 763c047c - Command received at handler: pincode REQUEST
2023-03-02 20:24:53.971 [TRACE] [l.googletv.GoogleTVConnectionManager] - 763c047c - Command received: pincode
2023-03-02 20:24:53.972 [TRACE] [l.googletv.GoogleTVConnectionManager] - 763c047c - Command received: pincode
2023-03-02 20:24:57.955 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:24:57.956 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:24:57.956 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:24:57.957 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:24:57.958 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.
2023-03-02 20:24:57.959 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07
2023-03-02 20:25:02.956 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:25:02.956 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:25:02.957 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:25:02.958 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:25:02.958 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.
2023-03-02 20:25:02.959 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07
2023-03-02 20:25:07.957 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:25:07.957 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:25:07.958 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:25:07.959 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:25:07.959 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.
2023-03-02 20:25:07.961 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07

@morph166955

2023-03-02 20:28:36.202 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: f50e0a600a AppDN: com.lonelycatgames.Xplore
2023-03-02 20:28:36.202 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: X-plore AppURL: http://192.168.2.238:43497/com.lonelycatgames.Xplore
2023-03-02 20:28:36.202 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a550a AppDN: com.android.vending
2023-03-02 20:28:36.202 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Play Store AppURL: http://192.168.2.238:43497/com.android.vending
2023-03-02 20:28:36.203 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a5f0a AppDN: com.android.tv.settings
2023-03-02 20:28:36.203 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Impostazioni AppURL: http://192.168.2.238:43497/com.android.tv.settings
2023-03-02 20:28:36.203 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a570a AppDN: com.android.gallery3d
2023-03-02 20:28:36.203 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Galleria AppURL: http://192.168.2.238:43497/com.android.gallery3d
2023-03-02 20:28:36.204 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a560a AppDN: com.disney.disneyplus
2023-03-02 20:28:36.204 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Disney+ AppURL: http://192.168.2.238:43497/com.disney.disneyplus
2023-03-02 20:28:36.204 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a450a AppDN: org.xbmc.kodi
2023-03-02 20:28:36.204 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Kodi AppURL: http://192.168.2.238:43497/org.xbmc.kodi
2023-03-02 20:28:36.204 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a660a AppDN: com.google.android.youtube.tv
2023-03-02 20:28:36.205 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: YouTube AppURL: http://192.168.2.238:43497/com.google.android.youtube.tv
2023-03-02 20:28:36.205 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a720a AppDN: com.amazon.amazonvideo.livingroom
2023-03-02 20:28:36.205 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Prime Video AppURL: http://192.168.2.238:43497/com.amazon.amazonvideo.livingroom
2023-03-02 20:28:36.205 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a560a AppDN: com.mgmedia.androidApp
2023-03-02 20:28:36.206 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: CHILI AppURL: http://192.168.2.238:43497/com.mgmedia.androidApp
2023-03-02 20:28:36.206 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a4e0a AppDN: com.netflix.ninja
2023-03-02 20:28:36.206 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Netflix AppURL: http://192.168.2.238:43497/com.netflix.ninja
2023-03-02 20:28:36.206 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a520a AppDN: it.rainet.androidtv
2023-03-02 20:28:36.206 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: RaiPlay AppURL: http://192.168.2.238:43497/it.rainet.androidtv
2023-03-02 20:28:36.206 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a5d0a AppDN: com.nvidia.tegrazone3
2023-03-02 20:28:36.207 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: NVIDIA Games AppURL: http://192.168.2.238:43497/com.nvidia.tegrazone3
2023-03-02 20:28:36.207 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a660a AppDN: com.google.android.youtube.tv
2023-03-02 20:28:36.207 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: YouTube AppURL: http://192.168.2.238:43497/com.google.android.youtube.tv
2023-03-02 20:28:36.207 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a450a AppDN: org.xbmc.kodi
2023-03-02 20:28:36.208 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Kodi AppURL: http://192.168.2.238:43497/org.xbmc.kodi
2023-03-02 20:28:36.208 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a560a AppDN: com.disney.disneyplus
2023-03-02 20:28:36.208 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Disney+ AppURL: http://192.168.2.238:43497/com.disney.disneyplus
2023-03-02 20:28:36.208 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a620a AppDN: com.google.android.videos
2023-03-02 20:28:36.209 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Play Film AppURL: http://192.168.2.238:43497/com.google.android.videos
2023-03-02 20:28:36.209 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a600a AppDN: com.lonelycatgames.Xplore
2023-03-02 20:28:36.209 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: X-plore AppURL: http://192.168.2.238:43497/com.lonelycatgames.Xplore
2023-03-02 20:28:36.209 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a5d0a AppDN: com.nvidia.tegrazone3
2023-03-02 20:28:36.209 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: NVIDIA Games AppURL: http://192.168.2.238:43497/com.nvidia.tegrazone3
2023-03-02 20:28:36.209 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a550a AppDN: com.android.vending
2023-03-02 20:28:36.209 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Play Store AppURL: http://192.168.2.238:43497/com.android.vending
2023-03-02 20:28:36.209 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a4e0a AppDN: com.netflix.ninja
2023-03-02 20:28:36.210 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Netflix AppURL: http://192.168.2.238:43497/com.netflix.ninja
2023-03-02 20:28:36.210 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppPrepend: 30010a570a AppDN: com.android.gallery3d
2023-03-02 20:28:36.210 [DEBUG] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - AppName: Galleria AppURL: http://192.168.2.238:43497/com.android.gallery3d
2023-03-02 20:28:36.216 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - MP appNameDB: {com.google.android.katnisspx=Google app for Android TV (Pictures), com.google.android.youtube.tv=YouTube, com.netflix.ninja=Netflix, com.google.android.tvlauncher=Android TV Home, com.nvidia.tegrazone3=NVIDIA Games, com.android.tv.settings=Impostazioni, com.google.android.katniss=Google app for Android TV, com.android.vending=Play Store, com.android.gallery3d=Galleria, com.google.android.backdrop=Backdrop Daydream, com.google.android.videos=Play Film, com.mgmedia.androidApp=CHILI, com.lonelycatgames.Xplore=X-plore, com.disney.disneyplus=Disney+, com.amazon.amazonvideo.livingroom=Prime Video, it.rainet.androidtv=RaiPlay, org.xbmc.kodi=Kodi} sortedAppNameDB: {com.google.android.tvlauncher=Android TV Home, com.google.android.backdrop=Backdrop Daydream, com.mgmedia.androidApp=CHILI, com.disney.disneyplus=Disney+, com.android.gallery3d=Galleria, com.google.android.katniss=Google app for Android TV, com.google.android.katnisspx=Google app for Android TV (Pictures), com.android.tv.settings=Impostazioni, org.xbmc.kodi=Kodi, com.nvidia.tegrazone3=NVIDIA Games, com.netflix.ninja=Netflix, com.google.android.videos=Play Film, com.android.vending=Play Store, com.amazon.amazonvideo.livingroom=Prime Video, it.rainet.androidtv=RaiPlay, com.lonelycatgames.Xplore=X-plore, com.google.android.youtube.tv=YouTube} appURLDB: {com.google.android.katnisspx=, com.google.android.youtube.tv=http://192.168.2.238:43497/com.google.android.youtube.tv, com.netflix.ninja=http://192.168.2.238:43497/com.netflix.ninja, com.google.android.tvlauncher=, com.nvidia.tegrazone3=http://192.168.2.238:43497/com.nvidia.tegrazone3, com.android.tv.settings=http://192.168.2.238:43497/com.android.tv.settings, com.google.android.katniss=, com.android.vending=http://192.168.2.238:43497/com.android.vending, com.android.gallery3d=http://192.168.2.238:43497/com.android.gallery3d, com.google.android.backdrop=, com.google.android.videos=http://192.168.2.238:43497/com.google.android.videos, com.mgmedia.androidApp=http://192.168.2.238:43497/com.mgmedia.androidApp, com.lonelycatgames.Xplore=http://192.168.2.238:43497/com.lonelycatgames.Xplore, com.disney.disneyplus=http://192.168.2.238:43497/com.disney.disneyplus, com.amazon.amazonvideo.livingroom=http://192.168.2.238:43497/com.amazon.amazonvideo.livingroom, it.rainet.androidtv=http://192.168.2.238:43497/it.rainet.androidtv, org.xbmc.kodi=http://192.168.2.238:43497/org.xbmc.kodi}
2023-03-02 20:28:36.216 [DEBUG] [l.shieldtv.ShieldTVConnectionManager] - App DB Populated
2023-03-02 20:28:36.216 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - Handler appNameDB: {com.google.android.tvlauncher=Android TV Home, com.google.android.backdrop=Backdrop Daydream, com.mgmedia.androidApp=CHILI, com.disney.disneyplus=Disney+, com.android.gallery3d=Galleria, com.google.android.katniss=Google app for Android TV, com.google.android.katnisspx=Google app for Android TV (Pictures), com.android.tv.settings=Impostazioni, org.xbmc.kodi=Kodi, com.nvidia.tegrazone3=NVIDIA Games, com.netflix.ninja=Netflix, com.google.android.videos=Play Film, com.android.vending=Play Store, com.amazon.amazonvideo.livingroom=Prime Video, it.rainet.androidtv=RaiPlay, com.lonelycatgames.Xplore=X-plore, com.google.android.youtube.tv=YouTube} appURLDB: {com.google.android.katnisspx=, com.google.android.youtube.tv=http://192.168.2.238:43497/com.google.android.youtube.tv, com.netflix.ninja=http://192.168.2.238:43497/com.netflix.ninja, com.google.android.tvlauncher=, com.nvidia.tegrazone3=http://192.168.2.238:43497/com.nvidia.tegrazone3, com.android.tv.settings=http://192.168.2.238:43497/com.android.tv.settings, com.google.android.katniss=, com.android.vending=http://192.168.2.238:43497/com.android.vending, com.android.gallery3d=http://192.168.2.238:43497/com.android.gallery3d, com.google.android.backdrop=, com.google.android.videos=http://192.168.2.238:43497/com.google.android.videos, com.mgmedia.androidApp=http://192.168.2.238:43497/com.mgmedia.androidApp, com.lonelycatgames.Xplore=http://192.168.2.238:43497/com.lonelycatgames.Xplore, com.disney.disneyplus=http://192.168.2.238:43497/com.disney.disneyplus, com.amazon.amazonvideo.livingroom=http://192.168.2.238:43497/com.amazon.amazonvideo.livingroom, it.rainet.androidtv=http://192.168.2.238:43497/it.rainet.androidtv, org.xbmc.kodi=http://192.168.2.238:43497/org.xbmc.kodi}
2023-03-02 20:28:36.217 [TRACE] [.androidtv.internal.AndroidTVHandler] - 763c047c - Updating CDP for app
2023-03-02 20:28:36.217 [TRACE] [.androidtv.internal.AndroidTVHandler] - 763c047c - CDP List: [CommandOption [command=com.google.android.tvlauncher, label=Android TV Home], CommandOption [command=com.google.android.backdrop, label=Backdrop Daydream], CommandOption [command=com.mgmedia.androidApp, label=CHILI], CommandOption [command=com.disney.disneyplus, label=Disney+], CommandOption [command=com.android.gallery3d, label=Galleria], CommandOption [command=com.google.android.katniss, label=Google app for Android TV], CommandOption [command=com.google.android.katnisspx, label=Google app for Android TV (Pictures)], CommandOption [command=com.android.tv.settings, label=Impostazioni], CommandOption [command=org.xbmc.kodi, label=Kodi], CommandOption [command=com.nvidia.tegrazone3, label=NVIDIA Games], CommandOption [command=com.netflix.ninja, label=Netflix], CommandOption [command=com.google.android.videos, label=Play Film], CommandOption [command=com.android.vending, label=Play Store], CommandOption [command=com.amazon.amazonvideo.livingroom, label=Prime Video], CommandOption [command=it.rainet.androidtv, label=RaiPlay], CommandOption [command=com.lonelycatgames.Xplore, label=X-plore], CommandOption [command=com.google.android.youtube.tv, label=YouTube]]
2023-03-02 20:28:40.053 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:28:40.054 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:28:40.054 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:28:40.055 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:28:40.055 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.
2023-03-02 20:28:40.057 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07
2023-03-02 20:28:45.054 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Sending ShieldTV keepalive query
2023-03-02 20:28:45.055 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 080028fae0a6c0d130
2023-03-02 20:28:45.055 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Raw ShieldTV command decodes as: 08ec0712020806
2023-03-02 20:28:45.056 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 080028fae0a6c0d130
2023-03-02 20:28:45.056 [TRACE] [l.shieldtv.ShieldTVConnectionManager] - 763c047c - Canceling ShieldTV scheduled reconnect job.
2023-03-02 20:28:45.057 [TRACE] [tocol.shieldtv.ShieldTVMessageParser] - 763c047c - Received ShieldTV message from: SHIELD - Message: 08ec07122a08072226220569745f4954421d636f6d2e676f6f676c652e616e64726f69642e74766c61756e6368657218ec07

@Norixone that all looks normal and isn’t showing any signs of disconnecting. It also looks like the PIN is already done and you’re logged in. Was there anything else in the logs? I’m not seeing the logs I’d expect to see around a disconnect/reconnect.

I think it is an issue with the access to the folders following the update to 3.4.2. As I worte in a previous post, for some reason even if I unistalled the binding, the Shield would remain connected. After the last binding up-date everything stopped working and was never able to get it to function again ever since. I will re-install everything from zero. Just need to find some time. I will let you know if that worked once I’m done. Thank you for your support.

I should see permission issues of you do:

bundle:list -s | grep android

bundle:stop (number from the list)
bundle:start (number)

The trace logs will tell me if its barfing on the keystore reads. The fact that you see the apps list out means at some point you logged in. That’s a privileged command.

To note, the keystores on both my dev system (ubuntu) and my production (docker on synology) are owned by root.

So after many hours of testing and trying various things I confirm I am having an issue with the permission.
Any version I now try to boot within the docker I get the following error

exec gosu openhab tini -s ./start.sh
error: exec: “tini”: executable file not found in $PATH

I tried by booting with exec gosu openhab ./start.sh but get the permission error. Any idea on how to get around this would be greatly appreciated.

No idea. Suggest you open a separate thread to get the right peoples attention.

I can confirm that Pairing does now work with 1x REQUEST

But I have another problem now:

Power OFF command does somehow not work anymore. I see the switch item connected to Channel changes to OFF, but TV does not power off.

This is the command I send to this item:

items.getItem("Philips_TV").sendCommand("OFF");

But also if I switch the item manually the TV does not switch off.

I don’t see anything abnormal in Log:

2023-03-03 16:27:51.056 [TRACE] [.androidtv.internal.AndroidTVHandler] - 70C94E569D06 - Command received at handler: power OFF
2023-03-03 16:27:51.057 [TRACE] [l.googletv.GoogleTVConnectionManager] - 70C94E569D06 - Command received: power

openhab.log (9.3 KB)

Try to send OFF not “OFF”. POWER is a Switch and takes OnOffType, not a StringType. The “” can cause it to send a string which is ignored.

Does it detect if you turn the TV on/off using a remote? And once you do that, does the power command work? Im worried that it’s not sending power state and because of that it’s not sending power commands.

What happens when you send KEY_POWER to KEYPRESS?

EDIT: More explanation…

So the problem is we don’t have actual power on and off, we have a toggle command. When someone sends a command to the POWER channel, we check to see if the current power state is what they are asking for or not. If the current state is not the state requested (e.g. power is ON but command is OFF), we send the toggle.

EDIT2: Try this jar instead…

https://github.com/morph166955/openhab-addons/releases/download/androidtv-beta/org.openhab.binding.androidtv-3.2.0-4.0.0-SNAPSHOT-power1.jar

I added something to accept both OnOffType and StringType on the channel and I added an error message to throw to the log if it’s sending some kind of weird/unknown power state so we can see it.

From what I can see, my Sony TV is not reporting power state changes. Therefore, sending KEY_POWER correctly toggles the power ON and OFF. But sending ON and OFF commands to the power channel doesn’t work. Sending consecutive OFF commands to the power channel toggles the power. Sending ON does nothing.

Also, sending ON and OFF to the volume channel doesn’t work. All I see in the logs is:

2023-03-03 12:14:03.714 [TRACE] [penhab.binding.androidtv.internal.AndroidTVHandler] - kitchen - Command received at handler: volume ON
2023-03-03 12:14:03.714 [TRACE] [ternal.protocol.googletv.GoogleTVConnectionManager] - kitchen - Command received: volume

But, sending KEY_VOLUP and KEY_VOLDOWN to the keypress channel works.