Sony Bravia TV component with Pre-Shared Key

Hi,

The code is already posted a few post above. Just change the entity name to your media player name.

1 Like

Cool, will find it. Sometimes I miss stuff in such long threads :wink:

Just look three posts above your first one… :wink: Sony Bravia TV component with Pre-Shared Key

1 Like

This works good. As I am using the official integration, I had to change tvshow to source for the App Buttons.

However the direction buttons are not working, too. Will play around and if I dont get them working, I switch back to bravia_psk component.

Update: I switched back to PSK and everything works like a charm. Except the Youtube button.

Okay when I got it right, I can just use tvshow and Netflix to start Netflix but for other apps like Youtube, Disney+ etc I have to use service and the app uri.

Can somebody tell me how to findout those URIs that are not listed somewhere, i.e. for Disney+? In my TV when I check the app I only find a short part of it.

(This part was working better in the official integration as the apps are treated as sources there and could be started with source and name from a button).

You can have a look here → GitHub - custom-components/media_player.braviatv_psk: Sony Bravia TV (Pre-Shared Key) component for Home Assistant

1 Like

Thank you, I saw this already. However it does not contain all apps of course and I thought somebody can tell me how it is possible to figure those URIs out for other apps installed on the device.

Update: Okay, now I found the Link to the curl command: Sony Bravia TV component with Pre-Shared Key

:smiley:
Thanks!

edit: And now I also found the curl command in the Readme, have totally overseen it before. My TV now told me what I wanted to know, thanks again!

Great ideea with the open_app and command services but I think theres a problem, Is anyone having issues with the braviatv_psk.bravia_open_app service, having multiple sony tvs ?
it always defaults to one tv, also tried with the dummy data from the autofill example data (with a sony entity that does not exist) and a tv is getting triggered.
manually calling the tv endpoints works as expected

1 Like

Anyone had any luck setting the Picture mode with this

entity_id: media_player.living_room_tv_psk
command_id: PictureMode

I want to be able to change the mode to vivid during the day, and to custom (or another mode) when it’s night.

Cannot seem to figure out any options without creating a whole macro

After restarting HA have following in Log:

Logger: braviapsk.sony_bravia_psk
Source: /usr/local/lib/python3.8/site-packages/braviapsk/sony_bravia_psk.py:180
First occurred: 7:07:15 PM (1 occurrences)
Last logged: 7:07:15 PM
Invalid response: {‘error’: [7, ‘not power-on’], ‘id’: 1} request path: sony/system request params: {“method”: “getRemoteControllerInfo”, “params”: [], “id”: 1, “version”: “1.0”}

Same message appear in Log every couple hours.

Thank you in advance for help.

One more:
Log Details (ERROR)

Logger: braviapsk.sony_bravia_psk
Source: /usr/local/lib/python3.8/site-packages/braviapsk/sony_bravia_psk.py:297
First occurred: August 14, 2020, 10:53:53 PM (1 occurrences)
Last logged: August 14, 2020, 10:53:53 PM
JSON request error:{ “error”: [ 7, “not power-on” ], “id”: 1 }

Hi

Am kinda new to all these and need some help with, I’ve got home assistant core setup(home assistant 0.113.1), HACS and bravia_psk installed.

It is currently setup with a standard media player card but on the card itself there is only a power button to turn the TV on and off, clicking on the 3 dot option open up a bigger card with

  • mute button (nothing happens when clicked)
  • volume up button (nothing happens when clicked)
  • volume down button (nothing happens when clicked)
  • volume slider (can control the TV volume with this)
  • Previous/Play-Pause/Next button (nothing happens when clicked)
  • Source selector (show as the sourcefilter applied)
    How do I make the button usable or add button to send command?

I did try this

curl -H 'Content-Type: application/json' -H 'X-Auth-PSK:sony' -X POST -d "{'id': 1, 'method': 'getApplicationList', 'version': '1.0', 'params': ['']}" http://192.168.1.112/sony/appControl

and get a list of apps that is already installed in the android tv but sending command doesn’t work

curl -H 'Content-Type: application/json' -H 'X-Auth-PSK:sony' -X POST http://192.168.1.112/DIAL/apps/com.google.android.youtube.tv-com.google.android.apps.youtube.tv.activity.ShellActivity

I tried this on the rpi terminal (or should i send the command somewhere else?)

The TV model is a 2020’ KD55X7500H

This works great for me! But I do have some questions, as I just switched from the homebridge with the plugin bravia-platform.

  • The HB plugin shows the channels / inputs also on the tile in the Home App, not only the remote. Would that also be possible, here?
  • On the HB plugin I also have DVB-T als an input. That makes it possible to switch back to TV (from eg. HDMI) to the last active channel. Can that also be done?
  • I could not get the presets to work in lovelace card mini-media-player. Eg. Channel 1 or ZDF HD. A hint to that would be nice (yaml code)
  • how can I use the services in an easy way, eg. a button in lovelace or a siri command, or from Home App?

Hi guys, first of all, thanks a lot for your effort on this!
I’m new and I’m starting to integrate into HA my new Bravia KD-49XH9505 model 2020. The integration is going fine, but I having 2 problems. First when I start Netflix, in player nothing is showed, seems that the integration doesn’t recognize what kind of application is opened and if is playing or paused. Then I went inside the full tread, but I haven’t found an example in how to use the “uri” for start application different from Netflix from the player (I’m using the mini media player card). Please can someone make an example on how to? Thanks in advance!

That’s not implemented indeed as I don’t have a Bravia with Android TV and can’t test that functionality :wink:

Have you checked the info on Github with examples?

Thanks Gerard, I already had a look in example, and I found how to script in order to manage different application with Android TV integration

Hey, for some reason * braviatv_psk.bravia_command * and * braviatv_psk.bravia_open_app * both don’t turn up when I search for them in the service tab, and I can’t use them in scripts. Is there anything I’m doing wrong? Also, when I control the TV from my main tab (with the little card) everything works correctly. Somewhere it said that I should alter the config files of this component to tell it that it is an Android Tv (Sony KD-49XF7596) but I don’t know where to find that file in the UI.
I’m a bloody newbie, appreciate any help.

This component is not configurable via the UI, only the default Bravia component in HA (with PIN) is.
Maybe you are using that one?

This component is installed and configured via the documentation here.

Ahhh, that seems to be it. Thank you very much, I’m still new to this.
Edit: With the standard Bravia Integration, I can change it to select all the installed apps as “Sources”, Netflix for example. With yours, I cannot. Is there a way around this?

The code to show the installed apps as sources is not added to the integration I wrote. I don’t have an Android TV so I can’t test the code, but if someone here wants to make a PR for this I can add it to this integration.

Gerard,
first of all i’ve been following your work, using this component and thank you. This is a ton of work!
May seem weird but After updating from HACS to 0.3.5 the services don’t appear in the developer tools.
I’m running 0.118.4
Thank you