Support for the remote of Chromecast with Google TV?

Looks like I was wrong about not seeing events when playing some the apps:

2020-11-06 14:05:42.536 [vent.ItemStateChangedEvent] - Item 'CrashTV_Mute' changed from NULL to OFF
2020-11-06 14:05:42.675 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from NULL to ON
2020-11-06 14:05:43.011 [vent.ItemStateChangedEvent] - Item 'CrashTV_Volume' changed from NULL to 100
2020-11-06 14:05:43.251 [vent.ItemStateChangedEvent] - Item 'CrashTV_Stop' changed from NULL to ON
2020-11-06 14:12:09.963 [vent.ItemStateChangedEvent] - Item 'CrashTV_Mute' changed from NULL to OFF
2020-11-06 14:12:10.130 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from NULL to ON
2020-11-06 14:12:10.426 [vent.ItemStateChangedEvent] - Item 'CrashTV_Volume' changed from NULL to 100
2020-11-06 14:12:10.555 [vent.ItemStateChangedEvent] - Item 'CrashTV_Stop' changed from NULL to ON
2020-11-06 14:37:11.595 [vent.ItemStateChangedEvent] - Item 'CrashTV_Mute' changed from NULL to OFF
2020-11-06 14:37:11.783 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from NULL to ON
2020-11-06 14:37:12.203 [vent.ItemStateChangedEvent] - Item 'CrashTV_Volume' changed from NULL to 100
2020-11-06 14:37:12.398 [vent.ItemStateChangedEvent] - Item 'CrashTV_Stop' changed from NULL to ON
2020-11-06 14:50:19.023 [vent.ItemStateChangedEvent] - Item 'CrashTV_MediaControl' changed from NULL to PAUSE
2020-11-06 14:50:19.027 [vent.ItemStateChangedEvent] - Item 'CrashTV_CurrentTime' changed from NULL to UNDEF
2020-11-06 14:50:19.033 [vent.ItemStateChangedEvent] - Item 'CrashTV_Duration' changed from NULL to UNDEF
2020-11-06 14:50:19.041 [vent.ItemStateChangedEvent] - Item 'CrashTV_MediaType' changed from NULL to GENERIC
2020-11-06 14:50:19.052 [vent.ItemStateChangedEvent] - Item 'CrashTV_Location' changed from NULL to UNDEF
2020-11-06 14:50:19.059 [vent.ItemStateChangedEvent] - Item 'CrashTV_ImageURL' changed from NULL to UNDEF
2020-11-06 14:50:19.067 [vent.ItemStateChangedEvent] - Item 'CrashTV_AlbumArtist' changed from NULL to UNDEF
2020-11-06 14:50:19.072 [vent.ItemStateChangedEvent] - Item 'CrashTV_AlbumName' changed from NULL to UNDEF
2020-11-06 14:50:19.075 [vent.ItemStateChangedEvent] - Item 'CrashTV_MediaArtist' changed from NULL to UNDEF
2020-11-06 14:50:19.078 [vent.ItemStateChangedEvent] - Item 'CrashTV_BroadcastDate' changed from NULL to UNDEF
2020-11-06 14:50:19.081 [vent.ItemStateChangedEvent] - Item 'CrashTV_Composer' changed from NULL to UNDEF
2020-11-06 14:50:19.083 [vent.ItemStateChangedEvent] - Item 'CrashTV_CreationDate' changed from NULL to UNDEF
2020-11-06 14:50:19.086 [vent.ItemStateChangedEvent] - Item 'CrashTV_DiscNumber' changed from NULL to UNDEF
2020-11-06 14:50:19.088 [vent.ItemStateChangedEvent] - Item 'CrashTV_EpisodeNumber' changed from NULL to UNDEF
2020-11-06 14:50:19.092 [vent.ItemStateChangedEvent] - Item 'CrashTV_LocationName' changed from NULL to UNDEF
2020-11-06 14:50:19.094 [vent.ItemStateChangedEvent] - Item 'CrashTV_ReleaseDate' changed from NULL to UNDEF
2020-11-06 14:50:19.097 [vent.ItemStateChangedEvent] - Item 'CrashTV_SeasonNumber' changed from NULL to UNDEF
2020-11-06 14:50:19.099 [vent.ItemStateChangedEvent] - Item 'CrashTV_SeriesTitle' changed from NULL to UNDEF
2020-11-06 14:50:19.102 [vent.ItemStateChangedEvent] - Item 'CrashTV_Studio' changed from NULL to UNDEF
2020-11-06 14:50:19.104 [vent.ItemStateChangedEvent] - Item 'CrashTV_Subtitle' changed from NULL to UNDEF
2020-11-06 14:50:19.107 [vent.ItemStateChangedEvent] - Item 'CrashTV_MediaTitle' changed from NULL to UNDEF
2020-11-06 14:50:19.110 [vent.ItemStateChangedEvent] - Item 'CrashTV_TrackNumber' changed from NULL to UNDEF
2020-11-06 14:50:20.286 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from NULL to Backdrop
2020-11-06 14:50:20.291 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from NULL to E8C28D3C
2020-11-06 14:50:20.299 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from NULL to
2020-11-06 22:10:15.169 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from Backdrop to UNDEF
2020-11-06 22:10:15.178 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from E8C28D3C to UNDEF
2020-11-06 22:10:15.182 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from  to UNDEF
2020-11-06 22:10:15.231 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from UNDEF to Netflix
2020-11-06 22:10:15.236 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from UNDEF to Netflix
2020-11-06 22:10:15.245 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from UNDEF to Netflix
2020-11-06 22:10:15.249 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from ON to OFF
2020-11-07 00:42:34.466 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from Netflix to UNDEF
2020-11-07 00:42:34.475 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from Netflix to UNDEF
2020-11-07 00:42:34.480 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from Netflix to UNDEF
2020-11-07 00:42:34.482 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from OFF to ON
2020-11-07 00:42:34.590 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from UNDEF to Netflix
2020-11-07 00:42:34.596 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from UNDEF to AndroidNativeApp
2020-11-07 00:42:34.599 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from UNDEF to Netflix
2020-11-07 00:42:34.602 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from ON to OFF
2020-11-07 00:42:34.677 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from Netflix to UNDEF
2020-11-07 00:42:34.683 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from AndroidNativeApp to UNDEF
2020-11-07 00:42:34.686 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from Netflix to UNDEF
2020-11-07 00:42:34.689 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from OFF to ON
2020-11-07 00:42:37.240 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from UNDEF to Netflix
2020-11-07 00:42:37.249 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from UNDEF to Netflix
2020-11-07 00:42:37.253 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from UNDEF to Netflix
2020-11-07 00:42:37.259 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from ON to OFF
2020-11-07 00:49:17.533 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from Netflix to UNDEF
2020-11-07 00:49:17.550 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from Netflix to UNDEF
2020-11-07 00:49:17.564 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from Netflix to UNDEF
2020-11-07 00:49:17.569 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from OFF to ON
2020-11-07 00:49:17.580 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from UNDEF to Netflix
2020-11-07 00:49:17.583 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from UNDEF to AndroidNativeApp
2020-11-07 00:49:17.588 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from UNDEF to Netflix
2020-11-07 00:49:17.592 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from ON to OFF
2020-11-06 22:10:15.178 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from E8C28D3C to UNDEF
2020-11-06 22:10:15.182 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from  to UNDEF
2020-11-06 22:10:15.231 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from UNDEF to Netflix
2020-11-06 22:10:15.236 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from UNDEF to Netflix
2020-11-06 22:10:15.245 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from UNDEF to Netflix
2020-11-06 22:10:15.249 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from ON to OFF
2020-11-07 00:42:34.466 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from Netflix to UNDEF
2020-11-07 00:42:34.475 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from Netflix to UNDEF
2020-11-07 00:42:34.480 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from Netflix to UNDEF
2020-11-07 00:42:34.482 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from OFF to ON
2020-11-07 00:42:34.590 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from UNDEF to Netflix
2020-11-07 00:42:34.596 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from UNDEF to AndroidNativeApp
2020-11-07 00:42:34.599 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from UNDEF to Netflix
2020-11-07 00:42:34.602 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from ON to OFF
2020-11-07 00:42:34.677 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from Netflix to UNDEF
2020-11-07 00:42:34.683 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from AndroidNativeApp to UNDEF
2020-11-07 00:42:34.686 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from Netflix to UNDEF
2020-11-07 00:42:34.689 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from OFF to ON
2020-11-07 00:42:37.240 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from UNDEF to Netflix
2020-11-07 00:42:37.249 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from UNDEF to Netflix
2020-11-07 00:42:37.253 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from UNDEF to Netflix
2020-11-07 00:42:37.259 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from ON to OFF
2020-11-07 00:49:17.533 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from Netflix to UNDEF
2020-11-07 00:49:17.550 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from Netflix to UNDEF
2020-11-07 00:49:17.564 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from Netflix to UNDEF
2020-11-07 00:49:17.569 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from OFF to ON
2020-11-07 00:49:17.580 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from UNDEF to Netflix
2020-11-07 00:49:17.583 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from UNDEF to AndroidNativeApp
2020-11-07 00:49:17.588 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from UNDEF to Netflix
2020-11-07 00:49:17.592 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from ON to OFF
2020-11-07 00:49:17.601 [vent.ItemStateChangedEvent] - Item 'CrashTV_App' changed from Netflix to UNDEF
2020-11-07 00:49:17.623 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppId' changed from AndroidNativeApp to UNDEF
2020-11-07 00:49:17.626 [vent.ItemStateChangedEvent] - Item 'CrashTV_AppStatus' changed from Netflix to UNDEF
2020-11-07 00:49:17.628 [vent.ItemStateChangedEvent] - Item 'CrashTV_Idling' changed from OFF to ON

Well, that’s promising! Is AndroidNativeApp the Google TV interface?

I think so. I’ll watch it. However I think I may have seen all of this because I started by casting. Tonight we turned the Chromecast on through the remote, browsed around, started Netflix, used the voice remote, started Netflix agaiin…: not a single event logged.

I also noticed that when in YouTube on a (Android, in my case) phone, if you connect to the Chromecast with Google TV and then tap the Cast icon, you get a dialog with a voice button and a small remote to control the UI. So those things seem to be accessible through a protocol and maybe someone will reverse engineer that too.

@Frenchman, have you learned anything more about the Chromecast with Google TV since this conversation? I’m thinking about getting one now.

I bought a Chromecast with Google TV, and it appears that a firmware update has impoved the information it provides to openHAB. I can start apps using the remote and they’ll show up in the appName channel. Also, the idling and stop channels are responding to everything I’ve tried (Youtube, Netflix, Prime Video, Disney+, Spotify).

What’s interesting is that with Youtube, Netflix, and Prime Video, the channels immediately switch when you open or close the apps. For everything else, these channels only change when you actually start playing content.

I’m updating this thread with respect to the original question about using the Chromecast with Google TV remote to control openHAB. I tried out @christoph_wempe’s suggestion and can confirm that it’s possible through a combination of the openHAB, Tasker, and Keyboard/Button Mapper (KBM) apps.

Button Mapper also works and can be directly installed from the Play Store, but I found that KBM is more powerful. It’s also completely free, though I’m not concerned about that. Neither app can remap the power or volume buttons, but every other button on the Chromecast remote can be remapped with short, long, or double-presses.

None of openHAB, Tasker, or KBM are available in the Android TV Play Store, so you have to sideload them. The annoying thing here is that sideloaded apps won’t show up in the Google TV UI, so you have to keep going to Settings > Apps to open them.

There’s an in-progress project on the KBM Github page to add it to the Android TV store, with an open bug to fix the volume buttons.

Here’s a quick summary:

  1. Connect a Bluetooth mouse to your Chromecast with Google TV. You’ll need it to configure Tasker. Without a mouse, you can’t navigate to Tasker’s “Add task” button.
  2. Unlock Developer Mode in the Android TV settings.
  3. Sideload the openHAB, Tasker, and KBM apps. There are lots of ways to do this. Personally, I installed Solid Explorer from the Play Store, then connected it to my Google Drive to get the APK files I had previously uploaded.
  4. Configure the openHAB app to connect to your server and enable Tasker integration.
  5. In Tasker, set up a task to control your openHAB item. Make sure to assign an icon to the task.
  6. Tasker will keep telling you that it needs to be excluded from energy optimization to work properly. You can do this in the Android TV settings, but I’m not entirely sure how necessary it is.
  7. In the Android TV settings, go to Accessibility and enable KBM so that it can capture button presses.
  8. Open KBM. It will complain about wanting some other settings besides Accessibility, but you don’t need them.
  9. Remap your buttons using KBM (the Bluetooth mouse comes in handy here, though you can do without it). When you choose an action, select “App shortcut” and then “Task Shortcut”. You’ll then be able to select the Tasker task you set up earlier.

Once you’ve saved your remapped button, it should start working immediately. I’ve remapped a short press of the “TV Input” button to toggle the Google TV activity on my Logitech Harmony Hub, so that I don’t need to use the Harmony remote to turn my entertainment system on/off. I also mapped long presses of some buttons to take me directly to the Tasker and KBM apps, so that it’s quicker to get to them.

Note that KBM can also remap button presses from other remotes/accessories connected to your Chromecast with Google TV, and you can have the same button on different remotes do different things. I tried mapping some of my Bluetooth keyboard’s buttons and most of them worked (though not the volume buttons, interestingly).

If you’re thinking about getting a Chromecast with Google TV, I’d recommend it.

Maybe you can ask the developer to fix this, so you do not need a bluetooth mouse in the future.

Yeah, the Tasker developer is very responsive. However, there are a bunch of Android TV requests that mostly go unanswered, so I suspect it’s a low priority.

There’s now an Android TV binding in the marketplace (formerly the Shield TV binding) that’s in development. It can send commands to a Chromecast with Google TV, as well as getting the power status and current app. I’ve tested it with both the HD and 4K versions of the CCGTV.

1 Like