Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SamsungTV remote/turn_on. unknown error #106733

Closed
ulliohura opened this issue Dec 30, 2023 · 24 comments
Closed

SamsungTV remote/turn_on. unknown error #106733

ulliohura opened this issue Dec 30, 2023 · 24 comments

Comments

@ulliohura
Copy link

The problem

Hello,

i cant turn on my Samsung TV with the service remote.turn_on, it had been working "some" time ago while it was connected via lan, now its connected via wlan. (also the TV doesnt wanted and still not wants to turn on by calling the media_player.turn on-command, only when i restart homeassistant, thats why i'm using the remote.turn_on cmd).

I tried to erase the entity registration, reinstall samsungtv and changed ipadress of the tv, still the same.

Debug-Log:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:238
Integration: Home Assistant WebSocket API ([documentation](https://www.home-assistant.io/integrations/websocket_api), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+websocket_api%22))
First occurred: 17:55:20 (10 occurrences)
Last logged: 18:16:34

    [140159820133696]
    [140159046058816]

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 878, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1279, in async_turn_on
    await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1275, in turn_on
    raise NotImplementedError()
NotImplementedError

Thanks in advance for your help!

What version of Home Assistant Core has the issue?

core-2023.12.4

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

SamsungTV

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (websocket_api) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of websocket_api can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign websocket_api Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


websocket_api documentation
websocket_api source
(message by IssueLinks)

@home-assistant
Copy link

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 Renames 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.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


samsungtv documentation
samsungtv source
(message by IssueLinks)

@tjorim
Copy link
Contributor

tjorim commented Dec 30, 2023

It relies on WoL (Wake-on-LAN), not all devices support it (especially over Wi-Fi).
Try sending a magic package from your pc and see if the television turns on.
If it does not: try again with the device connected over ethernet.
Please note the MAC address will be different.

@c1tru55
Copy link

c1tru55 commented Jan 6, 2024

same problem for UE32M5550, I can turn_on media_player (but for some reasons it doesn't turn on Xiaomi Mi Stick via HDMI CEC), but remote.turn_on raises NotImplementedError.

@msawatzky75
Copy link

It relies on WoL (Wake-on-LAN), not all devices support it (especially over Wi-Fi). Try sending a magic package from your pc and see if the television turns on. If it does not: try again with the device connected over ethernet. Please note the MAC address will be different.

magic packets to both WLAN and ETH interfaces on my TV did nothing. (i would like to clarify that this integration has turned on my TV until recently)

@msawatzky75
Copy link

Okay, and now that i've reset the network settings twice on the TV it works again. Although i've noticed that the TV won't respond to magic packets if the network interface is active. i've also found that the interface remains active for a short while after turning off the TV, and will remain active while off if continuously pinged.

@matped1810
Copy link

Hi,
Me too I have the same issue with a Q60AA. I can turn off the device but not able to turn it on. I get a failed to call service remote /turn.on unknown error. Thanks

@colalight890
Copy link

Hi,
any update about this?

@Sliderem
Copy link

Sliderem commented Apr 15, 2024

Hello I have the same issue on a Samsung The Frame, and it seems it is not from the Wake on LAN.

here is my Debug Log :

``
`Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/commands.py:239
integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 12:42:41 PM (6 occurrences)
Last logged: 1:03:14 PM

[547709800256]
[547514848960]
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 239, in handle_call_service
response = await hass.services.async_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2543, in async_call
response_data = await coro
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/core.py", line 2580, in _execute_service
return await target(service_call)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 971, in entity_service_call
single_response = await _handle_entity_call(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1043, in _handle_entity_call
result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1655, in async_turn_on
await self.hass.async_add_executor_job(ft.partial(self.turn_on, **kwargs))
File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1651, in turn_on
raise NotImplementedError
NotImplementedError`

@brehmium
Copy link

brehmium commented May 7, 2024

I have two entities from the SamsungTV integration. The media_player entity's power button does nothing.
The remote entity offers two buttons (one flash any one crossed out flash). Pressing the flag results in the error message "remote/turn_on unknown error" but changes the color of the icon.
On the other hand the crossed out flash switches the TV on and a second click off (without changing any icon colors or updating the recent change counter)

@chemelli74
Copy link
Contributor

@brehmium can I have some more details ? Screenshot of the 2 buttons, name of the entities you are referring to, etc.

@matped1810
Copy link

matped1810 commented May 8, 2024 via email

@chemelli74
Copy link
Contributor

@matped1810 please reply via web browser and not via email. Images are lost otherwise.

@epenet
Copy link
Contributor

epenet commented May 8, 2024

Note: turn_on was purposefully not implemented on the remote.
It is only implemented on the media player.

@matped1810
Copy link

matped1810 commented May 8, 2024 via email

@brehmium
Copy link

brehmium commented May 8, 2024

Here are screenshots from my dashboard and the entities:
Screenshot_20240508_100646_Home Assistant
Screenshot_20240508_100808_Home Assistant

I was not able to find anything on this in the logs.
Note that the media player entity is working as soon as the TV is switched on using the remote entity. The power button of the media player entity can be used to switch it off, but not on

@matped1810
Copy link

matped1810 commented May 8, 2024 via email

@epenet
Copy link
Contributor

epenet commented May 13, 2024

Adding these PRs for reference:

I think what is missing:

  • async_update (to set self._attr_is_on and show the state)
  • async_turn_on (and decide if that should be just the trigger, or also the wol)

@epenet
Copy link
Contributor

epenet commented May 14, 2024

I created PR #117403, if someone wants to try it.

@Bashewa
Copy link

Bashewa commented May 16, 2024

On and OFF works fine for me on Samsung new Q60CA and old 7 Series

Sometimes have to push twice, other times not, but for me it works, ( was also initially battling with "remote/turn_on unknown error" and just set up on both and tested a few times :)

Make sure the external device / tablet / wake on LAN setting is set on the TV settings
Grab the mac address from your DHCP router ( ensure its static IP too )
Check TV Entity id
And add below into automations or configurtaion.yaml as per
#https://www.home-assistant.io/integrations/samsungtv

Example configuration.yaml entry

wake_on_lan: # enables wake_on_lan integration

automation:

  • alias: "Turn On Living Room TV with WakeOnLan"
    trigger:
    • platform: samsungtv.turn_on
      entity_id: media_player.your-tvs-entity
      action:
    • service: wake_on_lan.send_magic_packet
      data:
      mac: aa:bb:cc:dd:ee:ff

@epenet
Copy link
Contributor

epenet commented May 22, 2024

#117403 has been merged.
Now waiting on #117909, and then I think we can close this ticket.

The functionnality will be available in 2024.6

@epenet
Copy link
Contributor

epenet commented May 22, 2024

Side note 1:

  • media_player/turn_on service works via Wake-On-Lan only for TVs that are connected via a wired connection. Wake-On-Lan is known to be unreliable on wireless connections.
    I believe this is the original issue for @ulliohura, and there is nothing we can do about it.

Side note 2:

  • remote/turn_on has never worked for SamsungTV (was not implemented), but will be solved in 2024.6 to have the same as media_player/turn_on

@epenet epenet closed this as completed May 22, 2024
@dvelaren
Copy link

I have two entities from the SamsungTV integration. The media_player entity's power button does nothing. The remote entity offers two buttons (one flash any one crossed out flash). Pressing the flag results in the error message "remote/turn_on unknown error" but changes the color of the icon. On the other hand the crossed out flash switches the TV on and a second click off (without changing any icon colors or updating the recent change counter)

Same problem

@epenet
Copy link
Contributor

epenet commented May 23, 2024

Please read the comments above
And please check again the documentation https://www.home-assistant.io/integrations/samsungtv/#turn-on-action

@home-assistant home-assistant locked as resolved and limited conversation to collaborators May 23, 2024
@home-assistant home-assistant unlocked this conversation May 23, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests