Philips TV (2016+) Binding

Hey guys,

For those who want to switch between the input sources, there are two solutions for Android models: adb and using the API.

  1. Using adb. In the example below the last digit in HdmiService%2FHW9 indicates an input source (for me HdmiService%2FHW9 is HDMI 2 and HdmiService%2FHW10 is HDMI 1; SCART uses a different service, but works the same way. You can find the service name and params by checking the syslog on your device after switching to the needed input source):
adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/org.droidtv.hdmiService%2F.HdmiService%2FHW9 -n org.droidtv.zapster/.playtv.activity.PlayTvActivity -f 0x10000000
  1. I’ve tried using the activities/launch endpoint in the Philips API to run the command above, but unfortunately the API strips out “data” and “flag” parameters (“-d” and “-f” in the example above), so I could not make it work. I’ve checked the source code for the API and it indeed does not pass these parameters, so there is no way to run this command through the API. But I was able to call Google Assistant and pass a query - apparently, passing input name as a query (“HDMI 1”, “HDMI 2”, “SCART”, etc.) will result in Google Assistant switching the TV to that input. Just post the following to activities/launch:
{ "intent": {"extras":{"query":"HDMI 1"}, "action": "Intent {  act=android.intent.action.ASSIST cmp=com.google.android.katniss/com.google.android.apps.tvsearch.app.launch.trampoline.SearchActivityTrampoline flg=0x10200000 }", "component":{"packageName":"com.google.android.katniss","className":"com.google.android.apps.tvsearch.app.launch.trampoline.SearchActivityTrampoline"} } }

Hope it helps!