Sony Bravia TV component with Pre-Shared Key

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.

In that dialogue your script would need to look like this:

service: media_player.play_media
data:
  media_content_id: Netflix
  media_content_type: tvshow
target:
  entity_id: media_player.sftv_3

Which will generate a scripts .yaml that will look like this:

netflix_tv:
  alias: netflix_tv
  sequence:
  - service: media_player.play_media
    data:
      media_content_id: Netflix
      media_content_type: tvshow
    target:
      entity_id: media_player.sftv_3
  mode: single

Which you need to include into configuration.yaml using this:

script: !include scripts.yaml

Or put direct into configuration.yaml like this:

script:
  netflix_tv:
    alias: netflix_tv
    sequence:
    - service: media_player.play_media
      data:
        media_content_id: Netflix
        media_content_type: tvshow
      target:
        entity_id: media_player.sftv_3
    mode: single

Didn’t work with sourcefilter. Can someone point me in the right direction?

Still didnt figure this out…
Just dont get it to work. Cant someone help me?