Nerwyn / android-tv-card

A completely customizable universal remote card for Home Assistant. Supports multiple platforms out of the box.
Apache License 2.0
246 stars 12 forks source link

2023 Samsung Frame TV cant switch to any app #142

Closed mhzawadi closed 1 month ago

mhzawadi commented 1 month ago

Checklist:

Release with the issue: 4.0.5

Last working release (if known): NA Browser and Operating System: Opera on MacOS 13

Description of problem: I cant switch to any of the apps on my 2023 Samsung Frame TV, nothing seems to work

Javascript errors shown in the web inspector (if applicable):

none

Your Full Remote Config

type: custom:android-tv-card
rows:
  - - power
    - home
    - menu
    - back
    - keyboard
  - - - volume_buttons
      - momentary_light
    - - disney
      - youtube
      - bbciplayer
      - kodi
    - - navigation_buttons
  - - play
    - numpad
    - pause
custom_actions:
  - type: button
    name: disney
    icon: disneyplus
    tap_action:
      action: perform-action
      perform_action: media_player.select_source
      target:
        entity_id: media_player.samsung_the_frame_43_dlna_2
      data:
        source: MCmYXNxgcu.DisneyPlus
    styles: ''
  - type: button
    name: bbciplayer
    icon: bbciplayer
    tap_action:
      action: source
      source: '3201601007670'
  - type: button
    name: youtube
    tap_action:
      action: source
      source: '111299001912'
    icon: mdi:youtube
  - type: button
    name: kodi
    tap_action:
      action: source
      source: ST_HDMI1
    icon: mdi:kodi
platform: Samsung TV
custom_icons:
  - path: >-
      M2.056 6.834C1.572 6.834 1 6.77 1 6.483c0-2.023 3.562-2.11 5.08-2.11c1.978
      0 4.506.614 6.66 1.384c3.277 1.188 9.917 5.145 9.917 9.674c0 4.001-4.31
      5.914-8.311 5.914a22 22 0 0 1-3.21-.33c-.066.243-.11.418-.264.924a4.3 4.3
      0 0
      1-.77.087l-.505-.043c-.33-.396-.44-1.033-.572-1.715c-2-1.165-3.298-2.155-3.891-2.836c-.506-.528-1.078-1.232-1.078-1.913c0-.351.22-.66.726-1.01c1.034-.77
      2.352-1.188 4.507-1.563l.044-.9c.022-.22.242-2.573.748-3.013c.813.66.901
      1.341.967 2.353c.022.44.044.901.11 1.385h.308c1.539 0 6.244.395 6.244
      2.616c0 .528-.77 1.517-1.518 1.517a1.9 1.9 0 0
      1-.966-.285c.329-.375.813-.704.945-.99c-.44-.528-2.814-1.143-4.551-1.143a4
      4 0 0 0-.572.022l.022 4.815c.703.44 1.561.483 2.11.483c2.42 0 7.431-.417
      7.431-4.331c0-3.87-4.946-6.86-8.64-8.266a21.4 21.4 0 0 0-7.937-1.496a7.2
      7.2 0 0 0-1.803.198c-.373.088-.505.176-.505.264c0
      .153.747.242.836.286a.22.22 0 0 1 .11.175a.26.26 0 0 1-.088.176c-.089
      0-.286.022-.528.022M9.2 14.551c-2.176.177-4.595.397-4.595 1.166c0 .594
      1.012 1.32 1.627 1.781a7.05 7.05 0 0 0 2.77
      1.319zm11.155-9.85c-.02.428-.042.942-.042 1.723c0 .3 0 .642.01
      1.027c-.042.193-.32.214-.46.278a1.2 1.2 0 0
      1-.256-.192V4.83c0-.29.01-.588.01-1.038c0-.225
      0-.482-.01-.792c0-.192.032-.374.15-.802a.34.34 0 0 1
      .3-.224c.245.064.491.17.577.374c-.257.76-.235 1.594-.279
      2.353m-.384-.085c.428.021.941.042 1.722.042c.3 0 .643 0
      1.027-.01c.193.041.215.32.279.459q-.078.141-.193.257H20.1c-.289
      0-.589-.01-1.037-.01c-.225 0-.482
      0-.792.01c-.193.002-.375-.03-.803-.149a.35.35 0 0
      1-.225-.299c.064-.246.172-.492.374-.578c.76.257 1.595.235 2.355.278z
    name: disneyplus
  - name: bbciplayer
    path: >-
      M8.315 0H2.382v6.022h5.933V3.506l9.618 8.45-9.618
      8.538V8.99H2.382V24h5.933l13.303-12.045Z
title: Living Room
remote_id: remote.samsung_the_frame_43_dlna
keyboard_id: remote.samsung_the_frame_43_dlna
media_player_id: media_player.samsung_the_frame_43_dlna_2

Additional information: QE43LS03BGUXXU by Samsung Electronics Firmware: T-PTMDEUC-1651.7|ST_ENERGY

I have looked about and found appIDs and app names, used both as an action source and an action media_player.select_source . but they dont work.

Basic functions do work, like the home button and volumes

Nerwyn commented 1 month ago

It looks like you're using custom actions for your sources. Have you tried calling them using the actions developer tool to make sure that they are correct?

Per the README, the key and source actions call the services remote.send_command and remote.turn_on. The Samsung TV integration supports key but not source, so you need to use the Perform action action with perform_action media_player.select_source for custom sources.

mhzawadi commented 1 month ago

Thanks for you help, but even media_player.select_source from the dev tools does nothing. I cant select an app for love nor money.

Have tried media_player.select_source with app name or ID and media_player.play_media with app ID and type of app.

using media_player.play_media with a type of channel and a number does work when in TV mode.

In the Samsung integration and clicking the TV item, the source list is just TV and HDMI image

Nerwyn commented 1 month ago

Reading more into the Samsung TV integration, it doesn't look like it actually lets you switch between apps. There is a custom integration that many people recommend for extended Samsung TV functionality including opening apps. Can you try using that? I may need to update the documentation to reflect this.

mhzawadi commented 1 month ago

Thanks for looking, will have a look and let you know if that works

mhzawadi commented 1 month ago

Have setup the extra HACS integration and have it working, I had to add the apps to the config of SamsungTV Smart Component

type: custom:android-tv-card
rows:
  - - power
    - home
    - menu
    - back
    - keyboard
  - - - volume_buttons
    - - disney
      - youtube
      - bbciplayer
      - kodi
    - - navigation_buttons
  - - play
    - numpad
    - pause
custom_actions:
  - type: button
    name: disney
    icon: disneyplus
    tap_action:
      action: perform-action
      perform_action: media_player.select_source
      target:
        entity_id: media_player.samsung_the_frame_43_dlna_2
      data:
        source: Disney+
    styles: ''
    entity_id: media_player.samsung_the_frame_43_dlna_2
  - type: button
    name: bbciplayer
    icon: bbciplayer
    tap_action:
      action: source
      source: '3201601007670'
  - type: button
    name: youtube
    tap_action:
      action: perform-action
      perform_action: media_player.select_source
      target:
        entity_id: media_player.samsung_the_frame_43_dlna_2
      data:
        source: YouTube
    icon: mdi:youtube
    entity_id: media_player.samsung_the_frame_43_dlna_2
  - type: button
    name: kodi
    tap_action:
      action: source
      source: ST_HDMI1
    icon: mdi:kodi
platform: Samsung TV
custom_icons:
  - path: >-
      M2.056 6.834C1.572 6.834 1 6.77 1 6.483c0-2.023 3.562-2.11 5.08-2.11c1.978
      0 4.506.614 6.66 1.384c3.277 1.188 9.917 5.145 9.917 9.674c0 4.001-4.31
      5.914-8.311 5.914a22 22 0 0 1-3.21-.33c-.066.243-.11.418-.264.924a4.3 4.3
      0 0
      1-.77.087l-.505-.043c-.33-.396-.44-1.033-.572-1.715c-2-1.165-3.298-2.155-3.891-2.836c-.506-.528-1.078-1.232-1.078-1.913c0-.351.22-.66.726-1.01c1.034-.77
      2.352-1.188 4.507-1.563l.044-.9c.022-.22.242-2.573.748-3.013c.813.66.901
      1.341.967 2.353c.022.44.044.901.11 1.385h.308c1.539 0 6.244.395 6.244
      2.616c0 .528-.77 1.517-1.518 1.517a1.9 1.9 0 0
      1-.966-.285c.329-.375.813-.704.945-.99c-.44-.528-2.814-1.143-4.551-1.143a4
      4 0 0 0-.572.022l.022 4.815c.703.44 1.561.483 2.11.483c2.42 0 7.431-.417
      7.431-4.331c0-3.87-4.946-6.86-8.64-8.266a21.4 21.4 0 0 0-7.937-1.496a7.2
      7.2 0 0 0-1.803.198c-.373.088-.505.176-.505.264c0
      .153.747.242.836.286a.22.22 0 0 1 .11.175a.26.26 0 0 1-.088.176c-.089
      0-.286.022-.528.022M9.2 14.551c-2.176.177-4.595.397-4.595 1.166c0 .594
      1.012 1.32 1.627 1.781a7.05 7.05 0 0 0 2.77
      1.319zm11.155-9.85c-.02.428-.042.942-.042 1.723c0 .3 0 .642.01
      1.027c-.042.193-.32.214-.46.278a1.2 1.2 0 0
      1-.256-.192V4.83c0-.29.01-.588.01-1.038c0-.225
      0-.482-.01-.792c0-.192.032-.374.15-.802a.34.34 0 0 1
      .3-.224c.245.064.491.17.577.374c-.257.76-.235 1.594-.279
      2.353m-.384-.085c.428.021.941.042 1.722.042c.3 0 .643 0
      1.027-.01c.193.041.215.32.279.459q-.078.141-.193.257H20.1c-.289
      0-.589-.01-1.037-.01c-.225 0-.482
      0-.792.01c-.193.002-.375-.03-.803-.149a.35.35 0 0
      1-.225-.299c.064-.246.172-.492.374-.578c.76.257 1.595.235 2.355.278z
    name: disneyplus
  - name: bbciplayer
    path: >-
      M8.315 0H2.382v6.022h5.933V3.506l9.618 8.45-9.618
      8.538V8.99H2.382V24h5.933l13.303-12.045Z
title: Living Room
remote_id: remote.samsung_the_frame_43_dlna_2
keyboard_id: remote.samsung_the_frame_43_dlna_2
media_player_id: media_player.samsung_the_frame_43_dlna_2
Nerwyn commented 1 month ago

I've updated the README to mention the Samsung TV custom integration.