ollo69/ha-samsungtv-smart

OSErrors when using send media key

Opened this issue · 6 comments

Describe the bug
A clear and concise description of what the bug is.

I noticed when trying to send media keys I'm getting OSErrors in the log. If I reload the integration sending keys works for awhile and eventually it stops and I get OSError.

It looks like Smartthings sees the TV as offline when it's not so the keys don't send which may be the cause of the OSError? Are the keys sent locally or to smart things API?

Expected behavior
If applicable, a clear and concise description of what you expected to happen.

Send media keys to always send when the TV is on.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment details:

  • Environment (HASSIO, Raspbian, etc): Home assistant Docker container
  • Home Assistant version installed: 2024.4.0
  • Component version installed: 0.13.1
  • Last know working version:
  • TV model: Q90CA

Output of HA logs
Paste the relavant output of the HA log here.

2024-02-25 16:46:00.455 DEBUG (SyncWorker_14) [custom_components.samsungtv_smart.api.samsungws] Sending key KEY_ENTER
2024-02-25 16:46:00.455 DEBUG (SyncWorker_14) [custom_components.samsungtv_smart.media_player] Error in send_command() -> OSError
2024-02-25 16:46:00.602 DEBUG (MainThread) [custom_components.samsungtv_smart.api.smartthings] {'deviceId': 'mytvid', 'state': 'OFFLINE', 'lastUpdatedDate': '2024-01-16T00:29:41.710Z'}
2024-02-25 16:46:05.267 DEBUG (MainThread) [custom_components.samsungtv_smart.api.smartthings] {'deviceId': 'mytvid', 'state': 'OFFLINE', 'lastUpdatedDate': '2024-02-15T06:39:50.790Z'}
2024-02-25 16:46:05.468 DEBUG (MainThread) [custom_components.samsungtv_smart.api.upnp] 
2024-02-25 16:46:05.669 DEBUG (MainThread) [custom_components.samsungtv_smart.api.upnp] 

Additional context
Add any other context about the problem here.

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days.

This issue was closed because it has been stalled for 7 days with no activity.

Still an issue can we re-open it?

@ollo69 should I open a new issue because this is still an issue and I can't reopen this one.

Ok, I reopen.
Sorry but I'm very busy with my job on last months so my activity on this repository is very limited.
Please next time remember just to give an "up" on the issue when you receive stale notification to avoid auto-closure.

Ok, I reopen.
Sorry but I'm very busy with my job on last months so my activity on this repository is very limited.
Please next time remember just to give an "up" on the issue when you receive stale notification to avoid auto-closure.

No worries thank you. I'll make sure to give a up when I get the stale notification.