Android TV - Pin code request does not show up on TV

I’m having problems executing the PIN Code Process on my openHAB 4.2.2 (running on Raspi 5 / Docker) with my Xiaomi Laser Projector 150’’ (running Android TV version 9). When executing the process, no code shows up on the screen.

Details:

Autodiscovery / scanning for the projector was not successful. Adding the projector as thing manually (type “Google TV”) seemed to work:

2024-12-08 13:22:58.010 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'androidtv:googletv:f81589c6c4' changed from UNINITIALIZED to INITIALIZING
2024-12-08 13:22:58.014 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'androidtv:googletv:f81589c6c4' changed from INITIALIZING to OFFLINE: Protocols Starting
2024-12-08 13:22:58.768 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'androidtv:googletv:f81589c6c4' changed from OFFLINE: Protocols Starting to OFFLINE: GoogleTV: PIN Process Incomplete
2024-12-08 13:22:58.611 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - Opening GoogleTV SSL connection to 192.168.0.176:6466 NORMAL
2024-12-08 13:22:58.761 [DEBUG] [l.googletv.GoogleTVConnectionManager] - Assuming server certificate is valid
2024-12-08 13:22:58.762 [DEBUG] [l.googletv.GoogleTVConnectionManager] - Returning empty certificate for getAcceptedIssuers
2024-12-08 13:22:58.768 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - GoogleTV PIN Process Incomplete
2024-12-08 13:22:58.768 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - startChildConnectionManager parent config: 6466 NORMAL false
2024-12-08 13:22:58.768 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - startChildConnectionManager child config: 6467 PIN false
2024-12-08 13:22:58.769 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - Opening GoogleTV SSL connection to 192.168.0.176:6467 PIN
2024-12-08 13:22:58.886 [DEBUG] [l.googletv.GoogleTVConnectionManager] - Assuming server certificate is valid`Preformatted text`
2024-12-08 13:22:58.887 [DEBUG] [l.googletv.GoogleTVConnectionManager] - Returning empty certificate for getAcceptedIssuers
2024-12-08 13:22:58.899 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - Connection to 192.168.0.176:6467 PIN successful
2024-12-08 13:22:58.899 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - Message reader thread started 6467
2024-12-08 13:22:58.899 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - Command sender thread started 6467
2024-12-08 13:22:58.907 [WARN ] [tocol.googletv.GoogleTVMessageParser] - f81589c6c4 - GoogleTV version on device needs to be updated

The thing appears as OFFLINE with the message GoogleTV: PIN Process Incomplete, so some form of communication is going on.

The logs (in DEBUG) also show a regular heartbeat:

2024-12-08 13:25:08.149 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - Device Health - Online: true - Logged In: false - Mode: NORMAL
2024-12-08 13:25:13.153 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - Device Health - Online: true - Logged In: false - Mode: NORMAL
2024-12-08 13:25:18.158 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - Device Health - Online: true - Logged In: false - Mode: NORMAL
2024-12-08 13:25:23.164 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - Device Health - Online: true - Logged In: false - Mode: NORMAL

When executing the PIN code process (as described here) via openhab:androidtv androidtv:googletv:f81589c6c4 pincode REQUEST

nothing pops up on the projector. Something seems to be going on, however, since the command triggers a log entry:

2024-12-08 13:28:10.947 [DEBUG] [al.console.AndroidTVCommandExtension] - Sending CLI Command to Handler: androidtv:googletv:f81589c6c4:pincode |||REQUEST|||
2024-12-08 13:28:10.948 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - Command received: pincode
2024-12-08 13:28:10.948 [DEBUG] [l.googletv.GoogleTVConnectionManager] - f81589c6c4 - Command received: pincode

Does anyone know what to do? Does the message GoogleTV version on device needs to be updated mean anything? What’s odd is the message Connection to 192.168.0.176:6467 PIN successful which sounds as if some sort of authentication was successful?

Streaming to the projector via my mobile works, so the network connection itself also seems to work.

Huh… I tried this last night and also did not see a PIN code in my ccwgtv. Maybe something changed…

Ok, at least I’m not the only one / not doing something obviously wrong.

Let me know if you’ve found anything…

This seems to be the problem. For some reason you have a very old version of GTV remote. If you turned logging to trace you will likely see a very long message matching “7b2270726f746f636f6c5f76657273696f6e223a312c22737461747573223a3430307d” coming in from the device. Please make sure https://play.google.com/store/apps/details?id=com.google.android.videos is installed onto the device and up to date.

Thanks! Your hint guided me towards the solution. :slight_smile:

However, it was not the Google TV App that was outdated, but the Android TV Remote Service, for which I had to search on the projector in the Google App Store, and then press „update“. Strangely there does not seem to be a logic that updates everything that’s installed from the Google App Store automatically (like on android phones).

I’ll probably make a contribution to the manual of the binding, since it does not mention this background service in the first place, and the problems I had can easily be avoided for others.

1 Like

That’s very odd. 99.999% of the time that is updated as part of the google videos app. Not sure why yours didn’t update. That’s actually the one I was expecting to update, just hard for most people to find so I point to the google video since it’s a dependency.

I wrote an update of the binding docu to help those with similar problems.

1 Like