core icon indicating copy to clipboard operation
core copied to clipboard

Samsung Smart TV UE65NU8000 reauthorisation

Open quantum-fc101 opened this issue 1 year ago • 13 comments

The problem

Hello,

The Samsung Smart TV integration keeps on asking for Re-Authorization from my living room TV.

image

I've tried restarting HA, deleting the device from the TV, disabling the integration yet it still keeps prompting.

Thanks

What version of Home Assistant Core has the issue?

N/A

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

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-11-12 11:30:38.691 WARNING (MainThread) [homeassistant.components.samsungtv] Failed to get remote for 10.0.10.235, re-authentication required: UnauthorizedError({'event': 'ms.channel.unauthorized'})
2024-11-12 11:38:48.554 DEBUG (MainThread) [homeassistant.components.samsungtv] Finished fetching samsungtv data in 0.000 seconds (success: True)
2024-11-12 11:38:51.928 DEBUG (MainThread) [homeassistant.components.samsungtv] Try config: {'name': 'HomeAssistant', 'host': '10.0.10.235', 'method': 'websocket', 'port': 8002, 'timeout': 31}
2024-11-12 11:38:51.929 DEBUG (MainThread) [samsungtvws.async_connection] WS url wss://10.0.10.235:8002/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==&token=None
2024-11-12 11:38:55.289 DEBUG (MainThread) [samsungtvws.helper] Processing API response: {"data":{"clients":[{"attributes":{"name":"W0hvbWUgQXNzaXN0YW50XSBTYW1zdW5nVFY=","token":"15025081"},"connectTime":1731411000820,"deviceName":"W0hvbWUgQXNzaXN0YW50XSBTYW1zdW5nVFY=","id":"6d761f39-6ac3-408e-af33-88e4da8317df","isHost":false},{"attributes":{"name":"SG9tZUFzc2lzdGFudA==","token":"None"},"connectTime":1731411531524,"deviceName":"SG9tZUFzc2lzdGFudA==","id":"7938e0b0-d334-4079-a374-44c7b1eb8916","isHost":false}],"id":"7938e0b0-d334-4079-a374-44c7b1eb8916","token":"17254708"},"event":"ms.channel.connect"}
2024-11-12 11:38:55.289 DEBUG (MainThread) [samsungtvws.connection] SamsungTVWS websocket event: {'data': {'clients': [{'attributes': {'name': 'W0hvbWUgQXNzaXN0YW50XSBTYW1zdW5nVFY=', 'token': '15025081'}, 'connectTime': 1731411000820, 'deviceName': 'W0hvbWUgQXNzaXN0YW50XSBTYW1zdW5nVFY=', 'id': '6d761f39-6ac3-408e-af33-88e4da8317df', 'isHost': False}, {'attributes': {'name': 'SG9tZUFzc2lzdGFudA==', 'token': 'None'}, 'connectTime': 1731411531524, 'deviceName': 'SG9tZUFzc2lzdGFudA==', 'id': '7938e0b0-d334-4079-a374-44c7b1eb8916', 'isHost': False}], 'id': '7938e0b0-d334-4079-a374-44c7b1eb8916', 'token': '17254708'}, 'event': 'ms.channel.connect'}
2024-11-12 11:38:55.290 DEBUG (MainThread) [samsungtvws.connection] Got token 17254708
2024-11-12 11:38:55.290 INFO (MainThread) [samsungtvws.connection] New token 17254708
2024-11-12 11:38:55.290 DEBUG (MainThread) [homeassistant.components.samsungtv] Working config: {'name': 'HomeAssistant', 'host': '10.0.10.235', 'method': 'websocket', 'port': 8002, 'timeout': 31}
2024-11-12 11:38:55.301 DEBUG (MainThread) [samsungtvws.async_connection] Connection closed.
2024-11-12 11:38:55.301 DEBUG (MainThread) [homeassistant.components.samsungtv] Skipping reload as its a token update
2024-11-12 11:38:55.304 DEBUG (MainThread) [homeassistant.components.samsungtv] Stopping SamsungTVBridge 10.0.10.235
2024-11-12 11:38:55.308 DEBUG (MainThread) [homeassistant.components.samsungtv] Checking if TV 10.0.10.235 is on using websocket
2024-11-12 11:38:55.309 DEBUG (MainThread) [homeassistant.components.samsungtv] Create SamsungTVWSBridge for 10.0.10.235
2024-11-12 11:38:55.309 DEBUG (MainThread) [samsungtvws.async_connection] WS url ws://10.0.10.235:8001/api/v2/channels/samsung.remote.control?name=SG9tZUFzc2lzdGFudA==
2024-11-12 11:38:55.330 DEBUG (MainThread) [samsungtvws.helper] Processing API response: {"event":"ms.channel.unauthorized"}
2024-11-12 11:38:55.330 DEBUG (MainThread) [samsungtvws.connection] SamsungTVWS websocket event: {'event': 'ms.channel.unauthorized'}
2024-11-12 11:38:55.330 DEBUG (MainThread) [samsungtvws.async_connection] Connection closed.
2024-11-12 11:38:55.331 WARNING (MainThread) [homeassistant.components.samsungtv] Failed to get remote for 10.0.10.235, re-authentication required: UnauthorizedError({'event': 'ms.channel.unauthorized'})
2024-11-12 11:38:55.331 DEBUG (MainThread) [homeassistant.components.samsungtv] Access denied in getting remote object
2024-11-12 11:38:55.334 DEBUG (MainThread) [homeassistant.components.samsungtv] Finished fetching samsungtv data in 0.025 seconds (success: True)

Additional information

No response

quantum-fc101 avatar Nov 12 '24 11:11 quantum-fc101

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)

home-assistant[bot] avatar Nov 12 '24 15:11 home-assistant[bot]

I have the same problem. Re authenticate constantly even after submitting. Slightly different model, Samsung Smart TV UE75NU7000

jumperr23 avatar Nov 27 '24 07:11 jumperr23

Is there any update regarding this issue? I'll buy you a coffee for fixing it. Thanks

quantum-fc101 avatar Dec 07 '24 14:12 quantum-fc101

Same thing with UN65NU7100

nitrousnrg avatar Dec 16 '24 01:12 nitrousnrg

Same thing with UN55NU7100

marko-vulovic avatar Jan 08 '25 13:01 marko-vulovic

Hi,

the TV is asking for reauth for some reason:

2024-11-12 11:38:55.330 DEBUG (MainThread) [samsungtvws.helper] Processing API response: {"event":"ms.channel.unauthorized"}

My model instead works fine, so I bet is a issue based on firmware model family . Seems all yours are quite similar in the end.

chemelli74 avatar Jan 08 '25 14:01 chemelli74

Started experiencing this issue just now. UA65TU8000

ghost avatar Jan 10 '25 11:01 ghost

I have the same with QE65Q70RATXXU

neilkplugins avatar Jan 22 '25 17:01 neilkplugins

Same

milandzuris avatar Feb 03 '25 05:02 milandzuris

I have the same with UE40NU7125

thierry5756 avatar Feb 10 '25 14:02 thierry5756

@chemelli74 @epenet something new?

milandzuris avatar Feb 11 '25 02:02 milandzuris

From what I can gather, this is NOT an issue with HomeAssistant.

It is more likely a firmware update on the TV that is causing issues with the underlying library https://github.com/xchwarze/samsung-tv-ws-api

I suggest that you take a look there at the examples and try to connect directly to the TV without going through Home Assistant:

  • using the latest v2.7.2 (which has updates from nov 2024)
  • using the oldish version v2.6.0 (previous version from may 2023)

epenet avatar Feb 11 '25 08:02 epenet

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.