[Release] Sony Bravia TV Rest Control

Hi Yes, you can query your TV directly and update a few lines of code. Steps to find the app URL on your TV is below.

  1. Turn refresh interval to 30 minutes and enable debug logging.
  2. Enter below two strings into senddebugstring button
    libpath= /sony/appControl
    jsonmsg= {"method": "getApplicationList","id": 60,"params": [],"version": "1.0"}
  3. Open log and filter by your TV device.
  4. There will be an Info log with a response saying "raw data result is" followed by a list of apps.
  5. In the string, there will be a field below for each app you have. You are interested in the URI for the app.
    [title:YouTube, uri:*com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.ShellActivity*
  6. Take the URI for the app you want to add it to line 584 of the code in the same format as the lines above it.
  7. Then replace any appname in line 33-45 with the name you added next to the URI. There is a Hubitat limit to the number of dropdowns on this button, so that's why I have a limited app list here.
  8. Remember to change your refresh back to whatever it was before. This step is just so your logs don't get spammed each minute with messages you don't need.

SendDebugString