Sony Bravia TV component with Pre-Shared Key

Any way to get Program Info from Apps Youtube / Emby / Netflix`?

1 Like

I might be able to help :slight_smile: as the initial curl command didn’t work for me…

Replace [YOUR IP] and let me know if they work…

This is the curl command I used to retrieve the list

curl http://[YOUR IP]/sony/appControl -X POST -H "X-Auth-PSK: 1122" -H "Content-Type: text/plain" -d "{     \"method\": \"getApplicationList\",     \"id\": 60,     \"params\": [],     \"version\": \"1.0\" }"

These are what pulled from my Bravia TV

            "title":"Play Store",
            "uri":"com.sony.dtv.com.android.vending.com.google.android.finsky.tvmainactivity.TvMainActivity",
            "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.android.vending.com.google.android.finsky.tvmainactivity.TvMainActivity.png"
            "title":"YouTube",
            "uri":"com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.ShellActivity",
            "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.ShellActivity.png"
        "title":"Album",
        "uri":"com.sony.dtv.com.sony.dtv.osat.album.com.sonyericsson.album.MainActivity",
        "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.sony.dtv.osat.album.com.sonyericsson.album.MainActivity.png"
            "title":"Music",
            "uri":"com.sony.dtv.com.sony.dtv.osat.music.com.sonyericsson.music.MusicActivity",
            "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.sony.dtv.osat.music.com.sonyericsson.music.MusicActivity.png"
        "title":"Programme Guide",
        "uri":"com.sony.dtv.com.sony.dtv.tvx.com.sony.dtv.tvx.MainActivity",
        "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.sony.dtv.tvx.com.sony.dtv.tvx.MainActivity.png"
            "title":"Prime Video",
            "uri":"com.sony.dtv.com.amazon.amazonvideo.livingroom.com.amazon.ignition.IgnitionActivity",
            "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.amazon.amazonvideo.livingroom.com.amazon.ignition.IgnitionActivity.png"
        "title":"Play Music",
        "uri":"com.sony.dtv.com.google.android.music.com.google.android.music.tv.HomeActivity",
        "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.google.android.music.com.google.android.music.tv.HomeActivity.png"
            "title":"Play Games",
            "uri":"com.sony.dtv.com.google.android.play.games.com.google.android.apps.play.games.app.atv.features.home.HomeActivity",
            "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.google.android.play.games.com.google.android.apps.play.games.app.atv.features.home.HomeActivity.png"
        "title":"Play Movies",
        "uri":"com.sony.dtv.com.google.android.videos.com.google.android.videos.tv.presenter.activity.TvLauncherActivity",
        "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.google.android.videos.com.google.android.videos.tv.presenter.activity.TvLauncherActivity.png"
            "title":"Netflix",
            "uri":"com.sony.dtv.com.netflix.ninja.com.netflix.ninja.MainActivity",
            "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.netflix.ninja.com.netflix.ninja.MainActivity.png"
        "title":"Internet Browser",
        "uri":"com.sony.dtv.com.opera.sdk.example.com.opera.sdk.example.SonyBrowserUiActivity",
        "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.opera.sdk.example.com.opera.sdk.example.SonyBrowserUiActivity.png"
            "title":"Video",
            "uri":"com.sony.dtv.com.sony.dtv.osat.video.com.sonyericsson.video.browser.BrowserActivity",
            "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.sony.dtv.osat.video.com.sonyericsson.video.browser.BrowserActivity.png"
        "title":"PlayStation Video",
        "uri":"com.sony.dtv.com.sony.snei.video.hhvu.com.sony.snei.video.hhvu.MainActivity",
        "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.sony.snei.video.hhvu.com.sony.snei.video.hhvu.MainActivity.png"
            "title":"Screen mirroring",
            "uri":"com.sony.dtv.screnmirroring.com.screnmirroring.com.StartScreenMirroringHomeActivity",
            "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.screnmirroring.com.screnmirroring.com.StartScreenMirroringHomeActivity.png"
        "title":"Disney+",
        "uri":"com.sony.dtv.com.disney.disneyplus.com.bamtechmedia.dominguez.main.MainActivity",
        "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.disney.disneyplus.com.bamtechmedia.dominguez.main.MainActivity.png"
            "title":"Facebook Watch",
            "uri":"com.sony.dtv.com.facebook.katana.com.facebook.katana.Fb4FireTVLaunchActivity",
            "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.facebook.katana.com.facebook.katana.Fb4FireTVLaunchActivity.png"
        "title":"Plex",
        "uri":"com.sony.dtv.com.plexapp.android.com.plexapp.plex.activities.SplashActivity",
        "icon":"http:\/\/[YOUR IP]\/DIAL\/icon\/com.sony.dtv.com.plexapp.android.com.plexapp.plex.activities.SplashActivity.png"
            "title":"BBC iPlayer",
            "uri":"com.sony.dtv.sonyselect-abf57f386c9db29b14eb49c980682c99e2745109",
            "icon":"https:\/\/images.erabu.sony.tv\/icons\/83c126f3-1b70-4998-997b-101ca052c4a4.png"
        "title":"ITV Player",
        "uri":"com.sony.dtv.sonyselect-8c998c408126fdc8d132d928b3b3e95231ad0061",
        "icon":"https:\/\/images.erabu.sony.tv\/icons\/cf8e5af9-0754-4fa4-bd2d-2cf4a9ad1574.png"
            "title":"All 4",
            "uri":"com.sony.dtv.sonyselect-89ab1b2b2b64b64b28dda5b4861a11e8fd5cc7a7",
            "icon":"https:\/\/images.erabu.sony.tv\/icons\/d28a3c32-f309-4854-b439-b9a90b674ded.png"
        "title":"My5",
        "uri":"com.sony.dtv.sonyselect-a48f2c50b1ba2a4b5e6c1b95e7dd2a1c6426fa2b",
        "icon":"https:\/\/images.erabu.sony.tv\/icons\/ede1b7e8-869f-41a0-88be-62308bd7d1f0.jpg"
            "title":"YouView",
            "uri":"com.sony.dtv.sonyselect-83b73dc5f2211b1c3f09150fe6d28ae3efd805b7",
            "icon":"https:\/\/images.erabu.sony.tv\/icons\/ce958b52-a29f-48b0-9949-f11fd96bc2fe.png"
3 Likes

is there a way where you can force tv to open specific content.
Eg youtube video or google moves movie

Basicly I want to be able to turn kids tv on to a specific move without having to browse content and pressing play.

I haven’t seen anything regarding this but I suppose it’s possible if you know the usual commands from here and the URIs from above?

You could create an automation based on the usual inputs to search a program and start it? Might be a long automation to call each up, down, left, right, return etc.

Don’t want to create a push button automation.

Was hoping you could trigger Chromecast or ideally native app if you pass the right details to play the content you want.

Have played a bit with YouTube and Google movies but can t get anything to play predefined content.

Haven’t tried Chromecast. So might give that a crack.

J

I’m not sure, but the TV is an adroid based mediaplayer, isn’t it? Therefor the usual commands for media players should work as well.

You might want to take a look in these two links:

There is another possibility to send some commands, it’s called sendevent, you can find some more info here: Android Debug Bridge - Home Assistant

Hi just looking at your post where do you use these curl commands ?
Are you using them within a automation ?
Thanks

Hey…

I used the Curl command on Windows CMD specifically to retrieve the URI’s so I could build a custom media player card which I did using Kalkih’s Mini Media Player.

image

Another reason I wanted the Curl was to generate a Sensor/List with all the URI’s. But couldn’t get that working… My thread is here if your interested.

Hope this helps :slight_smile:

1 Like

Looks good that.
I’ve no use for a remote yet as I tend to use the apps built into my Sky Q box (TV service).
But I thought it may be good to possibly have a button in ha that swaps picture modes over.

1 Like

Hi Guys, I am new here, and I have been trying a long time to create my Sony TV Bravia control at HA. I need your help…

  1. I ve installed HACS and Bravia TV PSK
  2. I ve connected the TV and HA, It iss working (created de TV on CONFIGURATIO.YAML)
    media_player:
    - platform: braviatv_psk
    host: 192.168.20.20
    psk: sony
    mac: CC:98:8B:0E:47:D1
    amp: True
    android: True
    time_format: 12H
    user_labels: True
    name: MyBraviaTVnew

It is working

  1. After that I ve edited services.yaml (inside the braviatv_psk) and created a service:

    channelUp:
    name: ChannelUp
    description: Canal_UP
    fields:
    entity_id: media_player.mybraviatvnew
    command_id: ChannelUp

No error

  1. When I created a button and brought the call service, I don t know how to get the command_id.
    Lock de error:

type: button
tap_action:
action: call-service
service: braviatv_psk.bravia_command
service_data: {}
target: {}
entity: media_player.mybraviatvnew

Thank you

Hey guys.

Can someone pls explain me how to change my source list to only show tv:dvbs? In which file do I have to put this??
I just can’t find it…

Thank you :slight_smile:

I was wondering if there any api for bravia, to show which is currently application is running?

and how can I send Num270? I mean, I want to turn on channel for example 270, but it only works with Num from 1-9

API is documented here - Introduction | BRAVIA Professional Displays Knowledge Center

No need to create a new service, and you shouldn’t really be modifying the services.yaml that comes with the integration. The standard HASS media player support I think two ways of doing channel up/down for this integration.

  1. Use media_player.next_track service (or previous_track) which I can see the integration does a channel up/down for.
  2. Use media_player.play_media (not media_play - that is play/pause) with a media_id of “ChannelUp” or “ChannelDown”. This method can also be used to send pretty much any button from the remote.

Also it looks like there is also a bravia_psk.bravia_command service which takes command_id the same as for play_media.

These are detailed here - GitHub - custom-components/media_player.braviatv_psk: Sony Bravia TV (Pre-Shared Key) component for Home Assistant

You can also trial them in the Developer Tools/Services dialogue on HASS.

Just send Num2, Num7, Num0 in quick succession. Same as you would do on your remote.

I haven’t tried it but I imagine you would use tv:dvbs instead of the HDMI 1 I have in the example below.

- platform: braviatv_psk
  host: !secret tv_host
  psk: !secret tv_psk
  mac: !secret tv_mac
  amp: False
  android: True
  user_labels: True
  sourcefilter:
    - 'HDMI 1'
    - 'HDMI 3'
  name: SFTV

1 Like

Like @RogTP
I am all set up but also i would like to create a button Netflix on the dashboard, that would start Netflix.
I found this script, i am not sure what to do with it.

You’d add a button to Lovelace that calls the script (after you have put the script in you config).

did not work

In what way did it not work? Did it not start Netflix? Or did the script error? Were there any errors in the logs?

Bear in my I never used this, you just asked what you should do with the script to trigger it from the UI, so I pointed you at how to use a button to trigger a script. I have no idea if the script you have actually works.