Skip to content
Doug Nelson edited this page Nov 7, 2023 · 9 revisions

Buy Me A Coffee

Details for App Requests

For Fire TV, Chromecast, NVIDIA Shield, Xiaomi Mi, and other Android based devices

One of the most helpful ways to fast track a new app shortcut request is to provide some additional technical details by running this one ADB command:

adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp|mInputMethodTarget|mSurface'

You can do this through the Home Assistant UI by following these steps:

IMPORTANT: Open the app on your Android device FIRST

  1. In Home Assistant, Open Developer tools
  2. Click the SERVICES Tab
  3. In the Service menu, select Android Debug Bridge: ADB command
  4. Select your device by clicking on the + Choose Entity button in the Targets section
  5. Enter or copy/paste adb shell dumpsys window windows | grep -E 'mCurrentFocus|mFocusedApp|mInputMethodTarget|mSurface' into the command field
  6. Click the CALL SERVICE button
  7. Click over to the Developer tools STATES tab
  8. Locate the entity that you had targeted in step 4
  9. Copy and paste the "Attributes" data under the heading "adb_response:" into your app request issue submission

For example, when the Netflix app is open, following these steps will provide this useful output (or similar)

adb_response: mSurface=Surface(name=com.netflix.ninja/com.netflix.ninja.MainActivity)/@0x743bfe6 mSurface=Surface(name=com.android.systemui.ImageWallpaper)/@0x7ec776e


image

image



For Apple TV Devices

For an Apple TV device app button request, this is the preferred method:

image

  1. Click on Developer Tools
  2. Open the STATES tab
  3. (optional) Type the name of your Apple TV Entity to help you sort through the list
  4. Under Filter attributes, copy and paste the contents of the source_list into your app request issue submission.

For instance, my reply would look like this:

source_list: AMC+, App Store, Arcade, ARD Mediathek, ARTE, bgtime.tv, Channels, CNN, Computers, Crunchyroll, Curiosity Stream, Daily Wire, DAZN, DIRECTV, discovery+, Disney+, DS video, Emby, ESPN, F1 TV, FaceTime, Fitness, FOX Sports, Freevee, gcn, HDHomeRun, Hulu, IPTVX, IPVanish, iQIYI, JustWatchTV, Magenta TV, Max, Mediaset Infinity, MLB, Movies, Music, NBC Sports, Nebula, Netflix, NFL, NLZIET, NPO, OQEE by Free, Pandora, Paramount+, PBS, Peacock, Photos, Plex, Pluto TV, Podcasts, Prime Video, Proximus Pickx, Qmusic-BE, RaiPlay, Search, Settings, ShopHQ, Showtime, SiriusXM Radio for TV, Sky News, Speedtest, Spotify, STARZ, Steam Link, Stream, SVT Play, TBS, Tennis Channel, TestFlight, TIDAL, TNT, Tubi, TV, TV Shows, TV4 Play, TVNZ+, Twitch, VBTV, Viaplay, Videoland, VLC, VRT MAX, XCIPTV, YouTube, YouTube Kids, YouTube TV, ZDFmediathek



Device Interrogation for New Device Support

In order to discover the best and fastest way for Home Assistant to communicate with an android device, we can send a simple adb command to the device and examine the output.

adb shell dumpsys input

It is possible to execute this command through the Home Assistant UI in just a few steps:

  1. Open Developer Tools
  2. Click the Services Tab
  3. Select "Android Debug Bridge: ADB command" service
  4. Choose your device by clicking on the entity button
  5. Enter adb shell dumpsys input into the command field
  6. Click the CALL SERVICE button
  7. Click over to the developer tools States tab
  8. Choose your entity (the one you sent the command to)
  9. Review the data to see what and how your device is listening for external input
Clone this wiki locally