Sony Bravia KD-43X8307C not detecting status

Hi Folks,

I’m new to Home Assistant currently moving from Domoticz and potentially OpenRemote.

Last night I setup the braviatv component and got the TV paired up using the pin code, however the status of the TV is always showing as off. I’ve debugged the code and found that it’s due to the TV not responding to the getPlayingContentInfo call. Does anyone else use this or a similar model with success?

I can see discussions around a new component for Bravia TV’s which I’ve not yet tried.

Thanks in advance

Ok so I’ve figured this out a little more.

So I do get content info back when the TV is switched to an input source, as soon as you got an app like Netflix or Amazon video then this fails. At that stage the plugin for HA shows the TV as off.

I’ve submitted a pull request to the author of braviarc to include a new function to test for power status: https://github.com/aparraga/braviarc/pull/2

If this is merged then I’ll submit my changes back to HA. I’ve only got one sony tv to test this against so I can’t confirm if it works across more models but I can’t see why it won’t.

Pull request submitted to the HA github repo.

How were you able to get your TV to pair? I tried using the configurator, but after I enter 0000, the TV flashes a code momentarily and then says the pair was cancelled. HA immediately adds the TV without ever prompting for the code and then the TV shows up as a media player card, however it doesn’t do anything or update status (obviously the pair didn’t complete successfully.) I’ve deleted the bravia.conf in the hass root directory and tried to repair multiple times with the same result.

I have two Bravia XBRs, 850C & 830C, same result with both.

Any advice?

I didn’t have an issue pairing except for when ‘playing around’ with my updated code.

To resolve that I just made sure I removed the pairing of HA from within the Sony TV settings and tried again, worked straight away. I do also though specify the options within a config file for HA to use so it doesn’t auto detect the settings as HA and the TV are on different vlans for me.

I’ll grab that and post it here.

In bravia.conf within your normal HA config directory add:

{"192.168.1.50": {"pin": "1234", "mac": "dc:9b:0a:e1:0c:2e"}}

Replace the IP, Ping and Mac with the relevant info for you.

Still doesn’t work, the TVs will not pair with HA. When I try to pair HA using the 0000 code, the TVs flash the dialog box and cancels it before I can even see the code. I never get a box in the HA front end to enter a code. Also, every time I reboot HA I get the pairing dialog on the TVs, however this time they don’t immediately cancel, but HA never gives me another opportunity to pair.

Did you unpair HA from the TV before trying it again?

Until I did this I got the prompt in HA to enter 0000 and the TV just cancelled the process.

The TV has never successfully paired, therefore there wouldn’t be anything to remove. Where would one look on the TV to see if their was an existing pair? I’ve been through all the settings menu and haven’t seen anything.

From the manual try: Press the HOME button on the IR Remote
Control, select [Settings] — [Touchpad Remote Control settings]

I thought it hadn’t paired correctly but it had.

Hi, i have the same problem, my tv cancel the pairing process before i can enter the code in HA.
i cannot put the pin in bravia.conf because once the pairing is cancelled the pin is not valid anymore.

Maybe the request from HA of the pairing can last longer somehow?

Anyway if anyone has this problem, this Bravia component is working fine with a pre-shared key:

Which pre-shared key are you using? I didn’t see it hidden in your link.

This one:
If it helps someone to make dominique’s script works i had to add ‘X-Auth-PSK’: ‘1111’ to the header of the request like this:

headers={‘X-Auth-PSK’: ‘1111’, ‘SOAPAction’: ‘urn:schemas-sony-com:service:IRCC:1#X_SendIRCC’},
(note that 1111 is a preshared key that i had to set in the tv network options)

Has anyone had any luck with this. I would love to get this working with my TV. I tried setting up a pre shared key and adding it to the bravia.conf file however it never worked and I don’t have anyplace to add the key the bravia gives me

Yes it works fine for me - you have to ensure you know which script you are using. My post refers to the included Sony Bravia support where others are talking about another users script (the one that uses pre-shared keys).

If you have a pin already that’s linked between HASS and the TV then take a look at the current sony docs on home-assistant.io, I updated them last week showing how you can create a config file to manually specify your tv.

I am having trouble getting the TV linked. I can’t seem to get the pin and HASS connected to each other. I have an 850C .

I had trouble to pair my tv to Homeassistant.
without bravia.conf Homeassistant ask me for a pin but the tv does not (even after the 0000 thing)
with a brafia.conf file the tv ask me to enter the pin in 60 seconds but Homeassistant does not have the configuration panel.

At the end i modified braviatv.py adding
“request_configuration(config, hass, add_devices_callback)”
(at line 136 after the add_devices_callback)

This way i was able to input the correct pin and pair the tv.
Then i restored braviatv.py otherwise you would see 2 different bravia in the web interface.

Hope it helps someone.