home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.68k stars 30.81k forks source link

Bravia TV status switches to off and back on #51259

Closed mathiasnagler closed 3 years ago

mathiasnagler commented 3 years ago

The problem

I own a Sony Bravia 65XE9005 TV that I integrated into Home Assistant via the braviatv integration. Unfortunately, while my TV is on, the status in Home Assistant switches to offline and back to online a few seconds later. This behavior occurs in different intervals, between 10 and 60 minutes.

IMG_0192

This is really unfortunate, because I have an automation that changes some lights based on the TVs status. Due to the issue, my lights keep changing over and over.

Steps I already tried:

Sadly those steps did nothing and the problem persists.

What is version of Home Assistant Core has the issue?

2021.5.5

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Bravia TV

Link to integration documentation on our website

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

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

probot-home-assistant[bot] commented 3 years ago

braviatv documentation braviatv source (message by IssueLinks)

bieniu commented 3 years ago

Please provide the log. Add this to your configuration.yaml file:

logger:
  default: warning
  logs:
    homeassistant.components.braviatv: debug
    bravia_tv: debug
mathiasnagler commented 3 years ago

There seems to be nothing in the log about the issue. I set up my configuration.yaml file like you posted, and this is the logfile while the issue showed 2 times:


2021-05-30 20:25:33 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities light.hallway_downstairs_light
2021-05-30 20:25:33 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities light.hallway_upstairs_light
2021-05-30 20:25:33 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities light.stairs_light
2021-05-30 20:25:33 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities light.hallway_downstairs_light
2021-05-30 20:25:33 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities light.hallway_upstairs_light
2021-05-30 20:25:33 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities switch.livingroom_light_cupboard
2021-05-30 20:25:33 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities switch.livingroom_light_cupboard
2021-05-30 20:25:34 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities light.hallway_downstairs_light
2021-05-30 20:25:34 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities light.hallway_downstairs_light
2021-05-30 20:25:35 WARNING (MainThread) [homeassistant.helpers.service] Unable to find referenced entities light.hallway_downstairs_light
2021-05-30 20:25:47 WARNING (MainThread) [homeassistant.components.media_player] Updating braviatv media_player took longer than the scheduled update interval 0:00:10
2021-05-30 20:25:47 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.sony_bravia_tv is taking over 10 seconds
2021-05-30 20:26:05 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'action' when rendering '{{ value_json.action }}'
2021-05-30 20:26:05 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-05-30 20:26:05 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-05-30 20:26:05 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-05-30 20:26:05 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-05-30 20:26:05 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-05-30 20:32:41 WARNING (MainThread) [homeassistant.components.homekit] The bridge Home Assistant Bridge has entity media_player.homecinema. For best performance, and to prevent unexpected unavailability, create and pair a separate HomeKit instance in accessory mode for this entity
2021-05-30 20:32:41 WARNING (MainThread) [homeassistant.components.homekit.accessories] binary_sensor.hallway_upstairs_window: Battery sensor state missing: None
2021-05-30 20:32:41 WARNING (MainThread) [homeassistant.components.homekit.accessories] binary_sensor.hallway_downstairs_entrance_door: Battery sensor state missing: None
2021-05-30 20:32:41 WARNING (MainThread) [homeassistant.components.homekit.accessories] binary_sensor.livingroom_window_1: Battery sensor state missing: None
2021-05-30 20:32:41 WARNING (MainThread) [homeassistant.components.homekit.accessories] binary_sensor.livingroom_window_2: Battery sensor state missing: None
2021-05-30 20:32:41 WARNING (MainThread) [homeassistant.components.homekit.accessories] binary_sensor.livingroom_window_3: Battery sensor state missing: None
2021-05-30 20:32:41 WARNING (MainThread) [homeassistant.components.homekit.accessories] binary_sensor.livingroom_window_4: Battery sensor state missing: None
2021-05-30 20:32:41 WARNING (MainThread) [homeassistant.components.homekit.accessories] binary_sensor.office_window: Battery sensor state missing: None
2021-05-30 20:32:41 WARNING (MainThread) [homeassistant.components.homekit.accessories] binary_sensor.bedroom_window: Battery sensor state missing: None
2021-05-30 20:49:55 WARNING (MainThread) [homeassistant.components.songpal.media_player] [STR-DN1080(http://10.10.20.24:10000/sony)] Got disconnected, trying to reconnect
2021-05-30 20:49:55 WARNING (MainThread) [homeassistant.components.homekit.type_remotes] media_player.homecinema: Sources out of sync. Restart Home Assistant
2021-05-30 20:50:00 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}'
2021-05-30 20:50:03 WARNING (MainThread) [homeassistant.helpers.entity] Update of vacuum.xiaomi_vacuum_cleaner is taking over 10 seconds
2021-05-30 20:50:03 WARNING (SyncWorker_2) [homeassistant.components.xiaomi_miio.vacuum] Got exception while fetching the state: Unable to discover the device 10.10.20.21
2021-05-30 20:50:07 WARNING (MainThread) [homeassistant.components.songpal.media_player] [STR-DN1080(http://10.10.20.24:10000/sony)] Connection reestablished
2021-05-30 20:50:07 WARNING (MainThread) [homeassistant.helpers.template] Template variable warning: 'dict object' has no attribute 'linkquality' when rendering '{{ value_json.linkquality }}' ```
mathiasnagler commented 3 years ago

Upon closer inspection, it seems that this behavior is also happening with my STR-DN1080 AVR that is integrated via the songpal integration.

bieniu commented 3 years ago

There is nothing in this log about unavailability of the Bravia TV. You have to post the log when TV entity goes to unavailable or off state.

mathiasnagler commented 3 years ago

I can‘t, because, as I said, there is nothing in the logs about the TV that is related to the issue.

homeassistant@homeassistant:~/.homeassistant$ cat home-assistant.log | grep bravia
2021-06-01 20:43:39 WARNING (MainThread) [homeassistant.components.media_player] Updating braviatv media_player took longer than the scheduled update interval 0:00:102021-06-01 20:43:39 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.sony_bravia_tv is taking over 10 seconds

I have this in my configuration.yaml:

# Logging
logger:
  default: warning
  logs:
    homeassistant.components.braviatv: debug
    bravia_tv: debug

What am I missing here?

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

Lauriz7 commented 3 years ago

I have almost the same issues on this integration and I am giving up on using it for automations. In my case the damn TV just from time to time report it's state as OFF, can be even after several hours, and then report state as ON again, messing up automations in HA. I will now be investing in smart plug to determine if the TV is on based on consumption. I have wasted too many hours of getting this working. in 2020 the problem was even worse, where it reported "Unavailable" state every few minutes, very annoying.