core: Sony Bravia TV turning off when connection reset

The problem

Watching TV and suddenly the tv turns off. Not an issue when the integration is disabled.

What version of Home Assistant Core has the issue?

core- 2023.6.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

braviatv

Link to integration documentation on our website

https://www.home-assistant.io/integrations/braviatv/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-07-01 10:48:41.500 DEBUG (MainThread) [pybravia.client] Response result: {'result': [{'uri': 'extInput:hdmi?port=4', 'source': 'extInput:hdmi', 'title': 'HDMI 4'}], 'id': 1}
2023-07-01 10:48:41.500 DEBUG (MainThread) [homeassistant.components.braviatv.coordinator] Finished fetching braviatv data in 0.142 seconds (success: True)
2023-07-01 10:48:51.360 DEBUG (MainThread) [pybravia.client] Request http://tv.home.arpa/sony/system, data: {'method': 'getPowerStatus', 'params': [], 'id': 1, 'version': '1.0'}, headers: {'X-Auth-PSK': 'qwerty', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive'}
2023-07-01 10:48:51.368 DEBUG (MainThread) [pybravia.client] Response status: 200
2023-07-01 10:48:51.368 DEBUG (MainThread) [pybravia.client] Response result: {'result': [{'status': 'active'}], 'id': 1}
2023-07-01 10:48:51.368 DEBUG (MainThread) [pybravia.client] Request http://tv.home.arpa/sony/audio, data: {'method': 'getVolumeInformation', 'params': [], 'id': 1, 'version': '1.0'}, headers: {'X-Auth-PSK': 'qwerty', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive'}
2023-07-01 10:48:51.377 DEBUG (MainThread) [pybravia.client] Response status: 200
2023-07-01 10:48:51.377 DEBUG (MainThread) [pybravia.client] Response result: {'result': [[{'target': 'speaker', 'volume': 43, 'mute': False, 'maxVolume': 100, 'minVolume': 0}]], 'id': 1}
2023-07-01 10:48:51.377 DEBUG (MainThread) [pybravia.client] Request http://tv.home.arpa/sony/avContent, data: {'method': 'getPlayingContentInfo', 'params': [], 'id': 1, 'version': '1.0'}, headers: {'X-Auth-PSK': 'qwerty', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive'}
2023-07-01 10:48:51.496 DEBUG (MainThread) [pybravia.client] Response status: 200
2023-07-01 10:48:51.496 DEBUG (MainThread) [pybravia.client] Response result: {'result': [{'uri': 'extInput:hdmi?port=4', 'source': 'extInput:hdmi', 'title': 'HDMI 4'}], 'id': 1}
2023-07-01 10:48:51.496 DEBUG (MainThread) [homeassistant.components.braviatv.coordinator] Finished fetching braviatv data in 0.136 seconds (success: True)
2023-07-01 10:49:01.358 DEBUG (MainThread) [pybravia.client] Request http://tv.home.arpa/sony/system, data: {'method': 'getPowerStatus', 'params': [], 'id': 1, 'version': '1.0'}, headers: {'X-Auth-PSK': 'qwerty', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive'}
2023-07-01 10:49:01.359 DEBUG (MainThread) [pybravia.client] Request error [Errno 104] Connection reset by peer
2023-07-01 10:49:01.360 DEBUG (MainThread) [homeassistant.components.braviatv.coordinator] Update skipped, Bravia TV is off
2023-07-01 10:49:01.360 DEBUG (MainThread) [homeassistant.components.braviatv.coordinator] Finished fetching braviatv data in 0.002 seconds (success: True)
2023-07-01 10:49:05.465 ERROR (Thread-16) [pychromecast.socket_client] [Living Room TV(10.53.9.15):8009] Error reading from socket.
2023-07-01 10:49:05.466 WARNING (Thread-16) [pychromecast.socket_client] [Living Room TV(10.53.9.15):8009] Error communicating with socket, resetting connection
2023-07-01 10:49:11.359 DEBUG (MainThread) [pybravia.client] Connect with pin: None, psk: qwerty, clientid: None, nickname: None
2023-07-01 10:49:11.359 DEBUG (MainThread) [pybravia.client] Request http://tv.home.arpa/sony/system, data: {'method': 'getSystemInformation', 'params': [], 'id': 1, 'version': '1.0'}, headers: {'X-Auth-PSK': 'qwerty', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive'}
2023-07-01 10:49:11.615 DEBUG (MainThread) [pybravia.client] Response status: 200
2023-07-01 10:49:11.615 DEBUG (MainThread) [pybravia.client] Response result: {'result': [{'product': 'TV', 'region': 'XUC', 'language': 'eng', 'model': 'XR-75X90CK', 'serial': 'XXX', 'macAddr': 'XXX', 'name': 'BRAVIA', 'generation': '5.5.0', 'area': 'USA', 'cid': 'XXX'}], 'id': 1}
2023-07-01 10:49:11.616 DEBUG (MainThread) [pybravia.client] Connected with PSK
2023-07-01 10:49:11.616 DEBUG (MainThread) [pybravia.client] Request http://tv.home.arpa/sony/system, data: {'method': 'getPowerStatus', 'params': [], 'id': 1, 'version': '1.0'}, headers: {'X-Auth-PSK': 'qwerty', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive'}
2023-07-01 10:49:11.623 DEBUG (MainThread) [pybravia.client] Response status: 200
2023-07-01 10:49:11.623 DEBUG (MainThread) [pybravia.client] Response result: {'result': [{'status': 'standby'}], 'id': 1}

Additional information

wired connection with PSK. Seems any minor network blip causes connection reset which also powers off the tv.

Hard to tell if it is pybravia.client or if pybravia.client uses pychromecast.socket_client which is the actual culprit.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 25 (9 by maintainers)

Most upvoted comments

Thanks for the follow up. Sony released a firmware update a few days ago and this now appears to be resolved.

Just reproduced it: Turned on logging. Disabled integration. Pause. Enabled Integration. TV sleeps (powers off)

Logs from this: 2023-07-01 14:06:21.474 ERROR (MainThread) [homeassistant.components.braviatv.coordinator] Error fetching braviatv data: Error communicating with device 2023-07-01 14:10:01.473 DEBUG (MainThread) [pybravia.client] Connect with pin: None, psk: qwerty, clientid: None, nickname: None 2023-07-01 14:10:01.473 DEBUG (MainThread) [pybravia.client] Request http://tv.home.arpa/sony/system, data: {'method': 'getSystemInformation', 'params': [], 'id': 1, 'version': '1.0'}, headers: {'X-Auth-PSK': 'qwerty', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive'} 2023-07-01 14:10:01.475 DEBUG (MainThread) [pybravia.client] Response status: 404 2023-07-01 14:10:01.475 DEBUG (MainThread) [homeassistant.components.braviatv.coordinator] Finished fetching braviatv data in 0.003 seconds (success: False) 2023-07-01 14:10:13.143 DEBUG (MainThread) [pybravia.client] Connect with pin: None, psk: qwerty, clientid: None, nickname: None 2023-07-01 14:10:13.143 DEBUG (MainThread) [pybravia.client] Request http://tv.home.arpa/sony/system, data: {'method': 'getSystemInformation', 'params': [], 'id': 1, 'version': '1.0'}, headers: {'X-Auth-PSK': 'qwerty', 'Cache-Control': 'no-cache', 'Connection': 'keep-alive'} 2023-07-01 14:10:13.251 DEBUG (MainThread) [pybravia.client] Response status: 404 2023-07-01 14:10:13.251 DEBUG (MainThread) [homeassistant.components.braviatv.coordinator] Update skipped, Bravia API service is reloading 2023-07-01 14:10:13.251 DEBUG (MainThread) [homeassistant.components.braviatv.coordinator] Finished fetching braviatv data in 0.108 seconds (success: True)