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
71.08k stars 29.74k forks source link

Can't power off Samsung Home Theater #87472

Open felipecrs opened 1 year ago

felipecrs commented 1 year ago

The problem

I have a Samsung Home Theater HT-F5505K. The Samsung TV integration is able to control, except that the power off function doesn't work.

I can control the volume for example, normally. But when I click in the power off button, nothing happens on my device.

What version of Home Assistant Core has the issue?

2023.2.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Samsung Smart TV

Link to integration documentation on our website

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

Diagnostics information

config_entry-samsungtv-daffe7066b9cd2fde69b664fdcc51141.json.txt

Example YAML snippet

Here's how my device is configured:

samsungtv:
  - host: 192.168.1.17
    name: Home Theater do escritório
    unique_id: home_theater_do_escritorio
    turn_on_action:
      if:
        - condition: state
          entity_id: media_player.home_theater_do_escritorio
          state: "off"
      then:
        - service: remote.send_command
          data:
            device: home_theater_do_escritorio
            command: power
          target:
            entity_id: remote.rm4_pro_remote

Anything in the logs that might be useful for us?

I did not find anything in logs related to Samsung. If you'd like, I can increase the logs and check again.

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @chemelli74, @epenet, mind taking a look at this issue as it has been labeled with an integration (samsungtv) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `samsungtv` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Change the title of the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign samsungtv` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


samsungtv documentation samsungtv source (message by IssueLinks)

felipecrs commented 1 year ago

By the way, it would be completely acceptable for me to have a way to specify a custom turn_off_action like I do for the turn_on_action.

felipecrs commented 1 year ago

Actually all that is needed for this is for the Samsung TV integration to support a turn_off trigger like the turn_on:

platform: samsungtv.turn_off
entity_id: media_player.my_home_theater
felipecrs commented 1 year ago

Using:

I already tried KEY_POWEROFF, KEY_POWERON and KEY_POWER and none of them makes any effect to my device.

I confirmed that the remote entity is working, because KEY_MUTE is working as expected.

issue-triage-workflows[bot] commented 1 year 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.

felipecrs commented 1 year ago

Still applicable.

felipecrs commented 10 months ago

@MartinHjelmare are you still against https://github.com/home-assistant/core/pull/91903?

issue-triage-workflows[bot] commented 7 months 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.

felipecrs commented 7 months ago

Still valid.

issue-triage-workflows[bot] commented 4 months 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.

felipecrs commented 4 months ago

Still an issue.

chemelli74 commented 4 months ago

Hi @felipecrs, I'm using the following code for my TV and it works jsut fine:

service: media_player.turn_off
target:
  entity_id:
    - media_player.samsung_tv_q85_series_55

But rechecking your post, seems that you are using a custom integration. Can you please clarify ?

felipecrs commented 4 months ago

No, I'm not using any custom integration. And the turn off service doesn't work either (for such device).

I also have a newer Samsung TV (Tizen), for which the turn off service works just fine.

chemelli74 commented 4 months ago

No, I'm not using any custom integration.

where is the yaml "samsungtv:" coming from then ?

And the turn off service doesn't work either (for such device).

Please add the following to configuration.yaml , restart HA, and post the log:

logger:
  default: warning
  logs:
    homeassistant.components.samsungtv: debug
    samsungtvws: debug
    samsungctl: debug

Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.

felipecrs commented 4 months ago

where is the yaml "samsungtv:" coming from then ?

lol that's from early 2023, when this integration did not have UI configurator. The issue remains to this date however, using latest Home Assistant.


I disabled all other Samsung devices and automations to ensure logs come clean. Then, after starting HA, I tried set the volume of the device to ensure it's properly connected, volume increase worked. Then I invoked the turn off service for such device, for which nothing happened in the device.

service: media_player.turn_off
target:
  entity_id: media_player.home_theater_do_escritorio

Then waited a few seconds and stopped the logs.

error_log.txt

Here is the device diagnostics too:

config_entry-samsungtv-daffe7066b9cd2fde69b664fdcc51141.json

chemelli74 commented 4 months ago

I see 2 devices on your log, both with issues:

2024-04-18 20:06:18.618 DEBUG (SyncWorker_19) [homeassistant.components.samsungtv] Create SamsungTVLegacyBridge for 192.168.1.17
2024-04-18 20:06:18.625 DEBUG (SyncWorker_11) [homeassistant.components.samsungtv] Failing config: {'name': 'HomeAssistant', 'description': 'HomeAssistant', 'id': 'ha.component.samsung', 'host': '192.168.1.17', 'method': 'legacy', 'port': None, 'timeout': 31}, error: 
2024-04-18 20:06:18.634 DEBUG (MainThread) [homeassistant.components.samsungtv] Host:192.168.1.17 did not return device info
2024-04-18 20:06:38.456 DEBUG (MainThread) [homeassistant.components.samsungtv] Samsung device found via DHCP: DhcpServiceInfo(ip='192.168.1.18', hostname='tv-samsung', macaddress='102b41ca4059')
2024-04-18 20:06:38.456 DEBUG (MainThread) [homeassistant.components.samsungtv] Found entry matching unique_id for 192.168.1.18
2024-04-18 20:06:49.901 DEBUG (SyncWorker_22) [homeassistant.components.samsungtv] Try config: {'name': 'HomeAssistant', 'description': 'HomeAssistant', 'id': 'ha.component.samsung', 'host': '192.168.1.18', 'method': 'legacy', 'port': None, 'timeout': 31}
2024-04-18 20:07:20.934 DEBUG (SyncWorker_22) [homeassistant.components.samsungtv] Failing config: {'name': 'HomeAssistant', 'description': 'HomeAssistant', 'id': 'ha.component.samsung', 'host': '192.168.1.18', 'method': 'legacy', 'port': None, 'timeout': 31}, error: timed out
2024-04-18 20:07:20.937 DEBUG (MainThread) [homeassistant.components.samsungtv] Host:192.168.1.18 did not return device info
felipecrs commented 4 months ago

I guess the integration continues to poll the devices even when they are disabled. Anyway, you can disregard 192.168.1.18. It probably failed because it was plugged off. The issue I'm reporting is for 192.168.1.17.

issue-triage-workflows[bot] commented 1 month 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.

felipecrs commented 1 month ago

Still valid.